KR20230041601A - Apparatus and method for encoding and decodng image using artificial intelligence - Google Patents

Apparatus and method for encoding and decodng image using artificial intelligence Download PDF

Info

Publication number
KR20230041601A
KR20230041601A KR1020220106058A KR20220106058A KR20230041601A KR 20230041601 A KR20230041601 A KR 20230041601A KR 1020220106058 A KR1020220106058 A KR 1020220106058A KR 20220106058 A KR20220106058 A KR 20220106058A KR 20230041601 A KR20230041601 A KR 20230041601A
Authority
KR
South Korea
Prior art keywords
image
current
optical flow
residual
feature data
Prior art date
Application number
KR1020220106058A
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/013650 priority Critical patent/WO2023043154A1/en
Publication of KR20230041601A publication Critical patent/KR20230041601A/en
Priority to US18/133,369 priority patent/US20230247212A1/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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/573Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/0093Geometric image transformation in the plane of the image for image warping, i.e. transforming by individually repositioning each pixel
    • G06T3/18
    • 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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • H04N19/147Data rate or code amount at the encoder output according to rate distortion criteria
    • 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/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter

Abstract

According to an embodiment, a method for decoding a video may comprise the steps of: obtaining feature data of a current optical flow and feature data of a current residual image from a bitstream; obtaining the current optical flow and first weight data by applying the feature data of the current optical flow to an optical flow decoder; obtaining the current residual image by applying the feature data of the current residual image to a residual decoder; obtaining a preliminary prediction image from a previous restored image based on the current optical flow; obtaining a final prediction image by applying sample values of the first weight data to sample values of the preliminary prediction image; and obtaining a current restored image corresponding to the current image by combining the final prediction image and the current residual image.

Description

AI를 이용하여 영상을 부호화 및 복호화하는 장치, 및 방법{APPARATUS AND METHOD FOR ENCODING AND DECODNG IMAGE USING ARTIFICIAL INTELLIGENCE}Apparatus and method for encoding and decoding images using AI

본 개시는 영상의 부호화 및 복호화에 관한 것이다. 보다 구체적으로, 본 개시는 AI(Artificial Intelligence), 예를 들어, 신경망을 이용하여 영상을 부호화 및 복호화하는 기술에 관한 것이다.The present disclosure relates to encoding and decoding of video. More specifically, the present disclosure relates to a technique for encoding and decoding an image using AI (Artificial Intelligence), eg, a neural network.

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 predicted and encoded through inter prediction or intra prediction. Predictive decoding is possible.

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

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

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

최근, AI(Artificial Intelligent)를 이용하여 영상을 부호화/복호화하는 기술들이 제안되고 있는데, AI, 예를 들어, 신경망을 이용하여 영상을 효과적으로 부호화/복호화하는 방안이 요구된다.Recently, technologies for encoding/decoding images using AI (Artificial Intelligent) have been proposed, and a method for effectively encoding/decoding images using AI, eg, a neural network, is required.

일 실시예에 따른 AI를 이용하는 영상 복호화 방법은, 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득하는 단계를 포함할 수 있다.An image decoding method using AI according to an embodiment may include acquiring feature data of a current optical flow and feature data of a current residual image from a bitstream.

상기 영상 복호화 방법은, 옵티컬 플로우 디코더에 상기 현재 옵티컬 플로우의 특징 데이터를 적용하여 상기 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하는 단계를 포함할 수 있다.The image decoding method may include obtaining the current optical flow and first weight data by applying feature data of the current optical flow to an optical flow decoder.

상기 영상 복호화 방법은, 잔차 디코더에 상기 현재 잔차 영상의 특징 데이터를 적용하여 상기 현재 잔차 영상을 획득하는 단계를 포함할 수 있다.The image decoding method may include obtaining the current residual image by applying feature data of the current residual image to a residual decoder.

상기 영상 복호화 방법은, 상기 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하는 단계를 포함할 수 있다.The image decoding method may include obtaining a preliminary prediction image from a previous reconstructed image based on the current optical flow.

상기 영상 복호화 방법은, 상기 예비 예측 영상의 샘플 값들에 상기 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하는 단계를 포함할 수 있다.The image decoding method may include obtaining a final prediction image by applying sample values of the first weight data to sample values of the preliminary prediction image.

상기 영상 복호화 방법은, 상기 최종 예측 영상과 상기 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득하는 단계를 포함할 수 있다.The image decoding method may include acquiring a current reconstructed image corresponding to the current image by combining the final prediction image and the current residual image.

일 실시예에 따른 AI를 이용하는 영상 복호화 장치는, 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득하는 획득부를 포함할 수 있다.An image decoding apparatus using AI according to an embodiment may include an acquisition unit that obtains feature data of a current optical flow and feature data of a current residual image from a bitstream.

상기 영상 복호화 장치는, 옵티컬 플로우 디코더에 상기 현재 옵티컬 플로우의 특징 데이터를 적용하여 상기 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하고, 잔차 디코더에 상기 현재 잔차 영상의 특징 데이터를 적용하여 상기 현재 잔차 영상을 획득하고, 상기 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하고, 상기 예비 예측 영상의 샘플 값들에 상기 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하고, 상기 최종 예측 영상과 상기 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득하는 예측 복호화부를 포함할 수 있다.The image decoding apparatus acquires the current optical flow and first weight data by applying feature data of the current optical flow to an optical flow decoder, and applies feature data of the current residual image to a residual decoder to obtain the current residual Obtaining an image, obtaining a preliminary prediction image from a previous reconstructed image based on the current optical flow, obtaining a final prediction image by applying sample values of the first weight data to sample values of the preliminary prediction image, A predictive decoding unit may be configured to obtain a current reconstructed image corresponding to the current image by combining the final predicted image and the current residual image.

일 실시예에 따른 AI를 이용하는 영상 부호화 방법은, 현재 영상 및 이전 복원 영상을 옵티컬 플로우 인코더에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득하는 단계를 포함할 수 있다.An image encoding method using AI according to an embodiment may include obtaining characteristic data of a current optical flow by applying a current image and a previous reconstructed image to an optical flow encoder.

상기 영상 부호화 방법은, 옵티컬 플로우 디코더에 상기 현재 옵티컬 플로우의 특징 데이터를 적용하여 상기 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하는 단계를 포함할 수 있다.The image encoding method may include obtaining the current optical flow and first weight data by applying feature data of the current optical flow to an optical flow decoder.

상기 영상 부호화 방법은, 상기 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하는 단계를 포함할 수 있다.The image encoding method may include obtaining a preliminary prediction image from a previous reconstructed image based on the current optical flow.

상기 영상 부호화 방법은, 상기 예비 예측 영상의 샘플 값들에 상기 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하는 단계를 포함할 수 있다.The image encoding method may include obtaining a final prediction image by applying sample values of the first weight data to sample values of the preliminary prediction image.

상기 영상 부호화 방법은, 상기 최종 예측 영상과 상기 현재 영상 사이의 차이에 해당하는 현재 잔차 영상을 획득하는 단계를 포함할 수 있다.The image encoding method may include obtaining a current residual image corresponding to a difference between the final prediction image and the current image.

상기 영상 부호화 방법은, 상기 현재 잔차 영상을 잔차 인코더에 적용하여 상기 현재 잔차 영상의 특징 데이터를 획득하는 단계를 포함할 수 있다.The image encoding method may include obtaining feature data of the current residual image by applying the current residual image to a residual encoder.

상기 영상 부호화 방법은, 상기 현재 옵티컬 플로우의 특징 데이터와 상기 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성하는 단계를 포함할 수 있다.The image encoding method may include generating a bitstream including feature data of the current optical flow and feature data of the current residual image.

일 실시예에 따른 AI를 이용하는 영상 부호화 장치는, 현재 영상 및 이전 복원 영상을 옵티컬 플로우 인코더에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득하고, 옵티컬 플로우 디코더에 상기 현재 옵티컬 플로우의 특징 데이터를 적용하여 상기 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하고, 상기 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하고, 상기 예비 예측 영상의 샘플 값들에 상기 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하고, 상기 최종 예측 영상과 상기 현재 영상 사이의 차이에 해당하는 현재 잔차 영상을 획득하고, 상기 현재 잔차 영상을 잔차 인코더에 적용하여 상기 현재 잔차 영상의 특징 데이터를 획득하는 예측 부호화부를 포함할 수 있다.An image encoding apparatus using AI according to an embodiment obtains feature data of a current optical flow by applying a current image and a previous reconstructed image to an optical flow encoder, and applies the feature data of the current optical flow to an optical flow decoder to obtain Obtaining the current optical flow and first weight data, obtaining a preliminary prediction image from a previous reconstructed image based on the current optical flow, and applying sample values of the first weight data to sample values of the preliminary prediction image Prediction of obtaining a final predicted image, obtaining a current residual image corresponding to a difference between the final predicted image and the current image, and obtaining feature data of the current residual image by applying the current residual image to a residual encoder It may include an encoding unit.

상기 영상 부호화 장치는, 상기 현재 옵티컬 플로우의 특징 데이터와 상기 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성하는 생성부를 포함할 수 있다.The image encoding apparatus may include a generator configured to generate a bitstream including feature data of the current optical flow and feature data of the current residual image.

일 실시예에 따른 AI를 이용하는 영상 복호화 방법은, 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득하는 단계를 포함할 수 있다.An image decoding method using AI according to an embodiment may include acquiring feature data of a current optical flow and feature data of a current residual image from a bitstream.

상기 영상 복호화 방법은, 옵티컬 플로우 디코더에 상기 현재 옵티컬 플로우의 특징 데이터를 적용하여 복수의 현재 옵티컬 플로우 및 복수의 제 2 가중치 데이터를 획득하는 단계를 포함할 수 있다.The image decoding method may include obtaining a plurality of current optical flows and a plurality of second weight data by applying characteristic data of the current optical flow to an optical flow decoder.

상기 영상 복호화 방법은, 잔차 디코더에 상기 현재 잔차 영상의 특징 데이터를 적용하여 상기 현재 잔차 영상을 획득하는 단계를 포함할 수 있다.The image decoding method may include obtaining the current residual image by applying feature data of the current residual image to a residual decoder.

상기 영상 복호화 방법은, 상기 복수의 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득하는 단계를 포함할 수 있다.The image decoding method may include acquiring a plurality of preliminary predicted images from a previous reconstructed image based on the plurality of current optical flows.

상기 영상 복호화 방법은, 상기 복수의 예비 예측 영상의 샘플 값들에 상기 복수의 제 2 가중치 데이터의 샘플 값들을 적용하여 복수의 변형된 예측 영상을 획득할 수 있다.The image decoding method may obtain a plurality of modified prediction images by applying sample values of the plurality of second weight data to sample values of the plurality of preliminary prediction images.

상기 영상 복호화 방법은, 상기 복수의 변형된 예측 영상을 결합하여 최종 예측 영상을 획득하는 단계를 포함할 수 있다.The image decoding method may include obtaining a final predicted image by combining the plurality of modified predicted images.

상기 영상 복호화 방법은, 상기 최종 예측 영상과 상기 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득하는 단계를 포함할 수 있다.The image decoding method may include acquiring a current reconstructed image corresponding to the current image by combining the final prediction image and the current residual image.

일 실시예에 따른 AI를 이용하는 영상 부호화 방법은, 현재 영상 및 이전 복원 영상을 옵티컬 플로우 인코더에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득하는 단계를 포함할 수 있다.An image encoding method using AI according to an embodiment may include obtaining characteristic data of a current optical flow by applying a current image and a previous reconstructed image to an optical flow encoder.

상기 영상 부호화 방법은, 옵티컬 플로우 디코더에 상기 현재 옵티컬 플로우의 특징 데이터를 적용하여 복수의 현재 옵티컬 플로우, 및 복수의 제 2 가중치 데이터를 획득하는 단계를 포함할 수 있다.The image encoding method may include obtaining a plurality of current optical flows and a plurality of second weight data by applying feature data of the current optical flow to an optical flow decoder.

상기 영상 부호화 방법은, 상기 복수의 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득하는 단계를 포함할 수 있다.The image encoding method may include acquiring a plurality of preliminary prediction images from a previous reconstructed image based on the plurality of current optical flows.

상기 영상 부호화 방법은, 상기 복수의 예비 예측 영상의 샘플 값들에 상기 복수의 제 2 가중치 데이터의 샘플 값들을 적용하여 복수의 변형된 예측 영상을 획득하는 단계를 포함할 수 있다.The image encoding method may include obtaining a plurality of modified prediction images by applying sample values of the plurality of second weight data to sample values of the plurality of preliminary prediction images.

상기 영상 부호화 방법은, 상기 복수의 변형된 예측 영상을 결합하여 최종 예측 영상을 획득하는 단계를 포함할 수 있다.The image encoding method may include obtaining a final predicted image by combining the plurality of transformed predicted images.

상기 영상 부호화 방법은, 상기 최종 예측 영상과 상기 현재 영상 사이의 차이에 해당하는 현재 잔차 영상을 획득하는 단계를 포함할 수 있다.The image encoding method may include obtaining a current residual image corresponding to a difference between the final predicted image and the current image.

상기 영상 부호화 방법은, 상기 현재 잔차 영상을 잔차 인코더에 적용하여 상기 현재 잔차 영상의 특징 데이터를 획득하는 단계를 포함할 수 있다.The image encoding method may include obtaining feature data of the current residual image by applying the current residual image to a residual encoder.

상기 영상 부호화 방법은, 상기 현재 옵티컬 플로우의 특징 데이터와 상기 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성하는 단계를 포함할 수 있다.The image encoding method may include generating a bitstream including feature data of the current optical flow and feature data of the current residual image.

도 1은 AI에 기반한 영상의 부호화 및 복호화 과정을 도시하는 도면이다.
도 2는 이전 복원 영상과 현재 영상을 예시하는 도면이다.
도 3은 이전 복원 영상과 현재 영상을 예시하는 도면이다.
도 4는 일 실시예에 따른 영상 부호화 및 복호화 과정을 설명하기 위한 도면이다.
도 5는 일 실시예에 따른 영상 부호화 및 복호화 과정을 설명하기 위한 도면이다.
도 6은 일 실시예에 따른 영상 복호화 장치의 구성을 도시하는 도면이다.
도 7은 일 실시예에 따른 획득부의 구성을 도시하는 도면이다.
도 8은 일 실시예에 따른 예측 복호화부의 구성을 도시하는 도면이다.
도 9는 일 실시예에 따른 예측 복호화부의 구성을 도시하는 도면이다.
도 10은 일 실시예에 따른 예측 복호화부의 구성을 도시하는 도면이다.
도 11은 일 실시예에 따른 예측 복호화부의 구성을 도시하는 도면이다.
도 12는 일 실시예에 따른 예측 복호화부의 구성을 도시하는 도면이다.
도 13은 일 실시예에 따른 영상 복호화 방법의 순서도이다.
도 14는 일 실시예에 따른 영상 복호화 방법의 순서도이다.
도 15는 일 실시예에 따른 영상 복호화 방법의 순서도이다.
도 16은 일 실시예에 따른 영상 부호화 장치의 구성을 도시하는 도면이다.
도 17은 일 실시예에 따른 예측 부호화부의 구성을 도시하는 도면이다.
도 18은 일 실시예에 따른 예측 부호화부의 구성을 도시하는 도면이다.
도 19는 일 실시예에 따른 생성부의 구성을 도시하는 도면이다.
도 20은 일 실시예에 따른 영상 부호화 방법의 순서도이다.
도 21은 일 실시예에 따른 영상 부호화 방법의 순서도이다.
도 22는 일 실시예에 따른 영상 부호화 방법의 순서도이다.
도 23은 일 실시예에 따른 신경망의 구조를 예시하는 도면이다.
도 24는 일 실시예에 따른 컨볼루션 레이어에서의 컨볼루션 연산을 설명하기 위한 도면이다.
도 25는 일 실시예에 따른 옵티컬 플로우 인코더, 옵티컬 플로우 디코더, 잔차 인코더 및 잔차 디코더의 훈련 방법을 설명하기 위한 도면이다.
도 26은 일 실시예에 따른 훈련 장치에 의한 옵티컬 플로우 인코더, 옵티컬 플로우 디코더, 잔차 인코더 및 잔차 디코더의 훈련 과정을 설명하기 위한 도면이다.
1 is a diagram illustrating a process of encoding and decoding an image based on AI.
2 is a diagram illustrating a previous reconstruction image and a current image.
3 is a diagram illustrating a previous reconstruction image and a current image.
4 is a diagram for explaining an image encoding and decoding process according to an exemplary embodiment.
5 is a diagram for explaining an image encoding and decoding process according to an exemplary embodiment.
6 is a diagram illustrating a configuration of a video decoding apparatus according to an exemplary embodiment.
7 is a diagram illustrating a configuration of an acquisition unit according to an exemplary embodiment.
8 is a diagram showing the configuration of a predictive decoding unit according to an embodiment.
9 is a diagram showing the configuration of a prediction decoding unit according to an embodiment.
10 is a diagram showing the configuration of a prediction decoding unit according to an embodiment.
11 is a diagram showing the configuration of a predictive decoding unit according to an embodiment.
12 is a diagram showing the configuration of a prediction decoding unit according to an embodiment.
13 is a flowchart of an image decoding method according to an embodiment.
14 is a flowchart of an image decoding method according to an embodiment.
15 is a flowchart of an image decoding method according to an embodiment.
16 is a diagram illustrating a configuration of an image encoding apparatus according to an exemplary embodiment.
17 is a diagram showing the configuration of a predictive encoder according to an embodiment.
18 is a diagram showing the configuration of a predictive encoder according to an embodiment.
19 is a diagram illustrating a configuration of a generation unit according to an embodiment.
20 is a flowchart of an image encoding method according to an embodiment.
21 is a flowchart of an image encoding method according to an embodiment.
22 is a flowchart of an image encoding method according to an embodiment.
23 is a diagram illustrating the structure of a neural network according to an embodiment.
24 is a diagram for explaining a convolution operation in a convolution layer according to an embodiment.
25 is a diagram for explaining a training method of an optical flow encoder, an optical flow decoder, a residual encoder, and a residual decoder according to an embodiment.
26 is a diagram for explaining a training process of an optical flow encoder, an optical flow decoder, a residual encoder, and a residual decoder by a training apparatus according to an exemplary embodiment.

본 개시는 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고, 이를 상세한 설명을 통해 설명하고자 한다. 그러나, 이는 본 개시의 실시 형태에 대해 한정하려는 것이 아니며, 본 개시는 여러 실시예들의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Since the present disclosure can make various changes and have various embodiments, specific embodiments are illustrated in the drawings and will be described through 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 the various embodiments.

실시예를 설명함에 있어서, 관련된 공지 기술에 대한 구체적인 설명이 본 개시의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 본 개시의 설명 과정에서 이용되는 숫자(예를 들어, 제 1, 제 2 등)는 하나의 구성요소를 다른 구성요소와 구분하기 위한 식별 기호에 불과하다.In describing the embodiments, 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 will be omitted. In addition, numbers (eg, first, second, etc.) used in the description process of the present disclosure are only identification symbols for distinguishing one component from another component.

본 개시에서, "a, b 또는 c 중 적어도 하나" 표현은 " a", " b", " c", "a 및 b", "a 및 c", "b 및 c", "a, b 및 c 모두", 혹은 그 변형들을 지칭할 수 있다.In this disclosure, the expression “at least one of a, b, or c” means “a”, “b”, “c”, “a and b”, “a and c”, “b and c”, “a, b” and c”, or variations thereof.

또한, 본 개시에서, 일 구성요소가 다른 구성요소와 "연결된다" 거나 "접속된다" 등으로 언급된 때에는, 상기 일 구성요소가 상기 다른 구성요소와 직접 연결되거나 또는 직접 접속될 수도 있지만, 특별히 반대되는 기재가 존재하지 않는 이상, 중간에 또 다른 구성요소를 매개하여 연결되거나 또는 접속될 수도 있다고 이해되어야 할 것이다.In addition, in the present disclosure, when one component is referred to as "connected" or "connected" to another component, the one component may be directly connected or directly connected to the other component, but in particular Unless otherwise described, it should be understood that they may be connected or connected via another component in the middle.

또한, 본 개시에서 '~부(유닛)', '모듈' 등으로 표현되는 구성요소는 2개 이상의 구성요소가 하나의 구성요소로 합쳐지거나 또는 하나의 구성요소가 보다 세분화된 기능별로 2개 이상으로 분화될 수도 있다. 또한, 이하에서 설명할 구성요소 각각은 자신이 담당하는 주기능 이외에도 다른 구성요소가 담당하는 기능 중 일부 또는 전부의 기능을 추가적으로 수행할 수도 있으며, 구성요소 각각이 담당하는 주기능 중 일부 기능이 다른 구성요소에 의해 전담되어 수행될 수도 있음은 물론이다.In addition, in the present disclosure, components expressed as '~ unit (unit)', 'module', etc., are two or more components combined into one component, or one component is divided into two or more for each 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 its own main function, and some of the main functions of each component may be different from other components. Of course, it may be performed exclusively by a component.

또한, 본 개시에서, '영상(image)'은 정지 영상, 픽처, 프레임, 복수의 연속된 정지 영상으로 구성된 동영상, 또는 비디오를 나타낼 수 있다.In addition, in the present disclosure, an 'image' may indicate a still image, a picture, a frame, a motion picture composed of a plurality of continuous still images, or a video.

또한, 본 개시에서 '신경망(neural network)'은 뇌 신경을 모사한 인공 신경망 모델의 대표적인 예시로서, 특정 알고리즘을 사용한 인공 신경망 모델로 한정되지 않는다. 신경망은 심층 신경망(deep neural network)으로 참조될 수도 있다.In addition, in the present disclosure, a 'neural network' is a representative example of an artificial neural network model that mimics a cranial 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)를 통해 갱신될 수 있다.Also, in the present disclosure, a 'parameter' is a value used in an operation process of each layer constituting a neural network, and may be used, for example, when an input value is applied to a predetermined operation expression. A parameter is a value set as a result of training and can be updated through separate training data as needed.

또한, 본 개시에서 '특징 데이터'는 신경망 기반의 인코더가 입력 데이터를 처리함으로써 획득되는 데이터를 의미한다. 특징 데이터는 여러 샘플들을 포함하는 1차원 또는 2차원의 데이터일 수 있다. 특징 데이터는 잠재 표현(latent representation)으로 참조될 수도 있다. 특징 데이터는 후술하는 디코더가 출력하는 데이터에 잠재된 특징을 나타낼 수 있다.Also, in the present disclosure, 'feature data' refers to data obtained by a neural network-based encoder processing input data. 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 may indicate features latent in data output by a decoder described later.

또한, 본 개시에서 '현재 영상'은 현재의 처리 대상인 영상을 의미하고, '이전 영상'은 현재 영상 이전의 처리 대상인 영상을 의미한다. 또한, '현재 옵티컬 플로우' 및 '현재 잔차 영상'은 각각 현재 영상의 처리를 위해 획득된 옵티컬 플로우 및 잔차 영상을 의미한다. In addition, in the present disclosure, 'current image' means an image that is a current processing target, and 'previous image' means an image that is a processing target before the current image. Also, 'current optical flow' and 'current residual image' refer to optical flow and residual images obtained for processing the current image, respectively.

또한, 본 개시에서, '샘플'은 영상, 특징 맵, 특징 데이터 또는 가중치 데이터 내의 샘플링 위치에 할당된 데이터로서 처리 대상이 되는 데이터를 의미한다. 예를 들어, 샘플은 2차원의 영상 내 픽셀을 포함할 수 있다.In addition, in the present disclosure, 'sample' refers to data to be processed as data allocated to a sampling position in an image, feature map, feature data, or weight data. For example, a sample may include a pixel in a 2D image.

도 1은 AI에 기반한 영상의 부호화 및 복호화 과정을 도시하는 도면이다.1 is a diagram illustrating a process of encoding and decoding an image based on AI.

도 1은 인터 예측 과정을 도시하고 있는데, 인터 예측에서는 옵티컬 플로우 인코더(110), 잔차 인코더(130), 옵티컬 플로우 디코더(150) 및 잔차 디코더(170)가 이용될 수 있다.1 illustrates an inter prediction process. In inter prediction, an optical flow encoder 110, a residual encoder 130, an optical flow decoder 150, and a residual decoder 170 may be used.

옵티컬 플로우 인코더(110), 잔차 인코더(130), 옵티컬 플로우 디코더(150) 및 잔차 디코더(170)는 신경망으로 구현될 수 있다.The optical flow encoder 110, the residual encoder 130, the optical flow decoder 150, and the residual decoder 170 may be implemented as a neural network.

옵티컬 플로우 인코더(110)와 옵티컬 플로우 디코더(150)는 현재 영상(10)과 이전 복원 영상(30)으로부터 현재 옵티컬 플로우(g)를 추출하기 위한 신경망으로 이해될 수 있다.The optical flow encoder 110 and the optical flow decoder 150 may be understood as neural networks for extracting the current optical flow g from the current image 10 and the previous reconstructed image 30 .

잔차 인코더(130)와 잔차 디코더(170)는 잔차 영상(r)의 부호화 및 복호화를 위한 신경망으로 이해될 수 있다.The residual encoder 130 and the residual decoder 170 may be understood as neural networks for encoding and decoding the residual image r.

전술한 바와 같이, 인터 예측은 현재 영상(10)과 이전 복원 영상(30) 사이의 시간적 중복성을 이용하여 현재 영상(10)을 부호화 및 복호화하는 과정이다. 이전 복원 영상(30)은 현재 영상(10)의 처리 전에 처리 대상이었던 이전 영상에 대한 복호화를 통해 획득된 영상일 수 있다.As described above, inter prediction is a process of encoding and decoding the current image 10 by using temporal redundancy between the current image 10 and the previous reconstruction image 30 . The previous reconstructed image 30 may be an image obtained by decoding a previous image that was a processing target before processing the current image 10 .

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

현재 옵티컬 플로우(g)는 이전 복원 영상(30) 내 샘플들의 위치가 현재 영상(10) 내에서 어떻게 변경되었는지, 또는 현재 영상(10)의 샘플들과 동일/유사한 샘플들이 이전 복원 영상(30) 내 어디에 위치하는지를 나타낼 수 있다.The current optical flow (g) indicates how the positions of samples in the previous reconstructed image 30 are changed within the current image 10, or whether samples identical/similar to those of the current image 10 are included in the previous reconstructed image 30. I can indicate where I am.

예를 들어, 현재 영상(10) 내 (1, 1)에 위치한 샘플과 동일 또는 가장 유사한 샘플이 이전 복원 영상(30)에서 (2, 1)에 위치한다면, 해당 샘플에 대한 옵티컬 플로우 또는 움직임 벡터는 (1(=2-1), 0(=1-1))으로 도출될 수 있다.For example, if the same or most similar sample as the sample located at (1, 1) in the current image 10 is located at (2, 1) in the previous reconstruction image 30, the optical flow or motion vector for the sample can be derived as (1(=2-1), 0(=1-1)).

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

구체적으로, 이전 복원 영상(30)과 현재 영상(10)이 옵티컬 플로우 인코더(110)로 입력될 수 있다. 옵티컬 플로우 인코더(110)는 훈련의 결과로 설정된 파라미터에 따라 현재 영상(10)과 이전 복원 영상(30)을 처리하여 현재 옵티컬 플로우의 특징 데이터(w)를 출력할 수 있다.Specifically, the previous reconstructed image 30 and the current image 10 may be input to the optical flow encoder 110 . The optical flow encoder 110 may output feature data w of the current optical flow by processing the current image 10 and the previous reconstructed image 30 according to parameters set as a result of training.

현재 옵티컬 플로우의 특징 데이터(w)는 옵티컬 플로우 디코더(150)로 입력될 수 있다. 옵티컬 플로우 디코더(150)는 입력된 특징 데이터(w)를 훈련의 결과로 설정된 파라미터에 따라 처리하여 현재 옵티컬 플로우(g)를 출력할 수 있다.Characteristic data w of the current optical flow may be input to the optical flow decoder 150 . The optical flow decoder 150 may output the current optical flow g by processing the input feature data w according to parameters set as a training result.

