KR20240030922A - Npu for distributing artificial neural networks based on mpeg-vcm and method thereof - Google Patents

Npu for distributing artificial neural networks based on mpeg-vcm and method thereof Download PDF

Info

Publication number
KR20240030922A
KR20240030922A KR1020220175322A KR20220175322A KR20240030922A KR 20240030922 A KR20240030922 A KR 20240030922A KR 1020220175322 A KR1020220175322 A KR 1020220175322A KR 20220175322 A KR20220175322 A KR 20220175322A KR 20240030922 A KR20240030922 A KR 20240030922A
Authority
KR
South Korea
Prior art keywords
npu
information
neural network
layer
artificial neural
Prior art date
Application number
KR1020220175322A
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 KR1020237031802A priority Critical patent/KR20240032707A/en
Priority to PCT/KR2023/012754 priority patent/WO2024049151A1/en
Priority to US18/504,522 priority patent/US20240089475A1/en
Publication of KR20240030922A publication Critical patent/KR20240030922A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/002Image coding using neural networks

Landscapes

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

Abstract

본 명세서의 일 개시에 따르면, 인코딩을 수행할 수 있는 NPU(Neural Processing Unit)가 제공된다. 상기 NPU는 인공신경망 내의 다수의 레이어들을 위한 연산을 수행하여 복수의 출력 특징맵을 생성하는 하나 이상의 PE(Processing Element)와; 그리고 상기 복수의 출력 특징맵 중에서 하나 이상의 임의 출력 특징맵을 비트스트림으로 인코딩한 후, 전송하는 인코더를 포함할 수 있다.According to one disclosure of the present specification, a Neural Processing Unit (NPU) capable of performing encoding is provided. The NPU includes one or more Processing Elements (PEs) that perform operations on multiple layers within an artificial neural network to generate multiple output feature maps; And, it may include an encoder that encodes one or more random output feature maps among the plurality of output feature maps into a bitstream and then transmits it.

Description

MPEG-VCM에 기반하여 인공신경망을 분산 처리하는 NPU 및 방법{NPU FOR DISTRIBUTING ARTIFICIAL NEURAL NETWORKS BASED ON MPEG-VCM AND METHOD THEREOF}NPU and method for distributed processing of artificial neural network based on MPEG-VCM {NPU FOR DISTRIBUTING ARTIFICIAL NEURAL NETWORKS BASED ON MPEG-VCM AND METHOD THEREOF}

본 개시는 인공신경망을 분산 처리하는 NPU 및 방법에 관한 것이다.This disclosure relates to an NPU and method for distributed processing of an artificial neural network.

정보 통신 산업의 지속적인 발달을 통해 HD(High Definition) 해상도를 가지는 방송 서비스가 세계적으로 확산되었다. Through the continued development of the information and communications industry, broadcasting services with HD (High Definition) resolution have spread globally.

이러한 확산을 통해, 많은 사용자들이 고해상도이며 고화질인 영상(image) 및/또는 비디오(video)에 익숙해지게 되었고, 보다 높은 화질, 즉 4K 또는 8K 이상의 UHD(Ultra High Definition) 영상/비디오와 같은 고해상도, 고품질의 영상/비디오에 대한 수요가 다양한 분야에서 증가되었다.Through this proliferation, many users have become accustomed to high-resolution and high-definition images and/or videos, and higher resolution, such as 4K or 8K or higher UHD (Ultra High Definition) images/videos, Demand for high-quality images/videos has increased in various fields.

이러한 UHD 영상데이터를 코딩하는 기술은 2013년 표준 기술인 HEVC(High Efficiency Video Coding)를 통해 완성되었다.The technology for coding such UHD video data was completed through HEVC (High Efficiency Video Coding), a standard technology in 2013.

HEVC는 이전의 H.264/AVC 기술보다 더 높은 압축률과 더 낮은 복잡도를 갖는 차세대 영상 압축 기술이며, HD급, UHD급 영상의 방대한 데이터를 효과적으로 압축하기 위한 핵심 기술이다.HEVC is a next-generation video compression technology with a higher compression rate and lower complexity than the previous H.264/AVC technology, and is a core technology for effectively compressing massive data of HD and UHD video.

HEVC는 이전의 압축 표준들과 같이 블록 단위의 부호화를 수행한다. 다만 H.264/AVC와 달리 하나의 프로파일만 존재하는 차이점이 있다. HEVC의 유일한 프로파일에 포함된 핵심 부호화 기술은 총 8개 분야로 계층적 부호화 구조 기술, 변환 기술, 양자화 기술, 화면 내 예측 부호화 기술, 화면 간 움직임 예측 기술, 엔트로피 부호화 기술, 루프 필터 기술 및 기타 기술이 있다.HEVC performs block-level encoding like previous compression standards. However, unlike H.264/AVC, there is only one profile. The core coding technologies included in HEVC's unique profile include a total of eight fields: hierarchical coding structure technology, transformation technology, quantization technology, intra-screen predictive coding technology, inter-screen motion prediction technology, entropy coding technology, loop filter technology, and other technologies. There is.

2013년 HEVC 비디오 코덱 제정 이후, 4K, 8K를 비디오 영상을 이용한 실감 영상 및 가상 현실 서비스 등이 확대됨에 따라 HEVC 대비 2배 이상 성능 개선을 목표로 하는 차세대 비디오 코덱인, 다용도 비디오 부호화(VVC: Versatile Video Coding) 표준이 개발되었다. VVC는 H.266으로 불린다.Since the establishment of the HEVC video codec in 2013, as realistic video and virtual reality services using 4K and 8K video images have expanded, the next-generation video codec, Versatile Video Coding (VVC), aims to improve performance by more than 2 times compared to HEVC. Video Coding) standards have been developed. VVC is called H.266.

H.266(VVC)은 이전 세대 코덱인 H.265(HEVC)보다 2배 이상의 효율을 목표로 개발되었다. VVC는 처음에는 4K 이상의 해상도를 감안하고 개발되었으나 점점 VR 시장의 확장으로 인한 360도 영상을 대응할 목적으로 무려 16K 수준의 초고해상도 영상처리용으로도 개발되었다. 또한 점차 디스플레이 기술의 발달로 HDR 시장이 확대됨에 따라 이에 대응하기 위해 10비트 색심도는 물론이고 16비트 색심도를 지원하며 1000니트, 4000니트, 10000니트의 밝기 표현을 지원한다. 또한 VR시장과 360도 영상시장을 염두하여 개발되고 있기에 0~120 FPS 범위의 부분 프레임 속도를 지원한다.H.266 (VVC) was developed with the goal of being more than twice as efficient as the previous generation codec, H.265 (HEVC). VVC was initially developed considering resolutions of 4K or higher, but was also developed for ultra-high resolution video processing at a whopping 16K level in order to respond to 360-degree videos due to the expansion of the VR market. In addition, in response to the gradual expansion of the HDR market due to the development of display technology, it supports not only 10-bit color depth but also 16-bit color depth, and supports brightness expressions of 1000 nits, 4000 nits, and 10000 nits. Additionally, since it is being developed with the VR market and 360-degree video market in mind, it supports partial frame rates ranging from 0 to 120 FPS.

<인공 지능의 발전><Development of artificial intelligence>

인공지능(artificial intelligence: AI)도 점차 발전하고 있다. AI는 인간의 지능, 즉 인식(Recognition), 분류(Classification), 추론(Inference), 예측(Predict), 조작/의사결정(Control/Decision making) 등을 할 수 있는 지능을 인공적으로 모방하는 것을 의미한다. Artificial intelligence (AI) is also gradually developing. AI refers to artificially imitating human intelligence, that is, intelligence capable of recognition, classification, inference, prediction, control/decision making, etc. do.

인공 지능 기술의 발전 및 사물인터넷(Internet Of Things; IOT) 기기의 증가로 인해 기계 간 트래픽이 폭증할 것으로 예측되고, 기계(machine)에 의존하는 영상 분석이 널리 사용될 것으로 예측되고 있다.Due to the development of artificial intelligence technology and the increase in Internet of Things (IOT) devices, traffic between machines is predicted to explode, and machine-dependent video analysis is predicted to be widely used.

그러나, 기계에 의해 분석되어야 할 영상이 기하급수적으로 증가될 것으로 예상됨에 따라, 서버의 부하 및 전력 소모 문제가 제기될 것으로 예측된다.However, as the number of images to be analyzed by machines is expected to increase exponentially, server load and power consumption problems are expected to arise.

따라서, 본 개시는 기계에 의한 영상 분석을 효과적으로 수행할 수 있도록 하기 위한, NPU(Neural Processing Unit)을 제공하는 것을 목적으로 한다.Accordingly, the purpose of the present disclosure is to provide a Neural Processing Unit (NPU) to effectively perform image analysis by a machine.

전술한 목적을 달성하기 위하여, 본 명세서의 일 개시에 따르면, 인코딩을 수행할 수 있는 NPU(Neural Processing Unit)가 제공된다. 상기 NPU는 인공신경망 내의 다수의 레이어들을 위한 연산을 수행하여 복수의 출력 특징맵을 생성하는 하나 이상의 PE(Processing Element)와; 그리고 상기 복수의 출력 특징맵 중에서 하나 이상의 임의 출력 특징맵을 비트스트림으로 인코딩한 후, 전송하는 인코더를 포함할 수 있다.In order to achieve the above-described object, according to one disclosure of the present specification, a Neural Processing Unit (NPU) capable of performing encoding is provided. The NPU includes one or more Processing Elements (PEs) that perform operations on multiple layers within an artificial neural network to generate multiple output feature maps; And, it may include an encoder that encodes one or more random output feature maps among the plurality of output feature maps into a bitstream and then transmits it.

상기 인코더는: 상기 복수의 출력 특징맵 중에서 하나 이상의 임의 출력 특징맵을 임의의 정보에 기초하여 선택할 수 있다.The encoder may: select one or more random output feature maps among the plurality of output feature maps based on arbitrary information.

상기 임의의 정보는, 서버 혹은 상기 비트스트림을 수신하는 다른 NPU로부터 수신될 수 있다.The arbitrary information may be received from a server or another NPU that receives the bitstream.

상기 임의의 정보는 상기 하나 이상의 임의 출력 특징맵에 대한 식별 정보 혹은 상기 임의 출력 특징맵에 대응하는 레이어에 대한 식별 정보를 포함할 수 있다.The random information may include identification information about the one or more random output feature maps or identification information about a layer corresponding to the random output feature map.

상기 임의의 정보는: 출력 특징맵의 사이즈 정보, 상기 비트스트림을 수신하는 다른 NPU에서 수행되는 머신 태스크의 정보 그리고 상기 비트스트림을 수신하는 다른 NPU에서 연산되는 인공신경망 모델의 정보 중 하나 이상에 기초하여 생성될 수 있다.The arbitrary information is based on one or more of: size information of the output feature map, information on machine tasks performed in another NPU receiving the bitstream, and information on an artificial neural network model calculated in another NPU receiving the bitstream. It can be created.

상기 비트스트림은, 상기 인공신경망 내의 후속 레이어들을 위한 연산을 다른 NPU가 수행하도록 하기 위해 전송될 수 있다.The bitstream may be transmitted to enable another NPU to perform calculations for subsequent layers in the artificial neural network.

전술한 목적을 달성하기 위하여, 본 명세서의 일 개시에 따르면, 디코딩을 수행할 수 있는 NPU(Neural Processing Unit)가 제공된다. 상기 NPU는 수신되는 비트스트림을 디코딩하여 하나 이상의 임의 특징맵으로 복원하는 디코더와; 그리고 인공신경망 모델을 위한 연산을 수행하는 하나 이상의 PE(Processing Element)를 포함할 수 있다. 상기 복원된 하나 이상의 임의 특징맵은 상기 인공신경망 내의 다수의 레이어들 중에서 임의 레이어의 출력 특징맵일 수 있다. 상기 하나 이상의 PE는 상기 복원된 하나 이상의 임의 특징맵을 상기 임의 레이어의 후속 레이어의 입력 특징맵으로 활용할 수 있다.In order to achieve the above-described object, according to one disclosure of the present specification, a Neural Processing Unit (NPU) capable of performing decoding is provided. The NPU includes a decoder that decodes the received bitstream and restores it into one or more random feature maps; It may also include one or more PE (Processing Elements) that perform calculations for the artificial neural network model. The one or more reconstructed random feature maps may be output feature maps of a random layer among multiple layers in the artificial neural network. The one or more PEs may utilize the one or more reconstructed random feature maps as an input feature map for a subsequent layer of the random layer.

상기 NPU는 상기 임의 레이어 혹은 상기 하나 이상의 특징맵을 상기 비트스트림을 전송하는 다른 NPU에 의해 선택될 수 있도록 하는 임의 정보를 전송할 수 있다.The NPU may transmit random information that allows the random layer or the one or more feature maps to be selected by another NPU transmitting the bitstream.

상기 임의 정보는 상기 하나 이상의 임의 특징맵에 대한 식별 정보 혹은 상기 하나 이상의 임의 특징맵에 대응하는 레이어에 대한 식별 정보를 포함할 수 있다.The random information may include identification information about the one or more random feature maps or identification information about a layer corresponding to the one or more random feature maps.

상기 임의 정보는: 특징맵의 사이즈 정보, 상기 NPU에서 수행되는 머신 태스크의 정보 그리고 상기 인공신경망 모델의 정보 중 하나 이상에 기초하여 생성될 수 있다. The random information may be generated based on one or more of: size information of the feature map, information on machine tasks performed in the NPU, and information on the artificial neural network model.

또한, 전술한 목적을 달성하기 위하여, 본 명세서의 일 개시에 따르면, 시스템이 제시된다. 상기 시스템은 복수의 레이어를 포한하는 인공신경망 모델의 제1 레이어 구간을 처리하도록 구성된 제1 신경 프로세싱 유닛; 및 상기 인공신경망 모델의 제2 레이어 구간을 처리하도록 구성된 제2 신경 프로세싱 유닛;을 포함할 수 있다. 상기 제1 신경 프로세싱 유닛은 상기 제1 레이어 구간의 마지막 레이어의 출력 특징맵을 상기 제2 신경 프로세싱 유닛에 입력하도록 구성될 수 있다.Also, to achieve the above-described object, according to one disclosure of the present specification, a system is presented. The system includes a first neural processing unit configured to process a first layer section of an artificial neural network model including a plurality of layers; and a second neural processing unit configured to process a second layer section of the artificial neural network model. The first neural processing unit may be configured to input the output feature map of the last layer of the first layer section to the second neural processing unit.

상기 제1 레이어 구간의 레이어들의 가중치의 총합의 크기는 상기 제2 레이어 구간의 레이어들의 가중치의 총합의 크기보다 상대적으로 더 작을 수 있다.The size of the sum of the weights of the layers in the first layer section may be relatively smaller than the size of the sum of the weights of the layers in the second layer section.

상기 제1 신경 프로세싱 유닛은 복수개이고, 상기 제2 신경 프로세싱 유닛은 상기 제1 신경 프로세싱 유닛에서 출력되는 상기 출력 특징맵 각각을 순차적으로 처리하도록 구성될 수 있다.There may be a plurality of first neural processing units, and the second neural processing unit may be configured to sequentially process each of the output feature maps output from the first neural processing unit.

상기 제2 신경 프로세싱 유닛은 적어도 상기 제1 신경 프로세싱 유닛의 개수에 대응하여 가중치를 재사용하도록 구성될 수 있다.The second neural processing unit may be configured to reuse weights corresponding to at least the number of the first neural processing units.

상기 제1 신경 프로세싱 유닛의 제1 메모리의 크기는 상기 제2 신경 프로세싱 유닛의 제2 메모리 보다 상대적으로 더 작도록 구성될 수 있다.The size of the first memory of the first neural processing unit may be configured to be relatively smaller than the second memory of the second neural processing unit.

상기 인공신경망 모델의 제1 레이어 구간과 상기 제2 레이어 구간은 특정 레이어의 출력 특징맵의 크기를 기초로 결정될 수 있다.The first layer section and the second layer section of the artificial neural network model may be determined based on the size of the output feature map of a specific layer.

상기 인공신경망 모델의 제1 레이어 구간과 상기 제2 레이어 구간은 각각의 레이어 구간의 가중치 총합의 크기를 기초로 결정될 수 있다.The first layer section and the second layer section of the artificial neural network model may be determined based on the size of the sum of the weights of each layer section.

상기 인공신경망 모델의 제1 레이어 구간의 제1 가중치의 크기는 상기 제2 레이어 구간의 제2 가중치 크기 보다 상대적으로 더 작을 수 있다. The size of the first weight of the first layer section of the artificial neural network model may be relatively smaller than the size of the second weight of the second layer section.

본 개시에 의해 제시되는 NPU에 따르면, 인공신경망의 분산 처리를 통하여, 엣지형 NPU는 제조 원가와 소모 전력을 절감할 수 있고, 서버형 NPU는 연산 부하를 절감할 수 있다. According to the NPU presented by this disclosure, through distributed processing of an artificial neural network, the edge-type NPU can reduce manufacturing costs and power consumption, and the server-type NPU can reduce computational load.

도 1은 비디오/영상 코딩 시스템의 예를 개략적으로 나타낸다.
도 2는 비디오/영상 인코딩 장치의 구성을 개략적으로 설명하는 도면이다.
도 3은 비디오/영상 디코딩 장치의 구성을 개략적으로 설명하는 도면이다.
도 4는 본 개시에 따른 신경 프로세싱 유닛을 설명하는 개략적인 개념도이다.
도 5a는 본 개시에 적용될 수 있는 복수의 프로세싱 엘리먼트 중 하나의 프로세싱 엘리먼트를 설명하는 개략적인 개념도이다.
도 5b는 본 개시에 적용될 수 있는 SFU를 설명하는 개략적인 개념도이다.
도 6은 도 4에 도시된 신경 프로세싱 유닛(100)의 변형예를 나타낸 예시도이다.
도 7은 예시적인 인공신경망모델을 설명하는 개략적인 개념도이다.
도 8a은 컨볼루션 신경망의 기본 구조를 설명하기 위한 도면이다.
도 8b는 컨볼루션 신경망의 동작을 이해하기 쉽게 나타낸 종합도이다.
도 9a 내지 도 9d는 VCM 인코더를 포함하는 NPU와 VCM 디코더를 포함하는 NPU를 나타낸 예시도들이다.
도 10a 및 도 10b는 인공신경망모델에서 비트스트림의 위치를 나타낸 예시도이다.
도 11a은 특징맵을 압축하는한 후 비트스트림으로 전송하는 예를 VCM 인코더와 수신된 비트스트림을 복원하는 VCM 디코더를 일 예시에 따라 나타내고, 도 11b는 도 11a에 도시된 특징맵 P2 내지 특징맵 P5를 생성하는 예를 나타낸다.
도 11c는 도 11a에 도시된 MSFF 수행부를 자세하게 나타낸 예시도이다.
도 12는 도 11a의 변형예를 나타낸 예시도이다.
도 13a는 예시적인 인공신경망 모델 내의 각 레이어 별 데이터의 크기를 기준으로, 본 명세서의 일 개시에 따라 에지 디바이스와 클라우드 서버 사이에 분산 처리되는 예시를 나타낸 개념도이다.
도 13b는 도 13a에 도시된 예시적 인공신경망 모델에서 각 레이어 별 데이터 사이즈 등을 나타낸 예시적인 테이블이다.
도 14a는 도 13a에 도시된 인공신경망 모델의 레이어 9부터 레이어 13까지의 특징맵을 예시적으로 나타낸 예시도이다.
도 14b는 도 14a에 도시된 특징맵 P9부터 특징맵 P12를 압축한 후 비트스트림으로 전송하는 VCM 인코더와 수신된 비트스트림을 복원하는 VCM 디코더를 일 예시에 따라 나타낸 예시도이다.
도 15a는 본 명세서의 개시에 따른 NPU를 동작 관점에서 나타낸 예시도이다.
도 15b는 전송측 NPU와 수신측 NPU 간의 신호 흐름을 나타낸 흐름도이다.
도 15c는 도 15b의 변형예이다.
도 16은 본 명세서의 일 개시가 적용되는 예시적인 제1 시나리오를 나타낸 예시도이다.
도 17은 본 명세서의 일 개시가 적용되는 예시적인 제2 시나리오를 나타낸 예시도이다.
1 schematically shows an example of a video/picture coding system.
Figure 2 is a diagram schematically explaining the configuration of a video/image encoding device.
Figure 3 is a diagram schematically explaining the configuration of a video/image decoding device.
4 is a schematic conceptual diagram explaining a neural processing unit according to the present disclosure.
FIG. 5A is a schematic conceptual diagram illustrating one processing element among a plurality of processing elements applicable to the present disclosure.
Figure 5b is a schematic conceptual diagram explaining an SFU applicable to the present disclosure.
FIG. 6 is an exemplary diagram showing a modified example of the neural processing unit 100 shown in FIG. 4.
7 is a schematic conceptual diagram illustrating an exemplary artificial neural network model.
Figure 8a is a diagram for explaining the basic structure of a convolutional neural network.
Figure 8b is a comprehensive diagram showing the operation of a convolutional neural network in an easy-to-understand manner.
Figures 9a to 9d are illustrations showing an NPU including a VCM encoder and an NPU including a VCM decoder.
Figures 10a and 10b are exemplary diagrams showing the positions of bitstreams in the artificial neural network model.
FIG. 11A shows an example of a VCM encoder compressing a feature map and then transmitting it as a bitstream, and a VCM decoder for restoring the received bitstream, according to an example, and FIG. 11B shows feature maps P2 to feature maps shown in FIG. 11A. An example of creating P5 is shown.
FIG. 11C is an example diagram illustrating in detail the MSFF execution unit shown in FIG. 11A.
FIG. 12 is an exemplary diagram showing a modification of FIG. 11A.
FIG. 13A is a conceptual diagram illustrating an example of distributed processing between an edge device and a cloud server according to an disclosure of the present specification, based on the size of data for each layer in an exemplary artificial neural network model.
FIG. 13B is an example table showing the data size for each layer in the example artificial neural network model shown in FIG. 13A.
FIG. 14A is an exemplary diagram illustrating feature maps from layer 9 to layer 13 of the artificial neural network model shown in FIG. 13A.
FIG. 14B is an exemplary diagram illustrating a VCM encoder that compresses the feature maps P9 to P12 shown in FIG. 14A and then transmits them as a bitstream, and a VCM decoder that restores the received bitstream, according to an example.
Figure 15a is an exemplary diagram showing the NPU according to the disclosure of the present specification from an operation perspective.
Figure 15b is a flowchart showing the signal flow between the transmitting NPU and the receiving NPU.
Figure 15c is a modified example of Figure 15b.
16 is an exemplary diagram illustrating a first exemplary scenario to which a disclosure of the present specification is applied.
17 is an exemplary diagram illustrating a second exemplary scenario to which a disclosure of the present specification is applied.

본 명세서 또는 출원에 개시되어 있는 본 개시의 개념에 따른 실시 예들에 대해서 특정한 구조적 내지 단계적 설명들은 단지 본 개시의 개념에 따른 실시 예를 설명하기 위한 목적으로 예시된 것으로, 본 개시의 개념에 따른 실시 예들은 다양한 형태로 실시될 수 있으며 본 개시의 개념에 따른 실시 예들은 다양한 형태로 실시될 수 있으며 본 명세서 또는 출원에 설명된 실시 예들에 한정되는 것으로 해석되어서는 아니 된다.Specific structural or step-by-step descriptions of embodiments according to the concept of the present disclosure disclosed in the present specification or application are merely illustrative for the purpose of explaining embodiments according to the concept of the present disclosure, and the implementation according to the concept of the present disclosure Examples may be implemented in various forms, and embodiments according to the concept of the present disclosure may be implemented in various forms, and should not be construed as being limited to the embodiments described in this specification or application.

본 개시의 개념에 따른 실시 예는 다양한 변경을 가할 수 있고 여러 가지 형태를 가질 수 있으므로 특정 실시 예들을 도면에 예시하고 본 명세서 또는 출원에 상세하게 설명하고자 한다. 그러나, 이는 본 개시의 개념에 따른 실시 예를 특정한 개시 형태에 대해 한정하려는 것이 아니며, 본 개시의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Since the embodiments according to the concept of the present disclosure may be subject to various changes and may have various forms, specific embodiments will be illustrated in the drawings and described in detail in the present specification or application. However, this is not intended to limit the embodiments according to the concept of the present disclosure to a specific disclosure form, and should be understood to include all changes, equivalents, and substitutes included in the spirit and technical scope of the present disclosure.

제1 및/또는 제2 등의 용어는 다양한 구성 요소들을 설명하는데 사용될 수 있지만, 상기 구성 요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성 요소를 다른 구성 요소로부터 구별하는 목적으로만, 예컨대 본 개시의 개념에 따른 권리 범위로부터 이탈되지 않은 채, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.Terms such as first and/or second may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another component, for example, without departing from the scope of rights according to the concept of the present disclosure, a first component may be named a second component, and similarly The second component may also be referred to as the first component.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 구성요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.When a component is said to be "connected" or "connected" to another component, it is understood that it may be directly connected to or connected to the other component, but that other components may exist in between. It should be. On the other hand, when it is mentioned that a component is “directly connected” or “directly connected” to another component, it should be understood that there are no other components in between. Other expressions that describe the relationship between components, such as "between" and "immediately between" or "neighboring" and "directly adjacent to" should be interpreted similarly.

본 명세서에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 개시를 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 서술된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in this specification are merely used to describe specific embodiments and are not intended to limit the present disclosure. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, terms such as “comprise” or “have” are intended to designate the existence of a described feature, number, step, operation, component, part, or combination thereof, but are not intended to indicate the presence of one or more other features or numbers. It should be understood that this does not preclude the existence or addition of steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by a person of ordinary skill in the technical field to which this disclosure pertains. Terms as defined in commonly used dictionaries should be interpreted as having meanings consistent with the meanings they have in the context of the related technology, and unless clearly defined in this specification, should not be interpreted in an idealized or overly formal sense. No.

실시 예를 설명함에 있어서 본 개시가 속하는 기술 분야에 익히 알려져 있고 본 개시와 직접적으로 관련이 없는 기술 내용에 대해서는 설명을 생략한다. 이는 불필요한 설명을 생략함으로써 본 개시의 요지를 흐리지 않고 더욱 명확히 전달하기 위함이다.In describing the embodiments, description of technical content that is well known in the technical field to which this disclosure belongs and that is not directly related to this disclosure will be omitted. This is to convey the gist of the present disclosure more clearly without obscuring it by omitting unnecessary explanation.

이 문서는 비디오/영상 코딩에 관한 것이다. 예를 들어 이 문서에서 개시된 방법/실시예는 VVC (Versatile Video Coding) 표준 (ITU-T Rec. H.266), VVC 이후의 차세대 비디오/이미지 코딩 표준, 또는 그 이외의 비디오 코딩 관련 표준들(예를 들어, HEVC (High Efficiency Video Coding) 표준 (ITU-T Rec. H.265), EVC(essential video coding) 표준, AVS2 표준 등)과 관련될 수 있다.This document is about video/image coding. For example, the method/embodiment disclosed in this document may be applied to the Versatile Video Coding (VVC) standard (ITU-T Rec. H.266), the next-generation video/image coding standard after VVC, or other video coding-related standards ( For example, it may be related to the High Efficiency Video Coding (HEVC) standard (ITU-T Rec. H.265), essential video coding (EVC) standard, AVS2 standard, etc.).

이 문서에서는 비디오/영상 코딩에 관한 다양한 실시예들을 제시하며, 다른 언급이 없는 한 상기 실시예들은 서로 조합되어 수행될 수도 있다.This document presents various embodiments of video/image coding, and unless otherwise specified, the embodiments may be performed in combination with each other.

이 문서에서 비디오(video)는 시간의 흐름에 따른 일련의 영상(image)들의 집합을 의미할 수 있다. 픽처(picture)는 일반적으로 특정 시간대의 하나의 영상을 나타내는 단위를 의미하며, 슬라이스(slice)/타일(tile)는 코딩에 있어서 픽처의 일부를 구성하는 단위이다. 슬라이스/타일은 하나 이상의 CTU(coding tree unit)을 포함할 수 있다. 하나의 픽처는 하나 이상의 슬라이스/타일로 구성될 수 있다. 하나의 픽처는 하나 이상의 타일 그룹으로 구성될 수 있다. 하나의 타일 그룹은 하나 이상의 타일들을 포함할 수 있다.In this document, video may refer to a series of images over time. A picture generally refers to a unit representing one image in a specific time period, and a slice/tile is a unit that forms part of a picture in coding. A slice/tile may contain one or more coding tree units (CTUs). One picture may consist of one or more slices/tiles. One picture may consist of one or more tile groups. One tile group may include one or more tiles.