이전 복원 영상(30)은 현재 옵티컬 플로우(g)에 기반한 워핑(190)을 통해 워핑되고(warped), 워핑(190)의 결과로 현재 예측 영상(x')이 획득될 수 있다. 워핑(190)이란, 영상 내 샘플들의 위치를 이동시키는 기하학적 변형의 한 종류이다. The previous reconstructed image 30 is warped through warping 190 based on the current optical flow g, and as a result of the warping 190, a current prediction image x' may be obtained. Warping 190 is a type of geometric transformation that moves the positions of samples in an image.

이전 복원 영상(30) 내 샘플들과 현재 영상(10) 내 샘플들 사이의 상대적인 위치 관계를 나타내는 현재 옵티컬 플로우(g)에 따라 이전 복원 영상(30)에 대해 워핑(190)이 적용됨으로써 현재 영상(10)과 유사한 현재 예측 영상(x')이 획득될 수 있다. Warping 190 is applied to the previous reconstructed image 30 according to the current optical flow (g) representing the relative positional relationship between the samples in the previous reconstructed image 30 and the samples in the current image 10, resulting in a current image A current prediction image (x') similar to (10) can be obtained.

예를 들어, 이전 복원 영상(30) 내 (1, 1)에 위치한 샘플이 현재 영상(10) 내 (2, 1)에 위치하는 샘플과 가장 유사하다면, 워핑(190)을 통해 이전 복원 영상(30) 내 (1, 1)에 위치한 샘플의 위치가 (2, 1)로 변경될 수 있다.For example, if the sample located at (1, 1) in the previous reconstruction image 30 is most similar to the sample located at (2, 1) in the current image 10, the previous reconstruction image ( 30), the position of the sample located at (1, 1) can be changed to (2, 1).

이전 복원 영상(30)으로부터 생성된 현재 예측 영상(x')은 현재 영상(10) 자체가 아니므로, 현재 예측 영상(x')과 현재 영상(10) 사이의 현재 잔차 영상(r)이 획득될 수 있다. Since the current predicted image (x') generated from the previous reconstructed image (30) is not the current image (10) itself, the current residual image (r) between the current predicted image (x') and the current image (10) is obtained. It can be.

예를 들어, 현재 영상(10) 내 샘플 값들로부터 현재 예측 영상(x') 내 샘플 값들을 차감함으로써 현재 잔차 영상(r)이 획득될 수 있다.For example, the current residual image r may be obtained by subtracting sample values in the current predicted image (x′) from sample values in the current image 10 .

현재 잔차 영상(r)은 잔차 인코더(130)로 입력될 수 있다. 잔차 인코더(130)는 훈련의 결과로 설정된 파라미터에 따라 현재 잔차 영상(r)을 처리하여 현재 잔차 영상의 특징 데이터(v)를 출력할 수 있다.The current residual image r may be input to the residual encoder 130 . The residual encoder 130 may process the current residual image r according to parameters set as a result of training and output feature data v of the current residual image.

현재 잔차 영상의 특징 데이터(v)는 잔차 디코더(170)로 입력될 수 있다. 잔차 디코더(170)는 입력된 특징 데이터(v)를 훈련의 결과로 설정된 파라미터에 따라 처리하여 복원된 현재 잔차 영상(r')을 출력할 수 있다.Feature data (v) of the current residual image may be input to the residual decoder 170 . The residual decoder 170 may output a restored current residual image r′ by processing the input feature data v according to a parameter set as a result of training.

현재 예측 영상(x')과 복원된 현재 잔차 영상(r')이 결합됨으로써 현재 복원 영상(50)이 획득될 수 있다.A current reconstructed image 50 may be obtained by combining the current predicted image (x') and the reconstructed current residual image (r').

도 1에 도시된 영상의 부호화 및 복호화 과정이 부호화 장치 및 복호화 장치로 구현되는 경우, 부호화 장치는 현재 영상(10)에 대한 부호화 과정을 통해 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)를 획득할 수 있다. 그리고, 부호화 장치는 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)에 대해 변환 및/또는 양자화를 적용하고, 변환 및/또는 양자화의 결과를 포함하는 비트스트림을 생성하여 복호화 장치로 전송할 수 있다. 복호화 장치는 비트스트림으로부터 추출된 데이터에 대해 역양자화 및/또는 역변환을 적용하여 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)를 획득할 수 있다. 그리고, 복호화 장치는 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)를 옵티컬 플로우 디코더(150) 및 잔차 디코더(170)로 처리하여 현재 복원 영상(50)을 획득할 수 있다.When the encoding and decoding processes of the image shown in FIG. 1 are implemented by an encoding device and a decoding device, the encoding device converts the characteristic data w of the current optical flow and the current residual image through the encoding process of the current image 10. Feature data (v) may be acquired. Then, the encoding device applies transform and/or quantization to feature data (w) of the current optical flow and feature data (v) of the current residual image, and generates a bitstream including a result of the transform and/or quantization, It can be transmitted to the decryption device. The decoding apparatus may obtain feature data (w) of the current optical flow and feature data (v) of the current residual image by applying inverse quantization and/or inverse transformation to data extracted from the bitstream. In addition, the decoding apparatus may process the feature data (w) of the current optical flow and the feature data (v) of the current residual image by the optical flow decoder 150 and the residual decoder 170 to obtain the current reconstructed image 50. there is.

전술한 바와 같이, 현재 영상(10)과 현재 예측 영상(x') 사이의 현재 잔차 영상(r)이 잔차 인코더(130)로 입력되고, 잔차 인코더(130)에 의해 현재 잔차 영상의 특징 데이터(v)가 획득될 수 있다. 현재 잔차 영상의 특징 데이터(v)는 소정의 처리를 거친 후 비트스트림에 포함되므로, 비트스트림의 크기를 감소시키기 위해서는 현재 잔차 영상의 특징 데이터(v)의 크기, 더 나아가 현재 잔차 영상(r)의 샘플 값들의 크기를 감소시킬 필요가 있다. 그러나, 현재 옵티컬 플로우(g)가 부정확하다면, 현재 영상(10)과 현재 예측 영상(x') 사이의 차이가 커질 수 밖에 없으므로, 부정확한 현재 옵티컬 플로우(g)는 비트스트림의 크기를 증가시키는 요인이 된다.As described above, the current residual image r between the current image 10 and the current predicted image x' is input to the residual encoder 130, and the feature data of the current residual image ( v) can be obtained. Since the feature data (v) of the current residual image is included in the bitstream after a predetermined process, in order to reduce the size of the bitstream, the size of the feature data (v) of the current residual image, furthermore, the current residual image (r) It is necessary to reduce the size of the sample values of . However, if the current optical flow (g) is inaccurate, the difference between the current image 10 and the current predicted image (x') inevitably increases, so the inaccurate current optical flow (g) increases the size of the bitstream become a factor

현재 옵티컬 플로우(g)는 옵티컬 플로우 인코더(110)와 옵티컬 플로우 디코더(150)의 처리 능력의 한계로 인해 부정확하게 획득될 수 있지만, 경우에 따라 이전 복원 영상(30)과 현재 영상(10)에 포함된 객체들의 움직임으로 인해 정확도가 떨어질 수 있고, 이에 따라 현재 예측 영상(x')의 퀄리티도 낮아질 수 있다.The current optical flow (g) may be obtained inaccurately due to limitations in the processing capabilities of the optical flow encoder 110 and the optical flow decoder 150, but in some cases, the previous reconstruction image 30 and the current image 10 Accuracy may decrease due to movement of included objects, and accordingly, the quality of the current predicted image (x') may also decrease.

도 2 및 도 3을 참조하여 낮은 퀄리티의 현재 옵티컬 플로우(g)가 획득될 수 있는 케이스에 대해 설명한다.A case in which a current optical flow g of low quality can be obtained will be described with reference to FIGS. 2 and 3 .

도 2는 이전 복원 영상(30)과 현재 영상(10)을 예시하는 도면이다.2 is a diagram illustrating a previous reconstruction image 30 and a current image 10 .

연속된 영상들에 포함되는 객체들의 움직임은 다양할 수 있다. 여기서, 객체는 샘플 또는 샘플들의 집합을 의미할 수 있다. Movements of objects included in consecutive images may vary. Here, an object may mean a sample or a set of samples.

예를 들어, 연속된 영상들에 포함된 어느 객체의 움직임은 클 수 있고, 다른 객체의 움직임은 작을 수 있다. 또한, 예를 들어, 어느 하나의 영상에 포함된 객체는 이전 영상 또는 다음 영상에 존재하지 않을 수도 있다. For example, the movement of one object included in the continuous images may be large, and the movement of another object may be small. Also, for example, an object included in any one image may not exist in the previous or next image.

소정 객체의 움직임이 크다는 것은 연속된 영상들 내에서의 소정 객체의 위치 차이가 크다는 것을 의미하고, 소정 객체의 움직임이 작다는 것은 연속된 영상들 내에서의 소정 객체의 위치 차이가 작다는 것을 의미할 수 있다.A large movement of a predetermined object means that the positional difference of the predetermined object within consecutive images is large, and a small movement of a predetermined object means that the positional difference of the predetermined object within consecutive images is small. can do.

영상들에 포함된 객체들의 다양한 움직임과 오클루젼으로 인해 현재 영상(10)과 이전 복원 영상(30)으로부터 획득되는 현재 옵티컬 플로우(g)가 부정확해질 수 있다.The current optical flow g obtained from the current image 10 and the previous reconstructed image 30 may become inaccurate due to various motions and occlusion of objects included in the images.

도 2를 참조하면, 현재 영상(10) 내 A-1 영역에 포함된 객체의 위치와 이전 복원 영상(30) 내 A-2 영역에 포함된 동일 객체의 위치 사이의 차이가 크지 않다면, 해당 객체의 움직임은 작다고 할 수 있다. 움직임이 작은 객체에 대해서는 현재 옵티컬 플로우(g)가 비교적 정확하게 측정될 수 있다. 왜냐하면, 현재 영상(10) 내 A-1 영역에 포함된 객체의 움직임 벡터를 획득하기 위해 이전 복원 영상(30) 내에서 A-1 영역에 대응하는 영역의 주변만을 탐색하면 되기 때문이다.Referring to FIG. 2 , if the difference between the position of an object included in area A-1 in the current image 10 and the position of the same object included in area A-2 in the previous reconstructed image 30 is not large, the corresponding object movement can be considered small. For an object with small motion, the current optical flow (g) can be measured relatively accurately. This is because only the periphery of the area corresponding to area A-1 in the previous reconstructed image 30 needs to be searched to obtain the motion vector of the object included in area A-1 in the current image 10 .

또한, 현재 영상(10) 내 B-1 영역에 포함된 객체의 위치와 이전 복원 영상(30) 내 B-2 영역에 포함된 동일 객체의 위치 사이의 차이가 크다면, 해당 객체의 움직임은 크다고 할 수 있다. 움직임이 큰 객체에 대해서는 현재 옵티컬 플로우(g)가 정확하게 측정되기 어렵다. 왜냐하면, 현재 영상(10) 내 B-1 영역에 포함된 객체의 움직임 벡터를 획득하기 위해 이전 복원 영상(30) 내에서 B-1 영역에 대응하는 영역의 주변을 탐색하더라도 B-1 영역에 포함된 객체와 동일 객체(즉, B-2 영역에 포함된 객체)를 찾기 어렵기 때문이다.In addition, if the difference between the position of an object included in area B-1 in the current image 10 and the position of the same object included in area B-2 in the previous reconstructed image 30 is large, the movement of the corresponding object is considered to be large. can do. Currently, it is difficult to accurately measure the optical flow (g) for a moving object. Because, in order to obtain a motion vector of an object included in area B-1 in the current image 10, even if the area corresponding to area B-1 is searched in the previous reconstructed image 30, it is included in area B-1. This is because it is difficult to find the same object (ie, an object included in the B-2 area).

또한, 현재 영상(10) 내 C 영역에 포함된 객체가 이전 복원 영상(30)에는 포함되어 있지 않을 수도 있다. 다시 말하면, C 영역에 포함된 객체가 이전 복원 영상(30)에서 오클루젼(occluded)되어 있을 수 있다. 이 경우, 현재 영상(10) 내 C 영역에 포함된 객체와 동일/유사한 객체를 이전 복원 영상(30) 내에서 찾기 어렵다.In addition, the object included in region C in the current image 10 may not be included in the previous reconstruction image 30 . In other words, an object included in region C may be occluded in the previous reconstruction image 30 . In this case, it is difficult to find an object identical/similar to an object included in region C in the current image 10 in the previous reconstruction image 30 .

움직임이 작은 객체의 경우에는 움직임 벡터가 비교적 정확하게 산출될 수 있으므로, 해당 객체에 대해 인터 예측을 적용하는 경우 부호화/복호화 효율이 높아질 수 있다. 여기서, 부호화/복호화 효율이 높다는 것은 비트스트림의 비트레이트가 작아지고, 복원된 객체의 퀄리티가 높아진다는 것을 의미한다.In the case of an object with small motion, since a motion vector can be calculated relatively accurately, encoding/decoding efficiency can be increased when inter prediction is applied to the object. Here, high encoding/decoding efficiency means that the bitrate of a bitstream is reduced and the quality of a reconstructed object is increased.

반대로, 움직임이 큰 객체이거나, 오클루젼된 객체의 경우에는 움직임 벡터가 정확하게 산출되기 어려우므로, 해당 객체에 대해 인터 예측을 적용하는 경우 부호화/복호화 효율이 낮아지게 된다.Conversely, in the case of an object with large motion or an occluded object, since it is difficult to accurately calculate a motion vector, encoding/decoding efficiency is reduced when inter prediction is applied to the corresponding object.

한편, 현재 영상(10)에 포함된 객체들의 움직임이 거의 없거나, 현재 영상(10)에 포함된 객체들이 이전 복원 영상(30) 내에서 오클루젼되어 있지 않더라도 인터 예측을 적용하기에 적절하지 않은 경우가 있을 수 있다.On the other hand, even if there is little movement of objects included in the current image 10 or objects included in the current image 10 are not occluded in the previous reconstructed image 30, it is not appropriate to apply inter prediction. There may be cases.

도 3을 참조하면, 현재 영상(10) 내 R-1 영역에 포함된 객체와 이전 복원 영상(30) 내 R-2 영역에 포함된 동일 객체의 위치 차이가 없거나 매우 작더라도 R-1 영역에 포함된 객체의 밝기와 이전 복원 영상(30) 내 R-2 영역에 포함된 객체의 밝기의 차이가 크다면, 해당 객체에 대해 인터 예측을 적용하기에 적절하지 않을 수 있다. Referring to FIG. 3 , even if there is no or very small difference in position between an object included in area R-1 in the current image 10 and the same object included in area R-2 in the previous reconstruction image 30, the object is located in area R-1. If the difference between the brightness of an included object and the brightness of an object included in the R-2 region in the previous reconstructed image 30 is large, it may not be appropriate to apply inter prediction to the object.

도 1을 참조하여 설명한 바와 같이, 이전 복원 영상(30)에 대한 워핑(190)을 통해 생성되는 현재 예측 영상(x')과 현재 영상(10) 사이의 차이에 해당하는 현재 잔차 영상(r)이 잔차 인코더(130)로 입력될 수 있다. 이때, 현재 영상(10) 내 특정 객체의 밝기 값과 이전 복원 영상(30) 내 동일 객체의 밝기 값의 차이가 크다면, 현재 영상(10) 내 샘플 값들과 이전 복원 영상(30)으로부터 생성된 현재 예측 영상(x') 내 동일 위치의 샘플 값들 사이의 차이도 커지게 되고, 그 결과 현재 잔차 영상(r)의 샘플 값이 커지게 된다. 즉, 연속된 영상들에서 객체의 밝기 값의 변화가 크다면 해당 객체에 인터 예측을 적용하더라도 부호화/복호화 효율을 증가시키기는 어려울 수 있다.As described with reference to FIG. 1, the current residual image (r) corresponding to the difference between the current predicted image (x') and the current image (10) generated through the warping (190) of the previous reconstructed image (30) This residual may be input to the encoder 130. At this time, if the difference between the brightness value of a specific object in the current image 10 and the brightness value of the same object in the previous reconstructed image 30 is large, the sample values in the current image 10 and the previous reconstructed image 30 generate A difference between sample values at the same position in the current prediction image (x') also increases, and as a result, the sample value of the current residual image (r) increases. That is, if the change in the brightness value of an object in consecutive images is large, it may be difficult to increase encoding/decoding efficiency even if inter prediction is applied to the corresponding object.

전술한 바와 같이, 연속된 영상들에 포함된 어떤 객체에 대해서는 인터 예측을 적용하는 경우 부호화/복호화 효율이 높아지고, 어떤 객체에 대해서는 인터 예측을 적용하는 경우 부호화/복호화 효율이 낮아질 수 있다. As described above, encoding/decoding efficiency may increase when inter prediction is applied to an object included in consecutive images, and encoding/decoding efficiency may decrease when inter prediction is applied to an object.

따라서, 현재 예측 영상(x')을 그대로 이용하는 것보다 현재 예측 영상(x')을 객체의 특성에 맞춰 변형하고, 변형된 예측 영상을 이용함으로써 부호화/복호화 효율을 향상시킬 수 있다.Therefore, rather than using the current predicted image (x') as it is, encoding/decoding efficiency can be improved by transforming the current predicted image (x') according to the characteristics of the object and using the modified predicted image.

도 4는 일 실시예에 따른 영상 부호화 및 복호화 과정을 설명하기 위한 도면이다.4 is a diagram for explaining an image encoding and decoding process according to an exemplary embodiment.

도 4를 참조하면, 영상의 부호화 및 복호화에 옵티컬 플로우 인코더(410), 옵티컬 플로우 디코더(450), 잔차 인코더(430) 및 잔차 디코더(470)가 이용될 수 있다. Referring to FIG. 4 , an optical flow encoder 410 , an optical flow decoder 450 , a residual encoder 430 , and a residual decoder 470 may be used to encode and decode an image.

일 실시예에서, 옵티컬 플로우 인코더(410), 옵티컬 플로우 디코더(450), 잔차 인코더(430) 및 잔차 디코더(470)는 신경망으로 구현될 수 있다.In one embodiment, the optical flow encoder 410, the optical flow decoder 450, the residual encoder 430, and the residual decoder 470 may be implemented as a neural network.

현재 영상(420)의 부호화를 위해 이전 복원 영상(440)과 현재 영상(420)이 옵티컬 플로우 인코더(410)로 입력될 수 있다. 옵티컬 플로우 인코더(410)는 훈련의 결과로 설정된 파라미터에 따라 현재 영상(420)과 이전 복원 영상(440)을 처리하여 현재 옵티컬 플로우의 특징 데이터(w)를 출력할 수 있다.For encoding of the current image 420 , the previous reconstructed image 440 and the current image 420 may be input to the optical flow encoder 410 . The optical flow encoder 410 may output feature data w of the current optical flow by processing the current image 420 and the previous reconstructed image 440 according to parameters set as a result of training.

현재 옵티컬 플로우의 특징 데이터(w)는 옵티컬 플로우 디코더(450)로 입력될 수 있다.Characteristic data w of the current optical flow may be input to the optical flow decoder 450 .

옵티컬 플로우 디코더(450)는 입력된 특징 데이터(w)를 훈련의 결과로 설정된 파라미터에 따라 처리하여 현재 옵티컬 플로우(g)를 출력할 수 있다.The optical flow decoder 450 may output the current optical flow g by processing the input feature data w according to parameters set as a training result.

옵티컬 플로우 디코더(450)는 현재 옵티컬 플로우(g)와 별개로 제 1 가중치 데이터(t1)를 출력할 수 있다. 제 1 가중치 데이터(t1)는 워핑(490)을 통해 생성된 예비 예측 영상(preliminary prediction image)(x')을 변형하는데 이용된다.The optical flow decoder 450 may output first weight data t1 separately from the current optical flow g. The first weight data t1 is used to transform a preliminary prediction image (x') generated through warping 490 .

이전 복원 영상(440)은 현재 옵티컬 플로우(g)에 기반한 워핑(490)을 통해 워핑되고(warped), 워핑(490)의 결과로 예비 예측 영상(x')이 획득될 수 있다. The previous reconstructed image 440 is warped through warping 490 based on the current optical flow g, and as a result of the warping 490, a preliminary prediction image x' may be obtained.

예비 예측 영상(x')에 대해 제 1 가중치 데이터(t1)가 적용됨으로써 최종 예측 영상(x'')이 획득될 수 있다. A final prediction image (x″) may be obtained by applying the first weight data (t1) to the preliminary prediction image (x′).

도 25 및 도 26을 참조하여 후술하는 바와 같이, 옵티컬 플로우 디코더(450)는 현재 잔차 영상의 특징 데이터(v)를 포함하는 비트스트림의 비트레이트 또는 현재 잔차 영상(r)의 샘플 값들이 작아지도록 훈련될 수 있으므로, 현재 영상(420)과 예비 예측 영상(x') 사이의 차이가 작아지게 하는 제 1 가중치 데이터(t1)가 옵티컬 플로우 디코더(450)로부터 출력될 수 있다. As will be described later with reference to FIGS. 25 and 26, the optical flow decoder 450 reduces the bit rate of the bitstream including the feature data v of the current residual image or the sample values of the current residual image r. Since training can be performed, the first weight data t1 that reduces the difference between the current image 420 and the preliminary prediction image x' can be output from the optical flow decoder 450 .

최종 예측 영상(x'')과 현재 영상(420) 사이의 차이에 해당하는 현재 잔차 영상(r)이 잔차 인코더(430)로 입력될 수 있다.A current residual image (r) corresponding to a difference between the final predicted image (x″) and the current image 420 may be input to the residual encoder 430 .

잔차 인코더(430)는 훈련의 결과로 설정된 파라미터에 따라 현재 잔차 영상(r)을 처리하여 현재 잔차 영상의 특징 데이터(v)를 출력할 수 있다.The residual encoder 430 may process the current residual image r according to parameters set as a result of training and output feature data v of the current residual image.

현재 잔차 영상의 특징 데이터(v)는 잔차 디코더(470)로 입력될 수 있다. 잔차 디코더(470)는 훈련의 결과로 설정된 파라미터에 따라 특징 데이터(v)를 처리하여 복원된 현재 잔차 영상(r')을 획득할 수 있다. Feature data v of the current residual image may be input to the residual decoder 470 . The residual decoder 470 may obtain a reconstructed current residual image r' by processing the feature data v according to parameters set as a result of training.

복원된 현재 잔차 영상(r')과 최종 예측 영상(x'')이 결합됨으로써 현재 복원 영상(460)이 획득될 수 있다.A current reconstructed image 460 may be obtained by combining the reconstructed current residual image (r') and the final predicted image (x'').

도 4에 도시된 영상의 부호화 및 복호화 과정이 부호화 장치 및 복호화 장치로 구현되는 경우, 부호화 장치는 현재 영상(420)에 대한 부호화를 통해 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)를 획득할 수 있다. 그리고, 부호화 장치는 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)를 포함하는 비트스트림을 생성하여 복호화 장치로 전송할 수 있다. When the process of encoding and decoding the image shown in FIG. 4 is implemented by an encoding device and a decoding device, the encoding device converts the feature data w of the current optical flow and the characteristics of the current residual image through encoding of the current image 420. Data (v) can be obtained. Also, the encoding device may generate a bitstream including feature data (w) of the current optical flow and feature data (v) of the current residual image, and transmit the generated bitstream to the decoding device.

복호화 장치는 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)를 획득할 수 있다. 그리고, 복호화 장치는 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)에 기반하여 현재 복원 영상(460)을 획득할 수 있다.The decoding apparatus may obtain feature data (w) of the current optical flow and feature data (v) of the current residual image from the bitstream. Also, the decoding apparatus may obtain a current reconstructed image 460 based on feature data (w) of the current optical flow and feature data (v) of the current residual image.

도 4에 도시된 영상의 부호화 및 복호화 과정에서는 워핑(490)을 통해 생성된 예비 예측 영상(x')이 제 1 가중치 데이터(t1)에 따라 변형된다는 점에서 도 1에 도시된 과정과 상이하다.In the process of encoding and decoding the image shown in FIG. 4, the process shown in FIG. 1 is different in that the preliminary prediction image (x') generated through warping 490 is transformed according to the first weight data t1. .

즉, 제 1 가중치 데이터(t1)에 기초하여 예비 예측 영상(x')이 처리됨으로써 최종 예측 영상(x'')이 현재 영상(420)에 유사해질 수 있고, 이에 따라 부호화/복호화 효율이 향상될 수 있다.That is, by processing the preliminary predicted image (x') based on the first weight data (t1), the final predicted image (x'') can be similar to the current image 420, thereby improving encoding/decoding efficiency. It can be.

구체적으로, 움직임이 큰 객체나 오클루젼된 객체에 대해서는 작은 샘플 값을 포함하는 제 1 가중치 데이터(t1)가 출력됨으로써 예비 예측 영상(x')의 샘플 값이 작게 변경될 수 있고, 움직임이 작거나 움직임이 없는 객체에 대해서는 1에 가까운 샘플 값을 포함하는 제 1 가중치 데이터(t1)가 출력됨으로써 예비 예측 영상(x')의 샘플 값이 거의 변경되지 않을 수 있다. Specifically, the sample value of the preliminary prediction image (x') may be changed to a small value by outputting the first weight data (t1) including a small sample value for an object with large motion or an occluded object, and the motion may be reduced. For a small or non-moving object, the first weight data t1 including a sample value close to 1 is output, so that the sample value of the preliminary prediction image x' may hardly change.

다시 말하면, 제 1 가중치 데이터(t1)에 포함된 샘플 값들에 따라 인터 예측된 결과, 다시 말하면, 예비 예측 영상(x')의 샘플 값들이 최종 예측 영상(x'')의 샘플 값들에 미치는 영향력이 샘플 별로 달라질 수 있는 것이다. In other words, the result of inter prediction according to the sample values included in the first weight data t1, that is, the influence of the sample values of the preliminary prediction image (x') on the sample values of the final prediction image (x'') This may vary from sample to sample.

제 1 가중치 데이터(t1)에 포함된 0의 샘플 값은, 예비 예측 영상(x')의 샘플 값이 최종 예측 영상(x'')의 샘플 값에 아무런 영향을 미치지 않는다는 것을 의미하며, 이는 해당 샘플에 대해 인터 예측이 적용되지 않는 것으로 이해될 수 있다. 이 경우, 현재 복원 영상(460)의 샘플을 획득하는데, 이전 복원 영상(440) 이 이용되지 않으므로 이를 인트라 예측이 적용되는 것으로 이해될 수 있다.A sample value of 0 included in the first weight data t1 means that the sample value of the preliminary prediction image (x') has no effect on the sample value of the final prediction image (x''), which means that the corresponding It can be understood that inter prediction is not applied to the sample. In this case, a sample of the current reconstructed image 460 is obtained, and since the previous reconstructed image 440 is not used, it can be understood that intra prediction is applied.

일 실시예에서, 현재 영상(420)과 비교하여 밝기 값의 변화량이 큰 이전 복원 영상(440) 내의 객체에 대해서는 제 1 가중치 데이터(t1)에 포함된 샘플 값을 1보다 크게 설정하거나, 1보다 작게 설정함으로써 예비 예측 영상(x')의 샘플 값이 현재 영상(420) 내 샘플 값에 보다 유사해지도록 할 수 있다.In one embodiment, the sample value included in the first weight data t1 is set to be greater than 1 or greater than 1 for an object in the previous reconstruction image 440 whose brightness value change is greater than that of the current image 420. By setting it small, the sample value of the preliminary prediction image (x') can be made more similar to the sample value in the current image 420 .

한편, 현재 옵티컬 플로우(g)에 포함된 샘플들의 개수는 현재 영상(420)에 포함된 샘플들의 개수와 동일할 수 있는데, 이는 현재 영상(420)에 포함된 샘플들 각각에 대해 하나의 움직임 벡터가 추출된다는 것을 의미한다. 그러나, 현재 영상(420)에 포함된 샘플들과 동일/유사한 샘플들이 이전 복원 영상(440) 내에 여러 개 존재할 수 있으므로, 현재 영상(420)의 샘플들 각각에 대해 두 개 이상의 움직임 벡터를 추출하는 경우, 인터 예측의 효율이 더 좋아질 수 있다. 이와 관련하여, 도 5를 참조하여 설명한다.Meanwhile, the number of samples included in the current optical flow (g) may be the same as the number of samples included in the current image 420, which is one motion vector for each sample included in the current image 420 means that is extracted. However, since several samples identical/similar to the samples included in the current image 420 may exist in the previous reconstruction image 440, two or more motion vectors are extracted for each of the samples of the current image 420. In this case, the efficiency of inter prediction may be better. In this regard, it will be described with reference to FIG. 5 .

도 5를 참조하면, 영상의 부호화 및 복호화에 옵티컬 플로우 인코더(410), 옵티컬 플로우 디코더(450), 잔차 인코더(430) 및 잔차 디코더(470)가 이용될 수 있다. Referring to FIG. 5 , an optical flow encoder 410 , an optical flow decoder 450 , a residual encoder 430 , and a residual decoder 470 may be used to encode and decode an image.

일 실시예에서, 옵티컬 플로우 인코더(410), 옵티컬 플로우 디코더(450), 잔차 인코더(430) 및 잔차 디코더(470)는 신경망으로 구현될 수 있다.In one embodiment, the optical flow encoder 410, the optical flow decoder 450, the residual encoder 430, and the residual decoder 470 may be implemented as a neural network.

현재 영상(420)의 부호화를 위해 이전 복원 영상(440)과 현재 영상(420)이 옵티컬 플로우 인코더(410)로 입력될 수 있다. For encoding of the current image 420 , the previous reconstructed image 440 and the current image 420 may be input to the optical flow encoder 410 .

옵티컬 플로우 인코더(410)는 훈련의 결과로 설정된 파라미터에 따라 현재 영상(420)과 이전 복원 영상(440)을 처리하여 현재 옵티컬 플로우의 특징 데이터(w)를 출력할 수 있다.The optical flow encoder 410 may output feature data w of the current optical flow by processing the current image 420 and the previous reconstructed image 440 according to parameters set as a result of training.

현재 옵티컬 플로우의 특징 데이터(w)는 옵티컬 플로우 디코더(450)로 입력될 수 있다. Characteristic data w of the current optical flow may be input to the optical flow decoder 450 .

옵티컬 플로우 디코더(450)는 입력된 특징 데이터(w)를 훈련의 결과로 설정된 파라미터에 따라 처리하여 복수의 현재 옵티컬 플로우(g[i])(i는 인덱스로서, 0 이상의 정수임)를 출력할 수 있다.The optical flow decoder 450 may output a plurality of current optical flows g[i] (i being an index and an integer greater than or equal to 0) by processing the input feature data w according to parameters set as a result of training. there is.

옵티컬 플로우 디코더(450)는 복수의 현재 옵티컬 플로우(g[i])와 별개로 복수의 제 2 가중치 데이터(t2[i])를 출력할 수 있다. 복수의 제 2 가중치 데이터(t2[i])는 워핑(490-1, 490-2, ..., 490-n)을 통해 생성된 복수의 예비 예측 영상(x'[i])을 변형하는데 이용될 수 있다. The optical flow decoder 450 may output a plurality of second weight data t2[i] separately from the plurality of current optical flows g[i]. The plurality of second weight data t2[i] transforms the plurality of preliminary prediction images x′[i] generated through warping 490-1, 490-2, ..., 490-n. can be used

복수의 제 2 가중치 데이터(t2[i])는 복수의 현재 옵티컬 플로우(g[i])의 신뢰도 또는 정확도로 참조될 수 있다. The plurality of second weight data t2[i] may be referred to as reliability or accuracy of the plurality of current optical flows g[i].

복수의 제 2 가중치 데이터(t2[i]) 각각에 포함된 샘플들의 개수는 복수의 현재 옵티컬 플로우(g[i]) 각각에 포함된 샘플들의 개수와 동일할 수 있는 데, 이 경우, 복수의 제 2 가중치 데이터(t2[i])에 포함된 샘플 값들은 복수의 현재 옵티컬 플로우(g[i])에 포함된 샘플 값들의 신뢰도 또는 정확도를 나타낼 수 있다. 예를 들어, 복수의 제 2 가중치 데이터(t2[i])에서 소정 위치에 있는 샘플 값들은 복수의 현재 옵티컬 플로우(g[i])에서 소정 위치에 있는 샘플 값들의 신뢰도 또는 정확도를 나타낼 수 있다. 후술하는 바와 같이, 복수의 제 2 가중치 데이터(t2[i])에서 동일 위치에 있는 샘플 값들의 합을 1로 설정함으로써, 이전 복원 영상(440)의 샘플 값들이 최종 예측 영상(x'')에서도 그대로 유지되도록 할 수 있다.The number of samples included in each of the plurality of second weight data t2[i] may be the same as the number of samples included in each of the plurality of current optical flows g[i]. In this case, the plurality of Sample values included in the second weight data t2[i] may indicate reliability or accuracy of sample values included in the plurality of current optical flows g[i]. For example, sample values at predetermined positions in the plurality of second weight data t2[i] may indicate reliability or accuracy of sample values at predetermined positions in the plurality of current optical flows g[i]. . As will be described later, by setting the sum of sample values at the same position in the plurality of second weight data t2[i] to 1, the sample values of the previous reconstructed image 440 form the final predicted image (x''). You can also keep it as it is.

이전 복원 영상(440)은 복수의 현재 옵티컬 플로우(g[i])에 기반한 워핑(490-1, 490-2, ..., 490-n)을 통해 워핑되고(warped), 워핑(490-1, 490-2, ..., 490-n)의 결과로 복수의 예비 예측 영상(x'[i])이 획득될 수 있다. The previous reconstruction image 440 is warped through warping (490-1, 490-2, ..., 490-n) based on a plurality of current optical flows (g[i]), and warping (490- As a result of 1, 490-2, ..., 490-n), a plurality of preliminary prediction images x'[i] may be obtained.

복수의 예비 예측 영상(x'[i])에 대해 복수의 제 2 가중치 데이터(t2[i])가 적용되고, 복수의 제 2 가중치 데이터(t2[i])가 적용된 복수의 예비 예측 영상(x'[i])이 결합됨으로써 최종 예측 영상(x'')이 획득될 수 있다. A plurality of preliminary prediction images (t2[i]) are applied to a plurality of preliminary prediction images (x'[i]), and a plurality of preliminary prediction images (t2[i]) are applied. By combining x'[i]), a final predicted image (x'') may be obtained.

옵티컬 플로우 디코더(450)는 현재 잔차 영상의 특징 데이터(v)를 포함하는 비트스트림의 비트레이트 또는 현재 잔차 영상(r)의 샘플 값들이 작아지도록 훈련될 수 있으므로, 현재 영상(420)과 최종 예측 영상(x'') 사이의 차이가 작아지게 하는 복수의 제 2 가중치 데이터(t2[i])가 옵티컬 플로우 디코더(450)로부터 출력될 수 있다.Since the optical flow decoder 450 can be trained to reduce the bitrate of the bitstream including the feature data v of the current residual image or the sample values of the current residual image r, the current image 420 and final prediction The optical flow decoder 450 may output a plurality of second weight data t2[i] to reduce the difference between the images x''.

최종 예측 영상(x'')과 현재 영상(420) 사이의 차이에 해당하는 현재 잔차 영상(r)은 잔차 인코더(430)로 입력될 수 있다.A current residual image (r) corresponding to a difference between the final prediction image (x″) and the current image 420 may be input to the residual encoder 430 .

잔차 인코더(430)는 훈련의 결과로 설정된 파라미터에 따라 현재 잔차 영상(r)을 처리하여 현재 잔차 영상의 특징 데이터(v)를 출력할 수 있다.The residual encoder 430 may process the current residual image r according to parameters set as a result of training and output feature data v of the current residual image.

현재 잔차 영상의 특징 데이터(v)는 잔차 디코더(470)로 입력될 수 있다. 잔차 디코더(470)는 훈련의 결과로 설정된 파라미터에 따라 특징 데이터(v)를 처리하여 복원된 현재 잔차 영상(r')을 획득할 수 있다. Feature data v of the current residual image may be input to the residual decoder 470 . The residual decoder 470 may obtain a reconstructed current residual image r' by processing the feature data v according to parameters set as a result of training.

복원된 현재 잔차 영상(r')과 최종 예측 영상(x'')이 결합됨으로써 현재 복원 영상(460)이 획득될 수 있다.A current reconstructed image 460 may be obtained by combining the reconstructed current residual image (r') and the final predicted image (x'').

도 5에 도시된 영상의 부호화 및 복호화 과정이 부호화 장치 및 복호화 장치로 구현되는 경우, 부호화 장치는 현재 영상(420)에 대한 부호화를 통해 획득된 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)를 포함하는 비트스트림을 생성하여 복호화 장치로 전송할 수 있다. When the process of encoding and decoding the image shown in FIG. 5 is implemented by an encoding device and a decoding device, the encoding device uses the feature data w of the current optical flow obtained through encoding of the current image 420 and the current residual image A bitstream including feature data (v) of can be generated and transmitted to a decoding device.

복호화 장치는 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)를 획득할 수 있다. 그리고, 복호화 장치는 현재 옵티컬 플로우의 특징 데이터(w)와 현재 잔차 영상의 특징 데이터(v)에 기반하여 현재 복원 영상(460)을 획득할 수 있다.The decoding apparatus may obtain feature data (w) of the current optical flow and feature data (v) of the current residual image from the bitstream. Also, the decoding apparatus may obtain a current reconstructed image 460 based on feature data (w) of the current optical flow and feature data (v) of the current residual image.

도 5에 도시된 영상의 부호화 및 복호화 과정에서는 옵티컬 플로우 디코더(450)가 복수의 현재 옵티컬 플로우(g[i])와 복수의 제 2 가중치 데이터(t2[i])를 출력한다는 점에서 도 1 및 도 4에 도시된 과정과 상이하다.In the process of encoding and decoding the image shown in FIG. 5, the optical flow decoder 450 outputs a plurality of current optical flows g[i] and a plurality of second weight data t2[i]. and different from the process shown in FIG. 4 .

즉, 복수의 현재 옵티컬 플로우(g[i])에 기반하여 현재 영상(420)의 예측 버전(version)으로 기능할 수 있는 복수의 예비 예측 영상들이 획득되며, 복수의 현재 옵티컬 플로우(g[i])의 샘플 별 신뢰도 또는 정확도를 나타내는 복수의 제 2 가중치 데이터(t2[i])가 복수의 예비 예측 영상들에 적용됨으로써 부호화/복호화 효율이 향상될 수 있다.That is, a plurality of preliminary prediction images that can function as a predicted version of the current image 420 are obtained based on a plurality of current optical flows (g[i]), and a plurality of current optical flows (g[i] ]) is applied to the plurality of preliminary prediction images, thereby improving encoding/decoding efficiency.

이하에서는, 도 6 내지 도 22를 참조하여, 일 실시예에 따른 영상 복호화 장치(600), 영상 부호화 장치(1600), 및 이들에 의한 영상의 복호화/부호화 방법에 대해 설명한다.Hereinafter, with reference to FIGS. 6 to 22 , an image decoding apparatus 600 , an image encoding apparatus 1600 , and a method for decoding/encoding an image using the video decoding apparatus 600 according to an exemplary embodiment will be described.

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

도 6을 참조하면, 일 실시예에 따른 영상 복호화 장치(600)는 획득부(610) 및 예측 복호화부(630)를 포함할 수 있다.Referring to FIG. 6 , an image decoding apparatus 600 according to an embodiment may include an acquisition unit 610 and a prediction decoding unit 630.

획득부(610) 및 예측 복호화부(630)는 적어도 하나의 프로세서로 구현될 수 있다. 획득부(610) 및 예측 복호화부(630)는 메모리(미도시)에 저장된 적어도 하나의 인스트럭션에 따라 동작할 수 있다.The acquisition unit 610 and the prediction decoding unit 630 may be implemented with at least one processor. The acquisition unit 610 and the prediction decoding unit 630 may operate according to at least one instruction stored in a memory (not shown).

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

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

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

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

획득부(610)는 비트스트림을 파싱하여 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득할 수 있다. The acquisition unit 610 may acquire feature data of the current optical flow and feature data of the current residual image by parsing the bitstream.

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

현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터는 예측 복호화부(630)로 전달되고, 예측 복호화부(630)는 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 이용하여 현재 영상에 대응하는 현재 복원 영상을 획득할 수 있다. 현재 복원 영상은 재생을 위해 디스플레이 장치로 출력될 수 있다.The feature data of the current optical flow and the feature data of the current residual image are transferred to the predictive decoding unit 630, and the predictive decoding unit 630 uses the feature data of the current optical flow and the feature data of the current residual image to obtain a current image. A corresponding current reconstructed image may be acquired. The current reconstruction image may be output to a display device for reproduction.

도 7은 일 실시예에 따른 획득부(610)의 구성을 도시하는 도면이다.7 is a diagram illustrating a configuration of an acquisition unit 610 according to an exemplary embodiment.

도 7을 참조하면, 획득부(610)는 엔트로피 복호화부(611) 및 역양자화부(613)를 포함할 수 있다.Referring to FIG. 7 , an acquisition unit 610 may include an entropy decoding unit 611 and an inverse quantization unit 613 .

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

역양자화부(613)는 현재 옵티컬 플로우의 양자화된 특징 데이터를 역양자화하여 현재 옵티컬 플로우의 특징 데이터를 획득하고, 현재 잔차 영상의 양자화된 특징 데이터를 역양자화하여 현재 잔차 영상의 특징 데이터를 획득할 수 있다.The inverse quantization unit 613 obtains feature data of the current optical flow by inverse quantizing the quantized feature data of the current optical flow, and inverse quantizes the quantized feature data of the current residual image to obtain feature data of the current residual image. can

일 실시예에서, 획득부(610)는 역변환부를 더 포함할 수 있다. 역변환부는 역양자화부(613)로부터 출력되는 특징 데이터를 주파수 도메인으로부터 공간 도메인으로 역변환할 수 있다. 후술하는 영상 부호화 장치(1600)가 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 공간 도메인으로부터 주파수 도메인으로 변환하는 경우, 역변환부는 역양자화부(613)로부터 출력되는 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 주파수 도메인에서 공간 도메인으로 역변환할 수 있다.In one embodiment, the acquisition unit 610 may further include an inverse transform unit. The inverse transform unit may inverse transform the feature data output from the inverse quantization unit 613 from the frequency domain to the spatial domain. When the image encoding apparatus 1600 described later converts the feature data of the current optical flow and the feature data of the current residual image from the spatial domain to the frequency domain, the inverse transform unit converts the feature data of the current optical flow output from the inverse quantization unit 613 and feature data of the current residual image may be inversely transformed from the frequency domain to the spatial domain.

일 실시예에서, 획득부(610)는 역양자화부(613)를 포함하지 않을 수도 있다. 즉, 엔트로피 복호화부(611)에 의한 처리를 통해 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터가 획득될 수 있다.In one embodiment, the acquisition unit 610 may not include the inverse quantization unit 613. That is, feature data of the current optical flow and feature data of the current residual image may be obtained through processing by the entropy decoding unit 611 .

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

도 8은 일 실시예에 따른 예측 복호화부(630)의 구성을 도시하는 도면이다.8 is a diagram showing the configuration of a prediction decoding unit 630 according to an embodiment.

도 8을 참조하면, 예측 복호화부(630)는 옵티컬 플로우 디코더(450), 잔차 디코더(470), 움직임 보상부(631), 가중치 적용부(632) 및 결합부(633)를 포함할 수 있다.Referring to FIG. 8 , the prediction decoding unit 630 may include an optical flow decoder 450, a residual decoder 470, a motion compensation unit 631, a weight application unit 632, and a combiner 633. .

옵티컬 플로우 디코더(450) 및 잔차 디코더(470)는 적어도 하나의 레이어(예를 들어, 컨볼루션 레이어)를 포함하는 신경망으로 구현될 수 있다. The optical flow decoder 450 and the residual decoder 470 may be implemented as a neural network including at least one layer (eg, a convolutional layer).

옵티컬 플로우 디코더(450) 및 잔차 디코더(470)는 메모리에 저장될 수 있다. 일 실시예에서, 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.The optical flow decoder 450 and the residual decoder 470 may be stored in memory. In one embodiment, the optical flow decoder 450 and the residual decoder 470 may be implemented with at least one dedicated processor for AI.

획득부(610)에 의해 출력된 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터는 각각 옵티컬 플로우 디코더(450)와 잔차 디코더(470)로 입력될 수 있다.Feature data of the current optical flow and feature data of the current residual image output by the acquisition unit 610 may be input to the optical flow decoder 450 and the residual decoder 470, respectively.

옵티컬 플로우 디코더(450)는 훈련을 통해 설정된 파라미터에 따라 현재 옵티컬 플로우의 특징 데이터를 처리하여 현재 옵티컬 플로우와 제 1 가중치 데이터를 출력할 수 있다. The optical flow decoder 450 may process feature data of the current optical flow according to parameters set through training and output the current optical flow and first weight data.

현재 옵티컬 플로우 및 제 1 가중치 데이터는 1차원 또는 2차원의 데이터로서, 복수의 샘플들로 이루어질 수 있다. 현재 옵티컬 플로우의 크기와 제 1 가중치 데이터의 크기는 동일할 수 있다. 여기서, 크기가 동일하다는 것은 샘플들의 개수가 동일하다는 것을 의미할 수 있다. The current optical flow and first weight data are 1-dimensional or 2-dimensional data and may consist of a plurality of samples. The size of the current optical flow and the size of the first weight data may be the same. Here, the same size may mean that the number of samples is the same.

일 실시예에서, 현재 옵티컬 플로우의 크기와 제 1 가중치 데이터의 크기는 이전 복원 영상의 크기와 동일할 수 있다.In one embodiment, the size of the current optical flow and the size of the first weight data may be the same as the size of the previous reconstructed image.

현재 옵티컬 플로우는 움직임 보상부(631)로 제공될 수 있다. 움직임 보상부(631)는 이전 복원 영상을 현재 옵티컬 플로우에 따라 처리하여 예비 예측 영상을 생성할 수 있다. The current optical flow may be provided to the motion compensator 631 . The motion compensator 631 may generate a preliminary prediction image by processing the previous reconstructed image according to the current optical flow.

움직임 보상부(631)는 예비 예측 영상의 생성을 위해 이전 복원 영상을 현재 옵티컬 플로우에 따라 워핑할 수 있다. 예비 예측 영상의 생성을 위한 워핑은 하나의 예시이고, 움직임 보상부(631)는 예비 예측 영상을 생성하기 위해, 현재 옵티컬 플로우에 기반하여 이전 복원 영상을 변경하는 다양한 영상 처리를 수행할 수 있다.The motion compensator 631 may warp a previous reconstructed image according to the current optical flow to generate a preliminary prediction image. Warping for generating a preliminary prediction image is an example, and the motion compensator 631 may perform various image processing to change a previous reconstructed image based on a current optical flow to generate a preliminary prediction image.

움직임 보상부(631)에 의해 생성된 예비 예측 영상과 옵티컬 플로우 디코더(450)에 의해 출력된 제 1 가중치 데이터는 가중치 적용부(632)로 제공될 수 있다.The preliminary prediction image generated by the motion compensator 631 and the first weight data output by the optical flow decoder 450 may be provided to the weight application unit 632 .

가중치 적용부(632)는 제 1 가중치 데이터의 샘플 값들을 예비 예측 영상의 샘플 값들에 적용하여 최종 예측 영상을 획득할 수 있다. The weight application unit 632 may obtain a final prediction image by applying sample values of the first weight data to sample values of the preliminary prediction image.

일 실시예에서, 가중치 적용부(632)는 제 1 가중치 데이터의 샘플 값들을 예비 예측 영상의 샘플 값들에 곱하여 최종 예측 영상을 획득할 수 있다. 이 경우, 가중치 적용부(632)는 곱셈기로 참조될 수 있다. In an embodiment, the weight application unit 632 may obtain a final prediction image by multiplying sample values of the first weight data by sample values of the preliminary prediction image. In this case, the weight application unit 632 may be referred to as a multiplier.

예를 들어, 제 1 가중치 데이터가 제 1 샘플 값과 제 2 샘플 값을 포함하고, 예비 예측 영상이 제 1 가중치 데이터의 제 1 샘플 값과 동일한 위치에 있는 제 1 샘플 값, 및 제 1 가중치 데이터의 제 2 샘플 값과 동일한 위치에 있는 제 2 샘플 값을 포함하는 경우, 가중치 데이터는 제 1 가중치 데이터의 제 1 샘플 값을 예비 예측 영상의 제 1 샘플 값에 곱하여 최종 예측 영상의 제 1 샘플 값을 획득하고, 제 1 가중치 데이터의 제 2 샘플 값을 예비 예측 영상의 제 2 샘플 값에 곱하여 최종 예측 영상의 제 2 샘플 값을 획득할 수 있다.For example, the first weight data includes a first sample value and a second sample value, the preliminary prediction image has a first sample value at the same position as the first sample value of the first weight data, and the first weight data If it includes the second sample value at the same position as the second sample value of the weight data, the first sample value of the final prediction image is obtained by multiplying the first sample value of the first weight data by the first sample value of the preliminary prediction image. , and a second sample value of the final prediction image may be obtained by multiplying the second sample value of the first weight data by the second sample value of the preliminary prediction image.

제 1 가중치 데이터는 최종 예측 영상의 샘플 값들이 현재 영상의 샘플 값들에 최대한 유사해지도록 하기 위한 가중치들을 포함할 수 있다. 도 25 및 도 26을 참조하여 후술하는 바와 같이, 옵티컬 플로우 디코더(450)는 현재 영상과 최종 예측 영상 사이의 차이에 대응하는 현재 잔차 영상의 샘플 값들이 감소 또는 최소화되는 방향으로 훈련될 수 있다. 따라서, 옵티컬 플로우 디코더(450)는 현재 영상과 최종 예측 영상 사이의 차이를 줄이기 위한 제 1 가중치 데이터를 출력할 수 있다.The first weight data may include weights for making sample values of the final prediction image as similar as possible to sample values of the current image. As described later with reference to FIGS. 25 and 26 , the optical flow decoder 450 may be trained in a direction in which sample values of the current residual image corresponding to the difference between the current image and the final predicted image are reduced or minimized. Accordingly, the optical flow decoder 450 may output first weight data for reducing the difference between the current image and the final predicted image.

일 실시예에서, 예비 예측 영상 내 샘플 값과 현재 영상 내 동일 위치의 샘플 값 사이의 차이가 작을수록 제 1 가중치 데이터 내 샘플 값은 1에 가까운 값을 가질 수 있다. 이 경우, 해당 샘플에 대한 인터 예측의 적용 비율이 높아지는 것으로 이해될 수 있다.In an embodiment, the sample value in the first weight data may have a value closer to 1 as the difference between the sample value in the preliminary prediction image and the sample value in the same position in the current image is smaller. In this case, it can be understood that the application rate of inter prediction to the corresponding sample increases.

또한, 일 실시예에서, 예비 예측 영상 내 샘플 값이 현재 영상 내 동일 위치의 샘플 값보다 크면, 제 1 가중치 데이터 내 샘플 값은 1보다 작은 값을 가질 수 있다. 또한 일 실시예에서, 예비 예측 영상 내 샘플 값이 현재 영상 내 동일 위치의 샘플 값보다 작으면, 제 1 가중치 데이터 내 샘플 값은 1보다 큰 값을 가질 수 있다.Also, in an embodiment, when a sample value in the preliminary prediction image is greater than a sample value at the same position in the current image, the sample value in the first weight data may have a value smaller than 1. Also, in one embodiment, when a sample value in the preliminary prediction image is smaller than a sample value at the same location in the current image, the sample value in the first weight data may have a value greater than 1.

제 1 가중치 데이터는 현재 영상과 이전 복원 영상에 포함된 객체의 다양한 움직임과 밝기 변화를 보상하기 위한 것일 수 있다.The first weight data may be for compensating for various motions and brightness changes of objects included in the current image and the previous reconstruction image.

전술한 바와 같이, 현재 영상과 이전 복원 영상에 포함된 객체의 움직임이 크다면, 현재 옵티컬 플로우의 샘플 값이 부정확할 수 있고, 이 경우, 예비 예측 영상의 샘플 값을 변경하지 않는다면 현재 잔차 영상의 샘플 값이 커질 가능성이 높아진다.As described above, if the movement of the object included in the current image and the previous reconstructed image is large, the sample value of the current optical flow may be inaccurate. In this case, if the sample value of the preliminary prediction image is not changed, the current residual image The higher the sample value, the higher the probability.

옵티컬 플로우 디코더(450)는 현재 영상과 이전 복원 영상에 포함된 소정 객체의 움직임이 크다면, 해당 객체에 대해 인터 예측의 적용 비율이 작아지도록 하는 제 1 가중치 데이터를 출력할 수 있다. 제 1 가중치 데이터에 포함된 샘플 값이 작아질수록 인터 예측의 적용 비율 역시 작아질 수 있다. 제 1 가중치 데이터에 포함된 샘플 값이 0이라면, 인터 예측의 적용 비율은 0%일 수 있다.The optical flow decoder 450 may output first weight data for reducing an application rate of inter prediction to the corresponding object when the movement of a predetermined object included in the current image and the previous reconstructed image is large. As the sample value included in the first weight data decreases, the application rate of inter prediction may also decrease. If the sample value included in the first weight data is 0, the application rate of inter prediction may be 0%.

또한, 옵티컬 플로우 디코더(450)는 현재 영상과 이전 복원 영상에 포함된 소정 객체의 움직임이 작거나 움직임이 없다면, 해당 객체에 대해 인터 예측의 적용 비율이 커지도록 하는 제 1 가중치 데이터를 출력할 수 있다. 제 1 가중치 데이터에 포함된 샘플 값이 1에 가까운 값을 가질수록 인터 예측의 적용 비율이 높아질 수 있다.In addition, the optical flow decoder 450 may output first weight data for increasing the inter-prediction application rate for a given object included in the current image and the previous reconstructed image if the motion of the predetermined object is small or there is no motion. there is. As the sample value included in the first weight data has a value close to 1, an application rate of inter prediction may increase.

또한, 옵티컬 플로우 디코더(450)는 현재 영상과 이전 복원 영상에 포함된 소정 객체에 대해 밝기 변화가 존재한다면, 이러한 밝기 변화를 보상할 수 있는 제 1 가중치 데이터를 출력할 수 있다. 예를 들어, 이전 복원 영상에 포함된 소정 객체의 밝기가 현재 영상에서 증가되었다면, 제 1 가중치 데이터 내 샘플 값은 1보다 큰 값을 가질 수 있다. 또한, 이전 복원 영상에 포함된 소정 객체의 밝기가 현재 영상에서 감소되었다면, 제 1 가중치 데이터 내 샘플 값은 1보다 작은 값을 가질 수 있다.In addition, the optical flow decoder 450 may output first weight data capable of compensating for the brightness change, if there is a change in brightness of a predetermined object included in the current image and the previous reconstructed image. For example, if the brightness of a predetermined object included in a previous reconstructed image is increased in the current image, the sample value in the first weight data may have a value greater than 1. Also, if the brightness of a predetermined object included in the previous reconstructed image is reduced in the current image, the sample value in the first weight data may have a value less than 1.

일 실시예에 따르면, 제 1 가중치 데이터를 통해 인터 예측의 적용 비율의 조절과 밝기 변화에 대한 보상이 예비 예측 영상의 샘플별로 이루어질 수 있으므로, 현재 잔차 영상의 샘플 값들이 최소화될 수 있고 이에 따라 비트스트림의 비트레이트 또한 감소될 수 있다.According to an embodiment, since the adjustment of the application rate of inter prediction and the compensation for the brightness change can be performed for each sample of the preliminary prediction image through the first weight data, sample values of the current residual image can be minimized, and thus the bit The bitrate of the stream may also be reduced.

가중치 적용부(632)에 의해 획득된 최종 예측 영상은 결합부(633)로 제공될 수 있다. The final predicted image obtained by the weight application unit 632 may be provided to the combiner 633.

획득부(610)에 의해 출력되는 현재 잔차 영상의 특징 데이터는 잔차 디코더(470)로 입력될 수 있다. Feature data of the current residual image output by the acquisition unit 610 may be input to the residual decoder 470 .

일 실시예에서, 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터는 연접되고, 연접된 결과가 잔차 디코더(470)로 입력될 수 있다. 여기서, 연접(concatenation)이란, 두 개 이상의 특징 데이터를 채널 방향으로 결합하는 처리를 의미할 수 있다.In an embodiment, feature data of the current optical flow and feature data of the current residual image may be concatenated, and the concatenated result may be input to the residual decoder 470 . Here, concatenation may mean a process of combining two or more feature data in a channel direction.

잔차 디코더(470)는 훈련을 통해 설정된 파라미터에 따라 현재 잔차 영상의 특징 데이터를 처리하여 현재 잔차 영상을 획득할 수 있다. 현재 잔차 영상은 결합부(633)로 제공될 수 있다.The residual decoder 470 may obtain a current residual image by processing feature data of the current residual image according to parameters set through training. The current residual image may be provided to the combiner 633.

결합부(633)는 최종 예측 영상과 현재 잔차 영상을 결합하여 현재 복원 영상을 획득할 수 있다. The combiner 633 may obtain a current reconstructed image by combining the final prediction image and the current residual image.

일 실시예에서, 결합부(633)는 최종 예측 영상의 샘플 값들과 현재 잔차 영상의 샘플 값들을 더하여 현재 복원 영상을 획득할 수 있다. 이 경우, 결합부(633)는 덧셈기로 참조될 수 있다.In an embodiment, the combiner 633 may obtain a current reconstructed image by adding sample values of the final prediction image and sample values of the current residual image. In this case, the combiner 633 may be referred to as an adder.

도 9는 일 실시예에 따른 예측 복호화부(630-1)의 구성을 도시하는 도면이다.9 is a diagram showing the configuration of a predictive decoding unit 630-1 according to an embodiment.

도 9에 도시된 예측 복호화부(630-1)에서는 제 1 가중치 데이터가 가중치 디코더(634)로부터 출력된다는 점을 제외하고 도 8에 도시된 예측 복호화부(630)와 동일하다.The prediction decoding unit 630-1 shown in FIG. 9 is the same as the prediction decoding unit 630 shown in FIG. 8 except that the first weight data is output from the weight decoder 634.

구체적으로, 가중치 디코더(634)는 적어도 하나의 레이어(예를 들어, 컨볼루션 레이어)를 포함하는 신경망으로 구현될 수 있다. Specifically, the weight decoder 634 may be implemented as a neural network including at least one layer (eg, a convolutional layer).

가중치 디코더(634)는 메모리에 저장될 수 있다. 일 실시예에서, 가중치 디코더(634)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.Weight decoder 634 may be stored in memory. In one embodiment, weight decoder 634 may be implemented with at least one dedicated processor for AI.

획득부(610)에 의해 출력된 현재 옵티컬 플로우의 특징 데이터는 옵티컬 플로우 디코더(450)와 가중치 디코더(634)로 입력될 수 있다.Characteristic data of the current optical flow output by the acquisition unit 610 may be input to the optical flow decoder 450 and the weight decoder 634 .

옵티컬 플로우 디코더(450)는 훈련을 통해 설정된 파라미터에 따라 현재 옵티컬 플로우의 특징 데이터를 처리하여 현재 옵티컬 플로우를 출력할 수 있다.The optical flow decoder 450 may output the current optical flow by processing feature data of the current optical flow according to parameters set through training.

가중치 디코더(634)는 훈련을 통해 설정된 파라미터에 따라 현재 옵티컬 플로우의 특징 데이터를 처리하여 제 1 가중치 데이터를 출력할 수 있다.The weight decoder 634 may output first weight data by processing feature data of the current optical flow according to parameters set through training.

도 8에 도시된 옵티컬 플로우 디코더(450)와 마찬가지로 도 9에 도시된 가중치 디코더(634)도 현재 영상과 최종 예측 영상 사이의 차이에 대응하는 현재 잔차 영상의 샘플 값들이 감소 또는 최소화되는 방향으로 훈련될 수 있다. 따라서, 가중치 디코더(634)는 현재 영상과 최종 예측 영상 사이의 차이를 줄이기 위한 제 1 가중치 데이터를 출력할 수 있다.Like the optical flow decoder 450 shown in FIG. 8, the weight decoder 634 shown in FIG. 9 is also trained in a direction in which sample values of the current residual image corresponding to the difference between the current image and the final predicted image are reduced or minimized. It can be. Accordingly, the weight decoder 634 may output first weight data for reducing the difference between the current image and the final predicted image.

일 실시예에서, 예비 예측 영상 내 샘플 값과 현재 영상 내 동일 위치의 샘플 값 사이의 차이가 작을수록 제 1 가중치 데이터 내 샘플 값은 1에 가까운 값을 가질 수 있다. 이 경우, 해당 샘플에 대한 인터 예측의 적용 비율이 높아지는 것으로 이해될 수 있다.In an embodiment, the sample value in the first weight data may have a value closer to 1 as the difference between the sample value in the preliminary prediction image and the sample value in the same position in the current image is smaller. In this case, it can be understood that the application rate of inter prediction to the corresponding sample increases.

또한, 일 실시예에서, 예비 예측 영상 내 샘플 값이 현재 영상 내 동일 위치의 샘플 값보다 크면, 제 1 가중치 데이터 내 샘플 값은 1보다 작은 값을 가질 수 있다. 또한 일 실시예에서, 예비 예측 영상 내 샘플 값이 현재 영상 내 동일 위치의 샘플 값보다 작으면, 제 1 가중치 데이터 내 샘플 값은 1보다 큰 값을 가질 수 있다.Also, in an embodiment, when a sample value in the preliminary prediction image is greater than a sample value at the same position in the current image, the sample value in the first weight data may have a value smaller than 1. Also, in one embodiment, when a sample value in the preliminary prediction image is smaller than a sample value at the same location in the current image, the sample value in the first weight data may have a value greater than 1.

제 1 가중치 데이터는 현재 영상과 이전 복원 영상에 포함된 객체의 다양한 움직임과 밝기 변화를 보상하기 위한 것으로 이해될 수 있다.The first weight data may be understood as compensation for various motions and brightness changes of objects included in the current image and the previous reconstruction image.

도 10은 일 실시예에 따른 예측 복호화부(630-2)의 구성을 도시하는 도면이다.10 is a diagram showing the configuration of a prediction decoding unit 630-2 according to an embodiment.

도 10에 도시된 예측 복호화부(630-2)에서는 가중치 디코더(634)가 가중치 데이터의 특징 데이터를 처리하여 제 1 가중치 데이터를 출력한다는 점을 제외하고 도 9에 도시된 예측 복호화부(630-1)와 동일하다. In the prediction decoding unit 630-2 shown in FIG. 10, the prediction decoding unit 630-2 shown in FIG. 9 except that the weight decoder 634 processes feature data of the weight data and outputs first weight data. Same as 1).