픽셀(pixel) 또는 펠(pel)은 하나의 픽처(또는 영상)을 구성하는 최소의 단위를 의미할 수 있다. 또한, 픽셀에 대응하는 용어로서 '샘플(sample)'이 사용될 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 루마(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 크로마(chroma) 성분의 픽셀/픽셀 값만을 나타낼 수도 있다. 또는 샘플은 공간 도메인에서의 픽셀값을 의미할 수도 있고, 이러한 픽셀값이 주파수 도메인으로 변환되면 주파수 도메인에서의 변환 계수를 의미할 수도 있다.A pixel or pel may refer to the minimum unit that constitutes one picture (or video). Additionally, 'sample' may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel/pixel value of a luma component, or only a pixel/pixel value of a chroma component. Alternatively, a sample may mean a pixel value in the spatial domain, or when these pixel values are converted to the frequency domain, it may mean a conversion coefficient in the frequency domain.

유닛(unit)은 영상 처리의 기본 단위를 나타낼 수 있다. 유닛은 픽처의 특정 영역 및 해당 영역에 관련된 정보 중 적어도 하나를 포함할 수 있다. 하나의 유닛은 하나의 루마 블록 및 두개의 크로마(ex. cb, cr) 블록을 포함 할 수 있다. 유닛은 경우에 따라서 블록(block) 또는 영역(area) 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들(또는 샘플 어레이) 또는 변환 계수(transform coefficient)들의 집합(또는 어레이)을 포함할 수 있다.A unit may represent the basic unit of image processing. A unit may include at least one of a specific area of a picture and information related to the area. One unit can include one luma block and two chroma (ex. cb, cr) blocks. In some cases, unit may be used interchangeably with terms such as block or area. In a general case, an MxN block may include a set (or array) of samples (or a sample array) or transform coefficients consisting of M columns and N rows.

<용어의 정의><Definition of terms>

이하, 본 명세서에서 제시되는 개시들의 이해를 돕고자, 본 명세서에서 사용되는 용어들에 대하여 간략하게 정리하기로 한다.Hereinafter, in order to help understand the disclosures presented in this specification, the terms used in this specification will be briefly summarized.

NPU: 신경 프로세싱 유닛(Neural Processing Unit)의 약어로서, CPU(Central processing unit)과 별개로 인공 신경망 모델의 연산을 위해 특화된 프로세서를 의미할 수 있다.NPU: Abbreviation for Neural Processing Unit, which may refer to a processor specialized for computing artificial neural network models, separate from the CPU (Central processing unit).

AI accelerator: AI 연산 가속기로써, NPU를 지칭할 수 있다.AI accelerator: As an AI calculation accelerator, it can refer to NPU.

ANN: 인공 신경망(artificial neural network)의 약어로서, 인간의 지능을 모방하기 위하여, 인간 뇌 속의 뉴런들(Neurons)이 시냅스(Synapse)를 통하여 연결되는 것을 모방하여, 노드들을 레이어(Layer: 계층) 구조로 연결시킨, 네트워크를 의미할 수 있다.ANN: An abbreviation for artificial neural network. In order to imitate human intelligence, neurons in the human brain are connected through synapses, forming a layer of nodes. It can mean a network connected in a structure.

인공 신경망의 구조에 대한 정보: 레이어의 개수에 대한 정보, 레이어 내의 노드의 개수, 각 노드의 값, 연산 처리 방법에 대한 정보, 각 노드에 적용되는 가중치 행렬에 대한 정보 등을 포함하는 정보이다.Information about the structure of the artificial neural network: Information including information about the number of layers, the number of nodes within the layer, the value of each node, information about the calculation processing method, and information about the weight matrix applied to each node.

인공 신경망의 데이터 지역성에 대한 정보: 신경 프로세싱 유닛이 별개의 메모리에 요청하는 데이터 접근 요청 순서에 기반하여 신경 프로세싱 유닛이 처리하는 인공신경망모델의 연산 순서를 예측하게 하는 정보이다.Information about data locality of artificial neural network: This is information that predicts the operation order of the artificial neural network model processed by the neural processing unit based on the order of data access requests made by the neural processing unit to a separate memory.

DNN: 심층 신경망(Deep Neural Network)의 약어로서, 보다 높은 인공 지능을 구현하기 위하여, 인공 신경망의 은닉 레이어의 개수를 늘린 것을 의미할 수 있다.DNN: An abbreviation for Deep Neural Network, which may mean increasing the number of hidden layers of an artificial neural network to implement higher artificial intelligence.

CNN: 컨볼루션 신경망(Convolutional Neural Network)의 약어로서, 인간 뇌의 시각 피질에서 영상을 처리하는 것과 유사한 기능을 하는 신경망이다. 컨볼루션 신경망은 영상처리에 적합한 것으로 알려져 있으며, 입력 데이터의 특징들(features)을 추출하고, 특징들의 패턴을 파악하기에 용이한 것으로 알려져 있다.CNN: An abbreviation for Convolutional Neural Network, it is a neural network that functions similar to image processing in the visual cortex of the human brain. Convolutional neural networks are known to be suitable for image processing and are known to be easy to extract features of input data and identify patterns of features.

커널: CNN에 적용되는 가중치 행렬을 의미할 수 있다. 커널의 값은 기계 학습을 통해서 결정될 수 있다.Kernel: May refer to the weight matrix applied to CNN. The value of the kernel can be determined through machine learning.

이하, 첨부한 도면을 참조하여 본 개시의 바람직한 실시 예를 설명함으로써, 본 개시를 상세히 설명한다. 이하, 본 개시의 실시 예를 첨부된 도면을 참조하여 상세하게 설명한다.Hereinafter, the present disclosure will be described in detail by explaining preferred embodiments of the present disclosure with reference to the accompanying drawings. Hereinafter, embodiments of the present disclosure will be described in detail with reference to the attached drawings.

도 1은 비디오/영상 코딩 시스템의 예를 개략적으로 나타낸다.1 schematically shows an example of a video/picture coding system.

도 1을 참조하면, 비디오/영상 코딩 시스템은 소스 디바이스 및 수신 디바이스를 포함할 수 있다. 소스 디바이스는 인코딩된 비디오(video)/영상(image) 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 수신 디바이스로 전달할 수 있다.Referring to FIG. 1, a video/image coding system may include a source device and a receiving device. The source device can transmit encoded video/image information or data in file or streaming form to a receiving device through a digital storage medium or network.

상기 소스 디바이스는 비디오 소스, 인코딩 장치, 전송부를 포함할 수 있다. 상기 수신 디바이스는 수신부, 디코딩 장치 및 렌더러를 포함할 수 있다. 상기 인코딩 장치는 비디오/영상 인코딩 장치라고 불릴 수 있고, 상기 디코딩 장치는 비디오/영상 디코딩 장치라고 불릴 수 있다. 송신기는 인코딩 장치에 포함될 수 있다. 수신기는 디코딩 장치에 포함될 수 있다. 렌더러는 디스플레이부를 포함할 수도 있고, 디스플레이부는 별개의 디바이스 또는 외부 컴포넌트로 구성될 수도 있다.The source device may include a video source, an encoding device, and a transmission unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be called a video/image encoding device, and the decoding device may be called a video/image decoding device. A transmitter may be included in the encoding device. A receiver may be included in the decoding device. The renderer may include a display unit, and the display unit may be composed of a separate device or external component.

비디오 소스는 비디오/영상의 캡쳐, 합성 또는 생성 과정 등을 통하여 비디오/영상을 획득할 수 있다. 비디오 소스는 비디오/영상 캡쳐 디바이스 및/또는 비디오/영상 생성 디바이스를 포함할 수 있다. 비디오/영상 캡쳐 디바이스는 예를 들어, 하나 이상의 카메라, 이전에 캡쳐된 비디오/영상을 포함하는 비디오/영상 아카이브 등을 포함할 수 있다. 비디오/영상 생성 디바이스는 예를 들어 컴퓨터, 타블렛 및 스마트폰 등을 포함할 수 있으며 (전자적으로) 비디오/영상을 생성할 수 있다. 예를 들어, 컴퓨터 등을 통하여 가상의 비디오/영상이 생성될 수 있으며, 이 경우 관련 데이터가 생성되는 과정으로 비디오/영상 캡쳐 과정이 갈음될 수 있다.A video source can acquire video/image through the process of capturing, compositing, or creating video/image. A video source may include a video/image capture device and/or a video/image generation device. A video/image capture device may include, for example, one or more cameras, a video/image archive containing previously captured video/images, etc. Video/image generating devices may include, for example, computers, tablets, and smartphones, and are capable of generating video/images (electronically). For example, a virtual video/image may be created through a computer, etc., and in this case, the video/image capture process may be replaced by the process of generating related data.

인코딩 장치는 입력 비디오/영상을 인코딩할 수 있다. 인코딩 장치는 압축 및 코딩 효율을 위하여 예측, 변환, 양자화 등 일련의 절차를 수행할 수 있다. 인코딩된 데이터(인코딩된 비디오/영상 정보)는 비트스트림(bitstream) 형태로 출력될 수 있다.The encoding device can encode input video/image. The encoding device can perform a series of procedures such as prediction, transformation, and quantization for compression and coding efficiency. Encoded data (encoded video/image information) may be output in the form of a bitstream.

전송부는 비트스트림 형태로 출력된 인코딩된 비디오/영상 정보 또는 데이터를 파일 또는 스트리밍 형태로 디지털 저장매체 또는 네트워크를 통하여 수신 디바이스의 수신부로 전달할 수 있다. 디지털 저장 매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장 매체를 포함할 수 있다. 전송부는 미리 정해진 파일 포맷을 통하여 미디어 파일을 생성하기 위한 엘리먼트를 포함할 수 있고, 방송/통신 네트워크를 통한 전송을 위한 엘리먼트를 포함할 수 있다. 수신부는 상기 비트스트림을 수신/추출하여 디코딩 장치로 전달할 수 있다.The transmitting unit may transmit the encoded video/image information or data output in the form of a bitstream to the receiving unit of the receiving device through a digital storage medium or network in the form of a file or streaming. Digital storage media may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. The transmission unit may include elements for creating a media file through a predetermined file format and may include elements for transmission through a broadcasting/communication network. The receiving unit may receive/extract the bitstream and transmit it to the decoding device.

디코딩 장치는 인코딩 장치의 동작에 대응하는 역양자화, 역변환, 예측 등 일련의 절차를 수행하여 비디오/영상을 디코딩할 수 있다.The decoding device can decode the video/image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction that correspond to the operation of the encoding device.

렌더러는 디코딩된 비디오/영상을 렌더링할 수 있다. 렌더링된 비디오/영상은 디스플레이부를 통하여 디스플레이될 수 있다.The renderer can render the decoded video/image. The rendered video/image may be displayed through the display unit.

도 2는 비디오/영상 인코딩 장치의 구성을 개략적으로 설명하는 도면이다. Figure 2 is a diagram schematically explaining the configuration of a video/image encoding device.

이하 비디오 인코딩 장치라 함은 영상 인코딩 장치를 포함할 수 있다.Hereinafter, the video encoding device may include a video encoding device.

도 2를 참조하면, 인코딩 장치(10a)는 영상 분할부(image partitioner, 10a-10), 예측부(predictor, 10a-20), 레지듀얼 처리부(residual processor, 10a-30), 엔트로피 인코딩부(entropy encoder, 10a-40), 가산부(adder, 10a-50), 필터링부(filter, 10a-60) 및 메모리(memory, 10a-70)를 포함하여 구성될 수 있다. 예측부(10a-20)는 인터 예측부(10a-21) 및 인트라 예측부(10a-22)를 포함할 수 있다. 레지듀얼 처리부(10a-30)는 변환부(transformer, 10a-32), 양자화부(quantizer 10a-33), 역양자화부(dequantizer 10a-34), 역변환부(inverse transformer, 10a-35)를 포함할 수 있다. 레지듀얼 처리부(10a-30)는 감산부(subtractor, 10a-31)를 더 포함할 수 있다. 가산부(10a-50)는 복원부(reconstructor) 또는 복원 블록 생성부(reconstructed block generator)로 불릴 수 있다. 상술한 영상 분할부(10a-10), 예측부(10a-20), 레지듀얼 처리부(10a-30), 엔트로피 인코딩부(10a-40), 가산부(10a-50) 및 필터링부(10a-60)는 실시예에 따라 하나 이상의 하드웨어 컴포넌트(예를 들어 인코더 칩셋 또는 프로세서)에 의하여 구성될 수 있다. 또한 메모리(10a-70)는 DPB(decoded picture buffer)를 포함할 수 있고, 디지털 저장 매체에 의하여 구성될 수도 있다. 상기 하드웨어 컴포넌트는 메모리(10a-70)를 내/외부 컴포넌트로 더 포함할 수도 있다.Referring to FIG. 2, the encoding device 10a includes an image partitioner (10a-10), a predictor (10a-20), a residual processor (10a-30), and an entropy encoding unit ( It may be configured to include an entropy encoder (10a-40), an adder (10a-50), a filter (10a-60), and a memory (10a-70). The prediction unit 10a-20 may include an inter prediction unit 10a-21 and an intra prediction unit 10a-22. The residual processing unit 10a-30 includes a transformer 10a-32, a quantizer 10a-33, a dequantizer 10a-34, and an inverse transformer 10a-35. can do. The residual processing unit 10a-30 may further include a subtractor 10a-31. The adder 10a-50 may be called a reconstructor or a reconstructed block generator. The above-described image segmentation unit 10a-10, prediction unit 10a-20, residual processing unit 10a-30, entropy encoding unit 10a-40, addition unit 10a-50, and filtering unit 10a- 60) may be configured by one or more hardware components (eg, an encoder chipset or processor) depending on the embodiment. Additionally, the memory 10a-70 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include a memory 10a-70 as an internal/external component.

영상 분할부(10a-10)는 인코딩 장치(10a)에 입력된 입력 영상(또는, 픽처, 프레임)를 하나 이상의 처리 유닛(processing unit)으로 분할할 수 있다. 일 예로, 상기 처리 유닛은 코딩 유닛(coding unit, CU)이라고 불릴 수 있다. 이 경우 코딩 유닛은 코딩 트리 유닛(coding tree unit, CTU) 또는 최대 코딩 유닛(largest coding unit, LCU)으로부터 QTBTTT (Quad-tree binary-tree ternary-tree) 구조에 따라 재귀적으로(recursively) 분할될 수 있다. 예를 들어, 하나의 코딩 유닛은 쿼드 트리 구조, 바이너리 트리 구조, 및/또는 터너리 구조를 기반으로 하위(deeper) 뎁스의 복수의 코딩 유닛들로 분할될 수 있다. 이 경우 예를 들어 쿼드 트리 구조가 먼저 적용되고 바이너리 트리 구조 및/또는 터너리 구조가 나중에 적용될 수 있다. 또는 바이너리 트리 구조가 먼저 적용될 수도 있다. 더 이상 분할되지 않는 최종 코딩 유닛을 기반으로 본 문서에 따른 코딩 절차가 수행될 수 있다. 이 경우 영상 특성에 따른 코딩 효율 등을 기반으로, 최대 코딩 유닛이 바로 최종 코딩 유닛으로 사용될 수 있고, 또는 필요에 따라 코딩 유닛은 재귀적으로(recursively) 보다 하위 뎁스의 코딩 유닛들로 분할되어 최적의 사이즈의 코딩 유닛이 최종 코딩 유닛으로 사용될 수 있다. 여기서 코딩 절차라 함은 후술하는 예측, 변환, 및 복원 등의 절차를 포함할 수 있다. 다른 예로, 상기 처리 유닛은 예측 유닛(PU: Prediction Unit) 또는 변환 유닛(TU: Transform Unit)을 더 포함할 수 있다. 이 경우 상기 예측 유닛 및 상기 변환 유닛은 각각 상술한 최종 코딩 유닛으로부터 분할 또는 파티셔닝될 수 있다. 상기 예측 유닛은 샘플 예측의 단위일 수 있고, 상기 변환 유닛은 변환 계수를 유도하는 단위 및/또는 변환 계수로부터 레지듀얼 신호(residual signal)를 유도하는 단위일 수 있다.The image segmentation unit 10a-10 may divide an input image (or picture, frame) input to the encoding device 10a into one or more processing units. As an example, the processing unit may be called a coding unit (CU). In this case, the coding unit will be split recursively according to the QTBTTT (Quad-tree binary-tree ternary-tree) structure from the coding tree unit (CTU) or the largest coding unit (LCU). You can. For example, one coding unit may be divided into a plurality of coding units of deeper depth based on a quad tree structure, binary tree structure, and/or ternary structure. In this case, for example, the quad tree structure may be applied first and the binary tree structure and/or ternary structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding procedure according to this document can be performed based on the final coding unit that is no longer divided. In this case, based on coding efficiency according to video characteristics, the largest coding unit can be used directly as the final coding unit, or, if necessary, the coding unit is recursively divided into coding units of lower depth to determine the optimal coding unit. A coding unit of size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit described above. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving a transform coefficient and/or a unit for deriving a residual signal from the transform coefficient.

유닛은 경우에 따라서 블록(block) 또는 영역(area) 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들 또는 변환 계수(transform coefficient)들의 집합을 나타낼 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 휘도(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 채도(chroma) 성분의 픽셀/픽셀 값만을 나타낼 수도 있다. 샘플은 하나의 픽처(또는 영상)을 픽셀(pixel) 또는 펠(pel)에 대응하는 용어로서 사용될 수 있다.In some cases, unit may be used interchangeably with terms such as block or area. In a general case, an MxN block may represent a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally represent a pixel or a pixel value, and may represent only a pixel/pixel value of a luminance (luma) component, or only a pixel/pixel value of a chroma component. A sample may be used as a term that corresponds to a pixel or pel of one picture (or video).

감산부(10a-31)는 입력 영상 신호(원본 블록, 원본 샘플들 또는 원본 샘플 어레이)에서 예측부(10a-20)로부터 출력된 예측 신호(예측된 블록, 예측 샘플들 또는 예측 샘플 어레이)를 감산하여 레지듀얼 신호(레지듀얼 블록, 레지듀얼 샘플들 또는 레지듀얼 샘플 어레이)를 생성할 수 있고, 생성된 레지듀얼 신호는 변환부(10a-32)로 전송된다. 예측부(10a-20)는 처리 대상 블록(이하, 현재 블록이라 함)에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부(10a-20)는 현재 블록 또는 CU 단위로 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있다. 예측부는 각 예측모드에 대한 설명에서 후술하는 바와 같이 예측 모드 정보 등 예측에 관한 다양한 정보를 생성하여 엔트로피 인코딩부(10a-40)로 전달할 수 있다. 예측에 관한 정보는 엔트로피 인코딩부(10a-40)에서 인코딩되어 비트스트림 형태로 출력될 수 있다.The subtractor 10a-31 subtracts the prediction signal (predicted block, prediction samples, or prediction sample array) output from the prediction unit 10a-20 from the input image signal (original block, original samples, or original sample array). A residual signal (residual block, residual samples, or residual sample array) can be generated by subtraction, and the generated residual signal is transmitted to the conversion unit 10a-32. The prediction unit 10a-20 may perform prediction on a block to be processed (hereinafter referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit 10a-20 may determine whether intra prediction or inter prediction is applied on a current block or CU basis. As will be described later in the description of each prediction mode, the prediction unit may generate various information related to prediction, such as prediction mode information, and transmit it to the entropy encoding unit 10a-40. Information about prediction may be encoded in the entropy encoding unit 10a-40 and output in the form of a bitstream.

인트라 예측부(10a-22)는 현재 픽처 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 상기 참조되는 샘플들은 예측 모드에 따라 상기 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 떨어져서 위치할 수도 있다. 인트라 예측에서 예측 모드들은 복수의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 비방향성 모드는 예를 들어 DC 모드 및 플래너 모드(Planar 모드)를 포함할 수 있다. 방향성 모드는 예측 방향의 세밀한 정도에 따라 예를 들어 33개의 방향성 예측 모드 또는 65개의 방향성 예측 모드를 포함할 수 있다. 다만, 이는 예시로서 설정에 따라 그 이상 또는 그 이하의 개수의 방향성 예측 모드들이 사용될 수 있다. 인트라 예측부(10a-22)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.The intra prediction unit 10a-22 may predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. Non-directional modes may include, for example, DC mode and planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the level of detail of the prediction direction. However, this is an example and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 10a-22 may determine the prediction mode applied to the current block using the prediction mode applied to the neighboring block.

인터 예측부(10a-21)는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측된 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기초하여 움직임 정보를 블록, 서브블록 또는 샘플 단위로 예측할 수 있다. 상기 움직임 정보는 움직임 벡터 및 참조 픽처 인덱스를 포함할 수 있다. 상기 움직임 정보는 인터 예측 방향(L0 예측, L1 예측, Bi 예측 등) 정보를 더 포함할 수 있다. 인터 예측의 경우에, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 상기 참조 블록을 포함하는 참조 픽처와 상기 시간적 주변 블록을 포함하는 참조 픽처는 동일할 수도 있고, 다를 수도 있다. 상기 시간적 주변 블록은 동일 위치 참조 블록(collocated reference block), 동일 위치 CU(colCU) 등의 이름으로 불릴 수 있으며, 상기 시간적 주변 블록을 포함하는 참조 픽처는 동일 위치 픽처(collocated picture, colPic)라고 불릴 수도 있다. 예를 들어, 인터 예측부(10a-21)는 주변 블록들을 기반으로 움직임 정보 후보 리스트를 구성하고, 상기 현재 블록의 움직임 벡터 및/또는 참조 픽처 인덱스를 도출하기 위하여 어떤 후보가 사용되는지를 지시하는 정보를 생성할 수 있다. 다양한 예측 모드를 기반으로 인터 예측이 수행될 수 있으며, 예를 들어 스킵 모드와 머지 모드의 경우에, 인터 예측부(10a-21)는 주변 블록의 움직임 정보를 현재 블록의 움직임 정보로 이용할 수 있다. 스킵 모드의 경우, 머지 모드와 달리 레지듀얼 신호가 전송되지 않을 수 있다. 움직임 정보 예측(motion vector prediction, MVP) 모드의 경우, 주변 블록의 움직임 벡터를 움직임 벡터 예측자(motion vector predictor)로 이용하고, 움직임 벡터 차분(motion vector difference)을 시그널링함으로써 현재 블록의 움직임 벡터를 지시할 수 있다.The inter prediction unit 10a-21 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector in the reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information can be predicted on a block, subblock, or sample basis based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, neighboring blocks may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture. A reference picture including the reference block and a reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated reference block, a collocated CU (colCU), etc., and a reference picture including the temporal neighboring block may be called a collocated picture (colPic). It may be possible. For example, the inter prediction unit 10a-21 constructs a motion information candidate list based on neighboring blocks and indicates which candidate is used to derive the motion vector and/or reference picture index of the current block. Information can be generated. Inter prediction may be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter prediction unit 10a-21 may use motion information of neighboring blocks as motion information of the current block. . In the case of skip mode, unlike merge mode, residual signals may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the surrounding block is used as a motion vector predictor, and the motion vector of the current block is predicted by signaling the motion vector difference. You can instruct.

예측부(10a-20)는 후술하는 다양한 예측 방법을 기반으로 예측 신호를 생성할 수 있다. 예를 들어, 예측부는 하나의 블록에 대한 예측을 위하여 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐 아니라, 인트라 예측과 인터 예측을 동시에 적용할 수 있다. 이는 combined inter and intra prediction (CIIP)라고 불릴 수 있다. 또한, 예측부는 블록에 대한 예측을 위하여 인트라 블록 카피(intra block copy, IBC)를 수행할 수도 있다. 상기 인트라 블록 카피는 예를 들어 SCC(screen content coding) 등과 같이 게임 등의 컨텐츠 영상/동영상 코딩을 위하여 사용될 수 있다. IBC는 기본적으로 현재 픽처 내에서 예측을 수행하나 현재 픽처 내에서 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 문서에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다.The prediction unit 10a-20 may generate a prediction signal based on various prediction methods described later. For example, the prediction unit can not only apply intra prediction or inter prediction for prediction of one block, but also can apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). Additionally, the prediction unit may perform intra block copy (IBC) to predict a block. The intra block copy can be used, for example, for video/video coding of content such as games, such as SCC (screen content coding). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can use at least one of the inter prediction techniques described in this document.

인터 예측부(10a-21) 및/또는 인트라 예측부(10a-22)를 통해 생성된 예측 신호는 복원 신호를 생성하기 위해 이용되거나 레지듀얼 신호를 생성하기 위해 이용될 수 있다. 변환부(10a-32)는 레지듀얼 신호에 변환 기법을 적용하여 변환 계수들(transform coefficients)를 생성할 수 있다. 예를 들어, 변환 기법은 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), GBT(Graph-Based Transform), 또는 CNT(Conditionally Non-linear Transform) 등을 포함할 수 있다. 여기서, GBT는 픽셀 간의 관계 정보를 그래프로 표현한다고 할 때 이 그래프로부터 얻어진 변환을 의미한다. CNT는 이전에 복원된 모든 픽셀(all previously reconstructed pixel)를 이용하여 예측 신호를 생성하고 그에 기초하여 획득되는 변환을 의미한다. 또한, 변환 과정은 정사각형의 동일한 크기를 갖는 픽셀 블록에 적용될 수도 있고, 정사각형이 아닌 가변 크기의 블록에도 적용될 수 있다.The prediction signal generated through the inter prediction unit 10a-21 and/or the intra prediction unit 10a-22 may be used to generate a restored signal or a residual signal. The transform unit 10a-32 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transformation technique may include Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), Graph-Based Transform (GBT), or Conditionally Non-linear Transform (CNT). Here, GBT refers to the transformation obtained from this graph when the relationship information between pixels is expressed as a graph. CNT refers to the transformation obtained by generating a prediction signal using all previously reconstructed pixels and obtaining it based on it. Additionally, the conversion process may be applied to square pixel blocks of the same size, or to non-square blocks of variable size.

양자화부(10a-33)는 변환 계수들을 양자화하여 엔트로피 인코딩부(10a-40)로 전송되고, 엔트로피 인코딩부(10a-40)는 양자화된 신호(양자화된 변환 계수들에 관한 정보)를 인코딩하여 비트스트림으로 출력할 수 있다. 상기 양자화된 변환 계수들에 관한 정보는 레지듀얼 정보라고 불릴 수 있다. 양자화부(10a-33)는 계수 스캔 순서(scan order)를 기반으로 블록 형태의 양자화된 변환 계수들을 1차원 벡터 형태로 재정렬할 수 있고, 상기 1차원 벡터 형태의 양자화된 변환 계수들을 기반으로 상기 양자화된 변환 계수들에 관한 정보를 생성할 수도 있다. 엔트로피 인코딩부(10a-40)는 예를 들어 지수 골롬(exponential Golomb), CAVLC(context-adaptive variable length coding), CABAC(context-adaptive binary arithmetic coding) 등과 같은 다양한 인코딩 방법을 수행할 수 있다. The quantization unit 10a-33 quantizes the transform coefficients and transmits them to the entropy encoding unit 10a-40, and the entropy encoding unit 10a-40 encodes the quantized signal (information about the quantized transform coefficients) It can be output as a bitstream. Information about the quantized transform coefficients may be called residual information. The quantization unit 10a-33 may rearrange the quantized transform coefficients in block form into a one-dimensional vector form based on the coefficient scan order, and based on the quantized transform coefficients in the one-dimensional vector form, the Information about quantized transform coefficients may also be generated. The entropy encoding unit 10a-40 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC).

엔트로피 인코딩부(10a-40)는 양자화된 변환 계수들 외 비디오/이미지 복원에 필요한 정보들(예컨대 신택스 요소들(syntax elements)의 값 등)을 함께 또는 별도로 인코딩할 수도 있다. 인코딩된 정보(ex. 인코딩된 비디오/영상 정보)는 비트스트림 형태로 NAL(network abstraction layer) 유닛 단위로 전송 또는 저장될 수 있다. 상기 비디오/영상 정보는 어댑테이션 파라미터 세트(APS), 픽처 파라미터 세트(PPS), 시퀀스 파라미터 세트(SPS) 또는 비디오 파라미터 세트(VPS) 등 다양한 파라미터 세트에 관한 정보를 더 포함할 수 있다. 또한 상기 비디오/영상 정보는 일반 제한 정보(general constraint information)을 더 포함할 수 있다. 본 문서에서 후술되는 시그널링/전송되는 정보 및/또는 신택스 요소들은 상술한 인코딩 절차를 통하여 인코딩되어 상기 비트스트림에 포함될 수 있다. 상기 비트스트림은 네트워크를 통하여 전송될 수 있고, 또는 디지털 저장매체에 저장될 수 있다. 여기서 네트워크는 방송망 및/또는 통신망 등을 포함할 수 있고, 디지털 저장매체는 USB, SD, CD, DVD, 블루레이, HDD, SSD 등 다양한 저장매체를 포함할 수 있다. 엔트로피 인코딩부(10a-40)로부터 출력된 신호는 전송하는 전송부(미도시) 및/또는 저장하는 저장부(미도시)가 인코딩 장치(10a)의 내/외부 엘리먼트로서 구성될 수 있고, 또는 전송부는 엔트로피 인코딩부(10a-40)에 포함될 수도 있다.The entropy encoding unit 10a-40 may encode information necessary for video/image restoration (e.g., values of syntax elements, etc.) in addition to the quantized transformation coefficients together or separately. Encoded information (ex. encoded video/picture information) may be transmitted or stored in bitstream form in units of NAL (network abstraction layer) units. The video/image information may further include information about various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Additionally, the video/image information may further include general constraint information. Signaling/transmission information and/or syntax elements described later in this document may be encoded through the above-described encoding procedure and included in the bitstream. The bitstream can be transmitted over a network or stored in a digital storage medium. Here, the network may include a broadcasting network and/or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. The signal output from the entropy encoding unit 10a-40 may be configured as an internal/external element of the encoding device 10a through a transmission unit (not shown) to transmit and/or a storage unit (not shown) to store it, or The transmission unit may be included in the entropy encoding unit 10a-40.

양자화부(10a-33)로부터 출력된 양자화된 변환 계수들은 예측 신호를 생성하기 위해 이용될 수 있다. 예를 들어, 양자화된 변환 계수들에 역양자화부(10a-34) 및 역변환부(10a-35)를 통해 역양자화 및 역변환을 적용함으로써 레지듀얼 신호(레지듀얼 블록 or 레지듀얼 샘플들)를 복원할 수 있다. 가산부(10a-50)는 복원된 레지듀얼 신호를 예측부(10a-20)로부터 출력된 예측 신호에 더함으로써 복원(reconstructed) 신호(복원 픽처, 복원 블록, 복원 샘플들 또는 복원 샘플 어레이)가 생성될 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다. 생성된 복원 신호는 현재 픽처 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 다음 픽처의 인터 예측을 위하여 사용될 수도 있다.The quantized transform coefficients output from the quantization unit 10a-33 can be used to generate a prediction signal. For example, the residual signal (residual block or residual samples) is restored by applying inverse quantization and inverse transformation to the quantized transformation coefficients through the inverse quantization unit 10a-34 and the inverse transformation unit 10a-35. can do. The adder 10a-50 adds the reconstructed residual signal to the prediction signal output from the prediction unit 10a-20, thereby creating a reconstructed signal (reconstructed picture, restored block, restored samples, or restored sample array). can be created. If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as a restoration block. The generated reconstructed signal can be used for intra prediction of the next processing target block in the current picture, and can also be used for inter prediction of the next picture after filtering, as will be described later.

한편 픽처 인코딩 및/또는 복원 과정에서 LMCS (luma mapping with chroma scaling)가 적용될 수도 있다.Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and/or restoration process.

필터링부(10a-60)는 복원 신호에 필터링을 적용하여 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어 필터링부(10a-60)는 복원 픽처에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽처를 생성할 수 있고, 상기 수정된 복원 픽처를 메모리(10a-70), 구체적으로 메모리(10a-70)의 DPB에 저장할 수 있다. 상기 다양한 필터링 방법은 예를 들어, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset, SAO), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter) 등을 포함할 수 있다. 필터링부(10a-60)는 각 필터링 방법에 대한 설명에서 후술하는 바와 같이 필터링에 관한 다양한 정보를 생성하여 엔트로피 인코딩부(10a-90)로 전달할 수 있다. 필터링 관한 정보는 엔트로피 인코딩부(10a-90)에서 인코딩되어 비트스트림 형태로 출력될 수 있다.The filtering unit 10a-60 may improve subjective/objective image quality by applying filtering to the restored signal. For example, the filtering unit 10a-60 may generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 10a-70, specifically the memory ( It can be stored in the DPB of 10a-70). The various filtering methods may include, for example, deblocking filtering, sample adaptive offset (SAO), adaptive loop filter, bilateral filter, etc. The filtering unit 10a-60 may generate various information about filtering and transmit it to the entropy encoding unit 10a-90, as will be described later in the description of each filtering method. Information about filtering may be encoded in the entropy encoding unit 10a-90 and output in the form of a bitstream.

메모리(10a-70)에 전송된 수정된 복원 픽처는 인터 예측부(10a-80)에서 참조 픽처로 사용될 수 있다. 인코딩 장치는 이를 통하여 인터 예측이 적용되는 경우, 인코딩 장치(10a)와 디코딩 장치에서의 예측 미스매치를 피할 수 있고, 부호화 효율도 향상시킬 수 있다.The modified reconstructed picture transmitted to the memory 10a-70 may be used as a reference picture in the inter prediction unit 10a-80. Through this, the encoding device can avoid prediction mismatch in the encoding device 10a and the decoding device when inter prediction is applied, and can also improve encoding efficiency.

메모리(10a-70)의 DPB는 수정된 복원 픽처를 인터 예측부(10a-21)에서의 참조 픽처로 사용하기 위해 저장할 수 있다. 메모리(10a-70)는 현재 픽처 내 움직임 정보가 도출된(또는 인코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽처 내 블록들의 움직임 정보를 저장할 수 있다. 상기 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부(10a-21)에 전달할 수 있다. 메모리(10a-70)는 현재 픽처 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부(10a-22)에 전달할 수 있다.The DPB of the memory 10a-70 can store the modified reconstructed picture for use as a reference picture in the inter prediction unit 10a-21. The memory 10a-70 may store motion information of a block from which motion information in the current picture is derived (or encoded) and/or motion information of blocks in an already reconstructed picture. The stored motion information can be transmitted to the inter prediction unit 10a-21 to be used as motion information of spatial neighboring blocks or motion information of temporal neighboring blocks. The memory 10a-70 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 10a-22.

도 3은 비디오/영상 디코딩 장치의 구성을 개략적으로 설명하는 도면이다.Figure 3 is a diagram schematically explaining the configuration of a video/image decoding device.

도 3을 참조하면, 디코딩 장치(10b)는 엔트로피 디코딩부(entropy decoder, 10b-10), 레지듀얼 처리부(residual processor, 10b-20), 예측부(predictor, 10b-30), 가산부(adder, 10b-40), 필터링부(filter, 10b-50) 및 메모리(memory, 10b-60)를 포함하여 구성될 수 있다. 예측부(10b-30)는 인터 예측부(10b-31) 및 인트라 예측부(10b-32)를 포함할 수 있다. 레지듀얼 처리부(10b-20)는 역양자화부(dequantizer, 10b-21) 및 역변환부(inverse transformer, 10b-21)를 포함할 수 있다. 상술한 엔트로피 디코딩부(10b-10), 레지듀얼 처리부(10b-20), 예측부(10b-30), 가산부(10b-40) 및 필터링부(10b-50)는 실시예에 따라 하나의 하드웨어 컴포넌트(예를 들어 디코더 칩셋 또는 프로세서)에 의하여 구성될 수 있다. 또한 메모리(10b-60)는 DPB(decoded picture buffer)를 포함할 수 있고, 디지털 저장 매체에 의하여 구성될 수도 있다. 상기 하드웨어 컴포넌트는 메모리(10b-60)을 내/외부 컴포넌트로 더 포함할 수도 있다.Referring to FIG. 3, the decoding device 10b includes an entropy decoder (10b-10), a residual processor (10b-20), a predictor (10b-30), and an adder (adder). , 10b-40), a filter (10b-50), and a memory (10b-60). The prediction unit 10b-30 may include an inter prediction unit 10b-31 and an intra prediction unit 10b-32. The residual processing unit 10b-20 may include a dequantizer 10b-21 and an inverse transformer 10b-21. The above-described entropy decoding unit 10b-10, residual processing unit 10b-20, prediction unit 10b-30, addition unit 10b-40, and filtering unit 10b-50 are one unit depending on the embodiment. It may be configured by hardware components (for example, a decoder chipset or processor). Additionally, the memory 10b-60 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include a memory 10b-60 as an internal/external component.

비디오/영상 정보를 포함하는 비트스트림이 입력되면, 디코딩 장치(10b)는 도 2의 인코딩 장치에서 비디오/영상 정보가 처리된 프로세스에 대응하여 영상을 복원할 수 있다. 예를 들어, 디코딩 장치(10b)는 상기 비트스트림으로부터 획득한 블록 분할 관련 정보를 기반으로 유닛들/블록들을 도출할 수 있다. 디코딩 장치(10b)는 인코딩 장치에서 적용된 처리 유닛을 이용하여 디코딩을 수행할 수 있다. 따라서 디코딩의 처리 유닛은 예를 들어 코딩 유닛일 수 있고, 코딩 유닛은 코딩 트리 유닛 또는 최대 코딩 유닛으로부터 쿼드 트리 구조, 바이너리 트리 구조 및/또는 터너리 트리 구조를 따라서 분할될 수 있다. 코딩 유닛으로부터 하나 이상의 변환 유닛이 도출될 수 있다. 그리고, 디코딩 장치(10b)를 통해 디코딩 및 출력된 복원 영상 신호는 재생 장치를 통해 재생될 수 있다.When a bitstream including video/image information is input, the decoding device 10b can restore the image in response to the process in which the video/image information is processed in the encoding device of FIG. 2. For example, the decoding device 10b may derive units/blocks based on block division-related information obtained from the bitstream. The decoding device 10b may perform decoding using a processing unit applied in the encoding device. Accordingly, the processing unit of decoding may for example be a coding unit, and the coding unit may be split along a quad tree structure, a binary tree structure and/or a ternary tree structure from a coding tree unit or a maximum coding unit. One or more transformation units can be derived from a coding unit. And, the restored video signal decoded and output through the decoding device 10b can be played through a playback device.

디코딩 장치(10b)는 도 2의 인코딩 장치로부터 출력된 신호를 비트스트림 형태로 수신할 수 있고, 수신된 신호는 엔트로피 디코딩부(10b-10)를 통해 디코딩될 수 있다. 예를 들어, 엔트로피 디코딩부(10b-10)는 상기 비트스트림을 파싱하여 영상 복원(또는 픽처 복원)에 필요한 정보(ex. 비디오/영상 정보)를 도출할 수 있다. 상기 비디오/영상 정보는 어댑테이션 파라미터 세트(APS), 픽처 파라미터 세트(PPS), 시퀀스 파라미터 세트(SPS) 또는 비디오 파라미터 세트(VPS) 등 다양한 파라미터 세트에 관한 정보를 더 포함할 수 있다. 또한 상기 비디오/영상 정보는 일반 제한 정보(general constraint information)을 더 포함할 수 있다. The decoding device 10b may receive the signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal may be decoded through the entropy decoding unit 10b-10. For example, the entropy decoder 10b-10 may parse the bitstream to derive information (e.g. video/picture information) necessary for image restoration (or picture restoration). The video/image information may further include information about various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Additionally, the video/image information may further include general constraint information.

디코딩 장치는 상기 파라미터 세트에 관한 정보 및/또는 상기 일반 제한 정보를 더 기반으로 픽처를 디코딩할 수 있다. 본 문서에서 후술되는 시그널링/수신되는 정보 및/또는 신택스 요소들은 상기 디코딩 절차를 통하여 디코딩되어 상기 비트스트림으로부터 획득될 수 있다. 예컨대, 엔트로피 디코딩부(10b-10)는 지수 골롬 부호화, CAVLC 또는 CABAC 등의 코딩 방법을 기초로 비트스트림 내 정보를 디코딩하고, 영상 복원에 필요한 신택스 엘리먼트의 값, 레지듀얼에 관한 변환 계수의 양자화된 값 들을 출력할 수 있다. 보다 상세하게, CABAC 엔트로피 디코딩 방법은, 비트스트림에서 각 구문 요소에 해당하는 빈을 수신하고, 디코딩 대상 구문 요소 정보와 주변 및 디코딩 대상 블록의 디코딩 정보 혹은 이전 단계에서 디코딩된 심볼/빈의 정보를 이용하여 문맥(context) 모델을 결정하고, 결정된 문맥 모델에 따라 빈(bin)의 발생 확률을 예측하여 빈의 산술 디코딩(arithmetic decoding)를 수행하여 각 구문 요소의 값에 해당하는 심볼을 생성할 수 있다. 이때, CABAC 엔트로피 디코딩 방법은 문맥 모델 결정 후 다음 심볼/빈의 문맥 모델을 위해 디코딩된 심볼/빈의 정보를 이용하여 문맥 모델을 업데이트할 수 있다. 엔트로피 디코딩부(10b-10)에서 디코딩된 정보 중 예측에 관한 정보는 예측부(10b-30)로 제공되고, 엔트로피 디코딩부(10b-10)에서 엔트로피 디코딩이 수행된 레지듀얼에 대한 정보, 즉 양자화된 변환 계수들 및 관련 파라미터 정보는 역양자화부(10b-21)로 입력될 수 있다. The decoding device may decode a picture further based on information about the parameter set and/or the general restriction information. Signaled/received information and/or syntax elements described later in this document may be decoded through the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 10b-10 decodes information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and quantizes the values of syntax elements necessary for image restoration and transform coefficients related to residuals. The values can be output. In more detail, the CABAC entropy decoding method receives bins corresponding to each syntax element from the bitstream, and provides syntax element information to be decoded, decoding information of surrounding and target blocks to be decoded, or information of symbols/bins decoded in the previous step. You can use this to determine a context model, predict the probability of occurrence of a bin according to the determined context model, perform arithmetic decoding of the bin, and generate symbols corresponding to the value of each syntax element. there is. At this time, the CABAC entropy decoding method can update the context model using information on the decoded symbol/bin for the context model of the next symbol/bin after determining the context model. Information about prediction among the information decoded in the entropy decoding unit 10b-10 is provided to the prediction unit 10b-30, and information about the residual for which entropy decoding was performed in the entropy decoding unit 10b-10, that is, Quantized transform coefficients and related parameter information may be input to the inverse quantization unit 10b-21.

또한, 엔트로피 디코딩부(10b-10)에서 디코딩된 정보 중 필터링에 관한 정보는 필터링부(10b-50)으로 제공될 수 있다. 한편, 인코딩 장치로부터 출력된 신호를 수신하는 수신부(미도시)가 디코딩 장치(10b)의 내/외부 엘리먼트로서 더 구성될 수 있고, 또는 수신부는 엔트로피 디코딩부(10b-10)의 구성요소일 수도 있다. 한편, 본 문서에 따른 디코딩 장치는 비디오/영상/픽처 디코딩 장치라고 불릴 수 있고, 상기 디코딩 장치는 정보 디코더(비디오/영상/픽처 정보 디코더) 및 샘플 디코더(비디오/영상/픽처 샘플 디코더)로 구분할 수도 있다. 상기 정보 디코더는 상기 엔트로피 디코딩부(10b-10)를 포함할 수 있고, 상기 샘플 디코더는 상기 역양자화부(10b-21), 역변환부(10b-22), 예측부(10b-30), 가산부(10b-40), 필터링부(10b-50) 및 메모리(10b-60) 중 적어도 하나를 포함할 수 있다.Additionally, information about filtering among the information decoded by the entropy decoding unit 10b-10 may be provided to the filtering unit 10b-50. Meanwhile, a receiving unit (not shown) that receives the signal output from the encoding device may be further configured as an internal/external element of the decoding device 10b, or the receiving unit may be a component of the entropy decoding unit 10b-10. there is. Meanwhile, the decoding device according to this document may be called a video/image/picture decoding device, and the decoding device can be divided into an information decoder (video/image/picture information decoder) and a sample decoder (video/image/picture sample decoder). It may be possible. The information decoder may include the entropy decoding unit 10b-10, and the sample decoder may include the inverse quantization unit 10b-21, the inverse transform unit 10b-22, the prediction unit 10b-30, and the addition unit. It may include at least one of a unit 10b-40, a filtering unit 10b-50, and a memory 10b-60.

역양자화부(10b-21)에서는 양자화된 변환 계수들을 역양자화하여 변환 계수들을 출력할 수 있다. 역양자화부(10b-21)는 양자화된 변환 계수들을 2차원의 블록 형태로 재정렬할 수 있다. 이 경우 상기 재정렬은 인코딩 장치에서 수행된 계수 스캔 순서를 기반하여 재정렬을 수행할 수 있다. 역양자화부(10b-21)는 양자화 파라미터(예를 들어 양자화 스텝 사이즈 정보)를 이용하여 양자화된 변환 계수들에 대한 역양자화를 수행하고, 변환 계수들(transform coefficient)를 획득할 수 있다.The inverse quantization unit 10b-21 may inversely quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 10b-21 may rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the reordering may be performed based on the coefficient scan order performed in the encoding device. The inverse quantization unit 10b-21 may perform inverse quantization on quantized transform coefficients using quantization parameters (eg, quantization step size information) and obtain transform coefficients.

역변환부(10b-22)에서는 변환 계수들를 역변환하여 레지듀얼 신호(레지듀얼 블록, 레지듀얼 샘플 어레이)를 획득하게 된다.The inverse transform unit 10b-22 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).

예측부는 현재 블록에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부는 엔트로피 디코딩부(10b-10)로부터 출력된 상기 예측에 관한 정보를 기반으로 상기 현재 블록에 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있고, 구체적인 인트라/인터 예측 모드를 결정할 수 있다.The prediction unit may perform prediction on the current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the information about the prediction output from the entropy decoding unit 10b-10, and may determine a specific intra/inter prediction mode. .

예측부는 후술하는 다양한 예측 방법을 기반으로 예측 신호를 생성할 수 있다. 예를 들어, 예측부는 하나의 블록에 대한 예측을 위하여 인트라 예측 또는 인터 예측을 적용할 수 있을 뿐 아니라, 인트라 예측과 인터 예측을 동시에 적용할 수 있다. 이는 combined inter and intra prediction (CIIP)라고 불릴 수 있다. 또한, 예측부는 블록에 대한 예측을 위하여 인트라 블록 카피(intra block copy, IBC)를 수행할 수도 있다. 상기 인트라 블록 카피는 예를 들어 SCC(screen content coding) 등과 같이 게임 등의 컨텐츠 영상/동영상 코딩을 위하여 사용될 수 있다. IBC는 기본적으로 현재 픽처 내에서 예측을 수행하나 현재 픽처 내에서 참조 블록을 도출하는 점에서 인터 예측과 유사하게 수행될 수 있다. 즉, IBC는 본 문서에서 설명되는 인터 예측 기법들 중 적어도 하나를 이용할 수 있다.The prediction unit may generate a prediction signal based on various prediction methods described later. For example, the prediction unit can not only apply intra prediction or inter prediction for prediction of one block, but also can apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). Additionally, the prediction unit may perform intra block copy (IBC) to predict a block. The intra block copy can be used, for example, for video/video coding of content such as games, such as SCC (screen content coding). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can use at least one of the inter prediction techniques described in this document.

인트라 예측부(10b-32)는 현재 픽처 내의 샘플들을 참조하여 현재 블록을 예측할 수 있다. 상기 참조되는 샘플들은 예측 모드에 따라 상기 현재 블록의 주변(neighbor)에 위치할 수 있고, 또는 떨어져서 위치할 수도 있다. 인트라 예측에서 예측 모드들은 복수의 비방향성 모드와 복수의 방향성 모드를 포함할 수 있다. 인트라 예측부(10b-32)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.The intra prediction unit 10b-32 may predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 10b-32 may determine the prediction mode applied to the current block using the prediction mode applied to the neighboring block.

인터 예측부(10b-31)는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 참조 블록(참조 샘플 어레이)을 기반으로, 현재 블록에 대한 예측된 블록을 유도할 수 있다. 이때, 인터 예측 모드에서 전송되는 움직임 정보의 양을 줄이기 위해 주변 블록과 현재 블록 간의 움직임 정보의 상관성에 기초하여 움직임 정보를 블록, 서브블록 또는 샘플 단위로 예측할 수 있다. 상기 움직임 정보는 움직임 벡터 및 참조 픽처 인덱스를 포함할 수 있다. 상기 움직임 정보는 인터 예측 방향(L0 예측, L1 예측, Bi 예측 등) 정보를 더 포함할 수 있다. The inter prediction unit 10b-31 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector in the reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information can be predicted on a block, subblock, or sample basis based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information.

인터 예측의 경우에, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 예를 들어, 인터 예측부(10b-31)는 주변 블록들을 기반으로 움직임 정보 후보 리스트를 구성하고, 수신한 후보 선택 정보를 기반으로 상기 현재 블록의 움직임 벡터 및/또는 참조 픽처 인덱스를 도출할 수 있다. 다양한 예측 모드를 기반으로 인터 예측이 수행될 수 있으며, 상기 예측에 관한 정보는 상기 현재 블록에 대한 인터 예측의 모드를 지시하는 정보를 포함할 수 있다.In the case of inter prediction, neighboring blocks may include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture. For example, the inter prediction unit 10b-31 may construct a motion information candidate list based on neighboring blocks and derive a motion vector and/or reference picture index of the current block based on the received candidate selection information. there is. Inter prediction may be performed based on various prediction modes, and the information about the prediction may include information indicating the mode of inter prediction for the current block.

가산부(10b-40)는 획득된 레지듀얼 신호를 예측부(10b-30)로부터 출력된 예측 신호(예측된 블록, 예측 샘플 어레이)에 더함으로써 복원 신호(복원 픽처, 복원 블록, 복원 샘플 어레이)를 생성할 수 있다. 스킵 모드가 적용된 경우와 같이 처리 대상 블록에 대한 레지듀얼이 없는 경우, 예측된 블록이 복원 블록으로 사용될 수 있다.The adder 10b-40 adds the obtained residual signal to the prediction signal (predicted block, predicted sample array) output from the prediction unit 10b-30 to generate a restored signal (restored picture, restored block, restored sample array). ) can be created. If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as a restoration block.

가산부(10b-40)는 복원부 또는 복원 블록 생성부라고 불릴 수 있다. 생성된 복원 신호는 현재 픽처 내 다음 처리 대상 블록의 인트라 예측을 위하여 사용될 수 있고, 후술하는 바와 같이 필터링을 거쳐서 출력될 수도 있고 또는 다음 픽처의 인터 예측을 위하여 사용될 수도 있다.The addition unit 10b-40 may be called a restoration unit or a restoration block generation unit. The generated reconstructed signal may be used for intra prediction of the next processing target block in the current picture, may be output after filtering as described later, or may be used for inter prediction of the next picture.

한편, 픽처 디코딩 과정에서 LMCS (luma mapping with chroma scaling)가 적용될 수도 있다.Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process.

필터링부(10b-50)는 복원 신호에 필터링을 적용하여 주관적/객관적 화질을 향상시킬 수 있다. 예를 들어 필터링부(10b-50)는 복원 픽처에 다양한 필터링 방법을 적용하여 수정된(modified) 복원 픽처를 생성할 수 있고, 상기 수정된 복원 픽처를 메모리(60), 구체적으로 메모리(10b-60)의 DPB에 전송할 수 있다. 상기 다양한 필터링 방법은 예를 들어, 디블록킹 필터링, 샘플 적응적 오프셋(sample adaptive offset), 적응적 루프 필터(adaptive loop filter), 양방향 필터(bilateral filter) 등을 포함할 수 있다.The filtering unit 10b-50 may improve subjective/objective image quality by applying filtering to the restored signal. For example, the filtering unit 10b-50 may generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 60, specifically the memory 10b- 60) can be transmitted to the DPB. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

메모리(10b-60)의 DPB에 저장된 (수정된) 복원 픽처는 인터 예측부(10b-31)에서 참조 픽쳐로 사용될 수 있다. 메모리(10b-60)는 현재 픽처 내 움직임 정보가 도출된(또는 디코딩된) 블록의 움직임 정보 및/또는 이미 복원된 픽처 내 블록들의 움직임 정보를 저장할 수 있다. 상기 저장된 움직임 정보는 공간적 주변 블록의 움직임 정보 또는 시간적 주변 블록의 움직임 정보로 활용하기 위하여 인터 예측부(10b-31)에 전달할 수 있다. 메모리(10b-60)는 현재 픽처 내 복원된 블록들의 복원 샘플들을 저장할 수 있고, 인트라 예측부(10b-32)에 전달할 수 있다.The (corrected) reconstructed picture stored in the DPB of the memory 10b-60 can be used as a reference picture in the inter prediction unit 10b-31. The memory 10b-60 may store motion information of a block from which motion information in the current picture is derived (or decoded) and/or motion information of blocks in an already reconstructed picture. The stored motion information can be transmitted to the inter prediction unit 10b-31 to be used as motion information of spatial neighboring blocks or motion information of temporal neighboring blocks. The memory 10b-60 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 10b-32.

본 명세서에서, 디코딩 장치(10b)의 예측부(10b-30), 역양자화부(10b-21), 역변환부(10b-22) 및 필터링부(10b-50) 등에서 설명된 실시예들은 각각 인코딩 장치(10a)의 예측부(10a-20), 역양자화부(10a-34), 역변환부(10a-35) 및 필터링부(10a-60) 등에도 동일 또는 대응되도록 적용될 수 있다.In this specification, the embodiments described in the prediction unit 10b-30, the inverse quantization unit 10b-21, the inverse transform unit 10b-22, and the filtering unit 10b-50 of the decoding device 10b are encoded, respectively. The same or corresponding application may be applied to the prediction unit 10a-20, the inverse quantization unit 10a-34, the inverse transform unit 10a-35, and the filtering unit 10a-60 of the device 10a.

상술한 바와 같이 비디오 코딩을 수행함에 있어 압축 효율을 높이기 위하여 예측을 수행한다. 이를 통하여 코딩 대상 블록인 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록을 생성할 수 있다. 여기서 상기 예측된 블록은 공간 도메인(또는 픽셀 도메인)에서의 예측 샘플들을 포함한다. 상기 예측된 블록은 인코딩 장치 및 디코딩 장치에서 동일하게 도출되며, 상기 인코딩 장치는 원본 블록의 원본 샘플 값 자체가 아닌 상기 원본 블록과 상기 예측된 블록 간의 레지듀얼에 대한 정보(레지듀얼 정보)를 디코딩 장치로 시그널링함으로써 영상 코딩 효율을 높일 수 있다. 디코딩 장치는 상기 레지듀얼 정보를 기반으로 레지듀얼 샘플들을 포함하는 레지듀얼 블록을 도출하고, 상기 레지듀얼 블록과 상기 예측된 블록을 합하여 복원 샘플들을 포함하는 복원 블록을 생성할 수 있고, 복원 블록들을 포함하는 복원 픽처를 생성할 수 있다.As described above, when performing video coding, prediction is performed to increase compression efficiency. Through this, a predicted block containing prediction samples for the current block, which is the coding target block, can be generated. Here, the predicted block includes prediction samples in the spatial domain (or pixel domain). The predicted block is derived equally from the encoding device and the decoding device, and the encoding device decodes information about the residual between the original block and the predicted block (residual information) rather than the original sample value of the original block itself. Video coding efficiency can be increased by signaling to the device. The decoding device may derive a residual block including residual samples based on the residual information, generate a restored block including restored samples by combining the residual block and the predicted block, and generate the restored blocks. A restored picture containing the image can be generated.

상기 레지듀얼 정보는 변환 및 양자화 절차를 통하여 생성될 수 있다. 예를 들어, 인코딩 장치는 상기 원본 블록과 상기 예측된 블록 간의 레지듀얼 블록을 도출하고, 상기 레지듀얼 블록에 포함된 레지듀얼 샘플들(레지듀얼 샘플 어레이)에 변환 절차를 수행하여 변환 계수들을 도출하고, 상기 변환 계수들에 양자화 절차를 수행하여 양자화된 변환 계수들을 도출하여 관련된 레지듀얼 정보를 (비트스트림을 통하여) 디코딩 장치로 시그널링할 수 있다. 여기서 상기 레지듀얼 정보는 상기 양자화된 변환 계수들의 값 정보, 위치 정보, 변환 기법, 변환 커널, 양자화 파라미터 등의 정보를 포함할 수 있다. 디코딩 장치는 상기 레지듀얼 정보를 기반으로 역양자화/역변환 절차를 수행하고 레지듀얼 샘플들(또는 레지듀얼 블록)을 도출할 수 있다. 디코딩 장치는 예측된 블록과 상기 레지듀얼 블록을 기반으로 복원 픽처를 생성할 수 있다. 인코딩 장치는 또한 이후 픽처의 인터 예측을 위한 참조를 위하여 양자화된 변환 계수들을 역양자화/역변환하여 레지듀얼 블록을 도출하고, 이를 기반으로 복원 픽처를 생성할 수 있다.The residual information can be generated through transformation and quantization procedures. For example, the encoding device derives a residual block between the original block and the predicted block, and performs a transformation procedure on residual samples (residual sample array) included in the residual block to derive transformation coefficients. Then, a quantization procedure can be performed on the transform coefficients to derive quantized transform coefficients, and the related residual information can be signaled to the decoding device (via a bitstream). Here, the residual information may include information such as value information of the quantized transform coefficients, position information, transform technique, transform kernel, and quantization parameters. The decoding device may perform an inverse quantization/inverse transformation procedure based on the residual information and derive residual samples (or residual blocks). The decoding device can generate a restored picture based on the predicted block and the residual block. The encoding device may also dequantize/inverse transform the quantized transform coefficients to derive a residual block for reference for inter prediction of a subsequent picture, and generate a restored picture based on this.

<NPU(Neural Processing Unit)><NPU(Neural Processing Unit)>

도 4는 본 개시에 따른 신경 프로세싱 유닛을 설명하는 개략적인 개념도이다. 4 is a schematic conceptual diagram explaining a neural processing unit according to the present disclosure.

도 4에 도시된 신경 프로세싱 유닛(neural processing unit, NPU)(100)은 인공신경망을 위한 동작을 수행하도록 특화된 프로세서이다.The neural processing unit (NPU) 100 shown in FIG. 4 is a processor specialized to perform operations for artificial neural networks.

인공신경망은 여러 입력 또는 자극이 들어오면 각각 가중치를 곱해 더해주고, 추가적으로 편차를 더한 값을 활성화 함수를 통해 변형하여 전달하는 인공 뉴런들이 모인 네트워크를 의미한다. 이렇게 학습된 인공신경망은 입력 데이터로부터 추론(inference) 결과를 출력하는데 사용될 수 있다. An artificial neural network refers to a network of artificial neurons that, when multiple inputs or stimuli come in, multiply each by its weight and add it, and additionally transform and transmit the added value through an activation function. The artificial neural network learned in this way can be used to output inference results from input data.

NPU(100)는 전기/전자 회로로 구현된 반도체일 수 있다. 전기/전자 회로라 함은 수많은 전자 소자, (예컨대 트렌지스터, 커패시터)를 포함하는 것을 의미할 수 있다. The NPU 100 may be a semiconductor implemented as an electrical/electronic circuit. An electrical/electronic circuit may mean including numerous electronic elements (eg, transistors, capacitors).

Transformer 및/또는 CNN 기반의 인공신경망모델인 경우, NPU(100)는 행렬 곱셈 연산, 합성곱 연산, 등을 인공신경망의 구조(architecture)에 따라 선별하여, 처리할 수 있다.In the case of a transformer and/or CNN-based artificial neural network model, the NPU 100 can select and process matrix multiplication operations, convolution operations, etc. according to the architecture of the artificial neural network.