가중치 데이터의 특징 데이터는 영상 부호화 장치(1600)에 의해 생성되어 비트스트림에 포함될 수 있다. 획득부(610)는 비트스트림으로부터 가중치 데이터의 특징 데이터를 획득하여 가중치 디코더(634)로 제공할 수 있다.Feature data of the weight data may be generated by the image encoding apparatus 1600 and included in the bitstream. The acquisition unit 610 may acquire feature data of the weight data from the bitstream and provide the obtained feature data to the weight decoder 634 .

예측 복호화부(630-2)의 다른 구성들에 대해서는 도 8 및 도 9와 관련하여 설명하였으므로 상세한 설명을 생략한다.Since other components of the prediction decoding unit 630-2 have been described with reference to FIGS. 8 and 9, a detailed description thereof will be omitted.

도 11은 일 실시예에 따른 예측 복호화부(630-3)의 구성을 도시하는 도면이다.11 is a diagram showing the configuration of a prediction decoding unit 630-3 according to an embodiment.

도 11에 도시된 예측 복호화부(630-3)는 옵티컬 플로우 디코더(450), 잔차 디코더(470), 움직임 보상부(631), 가중치 적용부(632) 및 결합부(633)를 포함할 수 있다.The prediction decoding unit 630-3 shown in FIG. 11 may include an optical flow decoder 450, a residual decoder 470, a motion compensation unit 631, a weight application unit 632, and a combiner 633. there is.

옵티컬 플로우 디코더(450) 및 잔차 디코더(470)는 적어도 하나의 레이어(예를 들어, 컨볼루션 레이어)를 포함하는 신경망으로 구현될 수 있다. The optical flow decoder 450 and the residual decoder 470 may be implemented as a neural network including at least one layer (eg, a convolutional layer).

옵티컬 플로우 디코더(450) 및 잔차 디코더(470)는 메모리에 저장될 수 있다. 일 실시예에서, 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.The optical flow decoder 450 and the residual decoder 470 may be stored in memory. In one embodiment, the optical flow decoder 450 and the residual decoder 470 may be implemented with at least one dedicated processor for AI.

획득부(610)에 의해 출력된 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터는 각각 옵티컬 플로우 디코더(450)와 잔차 디코더(470)로 입력될 수 있다.Feature data of the current optical flow and feature data of the current residual image output by the acquisition unit 610 may be input to the optical flow decoder 450 and the residual decoder 470, respectively.

옵티컬 플로우 디코더(450)는 훈련을 통해 설정된 파라미터에 따라 현재 옵티컬 플로우의 특징 데이터를 처리하여 복수의 현재 옵티컬 플로우와 복수의 제 2 가중치 데이터를 출력할 수 있다. The optical flow decoder 450 may output a plurality of current optical flows and a plurality of second weight data by processing feature data of a current optical flow according to parameters set through training.

복수의 현재 옵티컬 플로우 및 복수의 제 2 가중치 데이터는 1차원 또는 2차원의 데이터로서, 복수의 샘플들로 이루어질 수 있다. 각각의 현재 옵티컬 플로우의 크기와 각각의 제 2 가중치 데이터의 크기는 동일할 수 있다. The plurality of current optical flows and the plurality of second weight data are one-dimensional or two-dimensional data, and may consist of a plurality of samples. The size of each current optical flow and the size of each second weight data may be the same.

일 실시예에서, 각각의 현재 옵티컬 플로우의 크기와 각각의 제 2 가중치 데이터의 크기는 이전 복원 영상의 크기와 동일할 수 있다.In an embodiment, the size of each current optical flow and the size of each second weight data may be the same as the size of a previous reconstructed image.

일 실시예에서, 복수의 현재 옵티컬 플로우와 복수의 제 2 가중치 데이터는 1:1로 대응할 수 있다. 예를 들어, 옵티컬 플로우 디코더(450)에 의해 5개의 현재 옵티컬 플로우가 출력되었다면, 옵티컬 플로우 디코더(450)에 의해 출력되는 제 2 가중치 데이터의 개수 역시 5개일 수 있다.In one embodiment, a plurality of current optical flows and a plurality of second weight data may correspond 1:1. For example, if five current optical flows are output by the optical flow decoder 450, the number of second weight data output by the optical flow decoder 450 may also be five.

복수의 현재 옵티컬 플로우는 움직임 보상부(631)로 제공될 수 있다. 움직임 보상부(631)는 이전 복원 영상을 복수의 현재 옵티컬 플로우에 따라 처리하여 복수의 예비 예측 영상을 생성할 수 있다.A plurality of current optical flows may be provided to the motion compensator 631 . The motion compensation unit 631 may generate a plurality of preliminary prediction images by processing previous reconstructed images according to a plurality of current optical flows.

움직임 보상부(631)는 복수의 예비 예측 영상의 생성을 위해 이전 복원 영상을 복수의 현재 옵티컬 플로우 각각에 따라 워핑할 수 있다. 복수의 예비 예측 영상의 생성을 위한 워핑은 하나의 예시이고, 움직임 보상부(631)는 복수의 예비 예측 영상을 생성하기 위해, 복수의 현재 옵티컬 플로우에 기반하여 이전 복원 영상을 변경하는 다양한 영상 처리를 수행할 수 있다.The motion compensator 631 may warp previous reconstructed images according to each of a plurality of current optical flows in order to generate a plurality of preliminary prediction images. Warping for generating a plurality of preliminary prediction images is one example, and the motion compensator 631 performs various image processing to change previous reconstruction images based on a plurality of current optical flows in order to generate a plurality of preliminary prediction images. can be performed.

움직임 보상부(631)에 의해 생성된 복수의 예비 예측 영상과 옵티컬 플로우 디코더(450)에 의해 출력된 복수의 제 2 가중치 데이터는 가중치 적용부(632)로 제공될 수 있다.A plurality of preliminary prediction images generated by the motion compensator 631 and a plurality of second weight data output by the optical flow decoder 450 may be provided to the weight application unit 632 .

복수의 제 2 가중치 데이터는 복수의 현재 옵티컬 플로우의 신뢰도 또는 정확도로 참조될 수 있다. The plurality of second weight data may be referred to as reliability or accuracy of a plurality of current optical flows.

복수의 제 2 가중치 데이터에 포함된 샘플 값들은 복수의 현재 옵티컬 플로우에 포함된 샘플 값들의 신뢰도 또는 정확도를 나타낼 수 있다. 예를 들어, 복수의 제 2 가중치 데이터에서 소정 위치에 있는 샘플 값들은 복수의 현재 옵티컬 플로우에서 소정 위치에 있는 샘플 값들의 신뢰도 또는 정확도를 나타낼 수 있다. 또한, 예를 들어, 어느 하나의 제 2 가중치 데이터에 포함된 샘플 값들 각각은 어느 하나의 제 2 가중치 데이터에 대응하는 현재 옵티컬 플로우에 포함된 샘플 값들 각각의 신뢰도 또는 정확도를 나타낼 수 있고, 다른 하나의 제 2 가중치 데이터에 포함된 샘플 값들 각각은 다른 하나의 제 2 가중치 데이터에 대응하는 현재 옵티컬 플로우에 포함된 샘플 값들 각각의 신뢰도 또는 정확도를 나타낼 수 있다.Sample values included in the plurality of second weight data may indicate reliability or accuracy of sample values included in the plurality of current optical flows. For example, sample values at predetermined positions in a plurality of second weight data may indicate reliability or accuracy of sample values at predetermined positions in a plurality of current optical flows. Also, for example, each of the sample values included in any one of the second weight data may represent the reliability or accuracy of each of the sample values included in the current optical flow corresponding to the one of the second weight data, and the other one Each of the sample values included in the second weight data of may indicate reliability or accuracy of each sample value included in the current optical flow corresponding to another second weight data.

가중치 적용부(632)는 복수의 제 2 가중치 데이터를 복수의 예비 예측 영상에 적용하여 복수의 변형된 예측 영상을 획득할 수 있다. 예를 들어, 가중치 적용부(632)는 어느 하나의 제 2 가중치 데이터의 샘플 값들을 어느 하나의 제 2 가중치 데이터에 대응하는 예비 예측 영상의 샘플 값들에 곱하여 어느 하나의 변형된 예측 영상을 획득할 수 있다. 그리고, 가중치 적용부(632)는 다른 하나의 제 2 가중치 데이터의 샘플 값들을 다른 하나의 제 2 가중치 데이터에 대응하는 예비 예측 영상의 샘플 값들에 곱하여 다른 하나의 변형된 예측 영상을 획득할 수 있다.The weight application unit 632 may obtain a plurality of transformed prediction images by applying a plurality of second weight data to a plurality of preliminary prediction images. For example, the weight application unit 632 multiplies sample values of any one of the second weight data by sample values of a preliminary prediction image corresponding to any one of the second weight data to obtain any one modified prediction image. can And, the weight application unit 632 may obtain another modified prediction image by multiplying sample values of another piece of second weight data by sample values of a preliminary prediction image corresponding to another piece of second weight data. .

전술한 바와 같이, 복수의 제 2 가중치 데이터는 복수의 현재 옵티컬 플로우의 신뢰도 또는 정확도를 의미할 수 있으므로, 이러한 신뢰도 또는 정확도가 복수의 예비 예측 영상에 적용됨으로써 현재 영상에 보다 유사한 최종 예측 영상이 생성될 수 있다.As described above, since the plurality of second weight data may mean the reliability or accuracy of the plurality of current optical flows, the final prediction image more similar to the current image is generated by applying the reliability or accuracy to the plurality of preliminary prediction images. It can be.

일 실시예에서, 복수의 제 2 가중치 데이터 내에서 동일한 위치에 있는 샘플 값들의 합은 1일 수 있다. 이에 따라, 최종 예측 영상의 샘플들은 이전 복원 영상의 샘플들과 비교하여 위치는 달라질 수 있지만, 이전 복원 영상의 샘플 값들이 최종 예측 영상에서도 그대로 유지될 수 있다.In one embodiment, the sum of sample values at the same location within the plurality of second weight data may be 1. Accordingly, the positions of samples of the final predicted image may be different compared to those of the previous reconstructed image, but sample values of the previous reconstructed image may be maintained in the final predicted image.

복수의 변형된 예측 영상은 결합부(633)로 제공될 수 있다. 결합부(633)는 복수의 변형된 예측 영상을 결합하여 최종 예측 영상을 획득할 수 있다. 일 실시예에서, 결합부(633)는 복수의 변형된 예측 영상의 동일 위치의 샘플 값들을 서로 합하여 최종 예측 영상을 획득할 수 있다.A plurality of modified prediction images may be provided to the combiner 633 . The combiner 633 may obtain a final predicted image by combining a plurality of transformed predicted images. In an embodiment, the combining unit 633 may obtain a final predicted image by summing sample values of the plurality of transformed predicted images at the same location.

잔차 디코더(470)는 훈련을 통해 설정된 파라미터에 따라 현재 잔차 영상의 특징 데이터를 처리하여 현재 잔차 영상을 획득할 수 있다. 현재 잔차 영상은 결합부(633)로 제공될 수 있다.The residual decoder 470 may obtain a current residual image by processing feature data of the current residual image according to parameters set through training. The current residual image may be provided to the combiner 633.

결합부(633)는 최종 예측 영상과 현재 잔차 영상을 결합하여 현재 복원 영상을 획득할 수 있다. The combiner 633 may obtain a current reconstructed image by combining the final prediction image and the current residual image.

일 실시예에서, 결합부(633)는 최종 예측 영상의 샘플 값들과 현재 잔차 영상의 샘플 값들을 더하여 현재 복원 영상을 획득할 수 있다.In an embodiment, the combiner 633 may obtain a current reconstructed image by adding sample values of the final prediction image and sample values of the current residual image.

도 11에 도시된 예측 복호화부(630-3)는 앞서 도 5와 관련하여 설명한 영상의 부호화/복호화 과정에 대응하는 것으로서, 복수의 현재 옵티컬 플로우 각각은 현재 영상의 샘플들과 이전 복원 영상의 대응 샘플들 사이의 위치 차이, 즉 움직임 벡터의 집합으로 이해될 수 있다.The prediction decoding unit 630-3 shown in FIG. 11 corresponds to the encoding/decoding process of an image previously described with respect to FIG. It can be understood as a positional difference between samples, that is, a set of motion vectors.

다시 말하면, 도 11에 도시된 예측 복호화부(630-3)는 여러 개의 움직임 벡터의 집합을 획득하고, 이들의 신뢰도 내지 정확도를 나타내는 제 2 가중치 데이터를 이용함으로써 현재 영상에 보다 유사한 최종 예측 영상을 획득할 수 있다.In other words, the predictive decoding unit 630-3 shown in FIG. 11 obtains a set of several motion vectors and uses second weight data representing their reliability or accuracy to obtain a final predicted image more similar to the current image. can be obtained

한편, 도 11에는 도시되어 있지 않지만, 일 실시예에서, 예측 복호화부(630)는 현재 옵티컬 플로우의 특징 데이터를 처리하여 복수의 제 2 가중치 데이터를 출력하는 가중치 디코더를 더 포함할 수 있다. 이 경우, 옵티컬 플로우 디코더(450)는 현재 옵티컬 플로우의 특징 데이터를 처리하여 복수의 현재 옵티컬 플로우를 출력하고, 복수의 제 2 가중치 데이터는 가중치 디코더에 의해 출력될 수 있다.Meanwhile, although not shown in FIG. 11 , in one embodiment, the predictive decoding unit 630 may further include a weight decoder for outputting a plurality of second weight data by processing feature data of the current optical flow. In this case, the optical flow decoder 450 may output a plurality of current optical flows by processing feature data of the current optical flow, and output a plurality of second weight data by the weight decoder.

또한, 일 실시예에서, 가중치 디코더는 가중치 데이터의 특징 데이터를 처리하여 복수의 제 2 가중치 데이터를 출력할 수 있다. 가중치 데이터의 특징 데이터는 비트스트림에 포함될 수 있고, 획득부(610)는 비트스트림으로부터 가중치 데이터의 특징 데이터를 획득하여 가중치 디코더로 제공할 수 있다.Also, in one embodiment, the weight decoder may output a plurality of second weight data by processing feature data of the weight data. Feature data of the weight data may be included in the bitstream, and the acquisition unit 610 may obtain feature data of the weight data from the bitstream and provide the obtained feature data to a weight decoder.

또한, 일 실시예에서, 예측 복호화부(630-3)는 한 쌍의 현재 옵티컬 플로우와 제 2 가중치 데이터를 출력하는 복수의 옵티컬 플로우 디코더(450)를 포함할 수도 있다.Also, in one embodiment, the prediction decoding unit 630 - 3 may include a plurality of optical flow decoders 450 outputting a pair of current optical flow and second weight data.

또한, 일 실시예에서, 예측 복호화부(630-3)는 복수의 옵티컬 플로우 디코더(450) 및 복수의 가중치 디코더를 포함할 수 있다. 이 경우, 복수의 옵티컬 플로우 디코더(450) 각각은 하나(또는 그 이상)의 현재 옵티컬 플로우를 출력하고, 복수의 가중치 디코더 각각은 하나(또는 그 이상)의 제 2 가중치 데이터를 출력할 수 있다.Also, in one embodiment, the prediction decoding unit 630 - 3 may include a plurality of optical flow decoders 450 and a plurality of weight decoders. In this case, each of the plurality of optical flow decoders 450 may output one (or more) current optical flows, and each of the plurality of weight decoders may output one (or more) second weight data.

도 12는 일 실시예에 따른 예측 복호화부(630-4)의 구성을 도시하는 도면이다.12 is a diagram illustrating a configuration of a prediction decoding unit 630-4 according to an embodiment.

도 12에 도시된 예측 복호화부(630-4)는 도 8에 도시된 예측 복호화부(630)와 도 11에 도시된 예측 복호화부(630-3)의 동작을 수행하기 위한 것일 수 있다.The prediction decoding unit 630-4 shown in FIG. 12 may be for performing the operations of the prediction decoding unit 630 shown in FIG. 8 and the prediction decoding unit 630-3 shown in FIG.

도 12를 참조하면, 예측 복호화부(630-4)는 옵티컬 플로우 디코더(450), 잔차 디코더(470), 움직임 보상부(631), 가중치 적용부(632) 및 결합부(633)를 포함할 수 있다.Referring to FIG. 12, the prediction decoding unit 630-4 may include an optical flow decoder 450, a residual decoder 470, a motion compensation unit 631, a weight application unit 632, and a combiner 633. can

옵티컬 플로우 디코더(450) 및 잔차 디코더(470)는 적어도 하나의 레이어(예를 들어, 컨볼루션 레이어)를 포함하는 신경망으로 구현될 수 있다. The optical flow decoder 450 and the residual decoder 470 may be implemented as a neural network including at least one layer (eg, a convolutional layer).

옵티컬 플로우 디코더(450) 및 잔차 디코더(470)는 메모리에 저장될 수 있다. 일 실시예에서, 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.The optical flow decoder 450 and the residual decoder 470 may be stored in memory. In one embodiment, the optical flow decoder 450 and the residual decoder 470 may be implemented with at least one dedicated processor for AI.

획득부(610)에 의해 출력된 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터는 각각 옵티컬 플로우 디코더(450)와 잔차 디코더(470)로 입력될 수 있다.Feature data of the current optical flow and feature data of the current residual image output by the acquisition unit 610 may be input to the optical flow decoder 450 and the residual decoder 470, respectively.

옵티컬 플로우 디코더(450)는 훈련을 통해 설정된 파라미터에 따라 현재 옵티컬 플로우의 특징 데이터를 처리하여 복수의 현재 옵티컬 플로우, 제 1 가중치 데이터 및 복수의 제 2 가중치 데이터를 출력할 수 있다. The optical flow decoder 450 may process feature data of the current optical flow according to parameters set through training and output a plurality of current optical flows, first weight data, and a plurality of second weight data.

각각의 현재 옵티컬 플로우, 제 1 가중치 데이터 및 각각의 제 2 가중치 데이터는 1차원 또는 2차원의 데이터로서, 복수의 샘플들로 이루어질 수 있다. 각각의 현재 옵티컬 플로우의 크기, 제 1 가중치 데이터의 크기 및 각각의 제 2 가중치 데이터의 크기는 서로 동일할 수 있다. Each current optical flow, each of the first weight data and each of the second weight data is one-dimensional or two-dimensional data, and may consist of a plurality of samples. The size of each current optical flow, the size of the first weight data, and the size of each of the second weight data may be equal to each other.

일 실시예에서, 각각의 현재 옵티컬 플로우의 크기, 제 1 가중치 데이터의 크기 및 각각의 제 2 가중치 데이터의 크기는 이전 복원 영상의 크기와 동일할 수 있다.In an embodiment, the size of each current optical flow, the size of each first weight data, and the size of each second weight data may be the same as the size of a previous reconstructed image.

일 실시예에서, 복수의 현재 옵티컬 플로우와 복수의 제 2 가중치 데이터는 1:1로 대응할 수 있다. In one embodiment, a plurality of current optical flows and a plurality of second weight data may correspond 1:1.

복수의 현재 옵티컬 플로우는 움직임 보상부(631)로 제공될 수 있다. 움직임 보상부(631)는 이전 복원 영상을 복수의 현재 옵티컬 플로우에 따라 처리하여 복수의 예비 예측 영상을 생성할 수 있다.A plurality of current optical flows may be provided to the motion compensator 631 . The motion compensation unit 631 may generate a plurality of preliminary prediction images by processing previous reconstructed images according to a plurality of current optical flows.

움직임 보상부(631)는 복수의 예비 예측 영상의 생성을 위해 이전 복원 영상을 복수의 현재 옵티컬 플로우 각각에 따라 워핑할 수 있다. 복수의 예비 예측 영상의 생성을 위한 워핑은 하나의 예시이고, 움직임 보상부(631)는 복수의 예비 예측 영상을 생성하기 위해, 복수의 현재 옵티컬 플로우에 기반하여 이전 복원 영상을 변경하는 다양한 영상 처리를 수행할 수 있다.The motion compensator 631 may warp previous reconstructed images according to each of a plurality of current optical flows in order to generate a plurality of preliminary prediction images. Warping for generating a plurality of preliminary prediction images is one example, and the motion compensator 631 performs various image processing to change previous reconstruction images based on a plurality of current optical flows in order to generate a plurality of preliminary prediction images. can be performed.

움직임 보상부(631)에 의해 생성된 복수의 예비 예측 영상과 옵티컬 플로우 디코더(450)에 의해 출력된 제 1 가중치 데이터 및 복수의 제 2 가중치 데이터는 가중치 적용부(632)로 제공될 수 있다.The plurality of preliminary prediction images generated by the motion compensator 631 and the first weight data and the plurality of second weight data output by the optical flow decoder 450 may be provided to the weight application unit 632 .

복수의 제 2 가중치 데이터는 복수의 현재 옵티컬 플로우의 신뢰도 또는 정확도로 참조될 수 있다. The plurality of second weight data may be referred to as reliability or accuracy of a plurality of current optical flows.

가중치 적용부(632)는 복수의 제 2 가중치 데이터를 복수의 예비 예측 영상에 적용하여 복수의 변형된 예측 영상을 획득할 수 있다. 예를 들어, 가중치 적용부(632)는 어느 하나의 제 2 가중치 데이터의 샘플 값들을 어느 하나의 제 2 가중치 데이터에 대응하는 예비 예측 영상의 샘플 값들에 곱하여 어느 하나의 변형된 예측 영상을 획득할 수 있다. 그리고, 가중치 적용부(632)는 다른 하나의 제 2 가중치 데이터의 샘플 값들을 다른 하나의 제 2 가중치 데이터에 대응하는 예비 예측 영상의 샘플 값들에 곱하여 다른 하나의 변형된 예측 영상을 획득할 수 있다.The weight application unit 632 may obtain a plurality of transformed prediction images by applying a plurality of second weight data to a plurality of preliminary prediction images. For example, the weight application unit 632 multiplies sample values of any one of the second weight data by sample values of a preliminary prediction image corresponding to any one of the second weight data to obtain any one modified prediction image. can And, the weight application unit 632 may obtain another modified prediction image by multiplying sample values of another piece of second weight data by sample values of a preliminary prediction image corresponding to another piece of second weight data. .

일 실시예에서, 복수의 제 2 가중치 데이터 내에서 동일한 위치에 있는 샘플 값들의 합은 1일 수 있다.In one embodiment, the sum of sample values at the same location within the plurality of second weight data may be 1.

복수의 변형된 예측 영상은 결합부(633)로 제공될 수 있다. 결합부(633)는 복수의 변형된 예측 영상을 결합하여 중간 예측 영상(intermediate prediction image)을 획득할 수 있다. A plurality of modified predicted images may be provided to the combiner 633 . The combining unit 633 may obtain an intermediate prediction image by combining a plurality of modified prediction images.

일 실시예에서, 결합부(633)는 복수의 변형된 예측 영상의 동일 위치의 샘플 값들을 서로 합하여 중간 예측 영상을 획득할 수 있다.In an embodiment, the combiner 633 may obtain an intermediate prediction image by summing sample values of the plurality of modified prediction images at the same location.

중간 예측 영상은 가중치 적용부(632)로 제공될 수 있다. 가중치 적용부(632)는 중간 예측 영상의 샘플 값들에 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득할 수 있다. The intermediate prediction image may be provided to the weight application unit 632 . The weight application unit 632 may obtain a final prediction image by applying sample values of the first weight data to sample values of the intermediate prediction image.

일 실시예에서, 가중치 적용부(632)는 중간 예측 영상의 샘플 값들에 제 1 가중치 데이터의 샘플 값들을 곱하여 최종 예측 영상을 획득할 수 있다.In an embodiment, the weight application unit 632 may obtain a final prediction image by multiplying sample values of the intermediate prediction image by sample values of the first weight data.

가중치 적용부(632)에 의해 획득된 최종 예측 영상은 결합부(633)로 제공될 수 있다.The final predicted image obtained by the weight application unit 632 may be provided to the combiner 633.

잔차 디코더(470)는 훈련을 통해 설정된 파라미터에 따라 현재 잔차 영상의 특징 데이터를 처리하여 현재 잔차 영상을 획득할 수 있다. 현재 잔차 영상은 결합부(633)로 제공될 수 있다.The residual decoder 470 may obtain a current residual image by processing feature data of the current residual image according to parameters set through training. The current residual image may be provided to the combiner 633.

결합부(633)는 최종 예측 영상과 현재 잔차 영상을 결합하여 현재 복원 영상을 획득할 수 있다. The combiner 633 may obtain a current reconstructed image by combining the final prediction image and the current residual image.

도 12에는 도시되어 있지 않지만, 일 실시예에서, 예측 복호화부(630-4)는 현재 옵티컬 플로우의 특징 데이터를 처리하여 제 1 가중치 데이터와 복수의 제 2 가중치 데이터를 출력하는 적어도 하나의 가중치 디코더와, 현재 옵티컬 플로우의 특징 데이터를 처리하여 복수의 현재 옵티컬 플로우를 출력하는 적어도 하나의 옵티컬 플로우 디코더(450)를 포함할 수 있다. Although not shown in FIG. 12, in one embodiment, the prediction decoding unit 630-4 processes feature data of the current optical flow and outputs first weight data and a plurality of second weight data. At least one weight decoder and at least one optical flow decoder 450 outputting a plurality of current optical flows by processing feature data of the current optical flow.

일 실시예에서, 적어도 하나의 가중치 디코더는 현재 옵티컬 플로우의 특징 데이터를 처리하여 제 1 가중치 데이터를 출력하는 가중치 디코더와, 현재 옵티컬 플로우의 특징 데이터를 처리하여 복수의 제 2 가중치 데이터를 출력하는 가중치 디코더를 포함할 수도 있다.In one embodiment, the at least one weight decoder includes a weight decoder for processing feature data of the current optical flow and outputting first weight data, and a weight decoder for outputting a plurality of second weight data by processing feature data of the current optical flow. It may also include a decoder.

또한, 일 실시예에서, 적어도 하나의 가중치 디코더는 가중치 데이터의 특징 데이터를 처리하여 제 1 가중치 데이터와 복수의 제 2 가중치 데이터를 출력할 수 있다. 이 경우, 가중치 데이터의 특징 데이터는 비트스트림에 포함될 수 있고, 획득부(610)는 비트스트림으로부터 가중치 데이터의 특징 데이터를 획득하여 가중치 디코더로 제공할 수 있다.Also, in one embodiment, at least one weight decoder may output first weight data and a plurality of second weight data by processing feature data of the weight data. In this case, feature data of the weight data may be included in the bitstream, and the acquisition unit 610 may obtain feature data of the weight data from the bitstream and provide the obtained feature data to the weight decoder.

또한, 일 실시예에서, 예측 복호화부(630-4)는 복수의 현재 옵티컬 플로우와 제 1 가중치 데이터를 출력하는 적어도 하나의 옵티컬 플로우 디코더(450)와 복수의 제 2 가중치 데이터를 출력하는 적어도 하나의 가중치 디코더를 포함할 수도 있다.In addition, in one embodiment, the prediction decoding unit 630-4 includes at least one optical flow decoder 450 outputting a plurality of current optical flows and first weight data and at least one outputting a plurality of second weight data. may include a weight decoder of

또한, 일 실시예에서, 예측 복호화부(630-4)는 복수의 현재 옵티컬 플로우와 복수의 제 2 가중치 데이터를 출력하는 적어도 하나의 옵티컬 플로우 디코더(450)와 제 1 가중치 데이터를 출력하는 가중치 디코더를 포함할 수도 있다.In addition, in one embodiment, the prediction decoding unit 630-4 includes at least one optical flow decoder 450 outputting a plurality of current optical flows and a plurality of second weight data and a weight decoder outputting first weight data. may include.

또한, 일 실시예에서, 예측 복호화부(630-4)는 각각이 한 쌍의 현재 옵티컬 플로우와 제 2 가중치 데이터를 출력하는 복수의 옵티컬 플로우 디코더(450), 및 제 1 가중치 데이터를 출력하는 옵티컬 플로우 디코더(450)(또는 가중치 디코더)를 포함할 수도 있다.In addition, in one embodiment, the prediction decoding unit 630-4 includes a plurality of optical flow decoders 450 each outputting a pair of current optical flow and second weight data, and optical flow decoders 450 outputting first weight data. It may also include a flow decoder 450 (or weight decoder).