예를 들어, 합성곱 신경망(CNN)의 레이어 각각에서, 입력 데이터에 해당하는 입력 특징맵(Input feature map)과 가중치(Weight)에 해당하는 커널(kernel)은 복수의 채널로 구성된 행렬일 수 있다. 입력 특징맵과 커널의 합성곱 연산이 수행되며, 각 채널에서 합성곱 연산과 풀링 출력 특징맵(output feature map)이 생성된다. 출력 특징맵에 활성화 함수를 적용하여 해당 채널의 활성화맵(activation map)이 생성된다. 이후, 활성화맵에 대한 풀링이 적용될 수 있다. 여기서 포괄적으로 활성화맵은 출력 특징맵으로 지칭될 수 있다.For example, in each layer of a convolutional neural network (CNN), the input feature map corresponding to the input data and the kernel corresponding to the weight may be a matrix composed of a plurality of channels. . A convolution operation of the input feature map and the kernel is performed, and a convolution operation and a pooled output feature map are generated in each channel. An activation map for the corresponding channel is created by applying an activation function to the output feature map. Afterwards, pooling on the activation map may be applied. Here, the activation map may be generically referred to as the output feature map.

단, 본 개시의 예시들은 이에 제한되지 않으며, 출력 특징맵은 행렬 곱셈 연산 또는 합성곱 연산등이 적용된 것을 의미한다. However, examples of the present disclosure are not limited to this, and the output feature map means that a matrix multiplication operation or convolution operation, etc. has been applied.

부연 설명하면, 본 개시의 예시들에 따른 출력 특징맵은 포괄적인 의미로 해석되어야 한다. 예를 들면, 출력 특징맵은 행렬 곱셈 연산 또는 합성곱 연산 결과값일 수 있다. 이에, 복수의 프로세싱 엘리먼트(110)는 추가 알고리즘을 위한 처리 회로부를 더 포함하도록 변형 실시되는 것도 가능하다. To elaborate, the output feature maps according to examples of the present disclosure should be interpreted in a comprehensive sense. For example, the output feature map may be the result of a matrix multiplication operation or convolution operation. Accordingly, the plurality of processing elements 110 may be modified to further include a processing circuit for an additional algorithm.

NPU(100)는 상술한 인공신경망 연산에 필요한 합성곱 및 행렬 곱셈을 처리하기 위한 복수의 프로세싱 엘리먼트(110)를 포함하도록 구성될 수 있다. The NPU 100 may be configured to include a plurality of processing elements 110 for processing convolution and matrix multiplication required for the above-described artificial neural network operation.

NPU(100)는 상술한 인공신경망 연산에 필요한 행렬 곱셈 연산, 합성곱 연산, 활성화 함수 연산, 풀링 연산, 스트라이드 연산, 배치 정규화 연산, 스킵 커넥션 연산, 접합 연산, 양자화 연산, 클리핑 연산, 패딩 연산에 최적화된 각각의 처리 회로를 포함하도록 구성될 수 있다.The NPU 100 performs the matrix multiplication operation, convolution operation, activation function operation, pooling operation, stride operation, batch normalization operation, skip connection operation, concatenation operation, quantization operation, clipping operation, and padding operation required for the artificial neural network operation described above. It can be configured to include optimized respective processing circuits.

예를 들면, NPU(100)는 상술한 알고리즘들 중 활성화 함수 연산, 풀링 연산, 스트라이드 연산, 배치 정규화 연산, 스킵 커넥션 연산, 접합 연산, 양자화 연산, 클리핑 연산, 패딩 연산 중 적어도 하나를 처리하기 위한 SFU(150)를 포함하도록 구성될 수 있다.For example, the NPU 100 is for processing at least one of the activation function operation, pooling operation, stride operation, batch normalization operation, skip connection operation, concatenation operation, quantization operation, clipping operation, and padding operation among the above-described algorithms. It may be configured to include an SFU (150).

구체적으로, NPU(100)는 복수의 프로세싱 엘리먼트(processing element: PE) (110), SFU(150), NPU 내부 메모리(120), NPU 컨트롤러(130), 및 NPU 인터페이스(140)를 포함할 수 있다. 복수의 프로세싱 엘리먼트(110), SFU(150), NPU 내부 메모리(120), NPU 컨트롤러(130), 및 NPU 인터페이스(140) 각각은 수많은 트렌지스터들이 연결된 반도체 회로일 수 있다. 따라서, 이들 중 일부는 육안으로는 식별되어 구분되기 어려울 수 있고, 동작에 의해서만 식별될 수 있다. Specifically, the NPU 100 may include a plurality of processing elements (PE) 110, SFU 150, NPU internal memory 120, NPU controller 130, and NPU interface 140. there is. Each of the plurality of processing elements 110, SFU 150, NPU internal memory 120, NPU controller 130, and NPU interface 140 may be a semiconductor circuit to which numerous transistors are connected. Therefore, some of them may be difficult to identify and distinguish with the naked eye, and can only be identified through movement.

예컨대, 임의 회로는 복수의 프로세싱 엘리먼트(110)으로 동작하기도 하고, 혹은 NPU 컨트롤러(130)로 동작될 수도 있다. NPU 컨트롤러(130)는 NPU(100)의 인공신경망 추론 동작을 제어하도록 구성된 제어부의 기능을 수행하도록 구성될 수 있다.For example, an arbitrary circuit may operate as a plurality of processing elements 110 or may operate as an NPU controller 130. The NPU controller 130 may be configured to perform the function of a control unit configured to control the artificial neural network inference operation of the NPU 100.

NPU(100)는 복수의 프로세싱 엘리먼트(110) 및 SFU(150)에서 추론될 수 있는 인공신경망모델의 파라미터를 저장하도록 구성된 NPU 내부 메모리(120), 및 복수의 프로세싱 엘리먼트(110), SFU(150), 및 NPU 내부 메모리(120)의 연산 스케줄을 제어하도록 구성된 스케줄러를 포함하는 NPU 컨트롤러(130)를 포함할 수 있다. The NPU 100 includes an NPU internal memory 120 configured to store parameters of an artificial neural network model that can be inferred from a plurality of processing elements 110 and the SFU 150, and a plurality of processing elements 110 and the SFU 150. ), and an NPU controller 130 including a scheduler configured to control the operation schedule of the NPU internal memory 120.

NPU(100)는 SVC 또는 SFC를 이용한 인코딩 및 디코딩 방식에 대응되어 특징맵을 처리하도록 구성될 수 있다.The NPU 100 may be configured to process a feature map corresponding to an encoding and decoding method using SVC or SFC.

복수의 프로세싱 엘리먼트(110)는 인공신경망을 위한 동작의 일부를 수행할 수 있다. The plurality of processing elements 110 may perform some operations for an artificial neural network.

SFU(150)는 인공신경망을 위한 동작의 다른 일부를 수행할 수 있다.SFU 150 may perform other parts of the operations for the artificial neural network.

NPU(100)는 복수의 프로세싱 엘리먼트(110)와 SFU(150)를 사용하여 인공신경망모델의 연산을 하드웨어적으로 가속하도록 구성될 수 있다.The NPU 100 may be configured to accelerate the calculation of an artificial neural network model in hardware using a plurality of processing elements 110 and the SFU 150.

NPU 인터페이스(140)는 시스템 버스를 통해서 NPU(100)와 연결된 다양한 구성요소들, 예컨대 메모리와 통신할 수 있다. The NPU interface 140 may communicate with various components connected to the NPU 100, such as memory, through a system bus.

NPU 컨트롤러(130)는 신경 프로세싱 유닛(100)의 추론 연산을 위한 복수의 프로세싱 엘리먼트(110)의 연산, SFU(150)의 연산 및 NPU 내부 메모리(120)의 읽기 및 쓰기 순서를 제어하도록 구성된 스케줄러를 포함할 수 있다. The NPU controller 130 is a scheduler configured to control the operation of the plurality of processing elements 110 for the inference operation of the neural processing unit 100, the operation of the SFU 150, and the read and write order of the NPU internal memory 120. may include.

NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 데이터 지역성 정보 또는 구조에 대한 정보에 기초하여 복수의 프로세싱 엘리먼트(110), SFU(150), 및 NPU 내부 메모리(120)를 제어하도록 구성될 수 있다. The scheduler in the NPU controller 130 may be configured to control a plurality of processing elements 110, the SFU 150, and the NPU internal memory 120 based on data locality information or information on the structure of the artificial neural network model. .

NPU 컨트롤러(130) 내의 스케줄러는 복수의 프로세싱 엘리먼트(110) 및 SFU(150)에서 작동할 인공신경망모델의 구조를 분석하거나 또는 이미 분석된 정보를 제공받을 수 있다. 예를 들면, 인공신경망모델이 포함할 수 있는 인공신경망의 데이터는 각각의 레이어의 노드 데이터(즉, 특징맵), 레이어들의 배치 데이터, 지역성 정보 또는 구조에 대한 정보, 각각의 레이어의 노드를 연결하는 연결망 각각의 가중치 데이터 (즉, 가중치 커널) 중 적어도 일부를 포함할 수 있다. 인공신경망의 데이터는 NPU 컨트롤러(130) 내부에 제공되는 메모리 또는 NPU 내부 메모리(120)에 저장될 수 있다. The scheduler within the NPU controller 130 may analyze the structure of an artificial neural network model to operate in the plurality of processing elements 110 and the SFU 150 or may receive information that has already been analyzed. For example, the artificial neural network data that the artificial neural network model can include is node data (i.e. feature map) of each layer, arrangement data of the layers, locality information or structure information, and connecting the nodes of each layer. It may include at least some of the weight data (i.e., weight kernel) of each network. Data of the artificial neural network may be stored in a memory provided inside the NPU controller 130 or in the NPU internal memory 120.

NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 데이터 지역성 정보 또는 구조에 대한 정보에 기초하여 NPU(100)가 수행할 인공신경망모델의 연산 순서를 스케줄링 할 수 있다.The scheduler in the NPU controller 130 may schedule the operation order of the artificial neural network model to be performed by the NPU 100 based on information about the data locality or structure of the artificial neural network model.

NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 데이터 지역성 정보 또는 구조에 대한 정보에 기초하여 인공신경망모델의 레이어의 특징맵 및 가중치 데이터가 저장된 메모리 어드레스 값을 획득할 수 있다. 예를 들면, NPU 컨트롤러(130) 내의 스케줄러는 메모리에 저장된 인공신경망모델의 레이어의 특징맵 및 가중치 데이터가 저장된 메모리 어드레스 값을 획득할 수 있다. 따라서 NPU 컨트롤러(130) 내의 스케줄러는 구동할 인공신경망모델의 레이어의 특징맵 및 가중치 데이터를 메인 메모리에서 가져와서 NPU 내부 메모리(120)에 저장할 수 있다. The scheduler in the NPU controller 130 may obtain a memory address value where the feature map and weight data of the layer of the artificial neural network model are stored based on information about the data locality or structure of the artificial neural network model. For example, the scheduler in the NPU controller 130 may obtain the memory address value where the feature map and weight data of the layer of the artificial neural network model stored in the memory are stored. Therefore, the scheduler in the NPU controller 130 can retrieve the feature map and weight data of the layer of the artificial neural network model to be run from the main memory and store them in the NPU internal memory 120.

각각의 레이어의 특징맵은 대응되는 각각의 메모리 어드레스 값을 가질 수 있다. The feature map of each layer may have a corresponding memory address value.

각각의 가중치 데이터는 대응되는 각각의 메모리 어드레스 값을 가질 수 있다.Each weight data may have a corresponding memory address value.

NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 데이터 지역성 정보 또는 구조에 대한 정보, 예를 들면, 인공신경망모델의 인공신경망의 레이어들의 배치 데이터, 지역성 정보 또는 구조에 대한 정보에 기초해서 복수의 프로세싱 엘리먼트(110)의 연산 순서를 스케줄링 할 수 있다.The scheduler in the NPU controller 130 performs a plurality of processing based on data locality information or information on the structure of the artificial neural network model, for example, placement data, locality information, or information on the structure of the artificial neural network layers of the artificial neural network model. The operation order of the element 110 can be scheduled.

NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 데이터 지역성 정보 또는 구조에 대한 정보에 기초하여 스케줄링 하기 때문에, 일반적인 CPU의 스케줄링 개념과 다르게 동작할 수 있다. 일반적인 CPU의 스케줄링은 공평성, 효율성, 안정성, 반응 시간 등을 고려하여, 최상의 효율을 낼 수 있도록 동작한다. 즉, 우선 순위, 연산 시간 등을 고려해서 동일 시간내에 가장 많은 프로세싱을 수행하도록 스케줄링 한다. Since the scheduler in the NPU controller 130 performs scheduling based on data locality information or information on the structure of the artificial neural network model, it may operate differently from the scheduling concept of a general CPU. Typical CPU scheduling takes into account fairness, efficiency, stability, response time, etc. and operates to achieve the best efficiency. In other words, scheduling is performed to perform the most processing within the same amount of time, taking into account priority, computation time, etc.

종래의 CPU는 각 프로세싱의 우선 순서, 연산 처리 시간 등의 데이터를 고려하여 작업을 스케줄링 하는 알고리즘을 사용하였다. Conventional CPUs used an algorithm to schedule tasks by considering data such as priority order of each processing and operation processing time.

이와 다르게 NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 데이터 지역성 정보 또는 구조에 대한 정보에 기초하여 결정된 NPU(100)의 프로세싱 순서대로 NPU(100)를 제어할 수 있다.Differently, the scheduler in the NPU controller 130 may control the NPU 100 in the processing order of the NPU 100 determined based on data locality information or information on the structure of the artificial neural network model.

더 나아가면, NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 데이터 지역성 정보 또는 구조에 대한 정보 및/또는 사용하려는 신경 프로세싱 유닛(100)의 데이터 지역성 정보 또는 구조에 대한 정보에 기초하여 결정된 프로세싱 순서대로 NPU(100)를 구동할 수 있다. Furthermore, the scheduler in the NPU controller 130 determines the processing order based on information about the data locality information or structure of the artificial neural network model and/or information about the data locality information or structure of the neural processing unit 100 to be used. The NPU (100) can be driven as is.

단, 본 개시는 NPU(100)의 데이터 지역성 정보 또는 구조에 대한 정보에 제한되지 않는다. However, the present disclosure is not limited to information on data locality or structure of the NPU 100.

NPU 컨트롤러(130) 내의 스케줄러는 인공신경망의 데이터 지역성 정보 또는 구조에 대한 정보를 저장하도록 구성될 수 있다. The scheduler in the NPU controller 130 may be configured to store information about data locality or structure of the artificial neural network.

즉, NPU 컨트롤러(130) 내의 스케줄러는 적어도 인공신경망모델의 인공신경망의 데이터 지역성 정보 또는 구조에 대한 정보만 활용하더라도 프로세싱 순서를 결정할 수 있다. In other words, the scheduler in the NPU controller 130 can determine the processing order even if only using at least information about the data locality information or structure of the artificial neural network model of the artificial neural network model.

더 나아가서, NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 데이터 지역성 정보 또는 구조에 대한 정보 및 NPU(100)의 데이터 지역성 정보 또는 구조에 대한 정보를 고려하여 NPU(100)의 프로세싱 순서를 결정할 수 있다. 또한, 결정된 프로세싱 순서대로 NPU(100)의 프로세싱 최적화도 가능하다. Furthermore, the scheduler in the NPU controller 130 can determine the processing order of the NPU 100 by considering the information about the data locality information or structure of the artificial neural network model and the information about the data locality information or structure of the NPU 100. there is. Additionally, it is possible to optimize processing of the NPU 100 in the determined processing order.

복수의 프로세싱 엘리먼트(110)는 인공신경망의 특징맵과 가중치 데이터를 연산하도록 구성된 복수의 프로세싱 엘리먼트들(PE1 to PE12)이 배치된 구성을 의미한다. 각각의 프로세싱 엘리먼트는 MAC (multiply and accumulate) 연산기 및/또는 ALU (Arithmetic Logic Unit) 연산기를 포함할 수 있다. 단, 본 개시에 따른 예시들은 이에 제한되지 않는다. The plurality of processing elements 110 refers to a configuration in which a plurality of processing elements (PE1 to PE12) configured to calculate feature maps and weight data of an artificial neural network are arranged. Each processing element may include a multiply and accumulate (MAC) operator and/or an Arithmetic Logic Unit (ALU) operator. However, examples according to the present disclosure are not limited thereto.

각각의 프로세싱 엘리먼트는 추가적인 특수 기능을 처리하기 위해 추가적인 특수 기능 유닛을 선택적으로 더 포함하도록 구성될 수 있다. Each processing element may be configured to optionally further include additional special function units to process additional special functions.

예를 들면, 프로세싱 엘리먼트(PE)는 배치-정규화 유닛, 활성화 함수 유닛, 인터폴레이션 유닛 등을 더 포함하도록 변형 실시되는 것도 가능하다.For example, the processing element (PE) may be modified to further include a batch-normalization unit, an activation function unit, an interpolation unit, etc.

SFU(150)는 활성화 함수 연산, 풀링(pooling) 연산, 스트라이드(stride) 연산, 배치 정규화(batch-normalization) 연산, 스킵 커넥션(skip-connection) 연산, 접합(concatenation) 연산, 양자화(quantization) 연산, 클리핑(clipping) 연산, 패딩(padding) 연산 등을 인공신경망의 구조(architecture)에 따라 선별하여, 처리하도록 구성된 회로부를 포함할 수 있다. 즉, SFU(150)는 복수의 특수 기능 연산 처리 회로 유닛들을 포함할 수 있다. The SFU (150) performs activation function operation, pooling operation, stride operation, batch-normalization operation, skip-connection operation, concatenation operation, and quantization operation. , may include a circuit unit configured to select and process clipping operations, padding operations, etc. according to the architecture of the artificial neural network. That is, the SFU 150 may include a plurality of special function operation processing circuit units.

도 4에서는 예시적으로 복수의 프로세싱 엘리먼트들이 도시되었지만, 하나의 프로세싱 엘리먼트 내부에 MAC을 대체하여, 복수의 곱셈기(multiplier) 및 가산기 트리(adder tree)로 구현된 연산기들이 병렬로 배치되어 구성되는 것도 가능하다. 이러한 경우, 복수의 프로세싱 엘리먼트(110)는 복수의 연산기를 포함하는 적어도 하나의 프로세싱 엘리먼트로 지칭되는 것도 가능하다.Although a plurality of processing elements are exemplarily shown in FIG. 4, instead of a MAC, inside one processing element, operators implemented as a plurality of multipliers and adder trees are arranged in parallel. possible. In this case, the plurality of processing elements 110 may also be referred to as at least one processing element including a plurality of operators.

복수의 프로세싱 엘리먼트(110)는 복수의 프로세싱 엘리먼트들(PE1 to PE12)을 포함하도록 구성된다. 도 4에 도시된 복수의 프로세싱 엘리먼트들(PE1 to PE12)은 단지 설명의 편의를 위한 예시이며, 복수의 프로세싱 엘리먼트들(PE1 to PE12)의 개수는 제한되지 않는다. 복수의 프로세싱 엘리먼트들(PE1 to PE12)의 개수에 의해서 복수의 프로세싱 엘리먼트(110)의 크기 또는 개수가 결정될 수 있다. 복수의 프로세싱 엘리먼트(110)의 크기는 N x M 행렬 형태로 구현될 수 있다. 여기서 N 과 M은 0보다 큰 정수이다. 복수의 프로세싱 엘리먼트(110)는 N x M 개의 프로세싱 엘리먼트를 포함할 수 있다. 즉, 프로세싱 엘리먼트는 1개 이상일 수 있다.The plurality of processing elements 110 are configured to include a plurality of processing elements (PE1 to PE12). The plurality of processing elements (PE1 to PE12) shown in FIG. 4 are merely examples for convenience of explanation, and the number of processing elements (PE1 to PE12) is not limited. The size or number of the plurality of processing elements 110 may be determined depending on the number of the plurality of processing elements (PE1 to PE12). The size of the plurality of processing elements 110 may be implemented in the form of an N x M matrix. Here N and M are integers greater than 0. The plurality of processing elements 110 may include N x M processing elements. That is, there may be one or more processing elements.

복수의 프로세싱 엘리먼트(110)의 크기는 NPU(100)이 작동하는 인공신경망모델의 특성을 고려하여 설계할 수 있다. The size of the plurality of processing elements 110 can be designed considering the characteristics of the artificial neural network model on which the NPU 100 operates.

복수의 프로세싱 엘리먼트(110)는 인공신경망 연산에 필요한 덧셈, 곱셈, 누산 등의 기능을 수행하도록 구성된다. 다르게 설명하면, 복수의 프로세싱 엘리먼트(110)는 MAC(multiplication and accumulation) 연산을 수행하도록 구성될 수 있다.The plurality of processing elements 110 are configured to perform functions such as addition, multiplication, and accumulation required for artificial neural network operations. In other words, the plurality of processing elements 110 may be configured to perform a multiplication and accumulation (MAC) operation.

이하 복수의 프로세싱 엘리먼트(110) 중 제1 프로세싱 엘리먼트(PE1)를 예를 들어 설명한다.Hereinafter, the first processing element PE1 among the plurality of processing elements 110 will be described as an example.

도 5a는 본 개시에 적용될 수 있는 복수의 프로세싱 엘리먼트 중 하나의 프로세싱 엘리먼트를 설명하는 개략적인 개념도이다. FIG. 5A is a schematic conceptual diagram illustrating one processing element among a plurality of processing elements applicable to the present disclosure.

본 개시의 일 예시에 따른 NPU(100)은 복수의 프로세싱 엘리먼트(110), 복수의 프로세싱 엘리먼트(110)에서 추론될 수 있는 인공신경망모델을 저장하도록 구성된 NPU 내부 메모리(120) 및 복수의 프로세싱 엘리먼트(110) 및 NPU 내부 메모리(120)을 제어하도록 구성된 NPU 컨트롤러(130)를 포함하고, 복수의 프로세싱 엘리먼트(110)는 MAC 연산을 수행하도록 구성되고, 복수의 프로세싱 엘리먼트(110)는 MAC 연산 결과를 양자화해서 출력하도록 구성될 수 있다. 단, 본 개시의 예시들은 이에 제한되지 않는다. The NPU 100 according to an example of the present disclosure includes a plurality of processing elements 110, an NPU internal memory 120 configured to store an artificial neural network model that can be inferred from the plurality of processing elements 110, and a plurality of processing elements. (110) and an NPU controller 130 configured to control the NPU internal memory 120, a plurality of processing elements 110 are configured to perform a MAC operation, and the plurality of processing elements 110 are configured to perform the MAC operation result. It can be configured to quantize and output. However, the examples of the present disclosure are not limited thereto.

NPU 내부 메모리(120)은 메모리 크기와 인공신경망모델의 데이터 크기에 따라 인공신경망모델의 전부 또는 일부를 저장할 수 있다.The NPU internal memory 120 can store all or part of the artificial neural network model depending on the memory size and the data size of the artificial neural network model.

제1 프로세싱 엘리먼트(PE1)는 곱셈기(111), 가산기(112), 누산기(113), 및 비트 양자화 유닛(114)을 포함할 수 있다. 단, 본 개시에 따른 예시들은 이에 제한되지 않으며, 복수의 프로세싱 엘리먼트(110)는 인공신경망의 연산 특성을 고려하여 변형 실시될 수도 있다.The first processing element PE1 may include a multiplier 111, an adder 112, an accumulator 113, and a bit quantization unit 114. However, examples according to the present disclosure are not limited thereto, and the plurality of processing elements 110 may be modified and implemented in consideration of the computational characteristics of the artificial neural network.

곱셈기(111)는 입력 받은 (N)bit 데이터와 (M)bit 데이터를 곱한다. 곱셈기(111)의 연산 값은 (N+M)bit 데이터로 출력된다. The multiplier 111 multiplies the input (N) bit data and (M) bit data. The operation value of the multiplier 111 is output as (N+M) bit data.

곱셈기(111)는 하나의 변수와 하나의 상수를 입력 받도록 구성될 수 있다. The multiplier 111 may be configured to receive one variable and one constant as input.

누산기(113)는 (L)loops 횟수만큼 가산기(112)를 사용하여 곱셈기(111)의 연산 값과 누산기(113)의 연산 값을 누산 한다. 따라서 누산기(113)의 출력부와 입력부의 데이터의 비트 폭은 (N+M+log2(L))bit로 출력될 수 있다. 여기서 L은 0보다 큰 정수이다.The accumulator 113 accumulates the operation value of the multiplier 111 and the operation value of the accumulator 113 using the adder 112 the number of (L) loops. Therefore, the bit width of the data of the output and input portions of the accumulator 113 can be output as (N+M+log2(L)) bits. Here, L is an integer greater than 0.

누산기(113)는 누산이 종료되면, 초기화 신호(initialization reset)를 인가받아서 누산기(113) 내부에 저장된 데이터를 0으로 초기화 할 수 있다. 단, 본 개시에 따른 예시들은 이에 제한되지 않는다.When accumulation is completed, the accumulator 113 can receive an initialization reset signal and initialize the data stored inside the accumulator 113 to 0. However, examples according to the present disclosure are not limited thereto.

비트 양자화 유닛(114)은 누산기(113)에서 출력되는 데이터의 비트 폭을 저감할 수 있다. 비트 양자화 유닛(114)은 NPU 컨트롤러(130)에 의해서 제어될 수 있다. 양자화된 데이터의 비트 폭은 (X)bit로 출력될 수 있다. 여기서 X는 0보다 큰 정수이다. 상술한 구성에 따르면, 복수의 프로세싱 엘리먼트(110)는 MAC 연산을 수행하도록 구성되고, 복수의 프로세싱 엘리먼트(110)는 MAC 연산 결과를 양자화해서 출력할 수 있는 효과가 있다. 특히 이러한 양자화는 (L)loops가 증가할수록 소비 전력을 더 절감할 수 있는 효과가 있다. 또한 소비 전력이 저감되면 발열도 저감할 수 있는 효과가 있다. 특히 발열을 저감하면 NPU(100)의 고온에 의한 오동작 발생 가능성을 저감할 수 있는 효과가 있다.The bit quantization unit 114 can reduce the bit width of data output from the accumulator 113. The bit quantization unit 114 may be controlled by the NPU controller 130. The bit width of quantized data can be output as (X)bit. Here, X is an integer greater than 0. According to the above-described configuration, the plurality of processing elements 110 are configured to perform MAC operation, and the plurality of processing elements 110 have the effect of quantizing the MAC operation result and outputting it. In particular, this quantization has the effect of further reducing power consumption as (L)loops increase. Additionally, reducing power consumption has the effect of reducing heat generation. In particular, reducing heat generation has the effect of reducing the possibility of malfunction due to high temperature of the NPU (100).

비트 양자화 유닛(114)의 출력 데이터(X)bit은 다음 레이어의 노드 데이터 또는 합성곱의 입력 데이터가 될 수 있다. 만약 인공신경망모델이 양자화되었다면, 비트 양자화 유닛(114)은 양자화된 정보를 인공신경망모델에서 제공받도록 구성될 수 있다. 단, 이에 제한되지 않으며, NPU 컨트롤러(130)는 인공신경망모델을 분석하여 양자화된 정보를 추출하도록 구성되는 것도 가능하다. 따라서 양자화된 데이터 크기에 대응되도록, 출력 데이터(X)bit를 양자화 된 비트 폭으로 변환하여 출력될 수 있다. 비트 양자화 유닛(114)의 출력 데이터(X)bit는 양자화된 비트 폭으로 NPU 내부 메모리(120)에 저장될 수 있다. The output data (X) bit of the bit quantization unit 114 may be node data of the next layer or input data of convolution. If the artificial neural network model is quantized, the bit quantization unit 114 may be configured to receive quantized information from the artificial neural network model. However, it is not limited to this, and the NPU controller 130 may be configured to extract quantized information by analyzing an artificial neural network model. Therefore, the output data (X) bit can be converted to the quantized bit width and output to correspond to the quantized data size. The output data (X) bit of the bit quantization unit 114 may be stored in the NPU internal memory 120 as a quantized bit width.

본 개시의 일 예시에 따른 NPU(100)의 복수의 프로세싱 엘리먼트(110)는 곱셈기(111), 가산기(112), 및 누산기(113)를 포함한다. 비트 양자화 유닛(114)은 양자화 적용 여부에 따라 취사 선택될 수 있다.The plurality of processing elements 110 of the NPU 100 according to an example of the present disclosure include a multiplier 111, an adder 112, and an accumulator 113. The bit quantization unit 114 can be selected depending on whether quantization is applied.

도 5b는 본 개시에 적용될 수 있는 SFU를 설명하는 개략적인 개념도이다. Figure 5b is a schematic conceptual diagram explaining an SFU applicable to the present disclosure.

도 5b를 참고하면 SFU(150)는 여러 기능 유닛을 포함한다. 각각의 기능 유닛은 선택적으로 동작될 수 있다. 각각의 기능 유닛은 선택적으로 턴-온되거나 턴-오프될 수 있다. 즉, 각각의 기능 유닛은 설정이 가능하다.Referring to Figure 5b, SFU 150 includes several functional units. Each functional unit can be operated selectively. Each functional unit can be selectively turned on or off. That is, each functional unit can be set.

다시 말해서, SFU(150)는 인공신경망 추론 연산에 필요한 다양한 회로 유닛들을 포함할 수 있다.In other words, the SFU 150 may include various circuit units required for artificial neural network inference calculations.

예를 들면, SFU(150)의 회로 유닛들은 건너뛰고 연결하기(skip-connection) 동작을 위한 기능 유닛, 활성화 함수(activation function) 동작을 위한 기능 유닛, 풀링(pooling) 동작을 위한 기능 유닛, 양자화(quantization) 동작을 위한 기능 유닛, NMS(non-maximum suppression) 동작을 위한 기능 유닛, 정수 및 부동 소수점 변환(INT to FP32) 동작을 위한 기능 유닛, 배치 정규화(batch-normalization) 동작을 위한 기능 유닛, 보간법(interpolation) 동작을 위한 기능 유닛, 연접(concatenation) 동작을 위한 기능 유닛, 및 바이아스(bias) 동작을 위한 기능 유닛 등을 포함할 수 있다.For example, the circuit units of the SFU 150 include a functional unit for a skip-connection operation, a functional unit for an activation function operation, a functional unit for a pooling operation, and quantization. Functional unit for (quantization) operation, functional unit for NMS (non-maximum suppression) operation, functional unit for integer and floating point conversion (INT to FP32) operation, functional unit for batch-normalization operation. , it may include a functional unit for an interpolation operation, a functional unit for a concatenation operation, and a functional unit for a bias operation.

SFU(150)의 기능 유닛들은 인공신경망모델의 데이터 지역성 정보에 의해서 선택적으로 턴-온되거나 혹은 턴-오프될 수 있다. 인공신경망모델의 데이터 지역성 정보는 특정 레이어를 위한 연산이 수행될 때, 해당 기능 유닛의 턴-오프 혹은 턴-오프와 관련된 제어 정보를 포함할 수 있다.Functional units of the SFU 150 can be selectively turned on or turned off based on data locality information of the artificial neural network model. The data locality information of the artificial neural network model may include turn-off or control information related to the turn-off of the corresponding functional unit when an operation for a specific layer is performed.

SFU(150)의 기능 유닛들 중 활성화된 유닛은 턴-온 될 수 있다. 이와 같이 SFU(150)의 일부 기능 유닛을 선택적으로 턴-오프하는 경우, NPU(100)의 소비 전력을 절감할 수 있다. 한편, 일부 기능 유닛을 턴-오프하기 위하여, 파워 게이팅(power gating)을 이용할 수 있다. 또는, 일부 기능 유닛을 턴-오프하기 위하여, 클럭 게이팅(clock gating)을 수행할 수도 있다.Among the functional units of the SFU 150, an activated unit may be turned on. In this way, when some functional units of the SFU 150 are selectively turned off, the power consumption of the NPU 100 can be reduced. Meanwhile, power gating can be used to turn off some functional units. Alternatively, clock gating may be performed to turn off some functional units.

도 6은 도 4에 도시된 NPU(100)의 변형예를 나타낸 예시도이다.FIG. 6 is an exemplary diagram showing a modified example of the NPU 100 shown in FIG. 4.

도 6에 도시된 NPU(100)은 도 4에 예시적으로 도시된 프로세싱 유닛(100)과 비교하면, 복수의 프로세싱 엘리먼트(110)를 제외하곤 실질적으로 동일하기 때문에, 이하 단지 설명의 편의를 위해서 중복 설명은 생략할 수 있다. Since the NPU 100 shown in FIG. 6 is substantially the same as the processing unit 100 shown by way of example in FIG. 4 except for a plurality of processing elements 110, the following is only for convenience of description. Redundant descriptions can be omitted.

도 6에 예시적으로 도시된 복수의 프로세싱 엘리먼트(110)는 복수의 프로세싱 엘리먼트들(PE1 to PE12) 외에, 각각의 프로세싱 엘리먼트들(PE1 to PE12)에 대응되는 각각의 레지스터 파일들(RF1 to RF12)을 더 포함할 수 있다.The plurality of processing elements 110 illustratively shown in FIG. 6 include, in addition to a plurality of processing elements (PE1 to PE12), respective register files (RF1 to RF12) corresponding to each of the processing elements (PE1 to PE12). ) may further be included.

도 6에 도시된 복수의 프로세싱 엘리먼트들(PE1 to PE12) 및 복수의 레지스터 파일들(RF1 to RF12)은 단지 설명의 편의를 위한 예시이며, 복수의 프로세싱 엘리먼트들(PE1 to PE12) 및 복수의 레지스터 파일들(RF1 to RF12)의 개수는 제한되지 않는다. The plurality of processing elements (PE1 to PE12) and the plurality of register files (RF1 to RF12) shown in FIG. 6 are examples only for convenience of explanation, and the plurality of processing elements (PE1 to PE12) and the plurality of registers The number of files (RF1 to RF12) is not limited.

복수의 프로세싱 엘리먼트들(PE1 to PE12) 및 복수의 레지스터 파일들(RF1 to RF12)의 개수에 의해서 복수의 프로세싱 엘리먼트(110)의 크기 또는 개수가 결정될 수 있다. 복수의 프로세싱 엘리먼트(110) 및 복수의 레지스터 파일들(RF1 to RF12)의 크기는 N x M 행렬 형태로 구현될 수 있다. 여기서 N 과 M은 0보다 큰 정수이다.The size or number of the plurality of processing elements 110 may be determined depending on the number of processing elements (PE1 to PE12) and the number of register files (RF1 to RF12). The sizes of the plurality of processing elements 110 and the plurality of register files (RF1 to RF12) may be implemented in the form of an N x M matrix. Here N and M are integers greater than 0.

복수의 프로세싱 엘리먼트(110)의 어레이 크기는 NPU(100)이 작동하는 인공신경망모델의 특성을 고려하여 설계할 수 있다. 부연 설명하면, 레지스터 파일의 메모리 크기는 작동할 인공신경망모델의 데이터 크기, 요구되는 동작 속도, 요구되는 소비 전력 등을 고려하여 결정될 수 있다. The array size of the plurality of processing elements 110 can be designed considering the characteristics of the artificial neural network model on which the NPU 100 operates. To elaborate, the memory size of the register file can be determined by considering the data size of the artificial neural network model to be operated, required operation speed, required power consumption, etc.

NPU(100)의 레지스터 파일들(RF1 to RF12)은 프로세싱 엘리먼트들(PE1 to PE12)과 직접 연결된 정적 메모리 유닛이다. 레지스터 파일들(RF1 to RF12)은 예를 들면, 플립플롭, 및/또는 래치 등으로 구성될 수 있다. 레지스터 파일들(RF1 to RF12)은 대응되는 프로세싱 엘리먼트들(PE1 to PE12)의 MAC 연산 값을 저장하도록 구성될 수 있다. 레지스터 파일들(RF1 to RF12)은 NPU 내부 메모리(120)와 가중치 데이터 및/또는 노드 데이터를 제공하거나 제공받도록 구성될 수 있다.The register files (RF1 to RF12) of the NPU (100) are static memory units directly connected to the processing elements (PE1 to PE12). Register files (RF1 to RF12) may be composed of, for example, flip-flops and/or latches. Register files (RF1 to RF12) may be configured to store MAC operation values of corresponding processing elements (PE1 to PE12). Register files (RF1 to RF12) may be configured to provide or receive NPU internal memory 120, weight data, and/or node data.

레지스터 파일들(RF1 to RF12)은 MAC 연산 시 누산기의 임시 메모리의 기능을 수행하도록 구성되는 것도 가능하다. The register files (RF1 to RF12) can also be configured to perform the function of the accumulator's temporary memory during MAC operation.

도 7은 예시적인 인공신경망모델을 설명하는 개략적인 개념도이다. 7 is a schematic conceptual diagram illustrating an exemplary artificial neural network model.

이하 NPU(100)에서 작동될 수 있는 예시적인 인공신경망모델(110-10)의 연산에 대하여 설명한다.Hereinafter, the operation of the exemplary artificial neural network model 110-10 that can be operated on the NPU 100 will be described.

도 7의 예시적인 인공신경망모델(110-10)은 도 4 또는 도 6에 도시된 NPU(100)에서 학습되거나 별도의 기계 학습 장치에서 학습된 인공신경망일 수 있다. 인공신경망모델은 객체 인식, 음성 인식 등 다양한 추론 기능을 수행하도록 학습된 인공신경망일 수 있다.The exemplary artificial neural network model 110-10 in FIG. 7 may be an artificial neural network learned in the NPU 100 shown in FIG. 4 or 6 or in a separate machine learning device. An artificial neural network model may be an artificial neural network trained to perform various inference functions such as object recognition and voice recognition.

인공신경망모델(110-10)은 심층 신경망(DNN, Deep Neural Network)일 수 있다.The artificial neural network model 110-10 may be a deep neural network (DNN).

단, 본 개시의 예시들에 따른 인공신경망모델(110-10)은 심층 신경망에 제한되지 않는다. However, the artificial neural network model 110-10 according to examples of the present disclosure is not limited to deep neural networks.

예를 들면, 인공신경망모델은 Object Detection, Object Segmentation, Image/Video Reconstruction, Image/Video Enhancement, Object Tracking, Event Recognition, Event Prediction, Anomaly Detection, Density Estimation, Event Search, Measurement 등의 추론을 수행하도록 학습될 모델일 수 있다. For example, artificial neural network models are trained to perform inferences such as Object Detection, Object Segmentation, Image/Video Reconstruction, Image/Video Enhancement, Object Tracking, Event Recognition, Event Prediction, Anomaly Detection, Density Estimation, Event Search, and Measurement. It could be a model to become.

예를 들면, 인공신경망모델은 Bisenet, Shelfnet, Alexnet, Densenet, Efficientnet, EfficientDet, Googlenet, Mnasnet, Mobilenet, Resnet, Shufflenet, Squeezenet, VGG, Yolo, RNN, CNN, DBN, RBM, LSTM 등의 모델일 수 있다. 예를 들면, 인공신경망모델은 Generative adversarial networks (GAN), transformer 등의 모델일 수 있다. 단, 본 개시는 이에 제한되지 않으며, NPU에서 동작할 새로운 인공신경망모델이 꾸준히 발표되고 있다.For example, artificial neural network models can be Bisenet, Shelfnet, Alexnet, Densenet, Efficientnet, EfficientDet, Googlenet, Mnasnet, Mobilenet, Resnet, Shufflenet, Squeezenet, VGG, Yolo, RNN, CNN, DBN, RBM, LSTM, etc. there is. For example, artificial neural network models may be generative adversarial networks (GAN), transformer, etc. However, the present disclosure is not limited to this, and new artificial neural network models to operate on NPU are continuously being announced.

단, 본 개시는 상술한 모델들에 제한되지 않는다. 또한 인공신경망모델(110-10)은 적어도 두 개의 서로 다른 모델들에 기초한 앙상블 모델일 수도 있다.However, the present disclosure is not limited to the above-described models. Additionally, the artificial neural network model 110-10 may be an ensemble model based on at least two different models.

인공신경망모델(110-10)은 NPU(100)의 NPU 내부 메모리(120)에 저장될 수 있다. The artificial neural network model 110-10 may be stored in the NPU internal memory 120 of the NPU 100.

이하 도 7를 참조하여 예시적인 인공신경망모델(110-10)에 의환 추론 과정이 NPU(100)에 의해서 수행되는 것에 관해 설명한다.Hereinafter, with reference to FIG. 7, the inference process performed by the NPU 100 on the exemplary artificial neural network model 110-10 will be described.

인공신경망모델(110-10)은 입력 레이어(110-11), 제1 연결망(110-12), 제1 은닉 레이어(110-13), 제2 연결망(110-14), 제2 은닉 레이어(110-15), 제3 연결망(110-16), 및 출력 레이어(110-17)을 포함하는 예시적인 심층 신경망 모델이다. 단, 본 개시는 도 7에 도시된 인공신경망모델에만 제한되는 것은 아니다. 제1 은닉 레이어(110-13) 및 제2 은닉 레이어(110-15)는 복수의 은닉 레이어로 지칭되는 것도 가능하다.The artificial neural network model (110-10) includes an input layer (110-11), a first connection network (110-12), a first hidden layer (110-13), a second connection network (110-14), and a second hidden layer ( 110-15), a third connection network 110-16, and an output layer 110-17. However, the present disclosure is not limited to the artificial neural network model shown in FIG. 7. The first hidden layer 110-13 and the second hidden layer 110-15 may also be referred to as a plurality of hidden layers.

입력 레이어(110-11)는 예시적으로, x1 및 x2 입력 노드를 포함할 수 있다. 즉, 입력 레이어(110-11)는 2개의 입력 값에 대한 정보를 포함할 수 있다. 도 4 또는 도 6에 도시된 NPU 컨트롤러(130) 내의 스케줄러는 입력 레이어(110-11)로부터의 입력 값에 대한 정보가 저장되는 메모리 어드레스를 도 4 또는 도 6에 도시된 NPU 내부 메모리(120)에 설정할 수 있다.The input layer 110-11 may illustratively include x1 and x2 input nodes. That is, the input layer 110-11 may include information about two input values. The scheduler in the NPU controller 130 shown in FIG. 4 or 6 assigns a memory address where information about the input value from the input layer 110-11 is stored to the NPU internal memory 120 shown in FIG. 4 or 6. It can be set to .

제1 연결망(110-12)은 예시적으로, 입력 레이어(110-11)의 각각의 노드를 제1 은닉 레이어(110-13)의 각각의 노드로 연결시키기 위한 6개의 가중치 값에 대한 정보를 포함할 수 있다. 도 4 또는 도 6에 도시된 NPU 컨트롤러(130) 내의 스케줄러는 제1 연결망(110-12)의 가중치 값에 대한 정보가 저장되는 메모리 어드레스를 NPU 내부 메모리(120)에 설정할 수 있다. 각각의 가중치 값은 입력 노드 값과 곱해지고, 곱해진 값들의 누산된 값이 제1 은닉 레이어(110-13)에 저장된다. 여기서 노드들은 특징맵으로 지칭될 수 있다.The first connection network 110-12 illustratively includes information on six weight values for connecting each node of the input layer 110-11 to each node of the first hidden layer 110-13. It can be included. The scheduler in the NPU controller 130 shown in FIG. 4 or 6 may set a memory address in the NPU internal memory 120 where information about the weight value of the first connection network 110-12 is stored. Each weight value is multiplied by the input node value, and the accumulated value of the multiplied values is stored in the first hidden layer 110-13. Here, nodes may be referred to as feature maps.

제1 은닉 레이어(110-13)는 예시적으로 a1, a2, 및 a3 노드를 포함할 수 있다. 즉, 제1 은닉 레이어(110-13)는 3개의 노드 값에 대한 정보를 포함할 수 있다. 도 4 또는 도 6에 도시된 NPU 컨트롤러(130) 내의 스케줄러는 제1 은닉 레이어(110-13)의 노드 값에 대한 정보를 저장시키기 위한 메모리 어드레스를 NPU 내부 메모리(120)에 설정할 수 있다.The first hidden layer 110-13 may exemplarily include nodes a1, a2, and a3. That is, the first hidden layer 110-13 may include information about three node values. The scheduler in the NPU controller 130 shown in FIG. 4 or 6 may set a memory address for storing information about the node value of the first hidden layer 110-13 in the NPU internal memory 120.

NPU 컨트롤러(130) 내의 스케줄러는 제1 프로세싱 엘리먼트(PE1)가 제1 은닉 레이어(110-13)의 a1 노드의 MAC 연산을 수행하도록 연산 순서를 스케줄링 하도록 구성될 수 있다. NPU 컨트롤러(130) 내의 스케줄러는 제2 프로세싱 엘리먼트(PE2)가 제1 은닉 레이어(110-13)의 a2 노드의 MAC 연산을 수행하도록 연산 순서를 스케줄링 하도록 구성될 수 있다. NPU 컨트롤러(130) 내의 스케줄러는 제3 프로세싱 엘리먼트(PE3)가 제1 은닉 레이어(110-13)의 a3 노드의 MAC 연산을 수행하도록 연산 순서를 스케줄링 하도록 구성될 수 있다. 여기서 NPU 컨트롤러(130) 내의 스케줄러는 3개의 프로세싱 엘리먼트들이 병렬로 동시에 MAC 연산을 각각 수행하도록 연산 순서를 미리 스케줄링 할 수 있다.The scheduler in the NPU controller 130 may be configured to schedule an operation order so that the first processing element (PE1) performs the MAC operation of the a1 node of the first hidden layer (110-13). The scheduler in the NPU controller 130 may be configured to schedule an operation order so that the second processing element (PE2) performs the MAC operation of the a2 node of the first hidden layer (110-13). The scheduler in the NPU controller 130 may be configured to schedule an operation order so that the third processing element (PE3) performs the MAC operation of the a3 node of the first hidden layer (110-13). Here, the scheduler in the NPU controller 130 may pre-schedule the operation order so that the three processing elements each perform the MAC operation simultaneously in parallel.

제2 연결망(110-14)은 예시적으로, 제1 은닉 레이어(110-13)의 각각의 노드를 제2 은닉 레이어(110-15)의 각각의 노드로 연결시키기 위한 9개의 가중치 값에 대한 정보를 포함할 수 있다. 도 4 또는 도 6에 도시된 NPU 컨트롤러(130) 내의 스케줄러는 제2 연결망(110-14)의 가중치 값에 대한 정보를 저장시키기 위한 메모리 어드레스를 NPU 내부 메모리(120)에 설정할 수 있다. 상기 제2 연결망(110-14)의 가중치 값은 제1 은닉 레이어(110-13)로부터 입력되는 노드 값과 각기 곱해지고, 곱해진 값들의 누산된 값이 제2 은닉 레이어(110-15)에 저장된다. The second connection network 110-14 illustratively includes nine weight values for connecting each node of the first hidden layer 110-13 to each node of the second hidden layer 110-15. May contain information. The scheduler in the NPU controller 130 shown in FIG. 4 or 6 may set a memory address for storing information about the weight value of the second connection network 110-14 in the NPU internal memory 120. The weight value of the second network 110-14 is multiplied by the node value input from the first hidden layer 110-13, and the accumulated value of the multiplied values is sent to the second hidden layer 110-15. It is saved.

제2 은닉 레이어(110-15)는 예시적으로 b1, b2, 및 b3 노드를 포함할 수 있다. 즉, 제2 은닉 레이어(110-15)는 3개의 노드 값에 대한 정보를 포함할 수 있다. NPU 컨트롤러(130) 내의 스케줄러는 제2 은닉 레이어(110-15)의 노드 값에 대한 정보를 저장시키기 위한 메모리 어드레스를 NPU 내부 메모리(120)에 설정할 수 있다.The second hidden layer 110-15 may exemplarily include nodes b1, b2, and b3. That is, the second hidden layer 110-15 may include information about three node values. The scheduler within the NPU controller 130 may set a memory address for storing information about the node value of the second hidden layer 110-15 in the NPU internal memory 120.

NPU 컨트롤러(130) 내의 스케줄러는 제4 프로세싱 엘리먼트(PE4)가 제2 은닉 레이어(110-15)의 b1 노드의 MAC 연산을 수행하도록 연산 순서를 스케줄링 하도록 구성될 수 있다. NPU 컨트롤러(130) 내의 스케줄러는 제5 프로세싱 엘리먼트(PE5)가 제2 은닉 레이어(110-15)의 b2 노드의 MAC 연산을 수행하도록 연산 순서를 스케줄링 하도록 구성될 수 있다. NPU 컨트롤러(130) 내의 스케줄러는 제6 프로세싱 엘리먼트(PE6)가 제2 은닉 레이어(110-15)의 b3 노드의 MAC 연산을 수행하도록 연산 순서를 스케줄링 하도록 구성될 수 있다. The scheduler in the NPU controller 130 may be configured to schedule an operation order so that the fourth processing element (PE4) performs the MAC operation of the b1 node of the second hidden layer 110-15. The scheduler in the NPU controller 130 may be configured to schedule an operation order so that the fifth processing element (PE5) performs the MAC operation of the b2 node of the second hidden layer 110-15. The scheduler in the NPU controller 130 may be configured to schedule an operation order so that the sixth processing element (PE6) performs the MAC operation of the b3 node of the second hidden layer 110-15.

여기서 NPU 컨트롤러(130) 내의 스케줄러는 3개의 프로세싱 엘리먼트들이 병렬로 동시에 MAC 연산을 각각 수행하도록 연산 순서를 미리 스케줄링 할 수 있다. Here, the scheduler in the NPU controller 130 may pre-schedule the operation order so that the three processing elements each perform the MAC operation simultaneously in parallel.

여기서 NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 제1 은닉 레이어(110-13)의 MAC 연산 이후 제2 은닉 레이어(110-15)의 연산이 수행되도록 스케줄링을 결정할 수 있다. Here, the scheduler in the NPU controller 130 may determine scheduling so that the operation of the second hidden layer (110-15) is performed after the MAC operation of the first hidden layer (110-13) of the artificial neural network model.

즉, NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 데이터 지역성 정보 또는 구조에 대한 정보에 기초하여 복수의 프로세싱 엘리먼트(100) 및 NPU 내부 메모리(120)을 제어하도록 구성될 수 있다.That is, the scheduler in the NPU controller 130 may be configured to control the plurality of processing elements 100 and the NPU internal memory 120 based on information about the data locality or structure of the artificial neural network model.

제3 연결망(110-16)은 예시적으로, 제2 은닉 레이어(110-15)의 각각의 노드와 출력 레이어(110-17)의 각각의 노드를 연결하는 6개의 가중치 값에 대한 정보를 포함할 수 있다. NPU 컨트롤러(130) 내의 스케줄러는 제3 연결망(110-16)의 가중치 값에 대한 정보를 저장시키기 위한 메모리 어드레스를 NPU 내부 메모리(120)에 설정할 수 있다. 제3 연결망(110-16)의 가중치 값은 제2 은닉 레이어(110-15)로부터 입력되는 노드 값과 각기 곱해지고, 곱해진 값들의 누산된 값이 출력 레이어(110-17)에 저장된다. The third network 110-16 illustratively includes information on six weight values connecting each node of the second hidden layer 110-15 and each node of the output layer 110-17. can do. The scheduler within the NPU controller 130 may set a memory address for storing information about the weight value of the third connection network 110-16 in the NPU internal memory 120. The weight value of the third network 110-16 is multiplied by the node value input from the second hidden layer 110-15, and the accumulated value of the multiplied values is stored in the output layer 110-17.

출력 레이어(110-17)는 예시적으로 y1, 및 y2 노드를 포함할 수 있다. 즉, 출력 레이어(110-17)는 2개의 노드 값에 대한 정보를 포함할 수 있다. NPU 컨트롤러(130) 내의 스케줄러는 출력 레이어(110-17)의 노드 값에 대한 정보를 저장시키기 위해 메모리 어드레스를 NPU 내부 메모리(120)에 설정할 수 있다.The output layer 110-17 may illustratively include y1 and y2 nodes. That is, the output layer 110-17 may include information about two node values. The scheduler within the NPU controller 130 may set a memory address in the NPU internal memory 120 to store information about the node value of the output layer 110-17.

NPU 컨트롤러(130) 내의 스케줄러는 제7 프로세싱 엘리먼트(PE7)가 출력 레이어(110-17)의 y1 노드의 MAC 연산을 수행하도록 연산 순서를 스케줄링 하도록 구성될 수 있다. NPU 컨트롤러(130) 내의 스케줄러는 제8 프로세싱 엘리먼트(PE8)가 출력 레이어(110-15)의 y2 노드의 MAC 연산을 수행하도록 연산 순서를 스케줄링 하도록 구성될 수 있다.The scheduler in the NPU controller 130 may be configured to schedule an operation order so that the seventh processing element (PE7) performs the MAC operation of the y1 node of the output layer 110-17. The scheduler in the NPU controller 130 may be configured to schedule an operation order so that the eighth processing element (PE8) performs the MAC operation of the y2 node of the output layer 110-15.

여기서 NPU 컨트롤러(130) 내의 스케줄러는 2개의 프로세싱 엘리먼트들이 병렬로 동시에 MAC 연산을 각각 수행하도록 연산 순서를 미리 스케줄링 할 수 있다. Here, the scheduler in the NPU controller 130 may pre-schedule the operation order so that the two processing elements each perform the MAC operation simultaneously in parallel.

여기서 NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 제2 은닉 레이어(110-15)의 MAC 연산 이후 출력 레이어(110-17)의 연산이 수행되도록 스케줄링을 결정할 수 있다. Here, the scheduler in the NPU controller 130 may determine scheduling so that the operation of the output layer (110-17) is performed after the MAC operation of the second hidden layer (110-15) of the artificial neural network model.

즉, NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델의 데이터 지역성 정보 또는 구조에 대한 정보에 기초하여 복수의 프로세싱 엘리먼트(100) 및 NPU 내부 메모리(120)을 제어하도록 구성될 수 있다.That is, the scheduler in the NPU controller 130 may be configured to control the plurality of processing elements 100 and the NPU internal memory 120 based on information about the data locality or structure of the artificial neural network model.

즉, NPU 컨트롤러(130) 내의 스케줄러는 복수의 프로세싱 엘리먼트(100)에서 작동할 인공신경망모델의 구조를 분석하거나 또는 분석된 정보를 제공받을 수 있다. 인공신경망모델이 포함할 수 있는 인공신경망의 정보는 각각의 레이어의 노드 값에 대한 정보, 레이어들의 배치 데이터 지역성 정보 또는 구조에 대한 정보, 각각의 레이어의 노드를 연결하는 연결망 각각의 가중치 값에 대한 정보를 포함할 수 있다.That is, the scheduler in the NPU controller 130 can analyze the structure of the artificial neural network model to operate in the plurality of processing elements 100 or receive the analyzed information. The artificial neural network information that the artificial neural network model can include is information about the node value of each layer, information about the locality or structure of the arrangement data of the layers, and information about the weight value of each network connecting the nodes of each layer. May contain information.

NPU 컨트롤러(130) 내의 스케줄러는 예시적인 인공신경망모델(110-10)의 데이터 지역성 정보 또는 구조에 대한 정보를 제공받았기 때문에, NPU 컨트롤러(130) 내의 스케줄러는 인공신경망모델(110-10)의 입력부터 출력까지의 연산 순서를 파악할 수 있다. Since the scheduler in the NPU controller 130 is provided with information about the data locality information or structure of the exemplary artificial neural network model 110-10, the scheduler in the NPU controller 130 inputs the artificial neural network model 110-10. You can understand the operation sequence from start to output.

따라서, NPU 컨트롤러(130) 내의 스케줄러는 각각의 레이어의 MAC 연산 값들이 저장되는 메모리 어드레스를 스케줄링 순서를 고려해서 NPU 내부 메모리(120)에 설정할 수 있다. Accordingly, the scheduler within the NPU controller 130 may set the memory address where the MAC operation values of each layer are stored in the NPU internal memory 120 in consideration of the scheduling order.

NPU 내부 메모리(120)는 NPU(100)의 추론 연산이 지속되는 동안 NPU 내부 메모리(120)에 저장된 연결망들의 가중치 데이터를 보존하도록 구성될 수 있다. 따라서 메모리 읽기 쓰기 동작을 저감할 수 있는 효과가 있다.The NPU internal memory 120 may be configured to preserve weight data of connection networks stored in the NPU internal memory 120 while the inference operation of the NPU 100 continues. Therefore, there is an effect of reducing memory read and write operations.

즉, NPU 내부 메모리(120)는 추론 연산이 지속되는 동안 NPU 내부 메모리(120)에 저장된 MAC 연산 값을 재사용 하도록 구성될 수 있다.That is, the NPU internal memory 120 may be configured to reuse the MAC operation value stored in the NPU internal memory 120 while the inference operation continues.

도 8a는 컨볼류션 신경망의 기본 구조를 설명하기 위한 도면이다.Figure 8a is a diagram for explaining the basic structure of a convolutional neural network.

도 8a를 참조하면, 컨볼류션 신경망은 하나 또는 여러 개의 컨볼류션 레이어(convolutional layer)와 통합 레이어(pooling layer), 완전하게 연결된 레이어(fully connected layer)들의 조합일 수 있다. Referring to FIG. 8A, a convolutional neural network may be a combination of one or more convolutional layers, a pooling layer, and a fully connected layer.

본 개시의 예시에서, 컨볼류션 신경망은 채널마다 채널의 입력 영상의 특징을 추출하는 커널이 존재한다. 커널은 2차원 행렬로 구성될 수 있으며, 입력 데이터를 순회하면서 합성곱 연산 수행한다. 커널의 크기는 임의로 결정될 수 있으며, 커널이 입력 데이터를 순회하는 간격(stride) 또한 임의로 결정될 수 있다. 커널 하나당 입력 데이터 전체에 대한 합성곱 결과는 특징맵(feature map) 또는 활성화 맵으로 지칭될 수 있다. 이하에서 커널은 일 세트의 가중치 값들 또는 복수의 세트의 가중치 값들을 포함할 수 있다. 각 레이어 별 커널의 개수는 채널의 개수로 지칭될 수 있다. 커널은 행렬 형식의 가중치로, 또는 커널은 가중치로 지칭될 수 있다.In the example of the present disclosure, the convolutional neural network has a kernel for each channel that extracts features of the input image of the channel. The kernel may be composed of a two-dimensional matrix and performs convolution operations while traversing the input data. The size of the kernel can be determined arbitrarily, and the interval (stride) at which the kernel traverses the input data can also be arbitrarily determined. The convolution result for all input data per kernel may be referred to as a feature map or activation map. Hereinafter, the kernel may include one set of weight values or multiple sets of weight values. The number of kernels for each layer may be referred to as the number of channels. Kernels may be referred to as weights in matrix form, or kernels may be referred to as weights.

이처럼 합성곱 연산은 입력 데이터와 커널의 조합으로 이루어진 연산이므로, 이후 비선형성을 추가하기 위한 활성화 함수가 적용될 수 있다. 합성곱 연산의 결과인 특징맵에 활성화 함수가 적용되면 활성화 맵으로 지칭될 수 있다. In this way, since the convolution operation is an operation consisting of a combination of input data and a kernel, an activation function to add nonlinearity can be applied later. When an activation function is applied to a feature map that is the result of a convolution operation, it may be referred to as an activation map.

구체적으로 도 8a를 참조하면, 컨볼류션 신경망은 적어도 하나의 컨볼류션 레이어, 적어도 하나의 풀링 레이어, 및 적어도 하나의 완전 연결 레이어를 포함한다. Referring specifically to FIG. 8A, the convolutional neural network includes at least one convolutional layer, at least one pooling layer, and at least one fully connected layer.