한편, 도 12에 도시된 예측 복호화부(630-4)는 복수의 제 2 가중치 데이터를 복수의 예비 예측 영상에 곱하여 복수의 변형된 예측 영상을 획득하고, 복수의 변형된 예측 영상의 결합 결과에 해당하는 중간 예측 영상에 제 1 가중치 데이터를 곱하여 최종 예측 영상을 획득할 수 있는데, 이를 하기 수학식 1로 표현할 수 있다. 하기 수학식 1에서 i는 인덱스를 나타낸다.Meanwhile, the prediction decoding unit 630-4 shown in FIG. 12 obtains a plurality of transformed prediction images by multiplying a plurality of second weight data by a plurality of preliminary prediction images, and uses a combination result of the plurality of transformed prediction images. A final prediction image can be obtained by multiplying the corresponding intermediate prediction image by the first weight data, which can be expressed by Equation 1 below. In Equation 1 below, i represents an index.

[수학식 1][Equation 1]

최종 예측 영상 = (∑(예비 예측 영상[i]*제 2 가중치 데이터[i]))*제 1 가중치 데이터Final prediction image = (∑(Preliminary prediction image[i]*Second weight data[i]))*First weight data

하기 수학식 1은 다음 수학식 2와 같이 변형될 수 있다.Equation 1 below may be modified as in Equation 2 below.

[수학식 2][Equation 2]

최종 예측 영상 = ∑(예비 예측 영상[i]*제 2 가중치 데이터[i]*제 1 가중치 데이터)Final prediction image = ∑ (preliminary prediction image [i] * second weight data [i] * first weight data)

일 실시예에서, 옵티컬 플로우 디코더(450)는 수학식 2에서 복수의 제 2 가중치 데이터와 제 1 가중치 데이터를 곱한 결과에 해당하는 복수의 제 3 가중치 데이터를 출력할 수 있다.In an embodiment, the optical flow decoder 450 may output a plurality of third weight data corresponding to a result of multiplying the plurality of second weight data and the first weight data in Equation 2.

예를 들어, 제 3 가중치 데이터는 하기의 수학식 3으로 표현될 수 있다.For example, the third weight data may be expressed by Equation 3 below.

[수학식 3][Equation 3]

제 3 가중치 데이터[i] = 제 2 가중치 데이터[i] * 제 1 가중치 데이터3rd weight data [i] = 2nd weight data [i] * 1st weight data

옵티컬 플로우 디코더(450)는 현재 옵티컬 플로우의 특징 데이터를 처리하여 복수의 제 3 가중치 데이터를 획득하고, 복수의 제 3 가중치 데이터를 가중치 적용부(632)로 제공할 수 있다.The optical flow decoder 450 may process feature data of the current optical flow to obtain a plurality of third weight data and provide the plurality of third weight data to the weight application unit 632 .

가중치 적용부(632)는 복수의 예비 예측 영상에 복수의 제 3 가중치 데이터를 적용하여 복수의 변형된 예측 영상을 획득하고, 결합부(633)는 복수의 변형된 예측 영상을 결합하여 최종 예측 영상을 획득할 수 있다.The weight application unit 632 obtains a plurality of transformed prediction images by applying a plurality of third weight data to a plurality of preliminary prediction images, and the combining unit 633 combines the plurality of transformed prediction images to obtain a final prediction image. can be obtained.

옵티컬 플로우 디코더(450)가 복수의 제 3 가중치 데이터를 출력하는 경우의 예측 복호화부(630)의 구성은 도 11에 도시된 예측 복호화부(630-3)와 동일할 수 있다. 이 경우, 도 11의 옵티컬 플로우 디코더(450)는 복수의 제 2 가중치 데이터 대신 복수의 제 3 가중치 데이터를 출력할 수 있다.When the optical flow decoder 450 outputs a plurality of third weight data, the configuration of the prediction decoding unit 630 may be the same as that of the prediction decoding unit 630 - 3 shown in FIG. 11 . In this case, the optical flow decoder 450 of FIG. 11 may output a plurality of third weight data instead of a plurality of second weight data.

도 13은 일 실시예에 따른 영상 복호화 방법의 순서도이다.13 is a flowchart of an image decoding method according to an embodiment.

도 13을 참조하면, S1310 단계에서, 영상 복호화 장치(600)는 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득한다.Referring to FIG. 13 , in step S1310, the image decoding apparatus 600 obtains feature data of the current optical flow and feature data of the current residual image from the bitstream.

일 실시예에서, 영상 복호화 장치(600)는 비트스트림에 포함된 비트들에 대해 엔트로피 복호화, 역양자화 및/또는 역변환을 수행하여 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain feature data of the current optical flow and feature data of the current residual image by performing entropy decoding, inverse quantization, and/or inverse transformation on bits included in the bitstream. there is.

일 실시예에서, 영상 복호화 장치(600)는 비트스트림으로부터 가중치 데이터의 특징 데이터를 더 획득할 수 있다.In one embodiment, the image decoding apparatus 600 may further obtain feature data of the weight data from the bitstream.

S1320 단계에서, 영상 복호화 장치(600)는 신경망 기반의 옵티컬 플로우 디코더(450)에 현재 옵티컬 플로우의 특징 데이터를 적용하여 현재 옵티컬 플로우 및 제 1 가중치 데이터를 획득한다. In step S1320, the image decoding apparatus 600 obtains the current optical flow and first weight data by applying feature data of the current optical flow to the neural network-based optical flow decoder 450.

일 실시예에서, 영상 복호화 장치(600)는 가중치 데이터의 특징 데이터를 가중치 디코더(634)에 적용하여 제 1 가중치 데이터를 획득할 수 있다.In one embodiment, the image decoding apparatus 600 may obtain first weight data by applying feature data of the weight data to the weight decoder 634 .

S1330 단계에서, 영상 복호화 장치(600)는 신경망 기반의 잔차 디코더(470)에 현재 잔차 영상의 특징 데이터를 적용하여 현재 잔차 영상을 획득한다.In step S1330, the image decoding apparatus 600 acquires a current residual image by applying feature data of the current residual image to the neural network-based residual decoder 470.

S1340 단계에서, 영상 복호화 장치(600)는 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득한다. 예비 예측 영상을 획득하는 데 워핑이 이용될 수 있다.In step S1340, the image decoding apparatus 600 obtains a preliminary prediction image from a previous reconstructed image based on the current optical flow. Warping may be used to obtain a preliminary prediction image.

S1350 단계에서, 영상 복호화 장치(600)는 예비 예측 영상에 제 1 가중치 데이터를 적용하여 최종 예측 영상을 획득한다. In step S1350, the image decoding apparatus 600 obtains a final predicted image by applying first weight data to the preliminary predicted image.

일 실시예에서, 영상 복호화 장치(600)는 예비 예측 영상의 샘플 값들 각각에 제 1 가중치 데이터의 샘플 값들 각각을 곱하여 최종 예측 영상을 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain a final prediction image by multiplying each sample value of the preliminary prediction image by each sample value of the first weight data.

S1360 단계에서, 영상 복호화 장치(600)는 최종 예측 영상과 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득할 수 있다. In step S1360, the image decoding apparatus 600 may obtain a current reconstructed image corresponding to the current image by combining the final prediction image and the current residual image.

일 실시예에서, 영상 복호화 장치(600)는 최종 예측 영상의 샘플 값들 각각에 현재 잔차 영상의 샘플 값들 각각을 더하여 현재 복원 영상을 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain a current reconstructed image by adding each sample value of the current residual image to each of the sample values of the final prediction image.

도 14는 일 실시예에 따른 영상 복호화 방법의 순서도이다.14 is a flowchart of an image decoding method according to an embodiment.

도 14를 참조하면, S1410 단계에서, 영상 복호화 장치(600)는 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득한다.Referring to FIG. 14 , in step S1410, the image decoding apparatus 600 obtains feature data of the current optical flow and feature data of the current residual image from the bitstream.

일 실시예에서, 영상 복호화 장치(600)는 비트스트림에 포함된 비트들에 대해 엔트로피 복호화, 역양자화 및/또는 역변환을 수행하여 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain feature data of the current optical flow and feature data of the current residual image by performing entropy decoding, inverse quantization, and/or inverse transformation on bits included in the bitstream. there is.

일 실시예에서, 영상 복호화 장치(600)는 비트스트림으로부터 가중치 데이터의 특징 데이터를 더 획득할 수 있다.In one embodiment, the image decoding apparatus 600 may further obtain feature data of the weight data from the bitstream.

S1420 단계에서, 영상 복호화 장치(600)는 신경망 기반의 옵티컬 플로우 디코더(450)에 현재 옵티컬 플로우의 특징 데이터를 적용하여 복수의 현재 옵티컬 플로우 및 복수의 제 2 가중치 데이터를 획득한다. In step S1420, the image decoding apparatus 600 obtains a plurality of current optical flows and a plurality of second weight data by applying feature data of the current optical flow to the neural network-based optical flow decoder 450.

일 실시예에서, 영상 복호화 장치(600)는 가중치 데이터의 특징 데이터를 적어도 하나의 가중치 디코더(634)에 적용하여 복수의 제 2 가중치 데이터를 획득할 수 있다.In one embodiment, the image decoding apparatus 600 may obtain a plurality of second weight data by applying feature data of the weight data to at least one weight decoder 634 .

S1430 단계에서, 영상 복호화 장치(600)는 신경망 기반의 잔차 디코더(470)에 현재 잔차 영상의 특징 데이터를 적용하여 현재 잔차 영상을 획득한다.In step S1430, the image decoding apparatus 600 obtains a current residual image by applying feature data of the current residual image to the neural network-based residual decoder 470.

S1440 단계에서, 영상 복호화 장치(600)는 복수의 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득한다. 복수의 예비 예측 영상을 획득하는 데 워핑이 이용될 수 있다.In step S1440, the image decoding apparatus 600 obtains a plurality of preliminary prediction images from previous reconstructed images based on a plurality of current optical flows. Warping may be used to obtain a plurality of preliminary prediction images.

S1450 단계에서, 영상 복호화 장치(600)는 복수의 예비 예측 영상에 복수의 제 2 가중치 데이터를 적용하여 복수의 변형된 예측 영상을 획득한다. In step S1450, the image decoding apparatus 600 obtains a plurality of modified prediction images by applying a plurality of second weight data to a plurality of preliminary prediction images.

일 실시예에서, 영상 복호화 장치(600)는 복수의 예비 예측 영상의 샘플 값들 각각에 복수의 제 2 가중치 데이터의 샘플 값들 각각을 곱하여 복수의 변형된 예측 영상을 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain a plurality of modified prediction images by multiplying each of sample values of a plurality of preliminary prediction images by each sample value of a plurality of second weight data.

S1460 단계에서, 영상 복호화 장치(600)는 복수의 변형된 예측 영상을 결합하여 최종 예측 영상을 획득한다. In step S1460, the image decoding apparatus 600 obtains a final predicted image by combining a plurality of transformed predicted images.

일 실시예에서, 영상 복호화 장치(600)는 복수의 변형된 예측 영상에 포함된 동일 위치의 샘플 값들을 더하여 최종 예측 영상을 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain a final predicted image by adding sample values at the same location included in a plurality of transformed predicted images.

S1470 단계에서, 영상 복호화 장치(600)는 최종 예측 영상과 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득할 수 있다. In step S1470, the image decoding apparatus 600 may obtain a current reconstructed image corresponding to the current image by combining the final prediction image and the current residual image.

일 실시예에서, 영상 복호화 장치(600)는 최종 예측 영상의 샘플 값들 각각에 현재 잔차 영상의 샘플 값들 각각을 더하여 현재 복원 영상을 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain a current reconstructed image by adding each sample value of the current residual image to each of the sample values of the final prediction image.

도 15는 일 실시예에 따른 영상 복호화 방법의 순서도이다.15 is a flowchart of an image decoding method according to an embodiment.

도 15를 참조하면, S1510 단계에서, 영상 복호화 장치(600)는 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득한다.Referring to FIG. 15 , in step S1510, the image decoding apparatus 600 obtains feature data of the current optical flow and feature data of the current residual image from the bitstream.

일 실시예에서, 영상 복호화 장치(600)는 비트스트림에 포함된 비트들에 대해 엔트로피 복호화, 역양자화 및/또는 역변환을 수행하여 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain feature data of the current optical flow and feature data of the current residual image by performing entropy decoding, inverse quantization, and/or inverse transformation on bits included in the bitstream. there is.

일 실시예에서, 영상 복호화 장치(600)는 비트스트림으로부터 가중치 데이터의 특징 데이터를 더 획득할 수 있다.In one embodiment, the image decoding apparatus 600 may further obtain feature data of the weight data from the bitstream.

S1520 단계에서, 영상 복호화 장치(600)는 신경망 기반의 옵티컬 플로우 디코더(450)에 현재 옵티컬 플로우의 특징 데이터를 적용하여 복수의 현재 옵티컬 플로우, 제 1 가중치 데이터 및 복수의 제 2 가중치 데이터를 획득한다. In step S1520, the image decoding apparatus 600 obtains a plurality of current optical flows, first weight data, and a plurality of second weight data by applying feature data of the current optical flow to the neural network-based optical flow decoder 450. .

일 실시예에서, 영상 복호화 장치(600)는 가중치 데이터의 특징 데이터를 적어도 하나의 가중치 디코더(634)에 적용하여 제 1 가중치 데이터와 복수의 제 2 가중치 데이터를 획득할 수 있다.In one embodiment, the image decoding apparatus 600 may obtain first weight data and a plurality of second weight data by applying feature data of weight data to at least one weight decoder 634 .

S1530 단계에서, 영상 복호화 장치(600)는 신경망 기반의 잔차 디코더(470)에 현재 잔차 영상의 특징 데이터를 적용하여 현재 잔차 영상을 획득한다.In step S1530, the image decoding apparatus 600 obtains a current residual image by applying feature data of the current residual image to the neural network-based residual decoder 470.

S1540 단계에서, 영상 복호화 장치(600)는 복수의 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득한다. 복수의 예비 예측 영상을 획득하는데 워핑이 이용될 수 있다.In step S1540, the image decoding apparatus 600 obtains a plurality of preliminary prediction images from previous reconstructed images based on a plurality of current optical flows. Warping may be used to obtain a plurality of preliminary prediction images.

S1550 단계에서, 영상 복호화 장치(600)는 복수의 예비 예측 영상에 복수의 제 2 가중치 데이터를 적용하여 복수의 변형된 예측 영상을 획득한다. In step S1550, the image decoding apparatus 600 obtains a plurality of modified prediction images by applying a plurality of second weight data to a plurality of preliminary prediction images.

일 실시예에서, 영상 복호화 장치(600)는 복수의 예비 예측 영상의 샘플 값들 각각에 복수의 제 2 가중치 데이터의 샘플 값들 각각을 곱하여 복수의 변형된 예측 영상을 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain a plurality of modified prediction images by multiplying each of sample values of a plurality of preliminary prediction images by each sample value of a plurality of second weight data.

S1560 단계에서, 영상 복호화 장치(600)는 복수의 변형된 예측 영상을 결합하여 중간 예측 영상을 획득한다.In step S1560, the image decoding apparatus 600 obtains an intermediate prediction image by combining a plurality of modified prediction images.

일 실시예에서, 영상 복호화 장치(600)는 복수의 변형된 예측 영상의 동일 위치의 샘플 값들을 더하여 중간 예측 영상을 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain an intermediate predicted image by adding sample values at the same position of a plurality of modified predicted images.

S1570 단계에서, 영상 복호화 장치(600)는 중간 예측 영상에 제 1 가중치 데이터를 적용하여 최종 예측 영상을 획득한다.In step S1570, the image decoding apparatus 600 obtains a final predicted image by applying first weight data to the intermediate predicted image.

일 실시예에서, 영상 복호화 장치(600)는 중간 예측 영상의 샘플 값들 각각에 제 1 가중치 데이터의 샘플 값들 각각을 곱하여 최종 예측 영상을 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain a final prediction image by multiplying each sample value of the intermediate prediction image by each sample value of the first weight data.

S1580 단계에서, 영상 복호화 장치(600)는 최종 예측 영상과 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득할 수 있다. In step S1580, the image decoding apparatus 600 may obtain a current reconstructed image corresponding to the current image by combining the final prediction image and the current residual image.

일 실시예에서, 영상 복호화 장치(600)는 최종 예측 영상의 샘플 값들 각각에 현재 잔차 영상의 샘플 값들 각각을 더하여 현재 복원 영상을 획득할 수 있다.In an embodiment, the image decoding apparatus 600 may obtain a current reconstructed image by adding each sample value of the current residual image to each of the sample values of the final prediction image.

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

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

도 16을 참조하면, 영상 부호화 장치(1600)는 예측 부호화부(1610), 생성부(1620), 획득부(1630) 및 예측 복호화부(1640)를 포함할 수 있다.Referring to FIG. 16 , an image encoding apparatus 1600 may include a predictive encoder 1610, a generator 1620, an acquirer 1630, and a predictive decoder 1640.

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

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

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

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

예측 부호화부(1610)는 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터의 획득을 위해 신경망 기반의 옵티컬 플로우 인코더(410)와 잔차 인코더(430)를 이용할 수 있다. 예측 부호화부(1610)의 동작에 대해서는 도 17 및 도 18을 참조하여 상세히 설명한다.The prediction encoder 1610 may use the neural network-based optical flow encoder 410 and the residual encoder 430 to acquire feature data of the current optical flow and feature data of the current residual image. The operation of the predictive encoder 1610 will be described in detail with reference to FIGS. 17 and 18 .

예측 부호화부(1610)에 의해 획득된 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터는 생성부(1620)로 전달될 수 있다.Feature data of the current optical flow and feature data of the current residual image acquired by the predictive encoder 1610 may be transmitted to the generator 1620 .

생성부(1620)는 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성할 수 있다. The generation unit 1620 may generate a bitstream including feature data of the current optical flow and feature data of the current residual image.

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

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

획득부(1630)는 생성부(1620)에 의해 생성된 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 획득할 수 있다.The acquisition unit 1630 may acquire feature data of the current optical flow and feature data of the current residual image from the bitstream generated by the generator 1620 .

일 실시예에서, 획득부(1630)는 예측 부호화부(1610)로부터 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 수신할 수도 있다.In an embodiment, the acquisition unit 1630 may receive feature data of the current optical flow and feature data of the current residual image from the predictive encoder 1610 .

현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터는 예측 복호화부(1640)로 전달될 수 있다. Feature data of the current optical flow and feature data of the current residual image may be transferred to the prediction decoding unit 1640 .

예측 복호화부(1640)는 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 이용하여 현재 복원 영상을 획득할 수 있다. The predictive decoding unit 1640 may obtain a current reconstructed image using feature data of the current optical flow and feature data of the current residual image.

예측 복호화부(1640)에 의해 획득된 현재 복원 영상은 다음 영상의 부호화 과정에서 이용될 수 있다.The current reconstructed image obtained by the predictive decoding unit 1640 may be used in the encoding process of the next image.

획득부(1630) 및 예측 복호화부(1640)의 구성 및 동작은 영상 복호화 장치(600)의 획득부(610) 및 예측 복호화부(630)와 동일할 수 있다. Configurations and operations of the acquisition unit 1630 and the prediction decoding unit 1640 may be the same as those of the acquisition unit 610 and the prediction decoding unit 630 of the image decoding apparatus 600 .

예를 들어, 획득부(1630)의 구성 및 동작은 도 7에 도시된 획득부(610)와 동일하고, 예측 복호화부(1640)의 구성 및 동작은 앞서 도 8 내지 도 12에 도시된 예측 복호화부들(630, 630-1, 630-2, 630-3, 630-4) 중 어느 하나와 동일할 수 있다.For example, the configuration and operation of the acquisition unit 1630 is the same as that of the acquisition unit 610 shown in FIG. 7, and the configuration and operation of the prediction decoding unit 1640 perform the prediction decoding shown in FIGS. It may be the same as any one of the parts 630, 630-1, 630-2, 630-3, and 630-4.

도 17은 일 실시예에 따른 예측 부호화부(1610)의 구성을 도시하는 도면이다.17 is a diagram showing the configuration of a predictive encoder 1610 according to an embodiment.

도 17을 참조하면, 예측 부호화부(1610)는 옵티컬 플로우 인코더(410), 잔차 인코더(430) 및 차감부(1611)를 포함할 수 있다.Referring to FIG. 17 , a predictive encoder 1610 may include an optical flow encoder 410, a residual encoder 430, and a subtractor 1611.

옵티컬 플로우 인코더(410) 및 잔차 인코더(430)는 적어도 하나의 레이어(예를 들어, 컨볼루션 레이어)를 포함하는 신경망으로 구현될 수 있다. The optical flow encoder 410 and the residual encoder 430 may be implemented as a neural network including at least one layer (eg, a convolutional layer).

옵티컬 플로우 인코더(410) 및 잔차 인코더(430)는 메모리에 저장될 수 있다. 옵티컬 플로우 인코더(410) 및 잔차 인코더(430)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.The optical flow encoder 410 and the residual encoder 430 may be stored in memory. The optical flow encoder 410 and the residual encoder 430 may be implemented with at least one dedicated processor for AI.

현재 영상 및 이전 복원 영상은 옵티컬 플로우 인코더(410)로 입력될 수 있다. 옵티컬 플로우 인코더(410)는 훈련을 통해 설정된 파라미터에 따라 현재 영상과 이전 복원 영상을 처리하여 현재 옵티컬 플로우의 특징 데이터를 획득할 수 있다. 현재 옵티컬 플로우의 특징 데이터는 생성부(1620)로 전달될 수 있다.The current image and the previous reconstructed image may be input to the optical flow encoder 410 . The optical flow encoder 410 may obtain feature data of the current optical flow by processing the current image and the previous reconstructed image according to parameters set through training. Characteristic data of the current optical flow may be transmitted to the generating unit 1620 .

현재 옵티컬 플로우의 특징 데이터에 기초하여 이전 복원 영상으로부터 생성된 최종 예측 영상은 현재 영상과 함께 차감부(1611)로 입력될 수 있다. 최종 예측 영상은 예측 복호화부(1640)에 의해 생성되어 예측 부호화부(1610)로 전달될 수 있다. 예측 복호화부(1640)가 최종 예측 영상을 생성하는 과정에 대해 도 8 내지 도 12를 참조하여 설명하였으므로 여기서는 그 설명을 생략한다. A final predicted image generated from a previous reconstructed image based on feature data of the current optical flow may be input to the subtraction unit 1611 together with the current image. The final prediction image may be generated by the prediction decoding unit 1640 and transmitted to the prediction encoding unit 1610. Since the process of generating the final prediction image by the prediction decoding unit 1640 has been described with reference to FIGS. 8 to 12, the description thereof is omitted here.

차감부(1611)는 현재 영상과 최종 예측 영상 사이의 차이에 해당하는 현재 잔차 영상을 획득할 수 있다. The subtractor 1611 may obtain a current residual image corresponding to a difference between the current image and the final predicted image.

일 실시예에서, 차감부(1611)는 현재 영상의 샘플 값들로부터 최종 예측 영상의 샘플 값들을 차감하여 현재 잔차 영상을 획득할 수 있다.In an embodiment, the subtractor 1611 may obtain a current residual image by subtracting sample values of the final prediction image from sample values of the current image.

현재 잔차 영상은 잔차 인코더(430)로 입력될 수 있다. 잔차 인코더(430)는 훈련을 통해 설정된 파라미터에 따라 현재 잔차 영상을 처리하여 현재 잔차 영상의 특징 데이터를 획득할 수 있다. 현재 잔차 영상의 특징 데이터는 생성부(1620)로 전달될 수 있다.The current residual image may be input to the residual encoder 430 . The residual encoder 430 may obtain feature data of the current residual image by processing the current residual image according to parameters set through training. Feature data of the current residual image may be transmitted to the generation unit 1620 .

도 17에 도시된 예측 부호화부(1610)에 따르면, 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림이 생성되므로, 영상 복호화 장치(600)는 도 8, 도 9, 도 11 및 도 12에 도시된 예측 복호화부들(630, 630-1, 630-3, 630-4) 중 어느 하나를 포함할 수 있다.According to the predictive encoder 1610 shown in FIG. 17, since a bitstream including feature data of the current optical flow and feature data of the current residual image is generated, the image decoding apparatus 600 may It may include any one of the prediction decoding units 630, 630-1, 630-3, and 630-4 shown in FIGS. 11 and 12 .

도 18은 일 실시예에 따른 예측 부호화부(1610-1)의 구성을 도시하는 도면이다.18 is a diagram showing the configuration of a predictive encoder 1610-1 according to an embodiment.

도 18을 참조하면, 예측 부호화부(1610-1)는 옵티컬 플로우 인코더(410), 잔차 인코더(430), 가중치 인코더(1612) 및 차감부(1611)를 포함할 수 있다.Referring to FIG. 18 , a prediction encoder 1610-1 may include an optical flow encoder 410, a residual encoder 430, a weight encoder 1612, and a subtraction unit 1611.

옵티컬 플로우 인코더(410), 잔차 인코더(430) 및 가중치 인코더(1612)는 적어도 하나의 레이어(예를 들어, 컨볼루션 레이어)를 포함하는 신경망으로 구현될 수 있다. The optical flow encoder 410, the residual encoder 430, and the weight encoder 1612 may be implemented as a neural network including at least one layer (eg, a convolutional layer).

옵티컬 플로우 인코더(410), 잔차 인코더(430) 및 가중치 인코더(1612)는 메모리에 저장될 수 있다. 옵티컬 플로우 인코더(410), 잔차 인코더(430) 및 가중치 인코더(1612)는 AI를 위한 적어도 하나의 전용 프로세서로 구현될 수도 있다.Optical flow encoder 410, residual encoder 430, and weight encoder 1612 may be stored in memory. The optical flow encoder 410, the residual encoder 430, and the weight encoder 1612 may be implemented as at least one dedicated processor for AI.

현재 영상 및 이전 복원 영상은 옵티컬 플로우 인코더(410)로 입력될 수 있다. 옵티컬 플로우 인코더(410)는 훈련을 통해 설정된 파라미터에 따라 현재 영상과 이전 복원 영상을 처리하여 현재 옵티컬 플로우의 특징 데이터를 획득할 수 있다. 현재 옵티컬 플로우의 특징 데이터는 생성부(1620)로 전달될 수 있다.The current image and the previous reconstructed image may be input to the optical flow encoder 410 . The optical flow encoder 410 may obtain feature data of the current optical flow by processing the current image and the previous reconstructed image according to parameters set through training. Characteristic data of the current optical flow may be transmitted to the generating unit 1620 .

현재 영상 및 이전 복원 영상은 가중치 인코더(1612)로 입력될 수 있다. 가중치 인코더(1612)는 훈련을 통해 설정된 파라미터에 따라 현재 영상과 이전 복원 영상을 처리하여 가중치 데이터의 특징 데이터를 획득할 수 있다. 가중치 데이터의 특징 데이터는 생성부(1620)로 전달될 수 있다.The current image and the previous reconstructed image may be input to the weight encoder 1612 . The weight encoder 1612 may obtain feature data of the weight data by processing the current image and the previous reconstructed image according to parameters set through training. Feature data of the weight data may be transmitted to the generating unit 1620 .

현재 옵티컬 플로우의 특징 데이터와 가중치 데이터의 특징 데이터에 기초하여 이전 복원 영상으로부터 생성된 최종 예측 영상은 현재 영상과 함께 차감부(1611)로 입력될 수 있다. 최종 예측 영상은 예측 복호화부(1640)에 의해 생성되어 예측 부호화부(1610)로 전달될 수 있다. A final predicted image generated from a previous reconstructed image based on the feature data of the current optical flow and the feature data of the weight data may be input to the subtraction unit 1611 together with the current image. The final prediction image may be generated by the prediction decoding unit 1640 and transmitted to the prediction encoding unit 1610.

차감부(1611)는 현재 영상과 최종 예측 영상 사이의 차이에 해당하는 현재 잔차 영상을 획득할 수 있다. 일 실시예에서, 차감부(1611)는 현재 영상의 샘플 값들로부터 최종 예측 영상의 샘플 값들을 차감하여 현재 잔차 영상을 획득할 수 있다.The subtractor 1611 may obtain a current residual image corresponding to a difference between the current image and the final predicted image. In an embodiment, the subtractor 1611 may obtain a current residual image by subtracting sample values of the final prediction image from sample values of the current image.

현재 잔차 영상은 잔차 인코더(430)로 입력될 수 있다. 잔차 인코더(430)는 훈련을 통해 설정된 파라미터에 따라 현재 잔차 영상을 처리하여 현재 잔차 영상의 특징 데이터를 획득할 수 있다. 현재 잔차 영상의 특징 데이터는 생성부(1620)로 전달될 수 있다.The current residual image may be input to the residual encoder 430 . The residual encoder 430 may obtain feature data of the current residual image by processing the current residual image according to parameters set through training. Feature data of the current residual image may be transmitted to the generation unit 1620 .

도 18에 도시된 예측 부호화부(1610-1)에 따르면, 현재 옵티컬 플로우의 특징 데이터, 현재 잔차 영상의 특징 데이터 및 가중치 데이터의 특징 데이터를 포함하는 비트스트림이 생성되므로, 영상 복호화 장치(600)는 최종 예측 영상을 생성하기 위해 가중치 데이터의 특징 데이터를 필요로 하는 예측 복호화부(630), 예를 들어, 도 10에 도시된 예측 복호화부(630-2)를 포함할 수 있다.According to the predictive encoder 1610-1 shown in FIG. 18, since a bitstream including feature data of the current optical flow, feature data of the current residual image, and feature data of weight data is generated, the image decoding apparatus 600 may include a prediction decoding unit 630 that requires feature data of weight data to generate a final prediction image, for example, the prediction decoding unit 630-2 shown in FIG. 10 .