예를 들면, 합성곱(컨볼류션)은, 입력 데이터의 크기(통상적으로 1Х1, 3Х3 또는 5Х5 행렬)와 출력 특징 맵(Feature Map)의 깊이(커널의 수)와 같은 두 개의 주요 파라미터에 의해 정의될 수 있다. 이러한 주요 파라미터는 합성곱에 의해 연산 될 수 있다. 이들 합성곱은, 깊이 32에서 시작하여, 깊이 64로 계속되며, 깊이 128 또는 256에서 종료될 수 있다. 합성곱 연산은, 입력 데이터인 입력 이미지 행렬 위로 3Х3 또는 5Х5 크기의 커널(kernel)을 슬라이딩하여 커널의 각 가중치와 겹쳐지는 입력 이미지 행렬의 각 원소를 곱한 후 이들을 모두 더하는 연산을 의미할 수 있다.For example, convolution is based on two main parameters: the size of the input data (usually 1Х1, 3Х3 or 5Х5 matrices) and the depth of the output feature map (number of kernels). can be defined. These key parameters can be computed by convolution. These convolutions may start at depth 32, continue to depth 64, and end at depth 128 or 256. The convolution operation may refer to an operation that slides a kernel of size 3Х3 or 5Х5 over the input image matrix, which is input data, multiplies each weight of the kernel by each element of the overlapping input image matrix, and then adds them all together.

이와 같이 생성된 출력 특징맵에 활성화 함수가 적용되어 활성화 맵이 최종적으로 출력될 수 있다. 또한, 현재 레이어에서의 사용된 가중치는 합성곱을 통해 다음 레이어에 전달될 수 있다. 풀링 레이어는 출력 데이터(즉, 활성화 맵)을 다운 샘플링하여 특징맵의 크기를 줄이는 풀링 연산을 수행할 수 있다. 예를 들어, 풀링 연산은 최대 풀링(max pooling) 및/또는 평균 풀링(average pooling)을 포함할 수 있으나, 이에 한정되지 않는다. An activation function is applied to the output feature map generated in this way, and the activation map can be finally output. Additionally, the weights used in the current layer can be passed to the next layer through convolution. The pooling layer can perform a pooling operation to reduce the size of the feature map by downsampling the output data (i.e., activation map). For example, the pooling operation may include, but is not limited to, max pooling and/or average pooling.

최대 풀링 연산은 커널을 이용하며, 특징맵과 커널이 슬라이딩되어 커널과 겹쳐지는 특징맵의 영역에서 최대 값을 출력한다. 평균 풀링 연산은 특징맵과 커널이 슬라이딩되어 커널과 겹쳐지는 특징맵의 영역 내에서 평균값을 출력한다. 이처럼 풀링 연산에 의해 특징맵의 크기가 줄어들기 때문에 특징맵의 가중치 개수 또한 줄어든다.The maximum pooling operation uses a kernel, and the feature map and kernel are slid to output the maximum value in the area of the feature map that overlaps the kernel. The average pooling operation slides the feature map and the kernel to output the average value within the area of the feature map that overlaps the kernel. As the size of the feature map is reduced by the pooling operation, the number of weights in the feature map is also reduced.

완전 연결 레이어는 풀링 레이어를 통해서 출력된 데이터를 복수의 클래스(즉, 추정값)로 분류하고, 분류된 클래스 및 이에 대한 점수(score)를 출력할 수 있다. 풀링 레이어를 통해서 출력된 데이터는 3차원 특징맵 형태를 이루며, 이러한 3차원 특징맵이 1차원 벡터로 변환되어 완전 연결 레이어로 입력될 수 있다.The fully connected layer can classify data output through the pooling layer into multiple classes (i.e., estimated values) and output the classified classes and their scores. The data output through the pooling layer takes the form of a 3D feature map, and this 3D feature map can be converted into a 1D vector and input into a fully connected layer.

도 8b은 컨볼류션 신경망의 동작을 이해하기 쉽게 나타낸 종합도이다.Figure 8b is a comprehensive diagram showing the operation of a convolutional neural network in an easy-to-understand manner.

도 8b를 참조하면, 예시적으로 입력 이미지가 6 x 6 크기를 갖는 2차원적 행렬인 것으로 나타나 있다. 또한, 도 8b에는 예시적으로 3개의 채널, 즉 채널 1, 채널 2, 채널 3이 사용되는 것으로 나타내었다.Referring to FIG. 8B, the input image is exemplarily shown as a two-dimensional matrix with a size of 6 x 6. In addition, Figure 8b shows that three channels, that is, channel 1, channel 2, and channel 3, are used as an example.

먼저, 합성곱 동작에 대해서 설명하기로 한다. First, let's explain the convolution operation.

입력 이미지(도 8b에서는 예시적으로 6 x 6 크기인 것으로 나타내어짐)는 첫 번째 노드에서 채널 1을 위한 커널 1(도 8b에서는 예시적으로 3 x 3 크기인 것으로 나타내어짐)과 합성곱되고, 그 결과로서 특징맵1(도 8b에서는 예시적으로 4 x 4 크기인 것으로 나타내어짐)이 출력된다. 또한, 상기 입력 이미지(도 8b에서는 예시적으로 6 x 6 크기인 것으로 나타내어짐)는 두 번째 노드에서 채널 2를 위한 커널 2(도 8b에서는 예시적으로 3 x 3 크기인 것으로 나타내어짐)와 합성곱되고 그 결과로서 특징맵 2(도 8b에서는 예시적으로 4 x 4 크기인 것으로 나타내어짐)가 출력된다. 또한, 상기 입력 이미지는 세 번째 노드에서 채널 3을 위한 커널 3(도 8b에서는 예시적으로 3 x 3 크기인 것으로 나타내어짐)과 합성곱되고, 그 결과로서 특징맵3(도 8b에서는 예시적으로 4 x 4 크기인 것으로 나타내어짐)이 출력된다. The input image (illustratively shown to have a size of 6 x 6 in Figure 8B) is convolved with kernel 1 for channel 1 (illustrated to have a size of 3 x 3 in Figure 8B) at the first node, As a result, feature map 1 (illustratively shown as having a size of 4 x 4 in FIG. 8B) is output. Additionally, the input image (illustratively shown to have a size of 6 x 6 in FIG. 8B) is synthesized with kernel 2 for channel 2 (illustrated to have a size of 3 x 3 in FIG. 8B) at the second node. It is multiplied, and feature map 2 (illustratively shown as having a size of 4 x 4 in FIG. 8B) is output as a result. In addition, the input image is convolutioned with kernel 3 for channel 3 (illustratively shown as having a size of 3 x 3 in FIG. 8B) at the third node, and as a result, feature map 3 (illustratively shown in FIG. 8B (indicated to be 4 x 4 in size) is output.

각각의 합성곱을 처리하기 위해서 NPU(100)의 프로세싱 엘리먼트들(PE1 to PE12)은 MAC 연산을 수행하도록 구성된다.In order to process each convolution, the processing elements (PE1 to PE12) of the NPU 100 are configured to perform MAC operation.

다음으로, 활성화 함수의 동작에 대해서 설명하기로 한다.Next, we will explain the operation of the activation function.

합성곱 동작으로부터 출력되는 특징맵1, 특징맵2 그리고 특징맵3(도 8b에서는 각각의 크기는 예시적으로 4 x 4인 것으로 나타내어짐)에 대해서 활성화 함수가 적용될 수 있다. 활성화 함수가 적용되고 난 이후의 출력은 예시적으로 4 x 4 의 크기일 수 있다.An activation function can be applied to feature map 1, feature map 2, and feature map 3 (each size is exemplarily shown as 4 x 4 in FIG. 8B) output from the convolution operation. The output after the activation function is applied may, for example, have a size of 4 x 4.

다음으로, 폴링(pooling) 동작에 대해서 설명하기로 한다.Next, the polling operation will be explained.

상기 활성화 함수로부터 출력되는 특징맵1, 특징맵2, 특징맵3(도 8b에서는 각각의 크기는 예시적으로 4 x 4인 것으로 나타내어짐)은 3개의 노드로 입력된다. 활성화 함수로부터 출력되는 특징맵들을 입력으로 받아서 폴링(pooling)을 수행할 수 있다. 상기 폴링이라 함은 크기를 줄이거나 행렬 내의 특정 값을 강조할 수 있다. 폴링 방식으로는 최대값 폴링과 평균 폴링, 최소값 폴링이 있다. 최대값 폴링은 행렬의 특정 영역 안에 값의 최댓값을 모으기 위해서 사용되고, 평균 폴링은 특정 영역내의 평균을 구하기 위해서 사용될 수 있다.Feature map 1, feature map 2, and feature map 3 output from the activation function (each size is exemplarily shown as 4 x 4 in FIG. 8B) are input as three nodes. Polling can be performed by receiving feature maps output from the activation function as input. The polling can reduce the size or emphasize specific values in the matrix. Polling methods include maximum polling, average polling, and minimum polling. Maximum polling can be used to collect the maximum value within a specific region of a matrix, and average polling can be used to find the average within a specific region.

도 8b의 예시에서는 4 x 4 크기의 특징맵이 폴링에 의하여 2 x 2 크기로 줄어지는 것으로 나타내었다.In the example of Figure 8b, a feature map of size 4 x 4 is shown to be reduced to size of 2 x 2 by polling.

구체적으로, 첫 번째 노드는 채널 1을 위한 특징맵1을 입력으로 받아 폴링을 수행한 후, 예컨대 2 x 2 행렬로 출력한다. 두 번째 노드는 채널 2을 위한 특징맵2을 입력으로 받아 폴링을 수행한 후, 예컨대 2 x 2 행렬로 출력한다. 세 번째 노드는 채널 3을 위한 특징맵3을 입력으로 받아 폴링을 수행한 후, 예컨대 2 x 2 행렬로 출력한다. Specifically, the first node receives feature map 1 for channel 1 as input, performs polling, and outputs it as, for example, a 2 x 2 matrix. The second node receives feature map 2 for channel 2 as input, performs polling, and outputs it as, for example, a 2 x 2 matrix. The third node receives feature map 3 for channel 3 as input, performs polling, and outputs it as, for example, a 2 x 2 matrix.

전술한 합성곱, 활성화 함수과 폴링이 반복되고 최종적으로는, 도 8a과 같이 fully connected로 출력될 수 있다. 해당 출력은 다시 이미지 인식을 위한 인공 신경망으로 입력될 수 있다. 단, 본 개시는 특징맵, 커널의 크기에 제한되지 않는다.The above-described convolution, activation function, and polling are repeated, and finally, fully connected can be output as shown in FIG. 8a. The output can be input back into an artificial neural network for image recognition. However, the present disclosure is not limited to the size of the feature map or kernel.

<VCM(Video coding for Machines)><VCM(Video coding for Machines)>

최근에 Surveillance, Intelligent Transportation, Smart City, Intelligent Industry, Intelligent Content와 같은 다양한 산업 분야가 발전함에 따라 기계에 의해 소비되는 영상 또는 특징맵 데이터양이 증가하고 있다. 이에 반해, 현재 사용 중인 전통적인 영상 압축방식은 시청자가 인지하는 시각(Human Vision)의 특성을 고려해 개발된 기술이기에 불필요한 정보들을 포함하고 있어 기계 임무 수행에 비효율적이다. 따라서, 기계 임무 수행에 대해 효율적으로 특징맵을 압축하기 위한 비디오 코덱 기술에 관한 연구가 요구되고 있다.Recently, as various industrial fields such as Surveillance, Intelligent Transportation, Smart City, Intelligent Industry, and Intelligent Content develop, the amount of image or feature map data consumed by machines is increasing. In contrast, the traditional video compression method currently in use is a technology developed considering the characteristics of human vision as perceived by viewers, and therefore contains unnecessary information, making it inefficient in performing machine tasks. Therefore, research on video codec technology to efficiently compress feature maps for machine mission performance is required.

멀티미디어 부호화 국제표준화 그룹인 MPEG(Moving Picture Experts Group)에서 VCM(Video Coding for Machine) 기술이 논의되고 있다. VCM은 사람이 보는 시청자 시각 기준이 아닌 기계의 데이터 소비시각(Machine Vision)에 대한 기준의 영상 또는 특징맵 부호화 기술이다.Video Coding for Machine (VCM) technology is being discussed at MPEG (Moving Picture Experts Group), an international standardization group for multimedia encoding. VCM is an image or feature map encoding technology that is based on the machine's data consumption vision (Machine Vision) rather than the human viewer's vision.

<본 명세서의 개시에 대한 설명><Description of the disclosure of this specification>

도 9a 내지 도 9d는 VCM 인코더를 포함하는 NPU와 VCM 디코더를 포함하는 NPU를 나타낸 예시도들이다.Figures 9a to 9d are illustrations showing an NPU including a VCM encoder and an NPU including a VCM decoder.

도 9a을 참조하면, 제1 NPU(100a)는 VCM 인코더(150a)를 포함할 수 있고, 제2 NPU(100b)는 VCM 디코더(150b)를 포함할 수 있다.Referring to FIG. 9A, the first NPU (100a) may include a VCM encoder (150a), and the second NPU (100b) may include a VCM decoder (150b).

제1 NPU(100a) 내의 VCM 인코더(150a)가 비디오 및/또는 특징맵을 인코딩하여 비트스트림으로 전송하면, 제2 NPU(100b) 내의 VCM 디코더(150b)는 상기 비트스트림을 디코딩하여 출력할 수 있다. 이때, 상기 제2 NPU(100b) 내의 VCM 디코더(150b)는 하나 이상의 비디오 및/또는 특징맵을 출력할 수 있다. 예를 들어, 상기 제2 NPU(100b) 내의 VCM 디코더(150b)는 머신을 이용한 분석을 위한 제1 특징맵을 출력할 수 있고, 사용자에 의한 시청을 위한 제1 영상을 출력할 수 있다. 상기 제1 영상은 상기 제1 특징맵에 비하여 보다 고해상도일 수 있다.When the VCM encoder (150a) in the first NPU (100a) encodes the video and/or feature map and transmits it as a bitstream, the VCM decoder (150b) in the second NPU (100b) can decode and output the bitstream. there is. At this time, the VCM decoder 150b within the second NPU 100b may output one or more videos and/or feature maps. For example, the VCM decoder 150b in the second NPU 100b can output a first feature map for analysis using a machine and output a first image for viewing by a user. The first image may have higher resolution than the first feature map.

도 9b를 참조하면, 제1 NPU(100a)는 특징맵을 추출하는 특징 추출기(Feature Extractor)와 VCM 인코더(150a)를 포함할 수 있다. Referring to FIG. 9B, the first NPU 100a may include a feature extractor and a VCM encoder 150a that extract a feature map.

상기 제1 NPU(100a) 내의 VCM 인코더(150a)는 특징 인코더를 포함할 수 있다. 제2 NPU(100b)는 VCM 디코더(150b)를 포함할 수 있다. 상기 제2 NPU(100b) 내의 VCM 디코더(150b)는 특징 디코더와 비디오 재생성기(Video reconstructor)를 포함할 수 있다. 상기 특징 디코더는 비트스트림으로부터 특징맵을 디코딩하여, 머신을 이용한 분석을 위한 제1 특징맵을 출력할 수 있다. 상기 비디오 재생성기는 비트스트림으로부터 사용자에 의한 시청을 위한 제1 영상을 재생성하여 출력할 수 있다.The VCM encoder 150a within the first NPU 100a may include a feature encoder. The second NPU (100b) may include a VCM decoder (150b). The VCM decoder 150b in the second NPU 100b may include a feature decoder and a video reconstructor. The feature decoder may decode a feature map from a bitstream and output a first feature map for analysis using a machine. The video regenerator may reproduce and output a first video for viewing by a user from a bitstream.

도 9c 참조하면, 제1 NPU(100a)는 특징맵을 추출하는 특징 추출기(Feature Extractor)와 VCM 인코더(150a)를 포함할 수 있다. Referring to FIG. 9C, the first NPU 100a may include a feature extractor and a VCM encoder 150a that extract a feature map.

상기 제1 NPU(100a) 내의 VCM 인코더(150a)는 특징 인코더를 포함할 수 있다. 제2 NPU(100b)는 VCM 디코더(150b)를 포함할 수 있다. 상기 제2 NPU(100b) 내의 VCM 디코더(150b)는 특징 디코더를 포함할 수 있다. 상기 특징 디코더는 비트스트림으로부터 특징맵을 디코딩하여, 머신을 이용한 분석을 위한 제1 특징맵을 출력할 수 있다. 즉, 비트스트림은 영상이 아닌 특징맵으로만 인코딩 될 수 있다. 부연 설명하면, 특징맵은 영상을 기초로 머신의 특정 타스크를 처리하기 위한 특징에 대한 정보를 포함한 데이터 일 수 있다.The VCM encoder 150a within the first NPU 100a may include a feature encoder. The second NPU (100b) may include a VCM decoder (150b). The VCM decoder 150b within the second NPU 100b may include a feature decoder. The feature decoder can decode a feature map from a bitstream and output a first feature map for analysis using a machine. In other words, the bitstream can be encoded only as a feature map, not as an image. To elaborate, a feature map may be data containing information about features for processing a specific task of a machine based on an image.

도 9d를 참조하면, 제1 NPU(100a)는 특징맵을 추출하는 특징 추출기(Feature Extractor)와 VCM 인코더(150a)를 포함할 수 있다. Referring to FIG. 9D, the first NPU 100a may include a feature extractor and a VCM encoder 150a that extract a feature map.

상기 제1 NPU(100a) 내의 VCM 인코더(150a)는 특징 컨버터와 비디오 인코더를 포함할 수 있다. 제2 NPU(100b)는 VCM 디코더(150b)를 포함할 수 있다. 상기 제2 NPU(100b)내의 VCM 디코더(150b)는 비디오 디코더와 인버스 컨버터를 포함할 수 있다.The VCM encoder 150a within the first NPU 100a may include a feature converter and a video encoder. The second NPU (100b) may include a VCM decoder (150b). The VCM decoder 150b within the second NPU 100b may include a video decoder and an inverse converter.

도 9b 내지 도 9d에 도시된 특징 추출기는 도 4 또는 도 6에 도시된 상기 NPU(100) 내의 복수의 PE들(110)에 해당할 수 있다. 또는, 도 9b 내지 도 9d에 도시된 특징 추출기는 상기 NPU(100) 내의 복수의 PE들(110)과 전술한 SFU의 조합에 해당할 수 있다.The feature extractor shown in FIGS. 9B to 9D may correspond to a plurality of PEs 110 in the NPU 100 shown in FIG. 4 or 6. Alternatively, the feature extractor shown in FIGS. 9B to 9D may correspond to a combination of a plurality of PEs 110 in the NPU 100 and the SFU described above.

이상과 같이, 도 9a 내지 도 9d에서는 제1 NPU(100a)는 적어도 VCM 인코더(150a)를 포함하고, 제2 NPU(100b)는 적어도 VCM 디코더(150b)를 포함하는 것으로 나타나 있다. 단, 이에 제한되지 않으며, VCM 인코더(150a)가 제1 NPU(100a)를 포함하도록 변형실시 될 수 있거나, VCM 디코더(150b)가 제2 NPU(100b)를 포함하도록 변형실시 될 수 있다.As described above, in FIGS. 9A to 9D, the first NPU (100a) includes at least a VCM encoder (150a), and the second NPU (100b) includes at least a VCM decoder (150b). However, the present invention is not limited to this, and the VCM encoder 150a may be modified to include the first NPU 100a, or the VCM decoder 150b may be modified to include the second NPU 100b.

제1 NPU(100a)는 인공지능 연산(예를 들면, 컨볼류션(convolution))을 처리하여 특징맵을 생성할 수 있다. 제1 NPU(100a)는 인공지능 연산을 처리하여 특징맵을 인코딩한 후, 전송할 수 있다.The first NPU 100a may generate a feature map by processing an artificial intelligence operation (eg, convolution). The first NPU (100a) can process artificial intelligence operations, encode the feature map, and then transmit it.

제2 NPU(100b)는 상기 인코딩된 특징맵을 수신할 수 있다. 상기 제2 NPU(100b)는 인공지능 연산(예를 들면, 디컨볼류선(deconvolution))을 처리하여 인코딩된 특징맵을 디코딩할 수 있다. The second NPU 100b may receive the encoded feature map. The second NPU 100b may decode the encoded feature map by processing an artificial intelligence operation (eg, deconvolution).

인공지능 연산을 처리하기 위해서 특정 구조의 인공신경망모델이 사용될 수 있다. 예를 들면, 특징맵 추출을 위해서 NPU는 컨볼류션 연산을 처리할 수 있다. 예를 들면, 특징맵 인코딩을 위해서 NPU는 컨볼류션 연산을 처리할 수 있다. 예를 들면, 인코딩된 특징맵 디코딩을 위해서 NPU는 디컨볼류션 연산을 처리할 수 있다.To process artificial intelligence calculations, an artificial neural network model with a specific structure can be used. For example, to extract feature maps, the NPU can process convolution operations. For example, to encode feature maps, the NPU can process convolution operations. For example, to decode an encoded feature map, the NPU can process a deconvolution operation.

인공신경망모델은 다층 구조일 수 있으며, 인공신경망모델은 백본(backbone) 네트워크를 포함할 수 있다. 제1 NPU(100a)의 인공지능 연산을 통해 생성된 특징맵은 다층 구조의 인공신경망모델의 특정 층에서 생성된 특징맵일 수 있다. 즉, 특징맵은 다층 구조의 인공신경망모델의 적어도 하나의 층에서 생성된 적어도 하나의 특징맵일 수 있다. 다층 구조의 인공신경망모델의 특정 층에서 생성된 특징맵은 특정 머신을 이용한 분석에 적합한 특징맵일 수 있다.The artificial neural network model may have a multi-layer structure, and the artificial neural network model may include a backbone network. The feature map generated through the artificial intelligence operation of the first NPU 100a may be a feature map generated in a specific layer of a multi-layer artificial neural network model. That is, the feature map may be at least one feature map generated from at least one layer of an artificial neural network model with a multi-layer structure. A feature map generated from a specific layer of a multi-layer artificial neural network model may be a feature map suitable for analysis using a specific machine.

도 10a 및 도 10b는 인공신경망모델에서 비트스트림의 위치를 나타낸 예시도이다.Figures 10a and 10b are exemplary diagrams showing the positions of bitstreams in the artificial neural network model.

도 10a을 참고하여 알 수 있는 바와 같이, 제1 NPU(100a) 또는 VCM 인코더는 비디오를 입력받으면, 인공신경망모델(예컨대, 컨볼류션 네트워크 모델)을 이용하여, 각 레이어별로 각각의 특징맵들을 생성할 수 있다. 도 10a에서는 컨볼루션 네트워크 모델의 마지막인 레이어에 해당하는 완전 연결된 레이어(fully connected layer)에서의 특징맵을 비트스트림으로 전송하는 예가 나타나 있다. As can be seen with reference to FIG. 10A, when the first NPU (100a) or the VCM encoder receives video, it uses an artificial neural network model (e.g., a convolutional network model) to create each feature map for each layer. can be created. Figure 10a shows an example of transmitting a feature map in a fully connected layer corresponding to the last layer of the convolutional network model as a bitstream.

그러면, 제2 NPU(100b) 또는 VCM 디코더는 디컨볼류션 네트워크 모델을 이용하여 상기 특징맵을 포함하는 비트스트림을 디코딩할 수 있다.Then, the second NPU (100b) or the VCM decoder can decode the bitstream including the feature map using a deconvolution network model.

한편, 도 10b를 참고하면, 완전 연결된 레이어(fully connected layer)에서의 특징맵이 비트스트림으로 전송되는 것이 아니라, 인공신경망모델(예컨대, 컨볼류션 네트워크 모델)의 중간 레이어에서 생성된 특징맵들이 비트스트림으로 전송되는 예가 나타나 있다.Meanwhile, referring to FIG. 10b, the feature maps from the fully connected layer are not transmitted as a bitstream, but the feature maps generated from the middle layer of the artificial neural network model (e.g., convolutional network model) are An example of transmission as a bitstream is shown.

도 11a은 특징맵을 압축한 후 비트스트림으로 전송하는 VCM 인코더와 수신된 비트스트림을 복원하는 VCM 디코더를 일 예시에 따라 나타내고, 도 11b는 도 11a에 도시된 특징맵 P2 내지 특징맵 P5를 생성하는 예를 나타낸다. 그리고, 도 11c는 도 11a에 도시된 MSFF 수행부를 자세하게 나타낸 예시도이다.FIG. 11A shows a VCM encoder that compresses a feature map and transmits it as a bitstream, and a VCM decoder that restores the received bitstream, according to an example, and FIG. 11B generates feature maps P2 to P5 shown in FIG. 11A. Shows an example. And, FIG. 11C is an example diagram showing the MSFF execution unit shown in FIG. 11A in detail.

도 11a을 참고하여 알 수 있는 바와 같이, VCM 인코더(150a)(혹은 송신단)은 MSFF(Multi-scale feature fusion) 수행부(150a-1)와, SSFC(Single-stream feature codec) 인코더(150a-2)를 포함할 수 있다. VCM 디코더(150b)(혹은 수신단)은 SSFC 디코더(150b-1)와 MSFR(Multi-Scale Feature Reconstruction) 수행부(150b-2)을 포함할 수 있다.As can be seen with reference to FIG. 11A, the VCM encoder 150a (or transmitter) includes a multi-scale feature fusion (MSFF) performing unit 150a-1 and a single-stream feature codec (SSFC) encoder 150a- 2) may be included. The VCM decoder 150b (or receiving end) may include an SSFC decoder 150b-1 and a Multi-Scale Feature Reconstruction (MSFR) performing unit 150b-2.

상기 MSFF 수행부(150a-1)는 P 레이어의 특징맵 P2 내지 특징맵 P5를 정렬(Align)시킨 후, 연접(Concatenate)시킨다. 상기 P 레이어의 특징맵 P2 내지 특징맵 P5는 도 11b에서 도시된 바와 같이 생성될 수 있다. 도 11b를 참조하여 설명하면, 제1 인공신경망 모델, 예컨대 ResNet과 제2 인공신경망 모델, 예컨대 FPN(Feature Pyramid Network)의 조합을 이용하여 특징맵 P2 내지 특징맵 P5가 생성될 수 있다. 상기 제1 인공신경망 모델은 백본(Back-bone)으로 불릴 수 있고, 상기 제2 인공신경망 모델은 넥(Neck) 혹은 헤드(Head)로 불릴 수 있다. 도 11b에 도시된 바와 같이 이미지가 입력되면 제1 인공신경망 모델(예컨대 ResNet)은 Bottom-up 방식으로 여러 단계들(예컨대, Stage 1에서 Stage 5)까지를 수행할 수 있다. 각 단계는 예를 들어, 컨볼류션, 배치 정규화(Batch Normalization), ReLu(Rectified Linear Unit) 등을 포함할 수 있다. 상기 제1 인공신경망 모델(예컨대 ResNet)의 각 단계로부터의 출력에 대해서는 컨볼류션이 수행되어, C 레이어의 특징맵 C2 내지 특징맵 C5가 생성될 수 있다. 상기 제2 인공신경망 모델(예컨대, FPN)은 상기 C 레이어의 특징맵 C2 내지 특징맵 C5을 입력받아, Top-Down 방식으로 누적하여 M 레이어의 특징맵 M2 내지 특징맵 M5를 생성할 수 있다. 상기 M 레이어의 특징맵 M2 내지 특징맵 M5에 대해서 각기 컨볼류션이 수행됨으로써, P 레이어의 특징맵 P2 내지 특징맵 P5가 생성될 수 있다.The MSFF performing unit 150a-1 aligns the feature maps P2 to P5 of the P layer and then concatenates them. Feature maps P2 to P5 of the P layer can be generated as shown in FIG. 11B. Referring to FIG. 11B , feature maps P2 to P5 may be generated using a combination of a first artificial neural network model, such as ResNet, and a second artificial neural network model, such as FPN (Feature Pyramid Network). The first artificial neural network model may be called a backbone, and the second artificial neural network model may be called a neck or head. As shown in FIG. 11B, when an image is input, the first artificial neural network model (eg, ResNet) can perform several stages (eg, Stage 1 to Stage 5) in a bottom-up manner. Each step may include, for example, convolution, batch normalization, ReLu (Rectified Linear Unit), etc. Convolution may be performed on the output from each stage of the first artificial neural network model (eg, ResNet) to generate feature maps C2 to C5 of the C layer. The second artificial neural network model (eg, FPN) may receive feature maps C2 to C5 of the C layer and accumulate them in a top-down manner to generate feature maps M2 to M5 of the M layer. By performing convolution on the feature maps M2 to M5 of the M layer, feature maps P2 to P5 of the P layer can be generated.

다시 도 11a를 참조하면, 상기 MSFF 수행부(150a-1)는 P 레이어의 특징맵 P2 내지 특징맵 P5를 정렬(Align)시킨 후, 연접(Concatenate)시킨다. 구체적으로, 상기 MSFF 수행부(150a-1)는 상기 특징맵 P5의 사이즈에 맞추어 특징맵 P2 내지 특징맵 P4의 사이즈를 다운샘플링한 후, 연접시킨다. Referring again to FIG. 11A, the MSFF performing unit 150a-1 aligns the feature maps P2 to P5 of the P layer and then concatenates them. Specifically, the MSFF performing unit 150a-1 downsamples the size of the feature maps P2 to P4 to match the size of the feature map P5, and then concatenates them.

도 11c를 참조하여 자세히 설명하면, 상기 MSFF 수행부(150a-1)는 특징맵 P2 내지 특징맵 P5 각각에 대하여 풀링(pooling)을 수행한다. 상기 풀링에 의하여, 특징맵 P2 내지 특징맵 P5 각각은 특정 크기, 예컨대 64 x 64 크기 혹은 32 x 32 크기로 줄어들 수 있다. 또는, 특징맵 P2 내지 특징맵 P5 중에서 가장 작은 크기를 갖는 특징맵 P5을 기준으로 나머지 특징맵들(즉, 특징맵 P2, 특징맵 P3 및 P4)이 동일 크기를 갖도록 할 수 있다. 즉, 나머지 특징맵들(즉, 특징맵 P2, 특징맵 P3 및 P4) 각각에 대해서 풀링(pooling)을 수행하여, 특징맵 P5 크기와 동일하게 만들 수 있다. In detail with reference to FIG. 11C, the MSFF performing unit 150a-1 performs pooling on each of the feature maps P2 to P5. By the pooling, each of the feature maps P2 to P5 can be reduced to a specific size, for example, 64 x 64 or 32 x 32. Alternatively, the remaining feature maps (i.e., feature maps P2, feature maps P3, and P4) may be made to have the same size based on feature map P5, which has the smallest size among feature maps P2 to P5. That is, pooling can be performed on each of the remaining feature maps (i.e., feature maps P2, feature maps P3, and P4) to make the size the same as feature map P5.

그런 다음, 상기 MSFF 수행부(150a-1)는 특징맵 P2 내지 특징맵 P5를 연접시킬 수 있다. 예를 들어 특징맵 P2 내지 특징맵 P5 각각이 64 x 64 크기이면서 256 채널인 큐브(cube) 형태인 경우, 연접후에는 64 x 64 크기이면서 1024 채널인 큐브 형태로 될 수 있다. Then, the MSFF performing unit 150a-1 can concatenate feature maps P2 to P5. For example, if feature maps P2 to P5 each have a cube shape of 64

상기 연접된 특징맵들은 SEblock을 통과할 수 있다. The concatenated feature maps can pass through the SEblock.

다시 도 11a를 참조하면, 상기 SEBlock은 SE(Squeeze-and-Excitation)에 의한 처리 동작으로서, 피쳐맵의 채널별 가중치를 계산하고, 이 가중치를 residual unit의 출력 피쳐맵에 곱해줍니다. 또한, 상기 MSFF 수행부는 상기 SEBlock의 출력에 대하여 컨볼류션을 이용하여 채널 방향의 축소(channel-wise reduction)를 수행할 수 있다. 상기 MSFF 수행부는 최종적으로 출력 F를 상기 SSFC 인코더(150a-2)로 전달할 수 있다.상기 SSFC 인코더(150a-2)는 상기 MSFF 수행부(150a-1)로부터의 출력 F를 입력받으면, 채널의 개수를 축소시킨 후, 비트스트림을 전송할 수 있다. 이를 위하여, 상기 SSFC 인코더(150a-2)는 컨볼류션과, 배치 정규화 그리고 Tanh 함수를 포함할 수 있다.Referring again to FIG. 11A, the SEBlock is a processing operation based on SE (Squeeze-and-Excitation), which calculates a weight for each channel of the feature map and multiplies this weight by the output feature map of the residual unit. Additionally, the MSFF performing unit may perform channel-wise reduction on the output of the SEBlock using convolution. The MSFF performing unit may finally transmit the output F to the SSFC encoder (150a-2). When the SSFC encoder (150a-2) receives the output F from the MSFF performing unit (150a-1), the channel After reducing the number, the bitstream can be transmitted. To this end, the SSFC encoder 150a-2 may include convolution, batch normalization, and Tanh functions.

상기 VCM 디코더(150b)(즉, 수신단)은 MSFR 수행부(150b-1)와 SSFC 디코더(150b-2)를 포함할 수 있다. 상기 SSFC 디코더(150b-2)는 상기 비트스트림을 수신하면, 출력 F'를 생성할 수 있다. 이를 위하여, 상기 SSFC 디코더(150b-2)는 컨볼류션과, 배치 정규화 그리고 PReLu 등을 포함할 수 있다.The VCM decoder 150b (i.e., receiving end) may include an MSFR performing unit 150b-1 and an SSFC decoder 150b-2. When the SSFC decoder 150b-2 receives the bitstream, it can generate output F'. To this end, the SSFC decoder 150b-2 may include convolution, batch normalization, PReLu, etc.

상기 VCM 디코더(150b)의 MSFR 수행부(150b-1)는 상기 SSFC 디코더(150b-2)로부터의 출력 F'로부터 P' 레이어의 특징맵 P2' 내지 특징맵 P5'을 복원해낼 수 있다. 이를 위하여, 상기 MSFR 수행부(150b-1)는 업 샘플링/다운 샘플링과 누적 등을 수행할 수 있다. The MSFR performing unit 150b-1 of the VCM decoder 150b can restore feature maps P2' to feature maps P5' of the P' layer from the output F' from the SSFC decoder (150b-2). To this end, the MSFR performing unit 150b-1 may perform up-sampling/down-sampling and accumulation.

도 12는 도 11a의 변형예를 나타낸 예시도이다.FIG. 12 is an exemplary diagram showing a modification of FIG. 11A.

이하, 도 11a과 다른 부분에 대해서만 설명하고 동일한 부분에 대해서는 중복하여 설명하지 않고, 도 11a에 대한 설명 내용을 원용하기로 한다.Hereinafter, only the parts that are different from those of FIG. 11A will be described, and the same parts will not be repeatedly explained, and the description of FIG. 11A will be used.

도 12를 참조하여 알 수 있는 바와 같이, VCM 인코더(150a)는 컴프레서(Compressor)(150a-3)을 더 포함할 수 있다. 그리고 VCM 디코더(150b)는 디컴프레서(Decompressor)(150b-3)를 더 포함할 수 있다.As can be seen with reference to FIG. 12, the VCM encoder 150a may further include a compressor 150a-3. And the VCM decoder 150b may further include a decompressor 150b-3.

상기 VCM 인코더(150a)의 MSFF 수행부(150a-1)는 도 9b 내지 도 9d에 도시된 특징맵 추출기로부터 추출된 복수의 특징맵들 중에서 하나 이상을 선택적으로 입력받을 수 있다. 구체적인 예를 들면, 도 9b 내지 도 9d에 도시된 특징맵 추출기가 도 11b에 도시된 바와 같이 특징맵 P2 내지 특징맵 P5를 추출하였다고 가정해보자. 그러면, 상기 VCM 인코더(150a)의 MSFF 수행부(150a-1)는 상기 특징맵 P2 내지 특징맵 P5 중에서 하나 이상의 특징맵을 필요에 따라 선택적으로 입력받을 수 있다. 도 12의 예시에서는, 상기 특징맵 P2 내지 특징맵 P5 중에서, 특징맵 P2, 특징맵 P3 그리고 특징맵 P5를 선택적으로 상기 VCM 인코더(150a)의 MSFF 수행부(150a-1)가 입력받는 것으로 나타내어져 있다.The MSFF performing unit 150a-1 of the VCM encoder 150a may selectively receive one or more of the plurality of feature maps extracted from the feature map extractor shown in FIGS. 9B to 9D. For a specific example, let's assume that the feature map extractor shown in FIGS. 9B to 9D extracts feature maps P2 to P5 as shown in FIG. 11B. Then, the MSFF performing unit 150a-1 of the VCM encoder 150a can selectively receive one or more feature maps from among the feature maps P2 to P5 as needed. In the example of FIG. 12, among the feature maps P2 to P5, the MSFF performance unit 150a-1 of the VCM encoder 150a is shown to selectively receive feature maps P2, P3, and P5. It's messy.

상기 VCM 인코더(150a) 내의 컴프레서(150a-3)는 상기 SSFC 인코더(150a-2)로부터의 출력을 압축할 수 있다. 상기 압축을 위하여, 상기 VCM 인코더(150a) 내의 컴프레서(150a-3)는 VVC(Versatile Video Coding)(혹은 H.266), CABAC(context-based adaptive binary arithmetic coding), PCA(principal component analysis), DCT(discrete cosine transform) 등을 수행할 수 있다. 또는 상기 압축을 위하여, 상기 VCM 인코더(150a) 내의 컴프레서(150a-3)는 그 밖에 엔트로피 코딩(entropy coding) 기법 등을 이용할 수 있다.The compressor 150a-3 in the VCM encoder 150a may compress the output from the SSFC encoder 150a-2. For the compression, the compressor 150a-3 in the VCM encoder 150a uses Versatile Video Coding (VVC) (or H.266), context-based adaptive binary arithmetic coding (CABAC), principal component analysis (PCA), DCT (discrete cosine transform), etc. can be performed. Alternatively, for the compression, the compressor 150a-3 in the VCM encoder 150a may use an entropy coding technique or the like.

이와 같이 상기 압축을 수행하게 되면, 전송되는 비트스트림의 크기가 크게 줄어들 수 있어, 네트워크 대역폭을 절약할 수 있게 된다.When the compression is performed in this way, the size of the transmitted bitstream can be greatly reduced, thereby saving network bandwidth.

상기 VCM 디코더(150b)의 디컴프레서(150b-3)은 수신되는 비트스트림을 압축 해제할 수 있다. 이를 위하여, 상기 VCM 디코더(150b)의 디컴프레서(150b-3)는 VVC(즉, H.266), IDCT(Inverse DCT), IPCA(Inverse PCA) 등을 수행할 수 있다. The decompressor 150b-3 of the VCM decoder 150b can decompress the received bitstream. To this end, the decompressor 150b-3 of the VCM decoder 150b can perform VVC (i.e., H.266), Inverse DCT (IDCT), Inverse PCA (IPCA), etc.

상기 VCM 디코더(150b)의 MSFR 수행부(150b-1)는 상기 SSFC 디코더(150b-2)로부터의 출력 F' 로부터 특징맵 P2' 내지 특징맵 P5'을 복원해낼 수 있다. 그리고, 상기 VCM 디코더(150b)의 MSFR 수행부(150b-1)는 상기 복원된 특징맵 P2' 내지 특징맵 P5' 중에서 하나 이상을 각 태스크로 전달할 수 있다. 상기 태스크는 예를 들면, 오브젝트 분류(classification), 오브젝트 검출(detection), 오브젝트 추적(tracking), 오브젝트 세그먼테이션(segmentation) 등을 포함할 수 있다. 즉, 상기 VCM 디코더(150b)의 MSFR 수행부(150b-1)는 상기 복원된 특징맵 P2' 내지 특징맵 P5'중에서 특징맵 P5'는 태스크#1로 전달할 수 있고, 특징맵 P2', 특징맵 P3' 그리고 특징맵 P4'를 태스크#2로 전달할 수 있다.The MSFR performing unit 150b-1 of the VCM decoder 150b can restore feature maps P2' to feature maps P5' from the output F' from the SSFC decoder (150b-2). Additionally, the MSFR performing unit 150b-1 of the VCM decoder 150b may transmit one or more of the restored feature maps P2' to feature maps P5' to each task. The task may include, for example, object classification, object detection, object tracking, object segmentation, etc. That is, the MSFR performing unit 150b-1 of the VCM decoder 150b can transfer feature map P5' from among the restored feature maps P2' to feature maps P5' to task #1, feature map P2', and feature map P5'. Map P3' and feature map P4' can be passed to task #2.

도 13a는 예시적인 인공신경망 모델 내의 각 레이어 별 데이터의 크기를 기준으로, 본 명세서의 일 개시에 따라 에지 디바이스와 클라우드 서버 사이에 분산 처리되는 예시를 나타낸 개념도이다. 도 13b는 도 13a에 도시된 예시적 인공신경망 모델에서 각 레이어 별 데이터 사이즈 등을 나타낸 예시적인 테이블이다.FIG. 13A is a conceptual diagram illustrating an example of distributed processing between an edge device and a cloud server according to an disclosure of the present specification, based on the size of data for each layer in an exemplary artificial neural network model. FIG. 13B is an example table showing the data size for each layer in the example artificial neural network model shown in FIG. 13A.

도 13a에 도시된 예시적인 인공신경망 모델은 Mobilenet V1인 것으로 나타나 있다. 도 13a를 참조하면, 가로축은 예시적인 인공신경망 모델에서 레이어들을 순차적으로 나타내고, 세로축은 데이터의 크기를 나타낸다.The example artificial neural network model shown in FIG. 13A is shown to be Mobilenet V1. Referring to FIG. 13A, the horizontal axis sequentially represents layers in an exemplary artificial neural network model, and the vertical axis represents the size of data.

도 13a 및 도 13b에 도시된 레이어 1을 참고하면, 입력 특징맵의 크기(IFMAP_SIZE) 보다 출력 특징맵의 크기(OFMAP_SIZE)가 더 큰 것을 알 수 있다. Referring to layer 1 shown in FIGS. 13A and 13B, it can be seen that the size of the output feature map (OFMAP_SIZE) is larger than the size of the input feature map (IFMAP_SIZE).

그러나, 도 13a 및 도 13b에 도시된 레이어 12를 참고하면, 출력 특징맵의 크기(OFMAP_SIZE)는 50,176 바이트(약 50Kb)로서 입력 특징맵의 크기(IFMAP_SIZE)인 200,704 바이트 보다 작을 뿐만 아니라, 레이어 12의 출력 특징맵의 크기(OFMAP_SIZE)는 전후 인접한 레이어들의 출력 특징맵의 크기 보다도 작다.However, referring to layer 12 shown in Figures 13a and 13b, the size of the output feature map (OFMAP_SIZE) is 50,176 bytes (about 50Kb), which is not only smaller than the size of the input feature map (IFMAP_SIZE) of 200,704 bytes, but also the size of layer 12 The size of the output feature map (OFMAP_SIZE) is smaller than the sizes of the output feature maps of the front and rear adjacent layers.

또한, 레이어 1부터 레이어 12까지의 가중치들의 합계는 그 크기가 133Kb로 매우 작다. 또한, 레이어 12의 출력 특징맵의 크기는 약 50Kb로 그 크기가 또한 매우 작다. Additionally, the total size of the weights from layer 1 to layer 12 is very small, at 133Kb. Additionally, the size of the output feature map of layer 12 is about 50Kb, which is also very small.

따라서 각 감시 카메라의 NPU는 레이어 12의 출력 특징맵을 비트스트림 형태로 전송할 수 있다. 이와 같이 크기가 작은 특징맵을 전송하는 방식을 택하게 되면, 감시 카메라의 대수가 매우 증가하더라도, 통신 네트워크에 큰 부하 혹은 혼잡을 발생시키지 않을 수 있다.Therefore, the NPU of each surveillance camera can transmit the output feature map of layer 12 in bitstream form. If this method of transmitting small-sized feature maps is selected, even if the number of surveillance cameras greatly increases, it may not cause a large load or congestion on the communication network.

따라서, 도 13a에 도시된 바와 같이, 레이어 1부터 레이어 12까지를 에지 단말의 NPU에서 처리한 후, 레이어 12의 출력 특징맵을 유선 또는 무선으로 클라우드 서버로 전송하는 방안을 고려해볼 수 있다. Therefore, as shown in FIG. 13A, it is possible to consider processing layers 1 to 12 in the NPU of the edge terminal and then transmitting the output feature map of layer 12 to the cloud server by wire or wirelessly.

클라우드 서버의 NPU는 수신한 레이어 12의 출력 특징맵을 레이어 13의 입력 특징맵으로 사용하여, 레이어 13부터 레이어 28까지를 처리할 수 있다.The NPU of the cloud server can process layers 13 to 28 by using the received output feature map of layer 12 as the input feature map of layer 13.

한편, 레이어 12의 출력 특징맵은 도 11a에 도시된 바와 같이 MSFF 수행부(150a-1) 및 SSFC 인코더(150a-2)를 거쳐, 비트스트림 형태로 전송될 수도 있다. 즉, 레이어 12의 출력 특징맵의 크기는 MSFF 수행부 및 SSFC 인코더(150a-2)를 통해 압축되어 더 작아질 수 있다.Meanwhile, the output feature map of layer 12 may be transmitted in the form of a bitstream through the MSFF performing unit 150a-1 and the SSFC encoder 150a-2, as shown in FIG. 11A. That is, the size of the output feature map of layer 12 can be compressed through the MSFF performing unit and the SSFC encoder 150a-2 to become smaller.

이와 같이, 인공신경망 모델 내의 레이어들 중에서, 출력 특징맵의 사이즈가 작은 것을 선택하여 전송하게 되면, 네트워크 트래픽을 줄이면서, 컴퓨팅 부하를 분산할 수 있다.In this way, by selecting and transmitting the output feature map with a smaller size among the layers in the artificial neural network model, the computing load can be distributed while reducing network traffic.

도 14a는 도 13a에 도시된 인공신경망 모델의 레이어 9부터 레이어 13까지의 특징맵을 예시적으로 나타낸 예시도이다.FIG. 14A is an exemplary diagram illustrating feature maps from layer 9 to layer 13 of the artificial neural network model shown in FIG. 13A.

도 14a를 참조하면, 도 13a에 도시된 인공신경망 모델의 레이어 9에서 임의 연산(예컨대, 합성곱 연산)을 수행하면 특징맵 P9이 출력되고, 상기 특징맵 P9은 레이어 10으로 입력된다. 상기 레이어 10에서 임의 연산(예컨대, 합성곱 연산)을 수행하면 특징맵 P10이 출력되고, 상기 특징맵 P10은 레이어 11으로 입력된다. 상기 레이어 11에서 임의 연산(예컨대, 합성곱 연산)을 수행하면 특징맵 P11이 출력되고, 레이어 12로 입력된다. 마찬가지로, 상기 레이어 12에서 임의 연산(예컨대, 합성곱 연산)을 수행하면 특징맵 P12이 출력되고, 상기 특징맵 P12은 레이어 13으로 입력된다.Referring to FIG. 14A, when an arbitrary operation (eg, convolution operation) is performed on layer 9 of the artificial neural network model shown in FIG. 13A, feature map P9 is output, and the feature map P9 is input to layer 10. When a random operation (eg, convolution operation) is performed in layer 10, feature map P10 is output, and the feature map P10 is input to layer 11. When a random operation (eg, convolution operation) is performed in layer 11, feature map P11 is output and input to layer 12. Likewise, when an arbitrary operation (eg, convolution operation) is performed in layer 12, feature map P12 is output, and the feature map P12 is input to layer 13.

도 14b는 도 14a에 도시된 특징맵 P9부터 특징맵 P12를 압축한 후 비트스트림으로 전송하는 VCM 인코더와 수신된 비트스트림을 복원하는 VCM 디코더를 일 예시에 따라 나타낸 예시도이다.FIG. 14B is an exemplary diagram showing a VCM encoder that compresses the feature maps P9 to P12 shown in FIG. 14A and then transmits them as a bitstream, and a VCM decoder that restores the received bitstream, according to an example.

도 14b를 참조하여 알 수 있는 바와 같이, VCM 인코더(150a)(혹은 송신단)은 MSFF 수행부(150a-1)와, SSFC 인코더(150a-2) 그리고 컴프레서(150a-3)를 포함할 수 있다. 그리고 VCM 디코더(150b)(혹은 수신단)은 SSFC 디코더(150b-1)와 MSFR 수행부(150b-2)와 그리고 디컴프레서(150b-3)를 포함할 수 있다. 이하 도 11a와 도 12와 다른 부분에 대해서만 설명하고 동일한 부분에 대해서는 중복하여 설명하지 않고, 도 11a와 도 12에 대한 설명 내용을 원용하기로 한다.As can be seen with reference to FIG. 14b, the VCM encoder 150a (or transmitter) may include an MSFF performance unit 150a-1, an SSFC encoder 150a-2, and a compressor 150a-3. . And the VCM decoder 150b (or receiving end) may include an SSFC decoder 150b-1, an MSFR performance unit 150b-2, and a decompressor 150b-3. Hereinafter, only the parts that are different from those of FIGS. 11A and 12 will be described, and the same parts will not be repeatedly explained, and the descriptions of FIGS. 11A and 12 will be used.

상기 VCM 인코더(150a)의 MSFF 수행부(150a-1)는 도 9b 내지 도 9d에 도시된 특징맵 추출기로부터 추출된 복수의 특징맵들 중에서 하나 이상을 선택적으로 입력받을 수 있다. 구체적인 예를 들면, 도 9b 내지 도 9d에 도시된 특징맵 추출기가 도 14a에 도시된 바와 같이 특징맵 P9 내지 특징맵 P12를 추출하였다고 가정해보자. 그러면, 상기 VCM 인코더(150a)의 MSFF 수행부(150a-1)는 상기 특징맵 P9 내지 특징맵 P12 중에서 하나 이상의 특징맵을 필요에 따라 선택적으로 입력받을 수 있다. 도 14b의 예시에서는, 상기 특징맵 P9 내지 특징맵 P12 중에서, 특징맵 P9, 특징맵 P10 그리고 특징맵 P12를 선택적으로 상기 VCM 인코더(150a)의 MSFF 수행부(150a-1)가 입력받는 것으로 나타내어져 있다.The MSFF performing unit 150a-1 of the VCM encoder 150a may selectively receive one or more of the plurality of feature maps extracted from the feature map extractor shown in FIGS. 9B to 9D. For a specific example, let's assume that the feature map extractor shown in FIGS. 9B to 9D extracts feature maps P9 to P12 as shown in FIG. 14A. Then, the MSFF performing unit 150a-1 of the VCM encoder 150a can selectively receive one or more feature maps from among the feature maps P9 to P12 as needed. In the example of FIG. 14b, among the feature maps P9 to P12, the feature map P9, feature map P10, and feature map P12 are shown as being selectively received by the MSFF performing unit 150a-1 of the VCM encoder 150a. It's messy.

상기 VCM 디코더(150b)의 MSFR 수행부(150b-1)는 상기 SSFC 디코더(150b-2)로부터의 출력 F' 로부터 특징맵 P9' 내지 특징맵 P12'을 복원해낼 수 있다. 그리고, 상기 VCM 디코더(150b)의 MSFR 수행부(150b-1)는 상기 복원된 특징맵 P9' 내지 특징맵 P12' 중에서 하나 이상을 각 태스크로 전달할 수 있다.The MSFR performing unit 150b-1 of the VCM decoder 150b can restore feature maps P9' to feature maps P12' from the output F' from the SSFC decoder (150b-2). Additionally, the MSFR performing unit 150b-1 of the VCM decoder 150b may transmit one or more of the restored feature maps P9' to feature maps P12' to each task.

도 15a는 본 명세서의 개시에 따른 NPU를 동작 관점에서 나타낸 예시도이다.Figure 15a is an exemplary diagram showing the NPU according to the disclosure of the present specification from an operation perspective.

도 15a를 참고하여 알 수 있는 바와 같이, 전송측 제1 NPU(100a)는 복수의 제1 PE들(110a), 제1 NPU 내부 메모리(120a), 제1 NPU 컨트롤러(130a), 제1 NPU 인터페이스(140a) 그리고 VCM 인코더(150a)를 포함할 수 있다. As can be seen with reference to FIG. 15A, the first NPU 100a on the transmission side includes a plurality of first PEs 110a, a first NPU internal memory 120a, a first NPU controller 130a, and a first NPU. It may include an interface 140a and a VCM encoder 150a.

상기 VCM 인코더(150a)는 도 11, 도 12 또는 도 14B에 도시된 바와 같이 MSFF 수행부(150a-1), SSFC 인코더(150a-2) 그리고 컴프레서(150a-3)를 포함할 수 있다.The VCM encoder 150a may include an MSFF performing unit 150a-1, an SSFC encoder 150a-2, and a compressor 150a-3, as shown in FIG. 11, 12, or 14B.

그리고, 수신측 제2 NPU(100b)는 복수의 제2 PE들(110b), 제2 NPU 내부 메모리(120b), 제2 NPU 컨트롤러(130b), 제2 NPU 인터페이스(140b) 그리고 VCM 디코더(150b)를 포함할 수 있다.And, the second NPU (100b) on the receiving side includes a plurality of second PEs (110b), a second NPU internal memory (120b), a second NPU controller (130b), a second NPU interface (140b), and a VCM decoder (150b). ) may include.

상기 VCM 디코더(150b)는 도 11, 도 12 또는 도 14B에 도시된 바와 같이 SSFC 디코더(150b-1)와 MSFR 수행부(150b-2)와 그리고 디컴프레서(150b-3)를 포함할 수 있다.The VCM decoder 150b may include an SSFC decoder 150b-1, an MSFR performing unit 150b-2, and a decompressor 150b-3, as shown in FIG. 11, 12, or 14B. .

도시된 굵은선은 데이터(예, 비디오/이미지, 특징맵, 혹은 비트스트림)의 흐름을 나타내고, 점선은 제어 신호의 흐름을 나타낸다.The depicted thick line represents the flow of data (e.g., video/image, feature map, or bitstream), and the dotted line represents the flow of control signals.

먼저, 상기 전송측 제1 NPU(100a)가 비디오/이미지를 수신하면, 상기 제1 NPU(100a) 내의 제1 NPU 컨트롤러(130a)는 제1 NPU 인터페이스(140a)를 통하여, 제1 NPU 내부 메모리(120a)에 저장한다. First, when the first NPU (100a) on the transmission side receives a video/image, the first NPU controller (130a) in the first NPU (100a) transmits the first NPU internal memory through the first NPU interface (140a). Save it at (120a).

이어서, 상기 제1 NPU(100a) 내의 제1 NPU 컨트롤러(130a)는 상기 복수의 제1 PE들(110a)로 하여금 상기 제1 NPU 내부 메모리(120a)로부터 상기 비디오/이미지를 읽어낸 후, ANN 모델의 레이어 별로 연산을 수행하도록 한다. Subsequently, the first NPU controller 130a in the first NPU 100a causes the plurality of first PEs 110a to read the video/image from the first NPU internal memory 120a, and then ANN Perform calculations for each layer of the model.

상기 복수의 제1 PE들(110a)은 상기 제1 NPU 컨트롤러(130a)로부터의 제어 신호에 따라 상기 ANN 모델의 레이어 별 연산을 수행한 결과로 출력되는 특징맵들을 상기 제1 NPU 내부 메모리(120a)에 저장시킨다. 이처럼 ANN 모델의 레이어 별로 특징맵들이 저장됨에 따라, 상기 제1 NPU 내부 메모리(120a) 내에는 복수의 특징맵들이 저장될 수 있다.The plurality of first PEs 110a store feature maps output as a result of performing calculations for each layer of the ANN model according to a control signal from the first NPU controller 130a in the first NPU internal memory 120a. ) to save it. As feature maps are stored for each layer of the ANN model, a plurality of feature maps may be stored in the first NPU internal memory 120a.

상기 VCM 인코더(150a)는 상기 제1 NPU 컨트롤러(130a)로부터의 제어 신호에 따라, 상기 제1 NPU 내부 메모리(120a) 내에 저장된 복수의 특징맵들 중에서 하나 이상의 특징맵을 전송 대상으로 선택할 수 있다.The VCM encoder 150a may select one or more feature maps from among a plurality of feature maps stored in the first NPU internal memory 120a as a transmission target according to a control signal from the first NPU controller 130a. .

그러면, 상기 선택된 하나 이상의 특징맵들은 상기 VCM 인코더(150a) 내에서 SSFC 디코더(150b-1)와 MSFR 수행부(150b-2)와 그리고 디컴프레서(150b-3)를 거쳐서 도 11, 도 12 또는 도 14B에 도시된 바와 같이 비트스트림으로 변환된다.Then, the selected one or more feature maps pass through the SSFC decoder (150b-1), the MSFR performance unit (150b-2), and the decompressor (150b-3) within the VCM encoder (150a), and are transmitted through the VCM encoder (150a). It is converted into a bitstream as shown in FIG. 14B.

이후, 상기 VCM 인코더(150a)는 상기 제1 NPU 컨트롤러(130a)로부터의 제어 신호에 따라, 제1 NPU 인터페이스(140a)를 통하여 상기 비트스트림을 전송한다.Thereafter, the VCM encoder 150a transmits the bitstream through the first NPU interface 140a according to a control signal from the first NPU controller 130a.

한편, 상기 수신측 제2 NPU(100b)는 상기 비트스트림을 수신하면, 상기 제2 NPU(100b) 내의 제2 NPU 컨트롤러(130b)는 제2 NPU 인터페이스(140b)를 통하여, 제2 NPU 내부 메모리(120b)에 저장한다. Meanwhile, when the second NPU (100b) on the receiving side receives the bitstream, the second NPU controller (130b) in the second NPU (100b) transmits the second NPU internal memory through the second NPU interface (140b). Save it at (120b).

상기 수신측 제2 NPU(100b) 내의 VCM 디코더(150b)는 상기 제2 NPU 컨트롤러(130b)의 제어에 따라 상기 제2 NPU 내부 메모리(120b)로부터 상기 비트스트림을 읽어낸다. The VCM decoder 150b in the second NPU 100b on the receiving side reads the bitstream from the second NPU internal memory 120b under the control of the second NPU controller 130b.

상기 읽어진 비트스트림은 상기 VCM 디코더(150b) 내의 SSFC 디코더(150b-1)와 MSFR 수행부(150b-2)와 그리고 디컴프레서(150b-3)를 거친 후 도 11, 도 12 또는 도 14B에 도시된 바와 같이 하나 이상의 특징맵으로 복원된다.The read bitstream passes through the SSFC decoder (150b-1), the MSFR performance unit (150b-2), and the decompressor (150b-3) in the VCM decoder (150b) and is then displayed in Figures 11, 12, or 14B. As shown, it is restored into one or more feature maps.

그러면, 상기 VCM 디코더(150b)는 상기 복원된 하나 이상의 특징맵을 상기 제2 NPU 내부 메모리(120b)에 저장한다.Then, the VCM decoder (150b) stores the one or more restored feature maps in the second NPU internal memory (120b).