전술한 바와 같이, 영상 복호화 장치(600)의 예측 복호화부(630)는 가중치 데이터의 특징 데이터를 이용하여 제 1 가중치 데이터 및/또는 복수의 제 2 가중치 데이터를 획득할 수 있다.As described above, the prediction decoding unit 630 of the image decoding apparatus 600 may obtain first weight data and/or a plurality of second weight data by using feature data of the weight data.

도 19는 일 실시예에 따른 생성부(1620)의 구성을 도시하는 도면이다.19 is a diagram illustrating a configuration of a generating unit 1620 according to an embodiment.

도 19를 참조하면, 생성부(1620)는 양자화부(1621) 및 엔트로피 부호화부(1623)를 포함할 수 있다.Referring to FIG. 19 , a generation unit 1620 may include a quantization unit 1621 and an entropy encoding unit 1623.

양자화부(1621)는 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 양자화할 수 있다. The quantization unit 1621 may quantize feature data of the current optical flow and feature data of the current residual image.

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

일 실시예에서, 생성부(1620)는 변환부를 더 포함할 수 있다. 변환부는 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 공간 도메인에서 주파수 도메인으로 변환하여 양자화부(1621)로 제공할 수 있다.In one embodiment, the generation unit 1620 may further include a conversion unit. The transform unit may convert the feature data of the current optical flow and the feature data of the current residual image from the spatial domain to the frequency domain and provide them to the quantization unit 1621 .

일 실시예에서, 생성부(1620)는 양자화부(1621)를 포함하지 않을 수도 있다. 즉, 엔트로피 부호화부(1623)에 의한 처리를 통해 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림이 획득될 수 있다.In one embodiment, the generation unit 1620 may not include the quantization unit 1621. That is, a bitstream including feature data of the current optical flow and feature data of the current residual image may be obtained through processing by the entropy encoder 1623 .

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

일 실시예에서, 생성부(1620)는 예측 부호화부(1610-1)로부터 전달된 가중치 데이터의 특징 데이터에 대해 변환, 양자화 또는 엔트로피 부호화 중 적어도 하나를 적용하여 가중치 데이터의 특징 데이터를 포함하는 비트스트림을 생성할 수 있다.In one embodiment, the generation unit 1620 applies at least one of transform, quantization, or entropy encoding to the feature data of the weight data transmitted from the prediction encoder 1610-1 to apply at least one bit including the feature data of the weight data. streams can be created.

도 20은 일 실시예에 영상 부호화 방법의 순서도이다.20 is a flowchart of an image encoding method according to an embodiment.

도 20을 참조하면, S2010 단계에서, 영상 부호화 장치(1600)는 현재 영상과 이전 복원 영상을 옵티컬 플로우 인코더(410)에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득한다.Referring to FIG. 20 , in step S2010, the image encoding apparatus 1600 obtains feature data of the current optical flow by applying the current image and the previous reconstructed image to the optical flow encoder 410.

일 실시예에서, 영상 부호화 장치(1600)는 현재 영상과 이전 복원 영상을 가중치 인코더(1612)에 적용하여 가중치 데이터의 특징 데이터를 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain feature data of the weight data by applying the current image and the previous reconstructed image to the weight encoder 1612 .

S2020 단계에서, 영상 부호화 장치(1600)는 현재 옵티컬 플로우의 특징 데이터를 옵티컬 플로우 디코더(450)에 적용하여 현재 옵티컬 플로우와 제 1 가중치 데이터를 획득한다.In step S2020, the image encoding apparatus 1600 obtains the current optical flow and first weight data by applying feature data of the current optical flow to the optical flow decoder 450.

일 실시예에서, 영상 부호화 장치(1600)는 현재 옵티컬 플로우의 특징 데이터를 옵티컬 플로우 디코더(450)에 적용하여 현재 옵티컬 플로우를 획득하고, 가중치 데이터의 특징 데이터를 가중치 디코더(634)에 적용하여 제 1 가중치 데이터를 획득할 수 있다.In one embodiment, the image encoding apparatus 1600 obtains the current optical flow by applying the feature data of the current optical flow to the optical flow decoder 450, and applies the feature data of the weight data to the weight decoder 634 to obtain a second 1 Weight data can be obtained.

S2030 단계에서, 영상 부호화 장치(1600)는 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득한다. 예비 예측 영상을 획득하는 데 워핑이 이용될 수 있다.In step S2030, the image encoding apparatus 1600 obtains a preliminary prediction image from a previous reconstructed image based on the current optical flow. Warping may be used to obtain a preliminary prediction image.

S2040 단계에서, 영상 부호화 장치(1600)는 예비 예측 영상에 제 1 가중치 데이터를 적용하여 최종 예측 영상을 획득한다. In step S2040, the image encoding apparatus 1600 obtains a final predicted image by applying first weight data to the preliminary predicted image.

일 실시예에서, 영상 부호화 장치(1600)는 예비 예측 영상의 샘플 값들 각각에 제 1 가중치 데이터의 샘플 값들 각각을 곱하여 최종 예측 영상을 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain a final prediction image by multiplying each sample value of the preliminary prediction image by each sample value of the first weight data.

S2050 단계에서, 영상 부호화 장치(1600)는 최종 예측 영상과 현재 영상을 이용하여 현재 잔차 영상을 획득한다. In step S2050, the image encoding apparatus 1600 obtains a current residual image using the final predicted image and the current image.

일 실시예에서, 영상 부호화 장치(1600)는 현재 영상의 샘플 값들 각각으로부터 최종 예측 영상의 샘플 값들 각각을 차감하여 현재 잔차 영상을 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain a current residual image by subtracting each sample value of the final predicted image from each sample value of the current image.

S2060 단계에서, 영상 부호화 장치(1600)는 현재 잔차 영상을 잔차 인코더(430)에 적용하여 현재 잔차 영상의 특징 데이터를 획득한다.In step S2060, the image encoding apparatus 1600 obtains feature data of the current residual image by applying the current residual image to the residual encoder 430.

S2070 단계에서, 영상 부호화 장치(1600)는 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성한다. 일 실시예에서, 비트스트림은 가중치 데이터의 특징 데이터를 더 포함할 수 있다.In step S2070, the image encoding apparatus 1600 generates a bitstream including feature data of the current optical flow and feature data of the current residual image. In one embodiment, the bitstream may further include feature data of weight data.

일 실시예에서, 영상 부호화 장치(1600)는 비트스트림의 생성을 위해 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터에 대해 변환, 양자화 또는 엔트로피 부호화 중 적어도 하나를 수행할 수 있다.In an embodiment, the image encoding apparatus 1600 may perform at least one of transformation, quantization, or entropy encoding on feature data of the current optical flow and feature data of the current residual image to generate a bitstream.

도 20을 참조하여 설명한 과정들은 도 17 및 도 18에 도시된 예측 부호화부들(1610, 1610-1) 중 어느 하나와, 도 8, 도 9 및 도 10에 도시된 예측 복호화부들(630, 630-1, 630-2) 중 어느 하나를 예측 복호화부(1640)로 포함하는 영상 부호화 장치(1600)에 의해 수행될 수 있다.The process described with reference to FIG. 20 involves using any one of the prediction encoders 1610 and 1610-1 shown in FIGS. 17 and 18 and the prediction decoders 630 and 630-1 shown in FIGS. 8, 9 and 10. 1, 630-2) may be performed by the video encoding apparatus 1600 including any one of the prediction decoding unit 1640.

도 21은 일 실시예에 따른 영상 부호화 방법의 순서도이다.21 is a flowchart of an image encoding method according to an embodiment.

도 21을 참조하면, S2110 단계에서, 영상 부호화 장치(1600)는 현재 영상과 이전 복원 영상을 옵티컬 플로우 인코더(410)에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득한다.Referring to FIG. 21 , in step S2110, the image encoding apparatus 1600 obtains feature data of the current optical flow by applying the current image and the previous reconstructed image to the optical flow encoder 410.

일 실시예에서, 영상 부호화 장치(1600)는 현재 영상과 이전 복원 영상을 가중치 인코더(1612)에 적용하여 가중치 데이터의 특징 데이터를 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain feature data of the weight data by applying the current image and the previous reconstructed image to the weight encoder 1612 .

S2120 단계에서, 영상 부호화 장치(1600)는 현재 옵티컬 플로우의 특징 데이터를 옵티컬 플로우 디코더(450)에 적용하여 복수의 현재 옵티컬 플로우와 복수의 제 2 가중치 데이터를 획득한다.In step S2120, the image encoding apparatus 1600 obtains a plurality of current optical flows and a plurality of second weight data by applying feature data of the current optical flow to the optical flow decoder 450.

일 실시예에서, 영상 부호화 장치(1600)는 현재 옵티컬 플로우의 특징 데이터를 옵티컬 플로우 디코더(450)에 적용하여 복수의 현재 옵티컬 플로우를 획득하고, 가중치 데이터의 특징 데이터를 가중치 디코더(634)에 적용하여 복수의 제 2 가중치 데이터를 획득할 수 있다.In one embodiment, the image encoding apparatus 1600 obtains a plurality of current optical flows by applying feature data of the current optical flow to the optical flow decoder 450, and applies feature data of the weight data to the weight decoder 634 Thus, a plurality of second weight data may be obtained.

S2130 단계에서, 영상 부호화 장치(1600)는 복수의 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득한다. 복수의 예비 예측 영상을 획득하는 데 워핑이 이용될 수 있다.In step S2130, the image encoding apparatus 1600 obtains a plurality of preliminary prediction images from previous reconstructed images based on a plurality of current optical flows. Warping may be used to obtain a plurality of preliminary prediction images.

S2140 단계에서, 영상 부호화 장치(1600)는 복수의 예비 예측 영상에 복수의 제 2 가중치 데이터를 적용하여 복수의 변형된 예측 영상을 획득한다. In step S2140, the image encoding apparatus 1600 obtains a plurality of deformed prediction images by applying a plurality of second weight data to a plurality of preliminary prediction images.

일 실시예에서, 영상 부호화 장치(1600)는 복수의 예비 예측 영상의 샘플 값들 각각에 복수의 제 2 가중치 데이터의 샘플 값들 각각을 곱하여 복수의 변형된 예측 영상을 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain a plurality of modified prediction images by multiplying each of sample values of a plurality of preliminary prediction images by each sample value of a plurality of second weight data.

S2150 단계에서, 영상 부호화 장치(1600)는 복수의 변형된 예측 영상을 결합하여 최종 예측 영상을 획득한다.In step S2150, the image encoding apparatus 1600 obtains a final predicted image by combining a plurality of modified predicted images.

일 실시예에서, 영상 부호화 장치(1600)는 복수의 변형된 예측 영상의 동일한 위치의 샘플 값들을 합하여 최종 예측 영상을 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain a final prediction image by summing sample values at the same position of a plurality of modified prediction images.

S2160 단계에서, 영상 부호화 장치(1600)는 최종 예측 영상과 현재 영상을 이용하여 현재 잔차 영상을 획득한다. In step S2160, the image encoding apparatus 1600 obtains a current residual image using the final predicted image and the current image.

일 실시예에서, 영상 부호화 장치(1600)는 현재 영상의 샘플 값들 각각으로부터 최종 예측 영상의 샘플 값들 각각을 차감하여 현재 잔차 영상을 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain a current residual image by subtracting each sample value of the final predicted image from each sample value of the current image.

S2170 단계에서, 영상 부호화 장치(1600)는 현재 잔차 영상을 잔차 인코더(430)에 적용하여 현재 잔차 영상의 특징 데이터를 획득한다.In step S2170, the image encoding apparatus 1600 obtains feature data of the current residual image by applying the current residual image to the residual encoder 430.

S2180 단계에서, 영상 부호화 장치(1600)는 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성한다. In step S2180, the image encoding apparatus 1600 generates a bitstream including feature data of the current optical flow and feature data of the current residual image.

일 실시예에서, 비트스트림은 가중치 데이터의 특징 데이터를 더 포함할 수 있다.In one embodiment, the bitstream may further include feature data of weight data.

일 실시예에서, 영상 부호화 장치(1600)는 비트스트림의 생성을 위해 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터에 대해 변환, 양자화 또는 엔트로피 부호화 중 적어도 하나를 수행할 수 있다.In an embodiment, the image encoding apparatus 1600 may perform at least one of transformation, quantization, or entropy encoding on feature data of the current optical flow and feature data of the current residual image to generate a bitstream.

도 21을 참조하여 설명한 과정들은 도 17 및 도 18에 도시된 예측 부호화부들(1610, 1610-1) 중 어느 하나와, 도 11에 도시된 예측 복호화부(630-3)를 예측 복호화부(1640)로 포함하는 영상 부호화 장치(1600)에 의해 수행될 수 있다.In the process described with reference to FIG. 21, one of the prediction encoders 1610 and 1610-1 shown in FIGS. 17 and 18 and the prediction decoding unit 630-3 shown in FIG. 11 are used as a prediction decoding unit 1640. ).

도 22는 일 실시예에 따른 영상 부호화 방법의 순서도이다.22 is a flowchart of an image encoding method according to an embodiment.

도 22를 참조하면, S2210 단계에서, 영상 부호화 장치(1600)는 현재 영상과 이전 복원 영상을 옵티컬 플로우 인코더(410)에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득한다.Referring to FIG. 22 , in step S2210, the image encoding apparatus 1600 obtains feature data of the current optical flow by applying the current image and the previous reconstructed image to the optical flow encoder 410.

일 실시예에서, 영상 부호화 장치(1600)는 현재 영상과 이전 복원 영상을 가중치 인코더(1612)에 적용하여 가중치 데이터의 특징 데이터를 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain feature data of the weight data by applying the current image and the previous reconstructed image to the weight encoder 1612 .

S2220 단계에서, 영상 부호화 장치(1600)는 현재 옵티컬 플로우의 특징 데이터를 옵티컬 플로우 디코더(450)에 적용하여 복수의 현재 옵티컬 플로우, 제 1 가중치 데이터 및 복수의 제 2 가중치 데이터를 획득한다.In step S2220, the image encoding apparatus 1600 applies feature data of the current optical flow to the optical flow decoder 450 to obtain a plurality of current optical flows, first weight data, and a plurality of second weight data.

일 실시예에서, 영상 부호화 장치(1600)는 현재 옵티컬 플로우의 특징 데이터를 옵티컬 플로우 디코더(450)에 적용하여 복수의 현재 옵티컬 플로우를 획득하고, 가중치 데이터의 특징 데이터를 가중치 디코더(634)에 적용하여 제 1 가중치 데이터와 복수의 제 2 가중치 데이터를 획득할 수 있다.In one embodiment, the image encoding apparatus 1600 obtains a plurality of current optical flows by applying feature data of the current optical flow to the optical flow decoder 450, and applies feature data of the weight data to the weight decoder 634 Thus, first weight data and a plurality of second weight data may be obtained.

S2230 단계에서, 영상 부호화 장치(1600)는 복수의 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득한다. 복수의 예비 예측 영상을 획득하는 데 워핑이 이용될 수 있다.In step S2230, the image encoding apparatus 1600 obtains a plurality of preliminary prediction images from previous reconstructed images based on a plurality of current optical flows. Warping may be used to obtain a plurality of preliminary prediction images.

S2240 단계에서, 영상 부호화 장치(1600)는 복수의 예비 예측 영상에 복수의 제 2 가중치 데이터를 적용하여 복수의 변형된 예측 영상을 획득한다. In step S2240, the image encoding apparatus 1600 obtains a plurality of deformed prediction images by applying a plurality of second weight data to a plurality of preliminary prediction images.

일 실시예에서, 영상 부호화 장치(1600)는 복수의 예비 예측 영상의 샘플 값들 각각에 복수의 제 2 가중치 데이터의 샘플 값들 각각을 곱하여 복수의 변형된 예측 영상을 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain a plurality of modified prediction images by multiplying each of sample values of a plurality of preliminary prediction images by each sample value of a plurality of second weight data.

S2250 단계에서, 영상 부호화 장치(1600)는 복수의 변형된 예측 영상을 결합하여 중간 예측 영상을 획득한다.In step S2250, the image encoding apparatus 1600 obtains an intermediate prediction image by combining a plurality of modified prediction images.

일 실시예에서, 영상 부호화 장치(1600)는 복수의 변형된 예측 영상의 동일한 위치의 샘플 값들을 합하여 중간 예측 영상을 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain an intermediate prediction image by summing sample values at the same position of a plurality of modified prediction images.

S2260 단계에서, 영상 부호화 장치(1600)는 중간 예측 영상에 제 1 가중치 데이터를 적용하여 최종 예측 영상을 획득한다.In step S2260, the image encoding apparatus 1600 obtains a final predicted image by applying first weight data to the intermediate predicted image.

일 실시예에서, 영상 부호화 장치(1600)는 중간 예측 영상의 샘플 값들 각각에 제 1 가중치 데이터의 샘플 값들 각각을 곱하여 최종 예측 영상을 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain a final prediction image by multiplying each sample value of the intermediate prediction image by each sample value of the first weight data.

S2270 단계에서, 영상 부호화 장치(1600)는 최종 예측 영상과 현재 영상을 이용하여 현재 잔차 영상을 획득한다. In step S2270, the image encoding apparatus 1600 obtains a current residual image using the final predicted image and the current image.

일 실시예에서, 영상 부호화 장치(1600)는 현재 영상의 샘플 값들 각각으로부터 최종 예측 영상의 샘플 값들 각각을 차감하여 현재 잔차 영상을 획득할 수 있다.In an embodiment, the image encoding apparatus 1600 may obtain a current residual image by subtracting each sample value of the final predicted image from each sample value of the current image.

S2280 단계에서, 영상 부호화 장치(1600)는 현재 잔차 영상을 잔차 인코더(430)에 적용하여 현재 잔차 영상의 특징 데이터를 획득한다.In step S2280, the image encoding apparatus 1600 obtains feature data of the current residual image by applying the current residual image to the residual encoder 430.

S2290 단계에서, 영상 부호화 장치(1600)는 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성한다. In step S2290, the image encoding apparatus 1600 generates a bitstream including feature data of the current optical flow and feature data of the current residual image.

일 실시예에서, 비트스트림은 가중치 데이터의 특징 데이터를 더 포함할 수 있다.In one embodiment, the bitstream may further include feature data of weight data.

일 실시예에서, 영상 부호화 장치(1600)는 비트스트림의 생성을 위해 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터에 대해 변환, 양자화 또는 엔트로피 부호화 중 적어도 하나를 수행할 수 있다.In an embodiment, the image encoding apparatus 1600 may perform at least one of transformation, quantization, or entropy encoding on feature data of the current optical flow and feature data of the current residual image to generate a bitstream.

도 22를 참조하여 설명한 과정들은 도 17 및 도 18에 도시된 예측 부호화부들(1610, 1610-1) 중 어느 하나와, 도 12에 도시된 예측 복호화부(630-4)를 예측 복호화부(1640)로 포함하는 영상 부호화 장치(1600)에 의해 수행될 수 있다.In the process described with reference to FIG. 22, one of the prediction encoders 1610 and 1610-1 shown in FIGS. 17 and 18 and the prediction decoding unit 630-4 shown in FIG. 12 are used as a prediction decoding unit 1640. ).

전술한, 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450), 잔차 디코더(470), 가중치 인코더(1612) 또는 가중치 디코더(634) 중 적어도 하나는 컨볼루션 레이어를 포함할 수 있다. At least one of the aforementioned optical flow encoder 410, residual encoder 430, optical flow decoder 450, residual decoder 470, weight encoder 1612, or weight decoder 634 may include a convolution layer. can

옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450), 잔차 디코더(470), 가중치 인코더(1612) 또는 가중치 디코더(634) 중 적어도 하나가 가질 수 있는 구조에 대해 도 23을 참조하여 설명한다.23 for a structure that at least one of the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450, the residual decoder 470, the weight encoder 1612, or the weight decoder 634 may have. refer to and explain.

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

도 23에 도시된 바와 같이, 입력 데이터(2305)는 제 1 컨볼루션 레이어(2310)로 입력된다. 여기서, 입력 데이터(2305)는 신경망(2300)이 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450), 잔차 디코더(470), 가중치 인코더(1612) 및 가중치 디코더(634) 중 어느 것인지 따라 달라진다.As shown in FIG. 23 , input data 2305 is input to the first convolution layer 2310 . Here, input data 2305 is input by neural network 2300 to optical flow encoder 410, residual encoder 430, optical flow decoder 450, residual decoder 470, weight encoder 1612, and weight decoder 634. Depends on which of them.

일 실시예에서, 신경망(2300)이 옵티컬 플로우 인코더(410)인 경우, 입력 데이터(2305)는 현재 영상과 이전 복원 영상이고, 신경망(2300)이 잔차 디코더(470)인 경우, 입력 데이터(2305)는 현재 잔차 영상의 특징 데이터일 수 있다.In one embodiment, when the neural network 2300 is an optical flow encoder 410, the input data 2305 is a current image and a previous reconstructed image, and when the neural network 2300 is a residual decoder 470, the input data 2305 ) may be feature data of the current residual image.

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

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

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

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

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

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

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

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

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

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

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

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

제 1 활성화 레이어(2320)는 특징 맵의 샘플 값들을 제 2 컨볼루션 레이어(2330)로 전달할지 여부를 결정한다. 예를 들어, 특징 맵의 샘플 값들 중 어떤 샘플 값들은 제 1 활성화 레이어(2320)에 의해 활성화되어 제 2 컨볼루션 레이어(2330)로 전달되고, 어떤 샘플 값들은 제 1 활성화 레이어(2320)에 의해 비활성화되어 제 2 컨볼루션 레이어(2330)로 전달되지 않는다. 특징 맵들이 나타내는 입력 데이터(2305)의 고유 특성이 제 1 활성화 레이어(2320)에 의해 강조될 수 있다.The first activation layer 2320 determines whether to transfer the sample values of the feature map to the second convolution layer 2330. For example, certain sample values among sample values of the feature map are activated by the first activation layer 2320 and transferred to the second convolution layer 2330, and certain sample values are activated by the first activation layer 2320. It is inactivated and not passed to the second convolution layer 2330. Unique characteristics of the input data 2305 indicated by the feature maps may be emphasized by the first activation layer 2320 .

제 1 활성화 레이어(2320)에서 출력된 특징 맵들(2325)은 제 2 컨볼루션 레이어(2330)로 입력된다. 도 23에 도시된 특징 맵들(2325) 중 어느 하나는 도 24와 관련하여 설명한 특징 맵(2450)이 제 1 활성화 레이어(2320)에서 처리된 결과일 수 있다. The feature maps 2325 output from the first activation layer 2320 are input to the second convolution layer 2330. One of the feature maps 2325 shown in FIG. 23 may be a result of processing the feature map 2450 described with reference to FIG. 24 in the first activation layer 2320 .

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

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

출력 데이터(2355)는 신경망(2300)이 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450), 잔차 디코더(470), 가중치 인코더(1612) 및 가중치 디코더(634) 중 어느 것인지 따라 달라진다. The output data 2355 is output by the neural network 2300 to any one of the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450, the residual decoder 470, the weight encoder 1612, and the weight decoder 634. Depends on whether

일 예로, 신경망(2300)이 잔차 인코더(430)인 경우, 출력 데이터(2355)는 현재 잔차 영상의 특징 데이터이고, 신경망(2300)이 옵티컬 플로우 인코더(410)인 경우, 출력 데이터(2355)는 현재 옵티컬 플로우의 특징 데이터일 수 있다. For example, when the neural network 2300 is the residual encoder 430, the output data 2355 is feature data of the current residual image, and when the neural network 2300 is the optical flow encoder 410, the output data 2355 is It may be characteristic data of the current optical flow.

일 실시예에서, 제 3 컨볼루션 레이어(2350)에서 이용되는 필터 커널의 개수의 조절을 통해 출력 데이터(2355)의 개수가 조절될 수 있다. 예를 들어, 신경망(2300)이 옵티컬 플로우 디코더(450)이고, 제 3 컨볼루션 레이어(2350)에서 이용되는 필터 커널의 개수가 2개라면, 출력 데이터(2355)는 현재 옵티컬 플로우와 제 1 가중치 데이터를 포함할 수 있다. 또한, 예를 들어, 신경망(2300)이 옵티컬 플로우 디코더(450)이고, 제 3 컨볼루션 레이어(2350)에서 이용되는 필터 커널의 개수가 10개라면, 출력 데이터(2355)는 5개의 현재 옵티컬 플로우와 5개의 제 2 가중치 데이터를 포함할 수 있다.In one embodiment, the number of output data 2355 may be adjusted by adjusting the number of filter kernels used in the third convolution layer 2350 . For example, if the neural network 2300 is the optical flow decoder 450 and the number of filter kernels used in the third convolution layer 2350 is 2, the output data 2355 is the current optical flow and the first weight may contain data. Also, for example, if the neural network 2300 is the optical flow decoder 450 and the number of filter kernels used in the third convolution layer 2350 is 10, the output data 2355 is 5 current optical flows and five pieces of second weight data.

즉, 신경망(2300)이 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450), 잔차 디코더(470), 가중치 인코더(1612) 및 가중치 디코더(634) 중 어느 것에 해당하더라도 제 3 컨볼루션 레이어(2350)에서 이용되는 필터 커널의 개수의 조절을 통해 출력 데이터(2355)의 개수가 조절될 수 있다.That is, even if the neural network 2300 corresponds to any of the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450, the residual decoder 470, the weight encoder 1612, and the weight decoder 634, the first The number of output data 2355 may be adjusted by adjusting the number of filter kernels used in the 3 convolution layer 2350 .

도 23은 신경망(2300)이 세 개의 컨볼루션 레이어(2310, 2330, 2350)와 두 개의 활성화 레이어(2320, 2340)를 포함하고 있는 것으로 도시하고 있으나, 이는 하나의 예시일 뿐이며, 일 실시예에서, 신경망(2300)에 포함된 컨볼루션 레이어 및 활성화 레이어의 개수는 다양하게 변경될 수 있다. 23 shows that the neural network 2300 includes three convolution layers 2310, 2330, and 2350 and two activation layers 2320 and 2340, but this is only an example, and in one embodiment , the number of convolution layers and activation layers included in the neural network 2300 may be variously changed.

또한, 일 실시예에서, 신경망(2300)은 RNN(recurrent neural network)을 통해 구현될 수도 있다. 이 경우는 신경망(2300)의 CNN 구조를 RNN 구조로 변경하는 것을 의미한다.Also, in one embodiment, the neural network 2300 may be implemented through a recurrent neural network (RNN). In this case, it means that the CNN structure of the neural network 2300 is changed to an RNN structure.

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

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

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

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

도 25는 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)의 훈련 방법을 설명하기 위한 도면이다.25 is a diagram for explaining a training method of the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450, and the residual decoder 470.

도 25에는 가중치 인코더(1612)와 가중치 디코더(634)가 도시되어 있지 않은데, 가중치 인코더(1612)와 가중치 디코더(634)도 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)와 함께 훈련될 수 있다.Although the weight encoder 1612 and the weight decoder 634 are not shown in FIG. 25, the weight encoder 1612 and the weight decoder 634 also include the optical flow encoder 410, the residual encoder 430, and the optical flow decoder 450. ) and residual decoder 470.

일 실시예에서, 도 25에는 옵티컬 플로우 디코더(450)로부터 가중치 데이터(t)가 출력되는 것으로 도시하고 있는데, 현재 옵티컬 플로우의 특징 데이터(w)가 가중치 디코더(634)에 의해 처리되고, 가중치 디코더(634)로부터 가중치 데이터(t)가 출력되는 경우, 가중치 디코더(634)도 도 25를 참조하여 설명할 훈련 방법에 따라 훈련될 수 있다.25 shows that weight data t is output from the optical flow decoder 450, the feature data w of the current optical flow is processed by the weight decoder 634, and the weight decoder When the weight data t is output from 634, the weight decoder 634 may also be trained according to a training method to be described with reference to FIG. 25.

일 실시예에서, 도 25에는 현재 훈련 영상(2520)과 이전의 복원 훈련 영상(2540)이 옵티컬 플로우 인코더(410)에 의해 처리됨에 따라 현재 옵티컬 플로우의 특징 데이터(w)가 출력되는 것으로 도시하고 있는데, 현재 훈련 영상(2520)과 이전의 복원 훈련 영상(2540)이 가중치 인코더(1612)에 의해 처리되어 가중치 데이터의 특징 데이터가 출력될 수 있다. 또한, 가중치 데이터의 특징 데이터가 가중치 디코더(634)에 의해 처리되어 가중치 데이터(t)가 출력될 수 있다. 이 경우, 가중치 인코더(1612)와 가중치 디코더(634)도 도 25를 참조하여 설명할 훈련 방법에 따라 훈련될 수 있다.In one embodiment, FIG. 25 shows that feature data w of the current optical flow is output as the current training image 2520 and the previous reconstructed training image 2540 are processed by the optical flow encoder 410, However, the current training image 2520 and the previous reconstructed training image 2540 are processed by the weight encoder 1612 to output feature data of the weight data. In addition, feature data of the weight data may be processed by the weight decoder 634 to output weight data t. In this case, the weight encoder 1612 and the weight decoder 634 may also be trained according to a training method to be described with reference to FIG. 25 .

도 25에서, 현재 훈련 영상(2520), 이전의 복원 훈련 영상(2540) 및 현재의 복원 훈련 영상(2560)은 각각 전술한 현재 영상, 이전 복원 영상 및 현재 복원 영상에 대응할 수 있다.In FIG. 25 , a current training image 2520, a previous reconstructed training image 2540, and a current reconstructed training image 2560 may correspond to the aforementioned current image, previous reconstructed image, and current reconstructed image, respectively.

옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)를 훈련시키는데 있어, 현재의 복원 훈련 영상(2560)이 현재 훈련 영상(2520)과 어느 정도로 유사한지, 그리고 현재 훈련 영상(2520)에 대한 부호화를 통해 생성되는 비트스트림의 비트레이트 또는 잔차 훈련 영상(r)의 샘플 값들이 어느 정도로 큰지가 고려될 수 있다. How similar the current reconstructed training image 2560 is to the current training image 2520 in training the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450, and the residual decoder 470 , and how large the bitrate of the bitstream generated through encoding of the current training image 2520 or the sample values of the residual training image r may be considered.

이를 위해, 일 실시예에서는 제 1 손실 정보(2510), 제 2 손실 정보(2530) 또는 제 3 손실 정보(2550) 중 적어도 하나가 산출되고, 산출된 손실 정보에 따라 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)가 훈련될 수 있다.To this end, in an embodiment, at least one of the first loss information 2510, the second loss information 2530, and the third loss information 2550 is calculated, and according to the calculated loss information, the optical flow encoder 410, Residual encoder 430, optical flow decoder 450, and residual decoder 470 may be trained.

도 25를 참조하면, 현재 훈련 영상(2520) 및 이전의 복원 훈련 영상(2540)은 옵티컬 플로우 인코더(410)로 입력될 수 있다. 옵티컬 플로우 인코더(410)는 현재 훈련 영상(2520) 및 이전의 복원 훈련 영상(2540)을 처리하여 현재 옵티컬 플로우의 특징 데이터(w)를 출력할 수 있다.Referring to FIG. 25 , a current training image 2520 and a previous reconstructed training image 2540 may be input to the optical flow encoder 410 . The optical flow encoder 410 may output feature data w of the current optical flow by processing the current training image 2520 and the previous reconstructed training image 2540 .

일 실시예에서, 현재 훈련 영상(2520) 및 이전의 복원 훈련 영상(2540)은 가중치 인코더(1612)로 입력될 수 있고, 가중치 인코더(1612)에 의해 가중치 데이터의 특징 데이터가 출력될 수 있다.In one embodiment, the current training image 2520 and the previous reconstructed training image 2540 may be input to the weight encoder 1612, and feature data of the weight data may be output by the weight encoder 1612.

현재 옵티컬 플로우의 특징 데이터(w)는 옵티컬 플로우 디코더(450)로 입력될 수 있고, 옵티컬 플로우 디코더(450)는 현재 옵티컬 플로우의 특징 데이터(w)를 처리하여 현재 옵티컬 플로우(g)와 가중치 데이터(t)를 출력할 수 있다. 가중치 데이터(t)는 전술한 제 1 가중치 데이터 또는 복수의 제 2 가중치 데이터를 포함할 수 있다. 일 실시예에서, 가중치 데이터(t)는 제 1 가중치 데이터와 복수의 제 2 가중치 데이터를 포함할 수 있다.Feature data (w) of the current optical flow may be input to the optical flow decoder 450, and the optical flow decoder 450 processes the feature data (w) of the current optical flow to obtain the current optical flow (g) and weight data (t) can be output. The weight data t may include the aforementioned first weight data or a plurality of second weight data. In one embodiment, the weight data t may include first weight data and a plurality of second weight data.

일 실시예에서, 가중치 디코더(634)가 현재 옵티컬 플로우의 특징 데이터(w)를 처리하여 가중치 데이터(t)를 출력할 수도 있다.In one embodiment, the weight decoder 634 may output weight data t by processing feature data w of the current optical flow.

현재 옵티컬 플로우(g) 및 가중치 데이터(t)에 기초하여 이전의 복원 훈련 영상(2540)에 대해 최종 예측 영상 생성 과정(2500)이 적용됨으로써, 현재 훈련 영상(2520)과 유사한 최종 예측 훈련 영상(x'')이 획득될 수 있다.The final prediction image generation process 2500 is applied to the previous reconstructed training image 2540 based on the current optical flow (g) and weight data (t), so that a final prediction training image similar to the current training image 2520 ( x'') can be obtained.

최종 예측 훈련 영상(x'')은 앞서 도 8 내지 도 12를 참조하여 설명한 예측 복호화부들(630, 630-1, 630-2, 630-3, 630-4) 중 어느 하나의 최종 예측 영상의 생성 과정에 따라 생성될 수 있다.The final prediction training image (x″) is a final prediction image of any one of the prediction decoding units 630, 630-1, 630-2, 630-3, and 630-4 described above with reference to FIGS. 8 to 12. It can be created according to the creation process.

일 예로, 가중치 데이터(t)가 제 1 가중치 데이터를 포함하는 경우, 이전의 복원 훈련 영상(2540)에 대한 워핑을 통해 예비 예측 훈련 영상이 획득되고, 예비 예측 훈련 영상에 대해 제 1 가중치 데이터가 적용됨으로써 최종 예측 훈련 영상(x'')이 획득될 수 있다.For example, when the weight data t includes first weight data, a preliminary prediction training image is obtained through warping on a previous reconstruction training image 2540, and the first weight data is obtained for the preliminary prediction training image. By being applied, a final predictive training image (x'') may be obtained.

다른 예로, 복수의 현재 옵티컬 플로우(g)에 기초하여 이전의 복원 훈련 영상(2540)에 대해 워핑이 수행됨으로써 복수의 예비 예측 훈련 영상이 획득되고, 복수의 예비 예측 훈련 영상에 대해 복수의 제 2 가중치 데이터가 적용되어 복수의 변형된 예측 훈련 영상이 획득될 수 있다. 그리고, 복수의 변형된 예측 훈련 영상이 결합되어 최종 예측 훈련 영상(x'')이 획득될 수 있다.As another example, a plurality of preliminary prediction training images are acquired by performing warping on previous reconstructed training images 2540 based on a plurality of current optical flows (g), and a plurality of second prediction training images are obtained for the plurality of preliminary prediction training images. Weight data may be applied to obtain a plurality of deformed prediction training images. In addition, a plurality of deformed prediction training images may be combined to obtain a final prediction training image (x'').

최종 예측 훈련 영상(x'')과 현재 훈련 영상(2520) 사이의 차이에 해당하는 잔차 훈련 영상(r)이 잔차 인코더(430)로 입력될 수 있다.A residual training image (r) corresponding to a difference between the final predicted training image (x″) and the current training image 2520 may be input to the residual encoder 430 .

잔차 인코더(430)는 잔차 훈련 영상(r)을 처리하여 잔차 훈련 영상의 특징 데이터(v)를 출력할 수 있다.The residual encoder 430 may process the residual training image r and output feature data v of the residual training image.

잔차 디코더(470)는 잔차 훈련 영상의 특징 데이터(v)를 처리하여 복원된 잔차 훈련 영상(r')을 획득할 수 있다. The residual decoder 470 may obtain a reconstructed residual training image r′ by processing feature data v of the residual training image.

복원된 잔차 훈련 영상(r')과 최종 예측 훈련 영상(x'')의 결합에 따라 현재의 복원 훈련 영상(2560)이 획득될 수 있다.A current reconstructed training image 2560 may be obtained according to a combination of the reconstructed residual training image (r') and the final predictive training image (x'').

옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)(그리고, 가중치 인코더(1612) 및 가중치 디코더(634))의 훈련을 위해, 제 1 손실 정보(2510), 제 2 손실 정보(2530) 또는 제 3 손실 정보(2550) 중 적어도 하나가 획득될 수 있다.For training of optical flow encoder 410, residual encoder 430, optical flow decoder 450 and residual decoder 470 (and weight encoder 1612 and weight decoder 634), first loss information ( 2510), at least one of the second loss information 2530 and the third loss information 2550 may be obtained.

제 1 손실 정보(2510)는 현재 옵티컬 플로우의 특징 데이터(w)의 샘플 값들, 현재 옵티컬 플로우의 특징 데이터(w)의 엔트로피 또는 현재 옵티컬 플로우의 특징 데이터(w)에 대응하는 비트스트림의 비트레이트 중 적어도 하나로부터 산출될 수 있다.The first loss information 2510 is sample values of the feature data w of the current optical flow, entropy of the feature data w of the current optical flow, or bitrate of a bitstream corresponding to the feature data w of the current optical flow. It can be calculated from at least one of

제 2 손실 정보(2530)는 잔차 훈련 영상(r)의 샘플 값들, 잔차 훈련 영상의 특징 데이터(v)의 엔트로피 또는 잔차 훈련 영상의 특징 데이터(v)에 대응하는 비트스트림의 비트레이트로부터 산출될 수 있다.The second loss information 2530 may be calculated from the sample values of the residual training image r, the entropy of the feature data v of the residual training image, or the bitrate of the bitstream corresponding to the feature data v of the residual training image. can

제 1 손실 정보(2510)와 제 2 손실 정보(2530)는, 현재 훈련 영상(2520)에 대한 부호화 효율에 관련되므로, 제 1 손실 정보(2510)와 제 2 손실 정보(2530)는 압축도 손실 정보로 참조될 수 있다.Since the first loss information 2510 and the second loss information 2530 are related to the coding efficiency for the current training image 2520, the first loss information 2510 and the second loss information 2530 are compression loss. information may be referenced.

일 실시예에서, 도 25는 현재 훈련 영상(2520)에 대한 부호화 효율과 관련된 제 1 손실 정보(2510)와 제 2 손실 정보(2530)가 도출되는 것으로 도시하고 있으나, 현재 훈련 영상(2520)의 부호화를 통해 생성되는 하나의 비트스트림의 비트레이트에 대응하는 하나의 손실 정보가 도출될 수도 있다.In one embodiment, although FIG. 25 shows that the first loss information 2510 and the second loss information 2530 related to the encoding efficiency of the current training image 2520 are derived, the current training image 2520 One piece of loss information corresponding to the bit rate of one bitstream generated through encoding may be derived.

제 3 손실 정보(2550)는 현재 훈련 영상(2520)과 현재의 복원 훈련 영상(2560) 사이의 차이에 대응할 수 있다. 현재 훈련 영상(2520)과 현재의 복원 훈련 영상(2560) 사이의 차이는, 현재 훈련 영상(2520)과 현재의 복원 훈련 영상(2560) 사이의 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 third loss information 2550 may correspond to a difference between the current training image 2520 and the current reconstructed training image 2560 . The difference between the current training image 2520 and the current reconstruction training image 2560 is the L1-norm value between the current training image 2520 and the current reconstruction training image 2560, the L2-norm value, SSIM (Structural Similarity) value, Peak Signal-To-Noise Ratio-Human Vision System (PSNR-HVS) value, Multiscale SSIM (MS-SSIM) value, Variance Inflation Factor (VIF) value, or Video Multimethod Assessment Fusion (VMAF) value. can include

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

옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)(그리고, 가중치 인코더(1612) 및 가중치 디코더(634))는 제 1 손실 정보(2510), 제 2 손실 정보(2530) 또는 제 3 손실 정보(2550) 중 적어도 하나로부터 도출되는 최종 손실 정보가 감소 또는 최소화되도록 훈련될 수 있다. Optical flow encoder 410, residual encoder 430, optical flow decoder 450 and residual decoder 470 (and weight encoder 1612 and weight decoder 634) provide first loss information 2510, The final loss information derived from at least one of the second loss information 2530 and the third loss information 2550 may be trained to be reduced or minimized.

일 실시예에서, 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)(그리고, 가중치 인코더(1612) 및 가중치 디코더(634))는 미리 설정된 파라미터의 값을 변경하면서 최종 손실 정보가 감소 또는 최소화되도록 할 수 있다.In one embodiment, the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450 and the residual decoder 470 (and the weight encoder 1612 and the weight decoder 634) are used to determine the parameters of the preset parameters. By changing the value, the final loss information can be reduced or minimized.

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

[수학식 4][Equation 4]

최종 손실 정보 = a*제 1 손실 정보+b*제 2 손실 정보+c*제 3 손실 정보Final loss information = a*first loss information+b*second loss information+c*third loss information

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

수학식 4에 따르면, 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)(그리고, 가중치 인코더(1612) 및 가중치 디코더(634))는 현재의 복원 훈련 영상(2560)이 현재 훈련 영상(2520)에 최대한 유사해지고, 옵티컬 플로우 인코더(410) 및 잔차 인코더(430)로부터 출력되는 데이터에 대응하는 비트스트림의 크기가 최소화되는 방향으로 훈련됨을 알 수 있다.According to Equation 4, the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450, and the residual decoder 470 (and the weight encoder 1612 and the weight decoder 634) perform the current reconstruction It can be seen that training is performed in a direction in which the training image 2560 is most similar to the current training image 2520 and the size of the bitstream corresponding to the data output from the optical flow encoder 410 and the residual encoder 430 is minimized. .

도 26은 훈련 장치(2600)에 의한 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)의 훈련 과정을 설명하기 위한 도면이다.26 is a diagram for explaining a training process of the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450, and the residual decoder 470 by the training apparatus 2600.

도 26에는 도시되어 있지 않지만, 가중치 인코더(1612) 및/또는 가중치 디코더(634)도 도 26에 도시된 과정에 따라 훈련될 수 있다.Although not shown in FIG. 26 , the weight encoder 1612 and/or the weight decoder 634 may also be trained according to the process shown in FIG. 26 .

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

도 26을 참조하면, 훈련 장치(2600)는 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)(그리고, 가중치 인코더(1612) 및/또는 가중치 디코더(634))의 파라미터를 초기 세팅할 수 있다(S2610). 이에 의해, 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)(그리고, 가중치 인코더(1612) 및/또는 가중치 디코더(634))는 초기 세팅된 파라미터에 따라 동작할 수 있다.Referring to FIG. 26, a training device 2600 includes an optical flow encoder 410, a residual encoder 430, an optical flow decoder 450, and a residual decoder 470 (and a weight encoder 1612 and/or a weight decoder). Parameters of (634)) may be initially set (S2610). Thereby, the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450, and the residual decoder 470 (and the weight encoder 1612 and/or the weight decoder 634) are initially set parameters can operate according to

훈련 장치(2600)는 현재 훈련 영상(2520)과 이전의 복원 훈련 영상(2540)을 옵티컬 플로우 인코더(410)로 입력할 수 있다(S2615). The training device 2600 may input the current training image 2520 and the previous reconstructed training image 2540 to the optical flow encoder 410 (S2615).

옵티컬 플로우 인코더(410)는 현재 훈련 영상(2520) 및 이전의 복원 훈련 영상(2540)을 처리하여 현재 옵티컬 플로우의 특징 데이터(w)를 훈련 장치(2600) 및 옵티컬 플로우 디코더(450)로 출력할 수 있다(S2620).The optical flow encoder 410 processes the current training image 2520 and the previous reconstructed training image 2540 and outputs feature data w of the current optical flow to the training device 2600 and the optical flow decoder 450. It can (S2620).

일 실시예에서, 현재 옵티컬 플로우의 특징 데이터(w)는 가중치 디코더(634)로 입력될 수 있다.In one embodiment, feature data w of the current optical flow may be input to the weight decoder 634 .

또한, 일 실시예에서, 현재 훈련 영상(2520)과 이전의 복원 훈련 영상(2540)이 가중치 인코더(1612)로 입력되고, 가중치 인코더(1612)로부터 가중치 데이터의 특징 데이터가 옵티컬 플로우 디코더(450) 또는 가중치 디코더(634)로 입력될 수 있다.In addition, in one embodiment, the current training image 2520 and the previous reconstructed training image 2540 are input to the weight encoder 1612, and feature data of the weight data from the weight encoder 1612 is output to the optical flow decoder 450 Alternatively, it may be input to the weight decoder 634.

훈련 장치(2600)는 현재 옵티컬 플로우의 특징 데이터(w)로부터 제 1 손실 정보(2510)를 산출할 수 있다(S2625).The training apparatus 2600 may calculate first loss information 2510 from feature data w of the current optical flow (S2625).

옵티컬 플로우 디코더(450)는 현재 옵티컬 플로우의 특징 데이터(w)를 처리하여 현재 옵티컬 플로우(g) 및 가중치 데이터(t)를 훈련 장치(2600)로 출력할 수 있다(S2630).The optical flow decoder 450 may process feature data w of the current optical flow and output the current optical flow g and weight data t to the training device 2600 (S2630).

일 실시예에서, 가중치 디코더(634)가 현재 옵티컬 플로우의 특징 데이터(w) 또는 가중치 데이터의 특징 데이터(t)를 처리하여 가중치 데이터를 훈련 장치(2600)로 출력할 수도 있다.In an embodiment, the weight decoder 634 may output the weight data to the training device 2600 by processing feature data w of the current optical flow or feature data t of the weight data.

훈련 장치(2600)는 현재 옵티컬 플로우(g)와 가중치 데이터(t)를 이용하여 이전의 복원 훈련 영상(2540)으로부터 최종 예측 훈련 영상(x'')을 생성할 수 있고(S2635), 최종 예측 훈련 영상(x'')과 현재 훈련 영상(2520)을 이용하여 잔차 훈련 영상(r)을 획득할 수 있다(S2640). The training apparatus 2600 may generate a final prediction training image (x″) from the previous reconstructed training image 2540 using the current optical flow g and weight data t (S2635), and the final prediction A residual training image (r) may be acquired using the training image (x″) and the current training image (2520) (S2640).

훈련 장치(2600)는 잔차 훈련 영상(r)을 잔차 인코더(430)로 입력할 수 있다(S2645).The training device 2600 may input the residual training image r to the residual encoder 430 (S2645).

잔차 인코더(430)는 잔차 훈련 영상(r)을 처리하여 잔차 훈련 영상의 특징 데이터(v)를 잔차 디코더(470)와 훈련 장치(2600)로 출력할 수 있다(S2650).The residual encoder 430 may process the residual training image r and output feature data v of the residual training image to the residual decoder 470 and the training device 2600 (S2650).

훈련 장치(2600)는 잔차 훈련 영상(r) 또는 잔차 훈련 영상의 특징 데이터(v)로부터 제 2 손실 정보(2530)를 산출할 수 있다(S2655).The training apparatus 2600 may calculate second loss information 2530 from the residual training image r or feature data v of the residual training image (S2655).

잔차 디코더(470)는 잔차 훈련 영상의 특징 데이터(v)를 처리하여 복원된 잔차 훈련 영상(r')을 훈련 장치(2600)로 출력할 수 있다(S2660).The residual decoder 470 may process the feature data v of the residual training image and output the reconstructed residual training image r' to the training device 2600 (S2660).

훈련 장치(2600)는 복원된 잔차 훈련 영상(r')과 최종 예측 훈련 영상(x'')을 결합하여 현재의 복원 훈련 영상(2560)을 획득할 수 있고(S2665), 현재 훈련 영상(2520)과 현재의 복원 훈련 영상(2560) 사이의 차이에 대응하는 제 3 손실 정보(2550)를 산출할 수 있다(S2670).The training device 2600 may obtain a current reconstructed training image 2560 by combining the reconstructed residual training image r' and the final predictive training image 2560 (S2665), and the current training image 2520 ) and the current reconstructed training image 2560, third loss information 2550 corresponding to the difference may be calculated (S2670).

훈련 장치(2600)는 제 1 손실 정보(2510), 제 2 손실 정보(2530) 또는 제 3 손실 정보(2550) 중 적어도 하나를 결합하여 최종 손실 정보를 산출하고, 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)(그리고, 가중치 인코더(1612) 및/또는 가중치 디코더(634))는 최종 손실 정보에 기초한 역전사(back propagation) 과정을 통해 초기 세팅된 파라미터를 갱신할 수 있다(S2675, S2680, S2685, S2690). The training apparatus 2600 calculates final loss information by combining at least one of the first loss information 2510, the second loss information 2530, and the third loss information 2550, and the optical flow encoder 410, the residual The encoder 430, the optical flow decoder 450, and the residual decoder 470 (and the weight encoder 1612 and/or the weight decoder 634) perform initial setting through a back propagation process based on the final loss information The set parameters may be updated (S2675, S2680, S2685, S2690).

이후, 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)(그리고, 가중치 인코더(1612) 및/또는 가중치 디코더(634))는 최종 손실 정보가 최소화될 때까지 S2615 내지 S2690 과정을 반복하면서 파라미터를 갱신할 수 있다. 이 때, 각 반복 과정 동안 옵티컬 플로우 인코더(410), 잔차 인코더(430), 옵티컬 플로우 디코더(450) 및 잔차 디코더(470)(그리고, 가중치 인코더(1612) 및/또는 가중치 디코더(634))는 이전 과정에서 갱신된 파라미터에 따라 동작할 수 있다.Then, the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450, and the residual decoder 470 (and the weight encoder 1612 and/or the weight decoder 634) minimize the final loss information Parameters may be updated while repeating processes S2615 to S2690 until At this time, during each iteration, the optical flow encoder 410, the residual encoder 430, the optical flow decoder 450, and the residual decoder 470 (and the weight encoder 1612 and/or the weight decoder 634) It can operate according to the parameters updated in the previous process.

일 실시예에 따른 영상 부호화 장치(1600), 영상 복호화 장치(600), 및 이들에 의한 영상의 부호화 및 복호화 방법은 영상들에 포함된 객체들이 오클루젼되거나, 큰 움직임을 갖거나 작은 움직임을 갖더라도 해당 영상들을 효율적으로 부호화 및 복호화하는 것을 과제로 한다.In the image encoding apparatus 1600, the image decoding apparatus 600, and methods for encoding and decoding images according to an embodiment, objects included in images are occluded, have large motion, or have small motion. Even if there is, the task is to efficiently encode and decode corresponding images.

또한, 일 실시예에 따른 영상 부호화 장치(1600), 영상 복호화 장치(600), 및 이들에 의한 영상의 부호화 및 복호화 방법은 영상의 부호화 결과로 생성되는 비트스트림의 비트레이트를 감소시키는 것을 과제로 한다.In addition, an image encoding apparatus 1600, an image decoding apparatus 600, and a method for encoding and decoding an image according to an embodiment have the task of reducing a bit rate of a bitstream generated as a result of encoding an image. do.

또한, 일 실시예에 따른 영상 부호화 장치(1600), 영상 복호화 장치(600), 및 이들에 의한 영상의 부호화 및 복호화 방법은 영상들의 밝기 변화로 인해 비트스트림의 비트레이트가 커지는 것을 방지하는 것을 과제로 한다.In addition, the image encoding apparatus 1600, the image decoding apparatus 600, and the method for encoding and decoding an image according to an embodiment prevent an increase in the bitrate of a bitstream due to a change in brightness of images. do it with

또한, 일 실시예에 따른 영상 부호화 장치(1600), 영상 복호화 장치(600), 및 이들에 의한 영상의 부호화 및 복호화 방법은 AI 기반의 엔드-투-엔드 부호화/복호화 시스템을 제공하는 것을 과제로 한다.In addition, the video encoding apparatus 1600, the video decoding apparatus 600, and the video encoding and decoding method according to an embodiment have the task of providing an AI-based end-to-end encoding/decoding system. do.

일 실시예에 따른 AI를 이용하는 영상 복호화 방법은, 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득하는 단계(S1310)를 포함할 수 있다.An image decoding method using AI according to an embodiment may include acquiring feature data of a current optical flow and feature data of a current residual image from a bitstream (S1310).

영상 복호화 방법은, 옵티컬 플로우 디코더(450)에 현재 옵티컬 플로우의 특징 데이터를 적용하여 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하는 단계(S1320)를 포함할 수 있다.The image decoding method may include acquiring the current optical flow and first weight data by applying feature data of the current optical flow to the optical flow decoder 450 (S1320).

영상 복호화 방법은, 잔차 디코더(470)에 현재 잔차 영상의 특징 데이터를 적용하여 현재 잔차 영상을 획득하는 단계(S1330)를 포함할 수 있다.The image decoding method may include obtaining a current residual image by applying feature data of the current residual image to the residual decoder 470 (S1330).

영상 복호화 방법은, 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하는 단계(S1340)를 포함할 수 있다.The image decoding method may include obtaining a preliminary prediction image from a previous reconstructed image based on the current optical flow (S1340).

영상 복호화 방법은, 예비 예측 영상의 샘플 값들에 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하는 단계(S1350)를 포함할 수 있다.The image decoding method may include obtaining a final prediction image by applying sample values of the first weight data to sample values of the preliminary prediction image (S1350).

영상 복호화 방법은, 최종 예측 영상과 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득하는 단계(S1360)를 포함할 수 있다.The image decoding method may include acquiring a current reconstructed image corresponding to the current image by combining the final prediction image and the current residual image (S1360).

일 실시예에서, 옵티컬 플로우 디코더(450)는, 잔차 훈련 영상의 샘플 값들 또는, 잔차 훈련 영상의 특징 데이터를 포함하는 비트스트림의 비트레이트가 작아지도록 훈련되며, 잔차 훈련 영상은, 최종 예측 영상에 대응하는 예측 훈련 영상과 현재 영상에 대응하는 현재 훈련 영상 사이의 차이에 대응할 수 있다.In one embodiment, the optical flow decoder 450 is trained to reduce the bitrate of a bitstream including sample values of the residual training image or feature data of the residual training image, and the residual training image is included in the final prediction image. It may correspond to a difference between the corresponding predictive training image and the current training image corresponding to the current image.

일 실시예에서, 옵티컬 플로우 디코더(450)에 대한 훈련의 결과로서, 예비 예측 영상 내 샘플 값과 현재 영상 내 동일 위치의 샘플 값 사이의 차이가 작을수록 제 1 가중치 데이터 내 샘플 값은 1에 가까운 값을 가질 수 있다.In one embodiment, as a result of training the optical flow decoder 450, the sample value in the first weight data is closer to 1 as the difference between the sample value in the preliminary prediction image and the sample value at the same position in the current image is smaller. can have a value.

일 실시예에서, 옵티컬 플로우 디코더(450)에 대한 훈련의 결과로서, 예비 예측 영상 내 샘플 값이 현재 영상 내 동일 위치의 샘플 값보다 크면, 제 1 가중치 데이터 내 샘플 값은 1보다 작은 값을 가질 수 있다.In one embodiment, as a result of training the optical flow decoder 450, if a sample value in the preliminary prediction image is greater than a sample value at the same position in the current image, the sample value in the first weight data has a value less than 1. can

일 실시예에서, 옵티컬 플로우 디코더(450)에 대한 훈련의 결과로서, 예비 예측 영상 내 샘플 값이 현재 영상 내 동일 위치의 샘플 값보다 작으면, 제 1 가중치 데이터 내 샘플 값은 1보다 큰 값을 가질 수 있다.In one embodiment, as a result of training the optical flow decoder 450, if a sample value in the preliminary prediction image is smaller than a sample value at the same location in the current image, the sample value in the first weight data has a value greater than 1. can have

일 실시예에서, 현재 옵티컬 플로우의 특징 데이터가 옵티컬 플로우 디코더에 의해 처리됨에 따라 복수의 현재 옵티컬 플로우, 제 1 가중치 데이터 및 복수의 제 2 가중치 데이터가 획득될 수 있다.In an embodiment, as feature data of the current optical flow is processed by the optical flow decoder, a plurality of current optical flows, first weight data, and a plurality of second weight data may be obtained.

일 실시예에서, 예비 예측 영상을 획득하는 단계는, 복수의 현재 옵티컬 플로우에 기초하여 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득하는 단계(S1540)를 포함할 수 있다.In an embodiment, the obtaining of preliminary prediction images may include acquiring a plurality of preliminary prediction images from previous reconstructed images based on a plurality of current optical flows (S1540).

일 실시예에서, 최종 예측 영상을 획득하는 단계는, 복수의 예비 예측 영상에 대해 복수의 제 2 가중치 데이터를 적용하여 복수의 변형된 예측 영상을 획득하는 단계(S1550)를 포함할 수 있다.In an embodiment, the obtaining of the final prediction image may include acquiring a plurality of modified prediction images by applying a plurality of second weight data to a plurality of preliminary prediction images (S1550).

일 실시예에서, 최종 예측 영상을 획득하는 단계는, 복수의 변형된 예측 영상을 결합하여 중간 예측 영상을 획득하는 단계(S1560)를 포함할 수 있다.In an embodiment, the obtaining of the final prediction image may include obtaining an intermediate prediction image by combining a plurality of modified prediction images (S1560).

일 실시예에서, 최종 예측 영상을 획득하는 단계는, 중간 예측 영상의 샘플 값들에 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하는 단계(S1570)를 포함할 수 있다.In an embodiment, the obtaining of the final prediction image may include obtaining a final prediction image by applying sample values of the first weight data to sample values of the intermediate prediction image (S1570).

일 실시예에서, 옵티컬 플로우 디코더(450)의 개수는 복수이며, 복수의 옵티컬 플로우 디코더 각각은 한 쌍의 현재 옵티컬 플로우와 제 2 가중치 데이터를 출력할 수 있다.In one embodiment, the number of optical flow decoders 450 is plural, and each of the plurality of optical flow decoders may output a pair of current optical flow and second weight data.

일 실시예에서, 복수의 제 2 가중치 데이터 내 동일 위치의 샘플 값들의 합은 1일 수 있다.In one embodiment, the sum of sample values at the same position in the plurality of second weight data may be 1.

일 실시예에 따른 AI를 이용하는 영상 복호화 장치(600)는, 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득하는 획득부(610)를 포함할 수 있다.The image decoding apparatus 600 using AI according to an embodiment may include an acquisition unit 610 that obtains feature data of a current optical flow and feature data of a current residual image from a bitstream.