상기 제2 NPU(100b) 내의 제2 NPU 컨트롤러(130b)는 상기 복수의 제2 PE들(110b)로 하여금 상기 제2 NPU 내부 메모리(120b)로부터 상기 복원된 하나 이상의 특징맵을 읽어낸 후, ANN 모델의 레이어 별로 연산을 수행하도록 한다. The second NPU controller 130b in the second NPU 100b causes the plurality of second PEs 110b to read the one or more restored feature maps from the second NPU internal memory 120b, Calculations are performed for each layer of the ANN model.

도 14b에 도시된 바와 같이 머신 태스크가 복수개 존재할 경우, 상기 ANN 모델도 복수개가 존재할 수 있다. As shown in FIG. 14b, when there are a plurality of machine tasks, there may also be a plurality of ANN models.

도 15b는 전송측 NPU와 수신측 NPU 간의 신호 흐름을 나타낸 흐름도이다.Figure 15b is a flowchart showing the signal flow between the transmitting NPU and the receiving NPU.

도 15b를 참조하면, 송신측 NPU(100a)와 수신측 NPU(100b)가 나타나 있다. 수신측 NPU(100b)는 피드백 정보를 송신측 NPU(100a)에게 전송할 수 있다. 상기 피드백 정보는 상기 송신측 NPU(100a)가 하나 이상의 특징맵을 전송 대상으로 선택할 수 있도록 하는 정보일 수 있다. 예를 들어 상기 피드백 정보는 상기 수신측 NPU(100b)에서 사용되는 머신 태스크와 그리고 대응 ANN 모델에 대한 정보를 포함할 수 있다. 또는, 상기 피드백 정보는 상기 대응 ANN 모델 내의 복수의 레이어들 중에서 하나 이상의 레이어에 대한 식별 정보를 포함할 수 있다. 또는, 상기 피드백 정보는 상기 송신측 NPU(100a)에서 생성되는 복수의 특징맵 중에서 전송 대상이 되는 하나 이상의 특징맵에 대한 식별 정보를 포함할 수 있다. Referring to Figure 15b, a transmitting NPU (100a) and a receiving NPU (100b) are shown. The receiving NPU (100b) may transmit feedback information to the transmitting NPU (100a). The feedback information may be information that allows the transmitting NPU (100a) to select one or more feature maps as a transmission target. For example, the feedback information may include information about the machine task used in the receiving NPU (100b) and the corresponding ANN model. Alternatively, the feedback information may include identification information for one or more layers among a plurality of layers in the corresponding ANN model. Alternatively, the feedback information may include identification information about one or more feature maps to be transmitted among a plurality of feature maps generated by the transmitting NPU (100a).

그러면, 상기 송신측 NPU(100a)는 상기 피드백 정보에 기초하여, 복수의 특징맵 중에서 하나 이상의 특징맵을 전송 대상으로 선택할 수 있다.Then, the transmitting NPU (100a) may select one or more feature maps from a plurality of feature maps as a transmission target based on the feedback information.

그리고, 상기 송신측 NPU(100a)는 상기 선택된 특징맵을 인코딩 및/또는 압축한 후, 비트스트림 형태로 전송할 수 있다.In addition, the transmitting NPU (100a) may encode and/or compress the selected feature map and then transmit it in the form of a bitstream.

상기 수신측 NPU(100b)는 상기 비트스트림을 수신한 후, 디코딩 및/또는 압축 해제를 수행하여, 특징맵을 복원할 수 있다.After receiving the bitstream, the receiving NPU (100b) may perform decoding and/or decompression to restore the feature map.

그리고 상기 수신측 NPU(100b)는 상기 복원된 특징맵을 이용하여, ANN 모델의 후속 레이어의 연산을 수행하여, 머신 태스크를 수행할 수 있다. And the receiving NPU (100b) can use the restored feature map to perform calculations on subsequent layers of the ANN model and perform machine tasks.

도 15c는 도 15b의 변형예이다.Figure 15c is a modified example of Figure 15b.

도 15c를 참조하면, 송신측 NPU(100a)와 수신측 NPU(100b) 그리고 서버(200)가 나타나 있다. Referring to FIG. 15C, a transmitting NPU (100a), a receiving NPU (100b), and a server 200 are shown.

먼저 상기 서버(200)는 상기 수신측 NPU(100b)가 사용할 ANN 모델에 대한 정보를 상기 송신측 NPU(100a)와 그리고 상기 수신측 NPU(100b) 모두에게 혹은 어느 하나에 전송할 수 있다.First, the server 200 may transmit information about the ANN model to be used by the receiving NPU 100b to both or one of the transmitting NPU 100a and the receiving NPU 100b.

상기 수신측 NPU(100b)는 피드백 정보를 전송할 수 있다. 상기 피드백 정보는 상기 송신측 NPU(100a)가 하나 이상의 특징맵을 전송 대상으로 선택할 수 있도록 하는 정보일 수 있다. 예를 들어 상기 피드백 정보는 상기 ANN 모델 내의 복수의 레이어들 중에서 하나 이상의 레이어에 대한 식별 정보를 포함할 수 있다. 또는, 상기 피드백 정보는 상기 송신측 NPU(100a)에서 생성되는 복수의 특징맵 중에서 전송 대상이 되는 하나 이상의 특징맵에 대한 식별 정보를 포함할 수 있다. The receiving NPU (100b) may transmit feedback information. The feedback information may be information that allows the transmitting NPU (100a) to select one or more feature maps as a transmission target. For example, the feedback information may include identification information for one or more layers among a plurality of layers in the ANN model. Alternatively, the feedback information may include identification information about one or more feature maps to be transmitted among a plurality of feature maps generated by the transmitting NPU (100a).

그러면, 상기 송신측 NPU(100a)는 상기 피드백 정보에 기초하여, 복수의 특징맵 중에서 하나 이상의 특징맵을 전송 대상으로 선택할 수 있다.Then, the transmitting NPU (100a) may select one or more feature maps from a plurality of feature maps as a transmission target based on the feedback information.

그리고, 상기 송신측 NPU(100a)는 상기 선택된 특징맵을 인코딩 및/또는 압축한 후, 비트스트림 형태로 전송할 수 있다.In addition, the transmitting NPU (100a) may encode and/or compress the selected feature map and then transmit it in the form of a bitstream.

상기 수신측 NPU(100b)는 상기 비트스트림을 수신한 후, 디코딩 및/또는 압축 해제를 수행하여, 특징맵을 복원할 수 있다.After receiving the bitstream, the receiving NPU (100b) may perform decoding and/or decompression to restore the feature map.

그리고 상기 수신측 NPU(100b)는 상기 복원된 특징맵을 이용하여, ANN 모델의 후속 레이어의 연산을 수행하여, 머신 태스크를 수행할 수 있다. And the receiving NPU (100b) can use the restored feature map to perform calculations on subsequent layers of the ANN model and perform machine tasks.

도 16은 본 명세서의 일 개시가 적용되는 예시적인 제1 시나리오를 나타낸 예시도이다.16 is an exemplary diagram illustrating a first exemplary scenario to which a disclosure of the present specification is applied.

도 16을 참고하여 알 수 있는 바와 같이, 감시(surveillance) 카메라에는 엣지용 NPU가 장착될 수 있다. 상기 엣지용 NPU는 저전력으로 특화된 NPU이다. As can be seen with reference to FIG. 16, a surveillance camera may be equipped with an edge NPU. The edge NPU is an NPU specialized for low power consumption.

상기 NPU는 촬영 영상으로부터 특징맵을 추출할 수 있다. 일반적으로 특징맵의 사이즈는 매우 크기 때문에, 이를 유선 혹은 무선으로 전송하려면, 상당한 크기의 네트워크 대역폭이 요구되고, 네트워크 혼잡을 야기한다. 또한, 전력 낭비도 야기된다. The NPU can extract a feature map from a captured image. In general, the size of the feature map is very large, so transmitting it wired or wirelessly requires a significant amount of network bandwidth, causing network congestion. Additionally, power waste is also caused.

따라서, 본 명세서의 일 개시에 따르면, 감시 카메라에 장착된 NPU는 인공신경망 모델 내의 레이어들 중에서, 출력 특징맵의 사이즈가 작은 것을 선택하여 전송할 수 있다. 상기 출력 특징맵을 전송하기 전에, 상기 감시 카메라에 장착된 NPU는 도 11a에 도시된 바와 같이 MSFF(Multi-scale feature fusion) 수행부와, SSFC(Single-stream feature codec) 인코더를 통해, 사이즈를 더 줄일 수 있다.Therefore, according to one disclosure of the present specification, the NPU mounted on the surveillance camera can select and transmit the output feature map with a smaller size among the layers in the artificial neural network model. Before transmitting the output feature map, the NPU mounted on the surveillance camera determines the size through a multi-scale feature fusion (MSFF) performer and a single-stream feature codec (SSFC) encoder, as shown in Figure 11a. It can be reduced further.

이와 같이 각 감시 카메라가 데이터 사이즈가 작은 특정 레이어, 예컨대 레이어 12를 선택하여, 레이어 12의 특징맵을 전송하게 되면, 추론 1회 마다 약 4M 바이트의 가중치 사용을 생략할 수 있다. In this way, if each surveillance camera selects a specific layer with a small data size, for example, layer 12, and transmits the feature map of layer 12, the use of about 4M bytes of weight per inference can be omitted.

Mobilenet V1Mobilenet V1 LayerLayer 가중치의 합산sum of weights MAX
IFMAP+OFMAP
MAX
IFMAP+OFMAP
MAC 연산MAC operation
EDGE NPUEDGE NPU 1~121~12 133,568 (Kbyte)133,568 (Kbytes) 1,204,224 (Kbyte)1,204,224 (Kbytes) 202,861,568 202,861,568 SERVER NPUSERVER NPU 13~2813~28 4,075,520(Kbyte)4,075,520(Kbytes) 200,704 (Kbyte)200,704 (Kbytes) 365,878,784 365,878,784

따라서, 상기 감시 카메라에 장착된 NPU는 인공신경망의 모든 레이어를 처리해야 할 필요가 없고, 그로 인해 복잡도가 간소화될 수 있다. 예를 들어, 상기 감시 카메라에 장착된 NPU는 인공신경망의 전체 레이어 중에서 임의 레이어까지만 처리하면 되므로, 더 적은 개수의 PE만을 포함할 수 있다. 또한, 상기 감시 카메라에 장착된 NPU는 더 적은 크기의 SRAM을 포함할 수 있다. 나아가, 상기 카메라에 장착된 NPU는 DRAM(Dynamic random-access memory)은 포함하지 않을 수 있다. 이를 통해, 상기 감시 카메라에 장착될 NPU는 제조 원가를 크게 절감할 수 있다. 또한, 상기 감시 카메라에 장착될 NPU는 소비 전력을 크게 줄일 수 있다.Therefore, the NPU mounted on the surveillance camera does not need to process all layers of the artificial neural network, and thus complexity can be simplified. For example, the NPU mounted on the surveillance camera only needs to process a random layer among all layers of the artificial neural network, so it may include only a smaller number of PEs. Additionally, the NPU mounted on the surveillance camera may include a smaller SRAM. Furthermore, the NPU mounted on the camera may not include dynamic random-access memory (DRAM). Through this, the NPU to be mounted on the surveillance camera can significantly reduce manufacturing costs. Additionally, the NPU to be mounted on the surveillance camera can significantly reduce power consumption.

각 감시 카메라는 데이터 사이즈가 작은 특정 레이어를 선택한 후, 해당 특정 레이어의 출력 특징맵을 전송할 수 있다. Each surveillance camera can select a specific layer with a small data size and then transmit the output feature map of that specific layer.

이와 같이, 다수의 감시 카메라로부터 전송되는 출력 특징맵들은 멀티플렉서(Multiplexer, MUX)에 의해 시분할 방식으로 다중화되어 클라우드 서버로 전송될 수 있다. In this way, the output feature maps transmitted from multiple surveillance cameras can be multiplexed in a time division manner by a multiplexer (MUX) and transmitted to the cloud server.

상기 클라우드 서버는 제1 메모리와, NPU를 포함할 수 있다. The cloud server may include a first memory and an NPU.

상기 클라우드 서버의 상기 제1 메모리는 시분할 방식으로 다중화되어 수신되는 다수의 출력 특징맵을 일시적으로 저장한다. 또한, 상기 클라우드 서버의 상기 제1 메모리는 상기 감시 카메라의 NPU에 의해서 처리되지 않은 후속 레이어들에서 사용될 가중치들을 저장할 수 있다. 도 12 및 도 13을 참고하여 알 수 있는 바와 같이, 레이어 13부터 레이어 28까지의 가중치들의 합산 크기는 4075Kb일 수 있다. 이와 같이 레이어 13부터 레이어 28까지의 가중치들의 합산 크기는 현격히 작지는 않지만, 감시 카메라의 대수가 증가할 수 록, 가중치의 재사용율도 증가되기 때문에, 효율성이 저하되지는 않는다. The first memory of the cloud server temporarily stores a plurality of output feature maps that are multiplexed and received in a time division manner. Additionally, the first memory of the cloud server may store weights to be used in subsequent layers that have not been processed by the NPU of the surveillance camera. As can be seen with reference to FIGS. 12 and 13, the total size of the weights from layer 13 to layer 28 may be 4075Kb. As such, the total size of the weights from layer 13 to layer 28 is not significantly small, but as the number of surveillance cameras increases, the reuse rate of the weights also increases, so efficiency does not decrease.

상기 제1 메모리를 제어하는 메모리 컨트롤러는 상기 다수의 출력 특징맵들이 상기 제1 메모리로부터 순차적으로 읽혀질 수 있도록, 메모리 주소를 관리할 수 있다. A memory controller controlling the first memory may manage memory addresses so that the plurality of output feature maps can be sequentially read from the first memory.

상기 메모리 컨트롤러의 제어에 따라 상기 제1 메모리는 상기 다수의 출력 특징맵들을 순차적으로 상기 NPU로 전달한다. Under the control of the memory controller, the first memory sequentially delivers the plurality of output feature maps to the NPU.

상기 클라우드 서버의 NPU는 상기 제1 메모리로부터 읽어온 각 카메라로부터의 레이어 12의 출력 특징맵을 레이어 13의 입력 특징맵으로 활용하고 상기 제1 메모리로부터 읽어온 가중치를 이용하여, 연산을 수행한다. The NPU of the cloud server uses the output feature map of layer 12 from each camera read from the first memory as the input feature map of layer 13 and performs calculations using the weights read from the first memory.

한편, 상기 클라우드 서버의 NPU가 레이어 13부터 레이어 28까지를 처리하면서 상기 제1 메모리에 씌여지거나 읽혀지는 출력 특징맵과 입력 특징맵의 크기는 도 12 및 도 13을 참고하여 알 수 있는 바와 같이 그리 크지 않기 대문에(감시 카메라 1대당 200kb에 불과함), 상기 클라우드 서버는 많은 대수의 카메라를 위한 인공신경망 연산을 처리할 수 있다.Meanwhile, as the NPU of the cloud server processes layers 13 to 28, the sizes of the output feature map and input feature map written or read from the first memory are as can be seen with reference to FIGS. 12 and 13. Because it is not large (only 200 kb per surveillance camera), the cloud server can process artificial neural network calculations for a large number of cameras.

도 17은 본 명세서의 일 개시가 적용되는 예시적인 제2 시나리오를 나타낸 예시도이다.17 is an exemplary diagram illustrating a second exemplary scenario to which a disclosure of the present specification is applied.

도 17에 도시된 차량 카메라는 엣지용 NPU를 포함할 수 있다. 상기 차량 카메라에 장착된 NPU는 전술한 바와 마찬가지로 인공신경망 모델 내의 레이어들 중에서, 출력 특징맵의 사이즈가 작은 것을 선택하여 전송할 수 있다. 상기 출력 특징맵을 전송하기 전에, 상기 감시 카메라에 장착된 NPU는 도 11a에 도시된 바와 같이 MSFF(Multi-scale feature fusion) 수행부와, SSFC(Single-stream feature codec) 인코더를 통해, 사이즈를 더 줄일 수 있다.The vehicle camera shown in FIG. 17 may include an edge NPU. As described above, the NPU mounted on the vehicle camera can select and transmit the output feature map with a smaller size among the layers in the artificial neural network model. Before transmitting the output feature map, the NPU mounted on the surveillance camera determines the size through a multi-scale feature fusion (MSFF) performer and a single-stream feature codec (SSFC) encoder, as shown in Figure 11a. It can be reduced further.

클라우드 서버는 서버용 NPU를 포함할 수 있다. 상기 클라우드 서버의 NPU는 각 차량 카메라로부터의 출력 특징맵을 입력 특징맵으로 활용하여, 연산을 수행한다. 그리고 상기 클라우드 서버의 NPU는 상기 연산의 결과로서 차량 제어 신호를 생성하여, 각 차량으로 전송할 수 있다.The cloud server may include a server NPU. The NPU of the cloud server uses the output feature map from each vehicle camera as an input feature map to perform calculations. And the NPU of the cloud server can generate a vehicle control signal as a result of the above calculation and transmit it to each vehicle.

그 밖에 자세한 내용은 전술한 내용과 동일하므로, 중복하여 설명하지 않기로 한다. Other details are the same as those described above, so they will not be explained repeatedly.

본 명세서와 도면에 나타난 본 개시의 예시들은 본 개시의 기술 내용을 쉽게 설명하고 본 개시의 이해를 돕기 위해 특정 예를 제시한 것뿐이며, 본 명의 범위를 한정하고자 하는 것은 아니다. 지금까지 설명한 예시들 이외에도 다른 변형 예들이 실시 가능하다는 것은 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자에게 자명한 것이다.The examples of the present disclosure shown in the specification and drawings are merely provided as specific examples to easily explain the technical content of the present disclosure and aid understanding of the present disclosure, and are not intended to limit the scope of the present disclosure. It is obvious to those skilled in the art that in addition to the examples described so far, other modifications can be implemented.

본 명세서에 기재된 청구항들은 다양한 방식으로 조합될 수 있다. 예를 들어, 본 명세서의 방법 청구항의 기술적 특징이 조합되어 장치로 구현될 수 있고, 본 명세서의 장치 청구항의 기술적 특징이 조합되어 방법으로 구현될 수 있다. 또한, 본 명세서의 방법 청구항의 기술적 특징과 장치 청구항의 기술적 특징이 조합되어 장치로 구현될 수 있고, 본 명세서의 방법 청구항의 기술적 특징과 장치 청구항의 기술적 특징이 조합되어 방법으로 구현될 수 있다.The claims set forth herein may be combined in various ways. For example, the technical features of the method claims of this specification may be combined to implement a device, and the technical features of the device claims of this specification may be combined to implement a method. Additionally, the technical features of the method claims of this specification and the technical features of the device claims may be combined to implement a device, and the technical features of the method claims of this specification and technical features of the device claims may be combined to implement a method.

Claims (18)

인코딩을 수행할 수 있는 NPU(Neural Processing Unit)로서,
인공신경망 내의 다수의 레이어들을 위한 연산을 수행하여 복수의 출력 특징맵을 생성하는 하나 이상의 PE(Processing Element)와; 그리고
상기 복수의 출력 특징맵 중에서 하나 이상의 임의 출력 특징맵을 비트스트림으로 인코딩한 후, 전송하는 인코더를 포함하는, NPU.
As a Neural Processing Unit (NPU) capable of performing encoding,
One or more PEs (Processing Elements) that perform operations for multiple layers in an artificial neural network to generate multiple output feature maps; and
An NPU comprising an encoder that encodes one or more random output feature maps among the plurality of output feature maps into a bitstream and then transmits it.
제1항에 있어서, 상기 인코더는
상기 복수의 출력 특징맵 중에서 하나 이상의 임의 출력 특징맵을 임의의 정보에 기초하여 선택하는, NPU.
The method of claim 1, wherein the encoder
An NPU that selects one or more random output feature maps from among the plurality of output feature maps based on random information.
제2항에 있어서, 상기 임의의 정보는, 서버 혹은 상기 비트스트림을 수신하는 다른 NPU로부터 수신되는, NPU.The NPU of claim 2, wherein the arbitrary information is received from a server or another NPU that receives the bitstream. 제2항에 있어서, 상기 임의의 정보는 상기 하나 이상의 임의 출력 특징맵에 대한 식별 정보 혹은 상기 임의 출력 특징맵에 대응하는 레이어에 대한 식별 정보를 포함하는, NPU.The NPU of claim 2, wherein the random information includes identification information about the one or more random output feature maps or identification information about a layer corresponding to the random output feature map. 제2항에 있어서, 상기 임의의 정보는:
출력 특징맵의 사이즈 정보, 상기 비트스트림을 수신하는 다른 NPU에서 수행되는 머신 태스크의 정보 그리고 상기 비트스트림을 수신하는 다른 NPU에서 연산되는 인공신경망 모델의 정보 중 하나 이상에 기초하여 생성되는, NPU.
The method of claim 2, wherein the optional information:
An NPU generated based on one or more of size information of an output feature map, information on a machine task performed in another NPU receiving the bitstream, and information on an artificial neural network model calculated in another NPU receiving the bitstream.
제1항에 있어서,
상기 비트스트림은, 상기 인공신경망 내의 후속 레이어들을 위한 연산을 다른 NPU가 수행하도록 하기 위해 전송되는, NPU.
According to paragraph 1,
The bitstream is transmitted to enable another NPU to perform operations for subsequent layers in the artificial neural network.
디코딩을 수행할 수 있는 NPU(Neural Processing Unit)로서,
수신되는 비트스트림을 디코딩하여 하나 이상의 임의 특징맵으로 복원하는 디코더와; 그리고
인공신경망 모델을 위한 연산을 수행하는 하나 이상의 PE(Processing Element)를 포함하고,
상기 복원된 하나 이상의 임의 특징맵은 상기 인공신경망 내의 다수의 레이어들 중에서 임의 레이어의 출력 특징맵이고,
상기 하나 이상의 PE는 상기 복원된 하나 이상의 임의 특징맵을 상기 임의 레이어의 후속 레이어의 입력 특징맵으로 활용하는, NPU.
As a Neural Processing Unit (NPU) capable of performing decoding,
a decoder that decodes a received bitstream and restores it into one or more random feature maps; and
Contains one or more PE (Processing Elements) that perform calculations for an artificial neural network model,
The one or more reconstructed random feature maps are output feature maps of a random layer among a plurality of layers in the artificial neural network,
The one or more PEs utilize the one or more reconstructed random feature maps as an input feature map of a subsequent layer of the random layer.
제7항에 있어서, 상기 NPU는 상기 임의 레이어 혹은 상기 하나 이상의 특징맵을 상기 비트스트림을 전송하는 다른 NPU에 의해 선택될 수 있도록 하는 임의 정보를 전송하는, NPU.The NPU of claim 7, wherein the NPU transmits random information that allows the random layer or the one or more feature maps to be selected by another NPU transmitting the bitstream. 제8항에 있어서, 상기 임의 정보는 상기 하나 이상의 임의 특징맵에 대한 식별 정보 혹은 상기 하나 이상의 임의 특징맵에 대응하는 레이어에 대한 식별 정보를 포함하는, NPU.The NPU of claim 8, wherein the random information includes identification information about the one or more random feature maps or identification information about a layer corresponding to the one or more random feature maps. 제8항에 있어서, 상기 임의 정보는:
특징맵의 사이즈 정보, 상기 NPU에서 수행되는 머신 태스크의 정보 그리고 상기 인공신경망 모델의 정보 중 하나 이상에 기초하여 생성되는, NPU.
The method of claim 8, wherein the optional information:
An NPU generated based on one or more of the size information of the feature map, information on machine tasks performed in the NPU, and information on the artificial neural network model.
복수의 레이어를 포한하는 인공신경망 모델의 제1 레이어 구간을 처리하도록 구성된 제1 신경 프로세싱 유닛; 및
상기 인공신경망 모델의 제2 레이어 구간을 처리하도록 구성된 제2 신경 프로세싱 유닛;을 포함하고,
상기 제1 신경 프로세싱 유닛은 상기 제1 레이어 구간의 마지막 레이어의 출력 특징맵을 상기 제2 신경 프로세싱 유닛에 입력하도록 구성된, 시스템.
a first neural processing unit configured to process a first layer section of an artificial neural network model including a plurality of layers; and
A second neural processing unit configured to process a second layer section of the artificial neural network model,
The first neural processing unit is configured to input the output feature map of the last layer of the first layer section to the second neural processing unit.
제11항에 있어서,
상기 제1 레이어 구간의 레이어들의 가중치의 총합의 크기는 상기 제2 레이어 구간의 레이어들의 가중치의 총합의 크기보다 상대적으로 더 작은, 시스템.
According to clause 11,
The system wherein the size of the sum of the weights of the layers in the first layer section is relatively smaller than the size of the sum of the weights of the layers in the second layer section.
제11항에 있어서,
상기 제1 신경 프로세싱 유닛은 복수개이고, 상기 제2 신경 프로세싱 유닛은 상기 제1 신경 프로세싱 유닛에서 출력되는 상기 출력 특징맵 각각을 순차적으로 처리하도록 구성된, 시스템.
According to clause 11,
The system includes a plurality of first neural processing units, and the second neural processing unit is configured to sequentially process each of the output feature maps output from the first neural processing unit.
제11항에 있어서,
상기 제2 신경 프로세싱 유닛은 적어도 상기 제1 신경 프로세싱 유닛의 개수에 대응하여 가중치를 재사용하도록 구성된, 시스템.
According to clause 11,
The system wherein the second neural processing unit is configured to reuse weights at least corresponding to the number of the first neural processing unit.
제11항에 있어서,
상기 제1 신경 프로세싱 유닛의 제1 메모리의 크기는 상기 제2 신경 프로세싱 유닛의 제2 메모리 보다 상대적으로 더 작도록 구성된, 시스템.
According to clause 11,
The system is configured such that the size of the first memory of the first neural processing unit is relatively smaller than the second memory of the second neural processing unit.
제11항에 있어서,
상기 인공신경망 모델의 제1 레이어 구간과 상기 제2 레이어 구간은 특정 레이어의 출력 특징맵의 크기를 기초로 결정된, 시스템.
According to clause 11,
The system wherein the first layer section and the second layer section of the artificial neural network model are determined based on the size of the output feature map of a specific layer.
제11항에 있어서,
상기 인공신경망 모델의 제1 레이어 구간과 상기 제2 레이어 구간은 각각의 레이어 구간의 가중치 총합의 크기를 기초로 결정된, 시스템.
According to clause 11,
The system wherein the first layer section and the second layer section of the artificial neural network model are determined based on the size of the sum of the weights of each layer section.
제11항에 있어서,
상기 인공신경망 모델의 제1 레이어 구간의 제1 가중치의 크기는 상기 제2 레이어 구간의 제2 가중치 크기 보다 상대적으로 더 작은, 시스템.
According to clause 11,
The system wherein the size of the first weight of the first layer section of the artificial neural network model is relatively smaller than the size of the second weight of the second layer section.
KR1020220175322A 2022-08-29 2022-12-14 Npu for distributing artificial neural networks based on mpeg-vcm and method thereof KR20240030922A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
KR1020237031802A KR20240032707A (en) 2022-08-29 2023-08-29 Distributed computing system and method of artificial neural network
PCT/KR2023/012754 WO2024049151A1 (en) 2022-08-29 2023-08-29 Distributed computing system and method of artificial neural network
US18/504,522 US20240089475A1 (en) 2022-08-29 2023-11-08 Distributed computational system and method for artificial neural network

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020220108446 2022-08-29
KR20220108446 2022-08-29

Publications (1)

Publication Number Publication Date
KR20240030922A true KR20240030922A (en) 2024-03-07

Family

ID=90271664

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220175322A KR20240030922A (en) 2022-08-29 2022-12-14 Npu for distributing artificial neural networks based on mpeg-vcm and method thereof

Country Status (1)

Country Link
KR (1) KR20240030922A (en)

Similar Documents

Publication Publication Date Title
JP7422841B2 (en) Intra prediction-based image coding method and device using MPM list
US20230156212A1 (en) Video transmission method, video transmission device, video reception method, and video reception device
US20230276050A1 (en) Image decoding method and device using residual information in image coding system
CN107431805B (en) Encoding method and apparatus, and decoding method and apparatus
TW202145792A (en) Parallelized rate-distortion optimized quantization using deep learning
US20230276063A1 (en) Npu for encoding or decoding videostream format for machine analisys
US11838519B2 (en) Image encoding/decoding method and apparatus for signaling image feature information, and method for transmitting bitstream
KR20210158400A (en) Signaling of information indicating a transform kernel set in image coding
CN112823523A (en) Intra prediction-based image coding method using MPM list and apparatus thereof
EP4229868A1 (en) Joint termination of bidirectional data blocks for parallel coding
CN113841407A (en) Transform in image coding based on intra prediction
JP2023508364A (en) context-adaptive transform set
WO2023132919A1 (en) Scalable framework for point cloud compression
KR20220000403A (en) Coding for information about the transform kernel set
US11893783B2 (en) Apparatus and method for transceiving feature map extracted using MPEG-VCM
CN115836525A (en) Method and system for prediction from multiple cross components
US20230269385A1 (en) Systems and methods for improving object tracking in compressed feature data in coding of multi-dimensional data
WO2023027873A1 (en) Multi-level latent fusion in neural networks for image and video coding
KR20240030922A (en) Npu for distributing artificial neural networks based on mpeg-vcm and method thereof
US11451786B2 (en) Image coding method using buffer compression in CTU unit, and apparatus therefor
US20240089475A1 (en) Distributed computational system and method for artificial neural network
US11743477B1 (en) Video-stream format for machine analysis using NPU
US11831887B1 (en) Scalable video coding for machine
KR20220024499A (en) Transformation-based video coding method and apparatus
KR20220000404A (en) Context coding for information about a transform kernel set in an image coding system