영상 복호화 장치(600)는, 옵티컬 플로우 디코더에 현재 옵티컬 플로우의 특징 데이터를 적용하여 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하고, 잔차 디코더에 현재 잔차 영상의 특징 데이터를 적용하여 현재 잔차 영상을 획득하고, 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하고, 예비 예측 영상의 샘플 값들에 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하고, 최종 예측 영상과 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득하는 예측 복호화부(630;630-1;630-2;630-3;630-4)를 포함할 수 있다.The image decoding apparatus 600 applies feature data of a current optical flow to an optical flow decoder to obtain a current optical flow and first weight data, and applies feature data of a current residual image to a residual decoder to obtain a current residual image Obtain a preliminary prediction image from a previous reconstructed image based on the current optical flow, obtain a final prediction image by applying sample values of the first weight data to sample values of the preliminary prediction image, and obtain a final prediction image and a current residual It may include a predictive decoding unit (630; 630-1; 630-2; 630-3; 630-4) that combines images to obtain a current reconstructed image corresponding to the current image.

일 실시예에 따른 AI를 이용하는 영상 부호화 방법은, 현재 영상 및 이전 복원 영상을 옵티컬 플로우 인코더(410)에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득하는 단계(S2010)를 포함할 수 있다.An image encoding method using AI according to an embodiment may include obtaining characteristic data of a current optical flow by applying a current image and a previous reconstructed image to the optical flow encoder 410 (S2010).

영상 부호화 방법은, 옵티컬 플로우 디코더(450)에 현재 옵티컬 플로우의 특징 데이터를 적용하여 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하는 단계(S2020)를 포함할 수 있다.The image encoding method may include obtaining a current optical flow and first weight data by applying feature data of the current optical flow to the optical flow decoder 450 (S2020).

영상 부호화 방법은, 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하는 단계(S2030)를 포함할 수 있다.The image encoding method may include obtaining a preliminary prediction image from a previous reconstructed image based on the current optical flow (S2030).

영상 부호화 방법은, 예비 예측 영상의 샘플 값들에 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하는 단계(S2040)를 포함할 수 있다.The image encoding method may include obtaining a final prediction image by applying sample values of the first weight data to sample values of the preliminary prediction image (S2040).

영상 부호화 방법은, 최종 예측 영상과 현재 영상 사이의 차이에 해당하는 현재 잔차 영상을 획득하는 단계(S2050)를 포함할 수 있다.The image encoding method may include acquiring a current residual image corresponding to a difference between a final predicted image and a current image (S2050).

영상 부호화 방법은, 현재 잔차 영상을 잔차 인코더(430)에 적용하여 현재 잔차 영상의 특징 데이터를 획득하는 단계(S2060)를 포함할 수 있다.The image encoding method may include acquiring feature data of the current residual image by applying the current residual image to the residual encoder 430 (S2060).

영상 부호화 방법은, 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성하는 단계(S2070)를 포함할 수 있다.The image encoding method may include generating a bitstream including feature data of the current optical flow and feature data of the current residual image (S2070).

일 실시예에서, 현재 옵티컬 플로우의 특징 데이터가 옵티컬 플로우 디코더(450)에 의해 처리됨에 따라 복수의 현재 옵티컬 플로우, 제 1 가중치 데이터 및 복수의 제 2 가중치 데이터가 획득될 수 있다.In an embodiment, as feature data of the current optical flow is processed by the optical flow decoder 450 , a plurality of current optical flows, first weight data, and a plurality of second weight data may be obtained.

일 실시예에서, 예비 예측 영상을 획득하는 단계는, 복수의 현재 옵티컬 플로우에 기초하여 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득하는 단계(S2230)를 포함할 수 있다.In an embodiment, the obtaining of preliminary prediction images may include obtaining a plurality of preliminary prediction images from previous reconstructed images based on a plurality of current optical flows (S2230).

일 실시예에서, 최종 예측 영상을 획득하는 단계는, 복수의 예비 예측 영상에 대해 복수의 제 2 가중치 데이터를 적용하여 복수의 변형된 예측 영상을 획득하는 단계(S2240)를 포함할 수 있다.In an embodiment, the obtaining of the final prediction image may include acquiring a plurality of modified prediction images by applying a plurality of second weight data to the plurality of preliminary prediction images (S2240).

일 실시예에서, 최종 예측 영상을 획득하는 단계는, 복수의 변형된 예측 영상을 결합하여 중간 예측 영상을 획득하는 단계(S2250)를 포함할 수 있다.In an embodiment, obtaining a final predicted image may include obtaining an intermediate predicted image by combining a plurality of transformed predicted images (S2250).

일 실시예에서, 최종 예측 영상을 획득하는 단계는, 중간 예측 영상의 샘플 값들에 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하는 단계(S2260)를 포함할 수 있다.In an embodiment, the obtaining of the final prediction image may include obtaining a final prediction image by applying sample values of the first weight data to sample values of the intermediate prediction image (S2260).

일 실시예에 따른 AI를 이용하는 영상 부호화 장치(1600)는, 현재 영상 및 이전 복원 영상을 옵티컬 플로우 인코더에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득하고, 옵티컬 플로우 디코더에 현재 옵티컬 플로우의 특징 데이터를 적용하여 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하고, 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하고, 예비 예측 영상의 샘플 값들에 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하고, 최종 예측 영상과 현재 영상 사이의 차이에 해당하는 현재 잔차 영상을 획득하고, 현재 잔차 영상을 잔차 인코더에 적용하여 현재 잔차 영상의 특징 데이터를 획득하는 예측 부호화부(1610;1610-1)를 포함할 수 있다.An image encoding apparatus 1600 using AI according to an embodiment applies a current image and a previous reconstructed image to an optical flow encoder to acquire feature data of a current optical flow, and acquires feature data of the current optical flow to an optical flow decoder. to obtain a current optical flow and first weight data, obtain a preliminary prediction image from a previous reconstructed image based on the current optical flow, and apply sample values of the first weight data to sample values of the preliminary prediction image to obtain a final A predictive encoder (1610; 1610) obtains a predicted image, obtains a current residual image corresponding to a difference between the final predicted image and the current image, and obtains feature data of the current residual image by applying the current residual image to a residual encoder. -1) may be included.

영상 부호화 장치는, 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성하는 생성부(1620)를 포함할 수 있다.The image encoding apparatus may include a generator 1620 that generates a bitstream including feature data of the current optical flow and feature data of the current residual image.

일 실시예에 따른 AI를 이용하는 영상 복호화 방법은, 비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득하는 단계(S1410)를 포함할 수 있다.An image decoding method using AI according to an embodiment may include obtaining feature data of a current optical flow and feature data of a current residual image from a bitstream (S1410).

영상 복호화 방법은, 옵티컬 플로우 디코더(450)에 현재 옵티컬 플로우의 특징 데이터를 적용하여 복수의 현재 옵티컬 플로우 및 복수의 제 2 가중치 데이터를 획득하는 단계(S1420)를 포함할 수 있다.The image decoding method may include obtaining a plurality of current optical flows and a plurality of second weight data by applying feature data of the current optical flow to the optical flow decoder 450 (S1420).

영상 복호화 방법은, 잔차 디코더(470)에 현재 잔차 영상의 특징 데이터를 적용하여 현재 잔차 영상을 획득하는 단계(S1430)를 포함할 수 있다.The image decoding method may include obtaining a current residual image by applying feature data of the current residual image to the residual decoder 470 (S1430).

영상 복호화 방법은, 복수의 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득하는 단계(S1440)를 포함할 수 있다.The image decoding method may include acquiring a plurality of preliminary prediction images from a previous reconstructed image based on a plurality of current optical flows (S1440).

영상 복호화 방법은, 복수의 예비 예측 영상의 샘플 값들에 복수의 제 2 가중치 데이터의 샘플 값들을 적용하여 복수의 변형된 예측 영상을 획득하는 단계(S1450)를 포함할 수 있다.The image decoding method may include obtaining a plurality of modified prediction images by applying sample values of a plurality of second weight data to sample values of a plurality of preliminary prediction images (S1450).

영상 복호화 방법은, 복수의 변형된 예측 영상을 결합하여 최종 예측 영상을 획득하는 단계(S1460)를 포함할 수 있다.The image decoding method may include obtaining a final predicted image by combining a plurality of transformed predicted images (S1460).

영상 복호화 방법은, 최종 예측 영상과 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득하는 단계(S1470)를 포함할 수 있다.The image decoding method may include acquiring a current reconstructed image corresponding to the current image by combining the final prediction image and the current residual image (S1470).

일 실시예에 따른 AI를 이용하는 영상 부호화 방법은, 현재 영상 및 이전 복원 영상을 옵티컬 플로우 인코더(410)에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득하는 단계(S2110)를 포함할 수 있다.An image encoding method using AI according to an embodiment may include obtaining characteristic data of a current optical flow by applying a current image and a previous reconstructed image to the optical flow encoder 410 (S2110).

영상 부호화 방법은, 옵티컬 플로우 디코더(450)에 현재 옵티컬 플로우의 특징 데이터를 적용하여 복수의 현재 옵티컬 플로우, 및 복수의 제 2 가중치 데이터를 획득하는 단계(S2120)를 포함할 수 있다.The image encoding method may include obtaining a plurality of current optical flows and a plurality of second weight data by applying feature data of the current optical flow to the optical flow decoder 450 (S2120).

영상 부호화 방법은, 복수의 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득하는 단계(S2130)를 포함할 수 있다.The image encoding method may include acquiring a plurality of preliminary prediction images from a previous reconstructed image based on a plurality of current optical flows (S2130).

영상 부호화 방법은, 복수의 예비 예측 영상의 샘플 값들에 복수의 제 2 가중치 데이터의 샘플 값들을 적용하여 복수의 변형된 예측 영상을 획득하는 단계(S2140)를 포함할 수 있다.The image encoding method may include obtaining a plurality of modified prediction images by applying sample values of a plurality of second weight data to sample values of a plurality of preliminary prediction images (S2140).

영상 부호화 방법은, 복수의 변형된 예측 영상을 결합하여 최종 예측 영상을 획득하는 단계(S2150)를 포함할 수 있다.The image encoding method may include acquiring a final predicted image by combining a plurality of transformed predicted images (S2150).

영상 부호화 방법은, 최종 예측 영상과 현재 영상 사이의 차이에 해당하는 현재 잔차 영상을 획득하는 단계(S2160)를 포함할 수 있다.The image encoding method may include acquiring a current residual image corresponding to a difference between a final predicted image and a current image (S2160).

영상 부호화 방법은, 현재 잔차 영상을 잔차 인코더(430)에 적용하여 현재 잔차 영상의 특징 데이터를 획득하는 단계(S2170)를 포함할 수 있다.The image encoding method may include acquiring feature data of the current residual image by applying the current residual image to the residual encoder 430 (S2170).

영상 부호화 방법은, 현재 옵티컬 플로우의 특징 데이터와 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성하는 단계(S2180)를 포함할 수 있다.The image encoding method may include generating a bitstream including feature data of the current optical flow and feature data of the current residual image (S2180).

일 실시예에 따른 영상 부호화 장치(1600), 영상 복호화 장치(600), 및 이들에 의한 영상의 부호화 및 복호화 방법은 영상들에 포함된 객체들이 오클루젼되거나, 큰 움직임을 갖거나 작은 움직임을 갖더라도 영상들을 효율적으로 부호화 및 복호화할 수 있다.In the image encoding apparatus 1600, the image decoding apparatus 600, and methods for encoding and decoding images according to an embodiment, objects included in images are occluded, have large motion, or have small motion. Even if it has, it is possible to encode and decode images efficiently.

또한, 일 실시예에 따른 영상 부호화 장치(1600), 영상 복호화 장치(600), 및 이들에 의한 영상의 부호화 및 복호화 방법은 영상의 부호화 결과로 생성되는 비트스트림의 비트레이트를 감소시킬 수 있다.In addition, the image encoding apparatus 1600, the image decoding apparatus 600, and the method for encoding and decoding an image according to an embodiment can reduce the bit rate of a bitstream generated as a result of encoding the image.

또한, 일 실시예에 따른 영상 부호화 장치(1600), 영상 복호화 장치(600), 및 이들에 의한 영상의 부호화 및 복호화 방법은 영상들의 밝기 변화로 인해 비트스트림의 비트레이트가 커지는 것을 방지할 수 있다.In addition, the image encoding apparatus 1600, the image decoding apparatus 600, and methods for encoding and decoding images according to an embodiment can prevent the bitrate of a bitstream from increasing due to a change in brightness of images. .

또한, 일 실시예에 따른 영상 부호화 장치(1600), 영상 복호화 장치(600), 및 이들에 의한 영상의 부호화 및 복호화 방법은 AI 기반의 엔드-투-엔드 부호화/복호화 시스템을 제공할 수 있다.In addition, the video encoding apparatus 1600, the video decoding apparatus 600, and the video encoding and decoding method according to an embodiment may provide an AI-based end-to-end encoding/decoding system.

한편, 상술한 본 개시의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 작성된 프로그램은 기기로 읽을 수 있는 저장매체에 저장될 수 있다.On the other hand, 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 storage medium readable by a device.

기기로 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, ‘비일시적 저장매체'는 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다. 예로, '비일시적 저장매체'는 데이터가 임시적으로 저장되는 버퍼를 포함할 수 있다.The device-readable storage medium may be provided in the form of a non-transitory storage medium. Here, 'non-temporary storage medium' only means that it is a tangible device and does not contain signals (e.g., electromagnetic waves), and this term refers to the case where data is stored semi-permanently in the storage medium and temporary It does not discriminate if it is saved as . For example, a 'non-temporary 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 by being included in a computer program product. Computer program products may be traded between sellers and buyers as commodities. A computer program product is distributed in the form of a device-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 (eg downloaded or uploaded) directly or online. In the case of online distribution, at least a part of a computer program product (eg, a downloadable app) is stored on a device-readable storage medium such as a memory of a manufacturer's server, an application store's server, or a relay server. It can be temporarily stored or created temporarily.

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

Claims (13)

AI(Artificial Intelligence)를 이용하는 영상 복호화 방법에 있어서,
비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득하는 단계(S1310);
옵티컬 플로우 디코더(450)에 상기 현재 옵티컬 플로우의 특징 데이터를 적용하여 상기 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하는 단계(S1320);
잔차 디코더(470)에 상기 현재 잔차 영상의 특징 데이터를 적용하여 상기 현재 잔차 영상을 획득하는 단계(S1330);
상기 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상(preliminary prediction image)을 획득하는 단계(S1340);
상기 예비 예측 영상의 샘플 값들에 상기 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상(final prediction unit)을 획득하는 단계(S1350); 및
상기 최종 예측 영상과 상기 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득하는 단계(S1360)를 포함하는, 영상 복호화 방법.
In the image decoding method using AI (Artificial Intelligence),
acquiring feature data of the current optical flow and feature data of the current residual image from the bitstream (S1310);
acquiring the current optical flow and first weight data by applying feature data of the current optical flow to the optical flow decoder 450 (S1320);
acquiring the current residual image by applying feature data of the current residual image to the residual decoder 470 (S1330);
obtaining a preliminary prediction image from a previous reconstructed image based on the current optical flow (S1340);
obtaining a final prediction unit by applying sample values of the first weight data to sample values of the preliminary prediction image (S1350); and
and acquiring a current reconstructed image corresponding to the current image by combining the final predicted image and the current residual image (S1360).
제1항에 있어서,
상기 옵티컬 플로우 디코더(450)는, 잔차 훈련 영상의 샘플 값들 또는, 상기 잔차 훈련 영상의 특징 데이터를 포함하는 비트스트림의 비트레이트가 작아지도록 훈련되며,
상기 잔차 훈련 영상은, 상기 최종 예측 영상에 대응하는 최종 예측 훈련 영상과 상기 현재 영상에 대응하는 현재 훈련 영상 사이의 차이에 대응하는, 영상 복호화 방법.
According to claim 1,
The optical flow decoder 450 is trained to reduce the bitrate of sample values of the residual training image or a bitstream including feature data of the residual training image,
The residual training image corresponds to a difference between a final predicted training image corresponding to the final predicted image and a current training image corresponding to the current image.
제1항 내지 제2항 중 어느 하나의 항에 있어서,
상기 옵티컬 플로우 디코더(450)에 대한 훈련의 결과로서, 상기 예비 예측 영상 내 샘플 값과 상기 현재 영상 내 동일 위치의 샘플 값 사이의 차이가 작을수록 상기 제 1 가중치 데이터 내 샘플 값은 1에 가까운 값을 갖는, 영상 복호화 방법.
According to any one of claims 1 to 2,
As a result of training of the optical flow decoder 450, the sample value in the first weight data is a value closer to 1 as the difference between the sample value in the preliminary prediction image and the sample value at the same position in the current image is smaller Having, video decoding method.
제1항 내지 제3항 중 어느 하나의 항에 있어서,
상기 옵티컬 플로우 디코더(450)에 대한 훈련의 결과로서, 상기 예비 예측 영상 내 샘플 값이 상기 현재 영상 내 동일 위치의 샘플 값보다 크면, 상기 제 1 가중치 데이터 내 샘플 값은 1보다 작은 값을 갖는, 영상 복호화 방법.
According to any one of claims 1 to 3,
As a result of training the optical flow decoder 450, if the sample value in the preliminary prediction image is greater than the sample value at the same position in the current image, the sample value in the first weight data has a value smaller than 1, Video decoding method.
제1항 내지 제4항 중 어느 하나의 항에 있어서,
상기 옵티컬 플로우 디코더(450)에 대한 훈련의 결과로서, 상기 예비 예측 영상 내 샘플 값이 상기 현재 영상 내 동일 위치의 샘플 값보다 작으면, 상기 제 1 가중치 데이터 내 샘플 값은 1보다 큰 값을 갖는, 영상 복호화 방법.
According to any one of claims 1 to 4,
As a result of training of the optical flow decoder 450, if the sample value in the preliminary prediction image is smaller than the sample value at the same position in the current image, the sample value in the first weight data has a value greater than 1 , Video decoding method.
제1항 내지 제5항 중 어느 하나의 항에 있어서,
상기 현재 옵티컬 플로우의 특징 데이터가 상기 옵티컬 플로우 디코더(450)에 의해 처리됨에 따라 복수의 현재 옵티컬 플로우, 상기 제 1 가중치 데이터 및 복수의 제 2 가중치 데이터가 획득되고,
상기 예비 예측 영상을 획득하는 단계는,
상기 복수의 현재 옵티컬 플로우에 기초하여 상기 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득하는 단계(S1540)를 포함하고,
상기 최종 예측 영상을 획득하는 단계는,
상기 복수의 예비 예측 영상에 대해 상기 복수의 제 2 가중치 데이터를 적용하여 복수의 변형된 예측 영상을 획득하는 단계(S1550);
상기 복수의 변형된 예측 영상을 결합하여 중간 예측 영상을 획득하는 단계(S1560); 및
상기 중간 예측 영상의 샘플 값들에 상기 제 1 가중치 데이터의 샘플 값들을 적용하여 상기 최종 예측 영상을 획득하는 단계(S1570)를 포함하는, 영상 복호화 방법.
According to any one of claims 1 to 5,
As the feature data of the current optical flow is processed by the optical flow decoder 450, a plurality of current optical flows, the first weight data, and a plurality of second weight data are obtained;
Obtaining the preliminary prediction image,
Acquiring a plurality of preliminary prediction images from the previous reconstructed image based on the plurality of current optical flows (S1540);
Obtaining the final predicted image,
obtaining a plurality of modified prediction images by applying the plurality of second weight data to the plurality of preliminary prediction images (S1550);
obtaining an intermediate prediction image by combining the plurality of modified prediction images (S1560); and
and obtaining the final prediction image by applying sample values of the first weight data to sample values of the intermediate prediction image (S1570).
제1항 내지 제6항 중 어느 하나의 항에 있어서,
상기 옵티컬 플로우 디코더(450)의 개수는 복수이며,
복수의 옵티컬 플로우 디코더 각각은 한 쌍의 현재 옵티컬 플로우와 제 2 가중치 데이터를 출력하는, 영상 복호화 방법.
According to any one of claims 1 to 6,
The number of optical flow decoders 450 is plural,
An image decoding method, wherein each of the plurality of optical flow decoders outputs a pair of current optical flow and second weight data.
제1항 내지 제7항 중 어느 하나의 항에 있어서,
상기 복수의 제 2 가중치 데이터 내 동일 위치의 샘플 값들의 합은 1인, 영상 복호화 방법.
According to any one of claims 1 to 7,
The video decoding method of claim 1, wherein the sum of sample values at the same position in the plurality of second weight data is 1.
제1항 내지 제8항 중 어느 하나의 항의 방법을 수행하기 위한 프로그램이 기록된 컴퓨터로 읽을 수 있는 기록매체.
A computer-readable recording medium on which a program for performing the method of any one of claims 1 to 8 is recorded.
AI를 이용하는 영상 복호화 장치(600)에 있어서,
비트스트림으로부터 현재 옵티컬 플로우의 특징 데이터 및 현재 잔차 영상의 특징 데이터를 획득하는 획득부(610); 및
옵티컬 플로우 디코더에 상기 현재 옵티컬 플로우의 특징 데이터를 적용하여 상기 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하고, 잔차 디코더에 상기 현재 잔차 영상의 특징 데이터를 적용하여 상기 현재 잔차 영상을 획득하고, 상기 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하고, 상기 예비 예측 영상의 샘플 값들에 상기 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하고, 상기 최종 예측 영상과 상기 현재 잔차 영상을 결합하여 현재 영상에 대응하는 현재 복원 영상을 획득하는 예측 복호화부(630;630-1;630-2;630-3;630-4)를 포함하는, 영상 복호화 장치.
In the video decoding apparatus 600 using AI,
an acquisition unit 610 that obtains feature data of a current optical flow and feature data of a current residual image from a bitstream; and
The current optical flow and first weight data are obtained by applying feature data of the current optical flow to an optical flow decoder, and the current residual image is obtained by applying feature data of the current residual image to a residual decoder. A preliminary prediction image is obtained from a previous reconstructed image based on the current optical flow, a final prediction image is obtained by applying sample values of the first weight data to sample values of the preliminary prediction image, and the final prediction image and the current A video decoding apparatus comprising: a predictive decoding unit (630; 630-1; 630-2; 630-3; 630-4) that combines residual images to obtain a current reconstructed image corresponding to a current image.
AI를 이용하는 영상 부호화 방법에 있어서,
현재 영상 및 이전 복원 영상을 옵티컬 플로우 인코더(410)에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득하는 단계(S2010);
옵티컬 플로우 디코더(450)에 상기 현재 옵티컬 플로우의 특징 데이터를 적용하여 상기 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하는 단계(S2020);
상기 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하는 단계(S2030);
상기 예비 예측 영상의 샘플 값들에 상기 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하는 단계(S2040);
상기 최종 예측 영상과 상기 현재 영상 사이의 차이에 해당하는 현재 잔차 영상을 획득하는 단계(S2050);
상기 현재 잔차 영상을 잔차 인코더(430)에 적용하여 상기 현재 잔차 영상의 특징 데이터를 획득하는 단계(S2060); 및
상기 현재 옵티컬 플로우의 특징 데이터와 상기 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성하는 단계(S2070)를 포함하는, 영상 부호화 방법.
In the video encoding method using AI,
obtaining feature data of the current optical flow by applying the current image and the previous reconstructed image to the optical flow encoder 410 (S2010);
obtaining the current optical flow and first weight data by applying feature data of the current optical flow to the optical flow decoder 450 (S2020);
obtaining a preliminary prediction image from a previous reconstructed image based on the current optical flow (S2030);
obtaining a final prediction image by applying sample values of the first weight data to sample values of the preliminary prediction image (S2040);
obtaining a current residual image corresponding to a difference between the final predicted image and the current image (S2050);
obtaining feature data of the current residual image by applying the current residual image to the residual encoder 430 (S2060); and
and generating a bitstream including feature data of the current optical flow and feature data of the current residual image (S2070).
제11항에 있어서,
상기 현재 옵티컬 플로우의 특징 데이터가 상기 옵티컬 플로우 디코더(450)에 의해 처리됨에 따라 복수의 현재 옵티컬 플로우, 상기 제 1 가중치 데이터 및 복수의 제 2 가중치 데이터가 획득되고,
상기 예비 예측 영상을 획득하는 단계는,
상기 복수의 현재 옵티컬 플로우에 기초하여 상기 이전 복원 영상으로부터 복수의 예비 예측 영상을 획득하는 단계(S2230)를 포함하고,
상기 최종 예측 영상을 획득하는 단계는,
상기 복수의 예비 예측 영상에 대해 상기 복수의 제 2 가중치 데이터를 적용하여 복수의 변형된 예측 영상을 획득하는 단계(S2240);
상기 복수의 변형된 예측 영상을 결합하여 중간 예측 영상을 획득하는 단계(S2250); 및
상기 중간 예측 영상의 샘플 값들에 상기 제 1 가중치 데이터의 샘플 값들을 적용하여 상기 최종 예측 영상을 획득하는 단계(S2260)를 포함하는, 영상 부호화 방법.
According to claim 11,
As the feature data of the current optical flow is processed by the optical flow decoder 450, a plurality of current optical flows, the first weight data, and a plurality of second weight data are obtained;
Obtaining the preliminary prediction image,
Acquiring a plurality of preliminary prediction images from the previous reconstructed image based on the plurality of current optical flows (S2230);
Obtaining the final predicted image,
acquiring a plurality of modified prediction images by applying the plurality of second weight data to the plurality of preliminary prediction images (S2240);
obtaining an intermediate prediction image by combining the plurality of modified prediction images (S2250); and
and obtaining the final prediction image by applying sample values of the first weight data to sample values of the intermediate prediction image (S2260).
AI를 이용하는 영상 부호화 장치(1600)에 있어서,
현재 영상 및 이전 복원 영상을 옵티컬 플로우 인코더에 적용하여 현재 옵티컬 플로우의 특징 데이터를 획득하고, 옵티컬 플로우 디코더에 상기 현재 옵티컬 플로우의 특징 데이터를 적용하여 상기 현재 옵티컬 플로우, 및 제 1 가중치 데이터를 획득하고, 상기 현재 옵티컬 플로우를 기초로 이전 복원 영상으로부터 예비 예측 영상을 획득하고, 상기 예비 예측 영상의 샘플 값들에 상기 제 1 가중치 데이터의 샘플 값들을 적용하여 최종 예측 영상을 획득하고, 상기 최종 예측 영상과 상기 현재 영상 사이의 차이에 해당하는 현재 잔차 영상을 획득하고, 상기 현재 잔차 영상을 잔차 인코더에 적용하여 상기 현재 잔차 영상의 특징 데이터를 획득하는 예측 부호화부(1610;1610-1); 및
상기 현재 옵티컬 플로우의 특징 데이터와 상기 현재 잔차 영상의 특징 데이터를 포함하는 비트스트림을 생성하는 생성부(1620)를 포함하는, 영상 부호화 장치.
In the video encoding device 1600 using AI,
Applying a current image and a previous reconstructed image to an optical flow encoder to obtain feature data of a current optical flow, and applying the feature data of the current optical flow to an optical flow decoder to obtain the current optical flow and first weight data, , Obtaining a preliminary prediction image from a previous reconstructed image based on the current optical flow, obtaining a final prediction image by applying sample values of the first weight data to sample values of the preliminary prediction image, and obtaining a final prediction image and a predictive encoder (1610; 1610-1) for acquiring a current residual image corresponding to a difference between the current images and applying the current residual image to a residual encoder to acquire feature data of the current residual image; and
and a generation unit 1620 configured to generate a bitstream including feature data of the current optical flow and feature data of the current residual image.
KR1020220106058A 2021-09-17 2022-08-24 Apparatus and method for encoding and decodng image using artificial intelligence KR20230041601A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/KR2022/013650 WO2023043154A1 (en) 2021-09-17 2022-09-13 Device and method for encoding and decoding image using ai
US18/133,369 US20230247212A1 (en) 2021-09-17 2023-04-11 Device and method for encoding and decoding image using ai

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20210125277 2021-09-17
KR1020210125277 2021-09-17

Publications (1)

Publication Number Publication Date
KR20230041601A true KR20230041601A (en) 2023-03-24

Family

ID=85872743

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220106058A KR20230041601A (en) 2021-09-17 2022-08-24 Apparatus and method for encoding and decodng image using artificial intelligence

Country Status (1)

Country Link
KR (1) KR20230041601A (en)

Similar Documents

Publication Publication Date Title
KR20110093532A (en) Image/video coding and decoding system and method using graph based pixel prediction and depth map coding system and method
US9787985B2 (en) Reduction of spatial predictors in video compression
JP2002058031A (en) Method and apparatus for encoding image as well as method and apparatus for decoding image
CN103517071A (en) Image coding apparatus and image coding method
KR20220077097A (en) Method and Apparatus for Point Cloud Coding Using Mapping Function
KR20230041601A (en) Apparatus and method for encoding and decodng image using artificial intelligence
US11863756B2 (en) Image encoding and decoding apparatus and method using artificial intelligence
US10045022B2 (en) Adaptive content dependent intra prediction mode coding
JP6564315B2 (en) Encoding device, decoding device, and program
EP4250729A1 (en) Ai-based image encoding and decoding apparatus, and method by same
US20230247212A1 (en) Device and method for encoding and decoding image using ai
JP6190103B2 (en) Moving picture coding apparatus, moving picture coding method, and program
KR20220120436A (en) Artificial intelligence based encoding apparatus and decoding apparatus of image, and method thereby
KR20230022085A (en) Artificial intelligence based encoding apparatus and decoding apparatus of image, and method thereby
KR20230067492A (en) Image encoding apparatus and image decoding apparatus using artificial intelligence, and method for encoding and decondg image thereby
JP7249111B2 (en) Image encoding device, image decoding device, and program
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
US20230041187A1 (en) Artificial intelligence-based image encoding apparatus and method and decoding apparatus and method
WO2012128209A1 (en) Image encoding device, image decoding device, program, and encoded data
Cong et al. A low complexity Wyner-Ziv coding solution for light field image transmission and storage
KR20230022093A (en) Apparatus and method for applying artificial intelligence based filtering on image
JP6557483B2 (en) Encoding apparatus, encoding system, and program
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
CN116868566A (en) AI-based image encoding and decoding apparatus and method thereof
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