KR20220048875A - Method for generating quantization table - Google Patents

Method for generating quantization table Download PDF

Info

Publication number
KR20220048875A
KR20220048875A KR1020200132244A KR20200132244A KR20220048875A KR 20220048875 A KR20220048875 A KR 20220048875A KR 1020200132244 A KR1020200132244 A KR 1020200132244A KR 20200132244 A KR20200132244 A KR 20200132244A KR 20220048875 A KR20220048875 A KR 20220048875A
Authority
KR
South Korea
Prior art keywords
quantization table
target task
generating
loss function
quantization
Prior art date
Application number
KR1020200132244A
Other languages
Korean (ko)
Other versions
KR102506115B1 (en
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 KR1020200132244A priority Critical patent/KR102506115B1/en
Publication of KR20220048875A publication Critical patent/KR20220048875A/en
Application granted granted Critical
Publication of KR102506115B1 publication Critical patent/KR102506115B1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/002Image coding using neural networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream

Landscapes

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

Abstract

According to the present invention, provided is a method for generating a quantization table for each target task, which includes the steps of: setting a target task; determining a distortion loss function corresponding to the target task; estimating a bitrate loss function expressed in a differentiable form; calculating a quantization variable by adding predetermined weights to the distortion loss function and the bitrate loss function, respectively, and adding the same to each other; and deriving an optimal value of the quantization variable and generating a quantization table based on the optimal value.

Description

타겟 태스크별 양자화 테이블 생성 방법{Method for generating quantization table}Method for generating quantization table for each target task

본 발명은 타겟 태스크별 양자화 테이블 생성 방법에 관한 것으로, 보다 상세하게는 JPEG 압축 알고리즘의 성능을 향상시키기 위해 각 이미지와 용도에 따른 최적의 양자화 테이블을 생성하는 방법에 관한 것이다.The present invention relates to a method of generating a quantization table for each target task, and more particularly, to a method of generating an optimal quantization table according to each image and purpose in order to improve the performance of a JPEG compression algorithm.

본 발명은 JPEG 이미지 압축 시 양자화 테이블을 생성하는 방법에 관한 것으로, 구체적으로 태스크 별로 최적화된 양자화 테이블을 생성하는 방법에 관한 것이다.The present invention relates to a method of generating a quantization table when compressing a JPEG image, and more particularly, to a method of generating a quantization table optimized for each task.

인터넷 등 통신 기술의 발달에 따라 이미지를 전송하고 처리하는 기술 역시 빠른 속도로 발전하고 있다. 이러한 기술적 배경은 낮은 속도에서도 보다 좋은 화질을 얻을 수 있는 이미지 압축 방법에 대한 필요성을 증가시키고 있다.With the development of communication technology such as the Internet, technology for transmitting and processing images is also developing at a rapid pace. This technical background increases the need for an image compression method that can obtain better image quality even at a low speed.

압축에는 크게 비손실, 손실 압축이 있는데, 비손실 압축은 이미지가 거의 원본에 가깝게 원복가능한 압축이며, 손실압축은 더 많은 압축을 위해 기존 데이터의 정보의 손실을 감수하는 압축 방법이다. 이미지 손실 압축은 손실에 따른 이미지 품질 저하를 최소화하기 위한 RD(rate-distortion, 비트레이트-품질 저하 trade-off) 최적화를 통해 압축 성능을 높이고자 한다.There are two main types of compression: lossless and lossy. Lossless compression is compression that allows images to be restored almost to the original. Image loss compression seeks to increase compression performance through RD (rate-distortion, bitrate-quality degradation trade-off) optimization to minimize image quality degradation due to loss.

이러한 압축 방식 중 대표적인 기술이 JPEG 압축이며 JPEG 방식은 양자화 테이블을 사용하여 양자화 및 역양자화를 수행하게 된다. 양자화 테이블은 JPEG 압축 성능의 결정적인 요소로, 어떤 양자화 테이블을 사용하여 압축하는지에 따라 이미지의 품질이 크게 좌우될 수 있으며, 이를 구성하는 파라미터는 언제든지 사용자가 정의할 수 있으나, 대게는 표준이라 정해진 고정된 값을 사용한다.A representative technique among these compression methods is JPEG compression, and the JPEG method performs quantization and inverse quantization using a quantization table. The quantization table is a decisive factor in JPEG compression performance. Depending on which quantization table is used for compression, the quality of the image can be greatly affected. The parameters constituting it can be defined by the user at any time, but it is usually fixed as a standard. use the specified value.

다만, 표준화된 양자화 테이블은 목적에 따라 최적의 성능을 내기 어려운 단점이 있으며 이에 따라 태스크 별 최적화된 양자화 테이블 생성 방법이 요구된다.However, the standardized quantization table has a disadvantage in that it is difficult to achieve optimal performance depending on the purpose, and accordingly, a method for generating a quantization table optimized for each task is required.

KR 0620606KR 0620606

본 발명이 해결하려는 과제는 JPEG 압축에 요구되는 양자화 테이블을 목적에 따라 최적화하여 생성하는 것이다. The problem to be solved by the present invention is to optimize and generate a quantization table required for JPEG compression according to the purpose.

본 발명이 해결하려는 다른 과제는 상기 최적화된 양자화 테이블을 생성하기 위하여 뉴럴 네트워크 기반의 JPEG 비트레이트 추정 방법을 제공하는 것이다.Another object to be solved by the present invention is to provide a method for estimating a JPEG bitrate based on a neural network in order to generate the optimized quantization table.

상기 과제를 해결하기 위한 본 발명의 타겟 태스크별 양자화 테이블 생성 방법은, 타겟 태스크를 설정하는 단계; 상기 타겟 태스크에 대응하는 왜곡손실함수를 결정하는 단계; 미분가능한 형태로 표현되는 비트레이트손실함수를 추정하는 단계; 상기 왜곡손실함수와 상기 비트레이트손실함수에 각각 소정의 가중치를 부여한 후 서로 더하여 양자화 변수를 산출하는 단계; 및 상기 양자화 변수의 최적값을 산출하고 상기 최적값에 기반하여 양자화 테이블을 생성하는 단계를 포함한다.A method for generating a quantization table for each target task of the present invention for solving the above problem includes: setting a target task; determining a distortion loss function corresponding to the target task; estimating a bitrate loss function expressed in a differentiable form; calculating a quantization variable by adding predetermined weights to each of the distortion loss function and the bitrate loss function; and calculating an optimal value of the quantization variable and generating a quantization table based on the optimal value.

본 발명의 일 실시예에 있어서, 상기 비트레이트손실함수를 추정하기 위한 회귀모델을 학습하는 단계를 더 포함하며, 상기 회귀모델은 뉴럴 네트워크 모델을 통하여 학습할 수 있다.In one embodiment of the present invention, the method further comprises the step of learning a regression model for estimating the bitrate loss function, wherein the regression model can be learned through a neural network model.

본 발명의 일 실시예에 있어서, 상기 뉴럴 네트워크 모델은 LSTM(Long Short-Term Memory)일 수 있다.In an embodiment of the present invention, the neural network model may be a Long Short-Term Memory (LSTM).

본 발명의 일 실시예에 있어서, 상기 회귀모델은 허프만(Huffman) 모델을 추정하도록 학습될 수 있다.In an embodiment of the present invention, the regression model may be trained to estimate a Huffman model.

본 발명의 일 실시예에 있어서, 상기 회귀모델은 다중 퍼셉트론(MLP)을 통하여 학습될 수 있다.In an embodiment of the present invention, the regression model may be trained through a multiple perceptron (MLP).

본 발명의 일 실시예에 있어서, 상기 비트레이트손실함수는 DC 성분에 기반하는 제1 부분 및 AC 성분에 기반하는 제2 부분의 합으로 구성되며, 상기 제1 부분 및 상기 제2 부분은 각각 다중 퍼셉트론(MLP)을 통하여 학습되는 회귀모델에 의해 도출될 수 있다.In one embodiment of the present invention, the bitrate loss function is composed of the sum of a first part based on a DC component and a second part based on an AC component, wherein the first part and the second part are each multiple It can be derived by a regression model that is learned through a perceptron (MLP).

본 발명의 일 실시예에 있어서, 상기 제2 부분은 LSTM(Long Short-Term Memory)을 통하여 학습되는 회귀모델에 의해 도출되는 결과를 입력변수로 할 수 있다.In an embodiment of the present invention, the second part may use a result derived by a regression model learned through a long short-term memory (LSTM) as an input variable.

본 발명의 일 실시예에 있어서, 상기 회귀모델은 랜덤 데이터를 합성하여 사용하는 학습 데이터를 이용할 수 있다.In an embodiment of the present invention, the regression model may use training data that is used by synthesizing random data.

본 발명의 일 실시예에 있어서, 상기 최적값은 상기 양자화 변수를 최소화하는 것일 수 있다.In an embodiment of the present invention, the optimal value may be to minimize the quantization variable.

본 발명의 일 실시예에 있어서, 상기 상기 타겟 태스크는 기설정된 것 중 어느 하나일 수 있다.In an embodiment of the present invention, the target task may be any one of preset ones.

본 발명의 일 실시예에 있어서, 상기 기설정된 태스크들은 이미지 분류(classification), 이미지 분할(segmentation), 이미지 캡셔닝(captioning) 및 이미지 품질을 포함할 수 있다.In an embodiment of the present invention, the preset tasks may include image classification, image segmentation, image captioning, and image quality.

본 발명의 일 실시예에 있어서, 상기 기설정된 태스크들에 대응하는 상기 왜곡손실함수는 분류오류, MSE, 퍼셉츄얼 손실(Perceptual loss)을 포함할 수 있다.In an embodiment of the present invention, the distortion loss function corresponding to the preset tasks may include a classification error, MSE, and perceptual loss.

본 발명의 일 실시예에 있어서, 상기 생성된 양자화 테이블을 기반으로 비트레이트를 결정하는 단계를 더 포함할 수 있다.In an embodiment of the present invention, the method may further include determining a bit rate based on the generated quantization table.

본 발명의 일 실시예에 따른 타겟 태스크별 양자화 테이블 생성 방법은 태스크 별로 최적화된 양자화 테이블을 생성하여 압축된 이미지에서도 필요한 성능을 최대한 유지할 수 있다. The method for generating a quantization table for each target task according to an embodiment of the present invention generates a quantization table optimized for each task, thereby maximally maintaining required performance even in a compressed image.

또한, 양자화 테이블만을 최적화하여 제공하고 JPEG 베이스라인을 그대로 사용하기 때문에 기존의 코덱을 변경하지 않아도 사용할 수 있어 활용성이 높은 효과를 갖는다.In addition, since only the quantization table is optimized and provided and the JPEG baseline is used as it is, it can be used without changing the existing codec, which has a high usability effect.

도 1은 본 발명의 일 실시예에 따른 타겟 태스크별 양자화 테이블 생성 방법에 대한 순서도이다.
도 2는 본 발명의 일 실시예에 따른 비트레이트손실함수 추정에 대한 구성도이다.
도 3은 본 발명의 일 실시예에 따른 학습 프레임워크에 대한 구성도이다.
도 4는 본 발명의 일 실시예에 따른 JPEG 압축 방법에 대한 구성도이다.
도 5a는 본 발명의 일 실시예에 따른 태스크별 양자화 테이블 생성에 대한 구성도이다.
도 5b는 본 발명의 일 실시예에 따른 이미지별 양자화 테이블 생성에 대한 구성도이다.
도 6은 본 발명의 다른 일 실시예에 따른 타겟 태스크별 양자화 테이블 생성 방법에 대한 순서도이다.
도 7은 본 발명의 일 실시예에 따른 압축 결과에 대한 그래프이다.
도 8은 본 발명의 일 실시예에 따른 압축 결과를 비교한 이미지이다.
1 is a flowchart of a method of generating a quantization table for each target task according to an embodiment of the present invention.
2 is a block diagram of bitrate loss function estimation according to an embodiment of the present invention.
3 is a block diagram of a learning framework according to an embodiment of the present invention.
4 is a block diagram of a JPEG compression method according to an embodiment of the present invention.
5A is a block diagram for generating a quantization table for each task according to an embodiment of the present invention.
5B is a configuration diagram for generating a quantization table for each image according to an embodiment of the present invention.
6 is a flowchart of a method of generating a quantization table for each target task according to another embodiment of the present invention.
7 is a graph of a compression result according to an embodiment of the present invention.
8 is an image comparing compression results according to an embodiment of the present invention.

이하, 첨부된 도면을 참조하여 본 발명의 실시예들을 상세히 설명한다. 본 발명을 설명하는데 있어서, 해당 분야에 이미 공지된 기술 또는 구성에 대한 구체적인 설명을 부가하는 것이 본 발명의 요지를 불분명하게 할 수 있다고 판단되는 경우에는 상세한 설명에서 이를 일부 생략하도록 한다. 또한, 본 명세서에서 사용되는 용어들은 본 발명의 실시예들을 적절히 표현하기 위해 사용된 용어들로서, 이는 해당 분야의 관련된 사람 또는 관례 등에 따라 달라질 수 있다. 따라서, 본 용어들에 대한 정의는 본 명세서 전반에 걸친 내용을 토대로 내려져야 할 것이다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. In describing the present invention, if it is determined that adding a detailed description of a technique or configuration already known in the relevant field may make the gist of the present invention unclear, some of it will be omitted from the detailed description. In addition, the terms used in this specification are terms used to properly express the embodiments of the present invention, which may vary according to a person or custom in the relevant field. Accordingly, definitions of these terms should be made based on the content throughout this specification.

여기서 사용되는 전문용어는 단지 특정 실시예를 언급하기 위한 것이며, 본 발명을 한정하는 것을 의도하지 않는다. 여기서 사용되는 단수 형태들은 문구들이 이와 명백히 반대의 의미를 나타내지 않는 한 복수 형태들도 포함한다. 명세서에서 사용되는 '포함하는'의 의미는 특정 특성, 영역, 정수, 단계, 동작, 요소 및/또는 성분을 구체화하며, 다른 특정 특성, 영역, 정수, 단계, 동작, 요소, 성분 및/또는 군의 존재나 부가를 제외시키는 것은 아니다.The terminology used herein is for the purpose of referring to specific embodiments only, and is not intended to limit the invention. As used herein, the singular forms also include the plural forms unless the phrases clearly indicate the opposite. As used herein, the meaning of 'comprising' specifies a particular characteristic, region, integer, step, operation, element and/or component, and other specific characteristic, region, integer, step, operation, element, component, and/or group. It does not exclude the existence or addition of

본 명세서의 실시예에 있어서, 제1, 제2 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용되며, 특별히 언급되지 않는 한 구성요소들간의 순서 또는 중요도 등을 한정하지 않는다. 따라서, 본 명세서의 실시예의 범위 내에서 실시예에서의 제1 구성요소는 다른 실시예에서 제2 구성요소라고 칭할 수도 있고, 마찬가지로 실시예에서의 제2 구성요소를 다른 실시예에서 제1 구성요소라고 칭할 수도 있다.In the embodiments of the present specification, terms such as first, second, etc. are used only for the purpose of distinguishing one component from other components, and unless otherwise specified, do not limit the order or importance between the components. does not Accordingly, within the scope of the embodiments herein, a first component in an embodiment may be referred to as a second component in another embodiment, and similarly, a second component in an embodiment is referred to as a first component in another embodiment. can also be called

본 명세서에 있어서 네트워크의 통신 방식은 제한되지 않으며, 각 구성요소간 연결이 동일한 네트워크 방식으로 연결되지 않을 수도 있다. 네트워크는, 통신망(일례로, 이동통신망, 유선 인터넷, 무선 인터넷, 방송망, 위성망 등)을 활용하는 통신 방식뿐만 아니라 기기들간의 근거리 무선 통신 역시 포함될 수 있다. 예를 들어, 네트워크는, 객체와 객체가 네트워킹 할 수 있는 모든 통신 방법을 포함할 수 있으며, 유선 통신, 무선 통신, 3G, 4G, 5G, 혹은 그 이외의 방법으로 제한되지 않는다. 예를 들어, 유선 및/또는 네트워크는 LAN(Local Area Network), MAN(Metropolitan Area Network), GSM(Global System for Mobile Network), EDGE(Enhanced Data GSM Environment), HSDPA(High Speed Downlink Packet Access), W-CDMA(Wideband Code Division Multiple Access), CDMA(Code Division Multiple Access), TDMA(Time Division Multiple Access), 블루투스(Bluetooth), 지그비(Zigbee), 와이-파이(Wi-Fi), VoIP(Voice over Internet Protocol), LTE Advanced, IEEE802.16m, WirelessMAN-Advanced, HSPA+, 3GPP Long Term Evolution (LTE), Mobile WiMAX (IEEE 802.16e), UMB (formerly EV-DO Rev. C), Flash-OFDM, iBurst and MBWA (IEEE 802.20) systems, HIPERMAN, Beam-Division Multiple Access (BDMA), Wi-MAX(World Interoperability for Microwave Access) 및 초음파 활용 통신으로 이루어진 군으로부터 선택되는 하나 이상의 통신 방법에 의한 통신 네트워크를 지칭할 수 있으나, 이에 한정되는 것은 아니다.In the present specification, the communication method of the network is not limited, and the connection between each component may not be connected in the same network method. The network may include not only a communication method using a communication network (eg, a mobile communication network, a wired Internet, a wireless Internet, a broadcasting network, a satellite network, etc.) but also short-range wireless communication between devices. For example, the network may include all communication methods through which an object and an object can network, and is not limited to wired communication, wireless communication, 3G, 4G, 5G, or other methods. For example, a wired and/or network may be a Local Area Network (LAN), a Metropolitan Area Network (MAN), a Global System for Mobile Network (GSM), an Enhanced Data GSM Environment (EDGE), a High Speed Downlink Packet Access (HSDPA), W-CDMA (Wideband Code Division Multiple Access), CDMA (Code Division Multiple Access), TDMA (Time Division Multiple Access), Bluetooth, Zigbee, Wi-Fi, VoIP (Voice over) Internet Protocol), LTE Advanced, IEEE802.16m, WirelessMAN-Advanced, HSPA+, 3GPP Long Term Evolution (LTE), Mobile WiMAX (IEEE 802.16e), UMB (formerly EV-DO Rev. C), Flash-OFDM, iBurst and MBWA (IEEE 802.20) systems, HIPERMAN, Beam-Division Multiple Access (BDMA), Wi-MAX (World Interoperability for Microwave Access), and ultrasonic-based communication can refer to a communication network by one or more communication methods selected from the group consisting of However, the present invention is not limited thereto.

이하, 첨부된 도 1 내지 도 5를 참조하여 본 발명의 일 실시예에 따른 타겟 태스크별 양자화 테이블 생성 방법에 대해서 설명하도록 한다.Hereinafter, a method of generating a quantization table for each target task according to an embodiment of the present invention will be described with reference to FIGS. 1 to 5 .

본 발명은 이미지를 JPEG 방식으로 압축하는 과정에서 타겟 태스크별 최적의 양자화 테이블을 생성하는 방법에 관한 것이다.The present invention relates to a method of generating an optimal quantization table for each target task in the process of compressing an image using the JPEG method.

도 1은 본 발명의 일 실시예에 따른 타겟 태스크별 양자화 테이블 생성 방법에 대한 순서도이다.1 is a flowchart of a method of generating a quantization table for each target task according to an embodiment of the present invention.

도 1을 참조하면, 본 발명의 타겟 태스크별 양자화 테이블 생성 방법은 타겟 태스크를 설정하는 단계(S110), 타겟 태스크에 대응하는 왜곡손실함수를 결정하는 단계(S120), 미분가능한 형태로 표현되는 비트레이트손실함수를 추정하는 단계(S130), 왜곡손실함수와 비트레이트손실함수에 가중치를 부여하는 단계(S140), 양자화변수를 산출하는 단계(S150), 양자화변수의 최적값을 도출하는 단계(S160) 및 최적값을 기반으로 양자화 테이블을 생성하는 단계(S170)를 포함한다.Referring to FIG. 1 , the method for generating a quantization table for each target task of the present invention includes the steps of setting a target task (S110), determining a distortion loss function corresponding to the target task (S120), and a bit expressed in a differentiable form. Estimating the rate loss function (S130), weighting the distortion loss function and the bitrate loss function (S140), calculating a quantization variable (S150), and deriving an optimal value of the quantization variable (S160) ) and generating a quantization table based on the optimal value (S170).

상술한 각 단계들은 특별한 인과관계에 의해 나열된 순서에 따라 수행되어야 하는 경우를 제외하고, 나열된 순서와 상관없이 수행될 수 있다. 그러나 이하에서는 설명의 편의를 위해 상술한 각 단계들이 나열된 순서에 따라 수행되는 것을 가정하여 설명하도록 한다.Each of the above-described steps may be performed irrespective of the listed order, except when performed in the listed order due to a special causal relationship. However, hereinafter, for convenience of description, it is assumed that each of the above-described steps is performed according to the listed order.

이하, 타겟 태스크를 설정하는 단계(S110)에 대해 설명하도록 한다. 타겟 태스크를 설정하는 단계(S110)는 기설정된 적어도 하나의 태스크 중 사용자의 선택에 따라 하나의 타겟 태스크를 설정하는 단계이다.Hereinafter, the step of setting the target task ( S110 ) will be described. The step of setting the target task ( S110 ) is a step of setting one target task according to the user's selection among at least one preset task.

태스크는 사용자가 이미지 압축을 통해 달성하고자 하는 목적에 관한 것이다. 일반적으로 이미지 압축에 있어서 태스크는 압축률 대비 이미지의 시각적인 품질을 최대한 확보하는 것일 수 있다. 그러나 이외에 다양한 태스크들이 존재할 수 있다. 예를 들어, 태스크들은 이미지 분류(classification), 이미지 분할(segmentation) 및 이미지 캡셔닝(captioning)이 포함될 수 있으며, 이에 한정되지 않고 사용자가 이미지 압축을 통해 얻으려고 하는 모든 목적이 포함될 수 있다.The task is about what the user wants to achieve through image compression. In general, in image compression, a task may be to maximize the visual quality of the image compared to the compression ratio. However, other various tasks may exist. For example, the tasks may include, but are not limited to, image classification, image segmentation, and image captioning, and may include any purpose that a user seeks to achieve through image compression.

본 발명은 태스크에 따라 최적의 압축 방법을 제공하는 것과 관련된다. 예를 들어, 태스크가 이미지 분류 중 사람의 얼굴을 분류하는 것인 경우, 압축된 이미지에서 사람의 얼굴 부분이 최대한 원본 이미지와 일치하도록 사람의 얼굴 부분은 압축률을 낮추고, 나머지 부분은 압축률을 높일 수 있다. 이를 통해, 태스크에 최적화되면서 이미지 파일의 크기를 가능한 최대로 압축할 수 있다. 따라서 클라우드를 통하여 사람의 얼굴을 분류하는 태스크를 달성하고자 한다면, 그 과정에서 네트워크를 통하여 전송되는 데이터량을 최소화할 수 있다.The present invention relates to providing an optimal compression method according to the task. For example, if the task is to classify a human face during image classification, the compression ratio of the human face part in the compressed image is reduced so that the human face part matches the original image as much as possible, and the compression ratio of the rest part is increased. there is. Through this, the size of the image file can be compressed to the maximum possible while being optimized for the task. Therefore, if the task of classifying human faces is achieved through the cloud, the amount of data transmitted through the network in the process can be minimized.

타겟 태스크는 기설정된 적어도 하나의 태스크 중 사용자의 선택에 따라 설정되어야 한다. 단계(S110)에서 타겟 태스크가 결정된 이후, 단계(S120)에서 타겟 태스크에 대응되는 왜곡손실함수가 결정되어야 하는데, 왜곡손실함수는 태스크의 필요한 용도에 따라 한정된 개수로 마련되기 때문이다.The target task should be set according to a user's selection among at least one preset task. After the target task is determined in step S110, a distortion loss function corresponding to the target task must be determined in step S120, since the distortion loss function is provided in a limited number according to the required purpose of the task.

이하, 타겟 태스크에 대응하는 왜곡손실함수를 결정하는 단계(S120)에 대해 설명하도록 한다.Hereinafter, the step of determining the distortion loss function corresponding to the target task (S120) will be described.

왜곡손실함수은 이미지 품질에 관련한 손실함수로 이미지 손실압축 방식에서 발생하며 태스크에 대한 에러이다. Distortion loss function is a loss function related to image quality. It occurs in image loss compression method and is an error for the task.

왜곡손실함수는 단계(S110)에서 설정된 타켓 태스크에 따라 다양한 메트릭이 적용될 수 있다. 예를 들어, 설정된 타겟 태스크가 이미지 분류인 경우 왜곡손실함수는 분류 오류가 적용될 수 있다.Various metrics may be applied to the distortion loss function according to the target task set in step S110. For example, when the set target task is image classification, a classification error may be applied to the distortion loss function.

왜곡손실함수는 상술한 분류 오류 이외에도 MSE 및 퍼셉츄얼 손실(Perceptual loss) 등이 마련될 수 있으며, 이제 한정되지 않고 기설정된 태스크에 대응되는 추가의 왜곡손실함수가 마련될 수 있다.As for the distortion loss function, MSE and perceptual loss may be provided in addition to the above-described classification error, and an additional distortion loss function corresponding to a preset task may be provided without being limited thereto.

이하 도 1과 함께 도 2를 참조하여, 미분가능한 형태로 표현되는 비트레이트손실함수를 추정하는 단계(S130)에 대해 설명하도록 한다.Hereinafter, the step of estimating the bitrate loss function expressed in a differentiable form ( S130 ) will be described with reference to FIG. 2 together with FIG. 1 .

비트레이트손실함수는 압축 용량에 관한 손실함수로 본 발명에서는 양자화 테이블을 생성하여 비트레이트를 결정하기 위하여 추정된다. 비트레이트손실함수는 뉴럴 네트워크 학습을 위해 미분가능한 형태로 표현되어야 한다.The bitrate loss function is a loss function related to the compression capacity, and in the present invention, it is estimated to determine the bitrate by generating a quantization table. The bitrate loss function must be expressed in a differentiable form for neural network training.

도 2는 본 발명의 일 실시예에 따른 비트레이트손실함수 추정에 대한 구성도이다.2 is a block diagram of bitrate loss function estimation according to an embodiment of the present invention.

도 2를 참조하면, 비트레이트손실함수를 뉴럴 네트워크를 통하여 추정할 수 있다. 구체적으로, 비트레이트를 예측하는 회귀모델(220)을 뉴럴 네트워크(210)를 통해 학습하고 이를 통해 비트레이트손실함수(230)를 추정할 수 있다.Referring to FIG. 2 , the bitrate loss function may be estimated through a neural network. Specifically, the regression model 220 for predicting the bit rate may be learned through the neural network 210 and the bit rate loss function 230 may be estimated through this.

보다 구체적으로, JPEG 이미지의 비트레이트를 예측하기 위해서 JPEG의 엔트로피 코딩 과정에서 Run-length 인코딩, 허프만 코딩 등 각각의 단계를 모사하는 뉴럴 네트워크를 구성할 수 있다. 학습 데이터는 어떠한 이미지가 들어와도 예측 가능하도록 랜덤한 데이터를 합성하여 사용할 수 있으며, JPEG 인코딩의 기본 단위인 8x8 픽셀 블록에 대해 각각 적용될 수 있다.More specifically, in order to predict the bitrate of a JPEG image, a neural network that simulates each step such as run-length encoding and Huffman coding in the entropy coding process of JPEG may be constructed. The training data can be used by synthesizing random data so that any image can be predicted, and can be applied to each 8x8 pixel block, which is the basic unit of JPEG encoding.

뉴럴 네트워크 모델은 LSTM(Long Short-Term Memory)일 수 있다. 다만, 이에 한정되지 않고 RNN(Recurrent Neural Network)에 해당되는 다른 알고리즘들도 본 발명의 범위에 포함될 수 있다.The neural network model may be a Long Short-Term Memory (LSTM). However, the present invention is not limited thereto, and other algorithms corresponding to a recurrent neural network (RNN) may be included in the scope of the present invention.

회귀모델은 허프만(Huffman) 모델을 추정하도록 학습될 수 있다. 구체적으로, 회귀모델은 허프만 모델에 따른 허프만 코드 길이를 추정하도록 학습될 수 있다. 비트레이트손실함수는 DC 성분에 기반하는 제1 부분 및 AC 성분에 기반하는 제2 부분의 합으로 구성된다. 제1 부분 및 제2 부분은 각각 다중 퍼셉트론(MLP; Multi-Layer Perceptron)을 통하여 학습되는 회귀모델에 의해 도출될 수 있다.A regression model can be trained to estimate a Huffman model. Specifically, the regression model may be trained to estimate the Huffman code length according to the Huffman model. The bitrate loss function consists of the sum of a first part based on the DC component and a second part based on the AC component. The first part and the second part may be derived by a regression model learned through a multi-layer perceptron (MLP), respectively.

여기서, 제1 부분은 허프만 모델의 DC 성분을 JPEG 인코딩의 기본 단위인 8x8 픽셀 블록에 기반한 합으로 표현될 수 있다.Here, the first part may be expressed as a sum of the DC component of the Huffman model based on an 8x8 pixel block, which is a basic unit of JPEG encoding.

또한, AC 성분에 기반하는 제2 부분은 LSTM(Long Short-Term Memory)을 통하여 학습되는 회귀모델에 의해 도출되는 결과를 입력변수로 할 수 있다.In addition, the second part based on the AC component may use a result derived by a regression model learned through a long short-term memory (LSTM) as an input variable.

이를 수학식으로 표현하면 다음과 같이 표시된다.Expressing this as an equation, it is expressed as follows.

Figure pat00001
는 각각 픽셀 블록의 JPEG의 DC 성분, AC 성분 벡터를 의미하며, Hdc, Hac는 허프만 모델에 따른 허프만 코드 길이를 나타낸다. 상기 회귀모델은 허프만 모델을 추정하도록 학습될 수 있으며 다중 퍼셉트론(MLP)을 통하여 학습될 수 있다. 다만, 이에 한정되지 않고 다양한 모델을 통하여 학습될 수 있다. Sac는 Run-length 인코딩의 결과를 예측하는 모델로 상술한 LSTM을 이용할 수 있다.
Figure pat00001
denotes the DC component and AC component vectors of the JPEG of the pixel block, respectively, and Hdc and Hac denote the Huffman code length according to the Huffman model. The regression model can be trained to estimate the Huffman model and can be trained through multiple perceptrons (MLP). However, the present invention is not limited thereto and may be learned through various models. Sac may use the above-described LSTM as a model for predicting the result of run-length encoding.

이하, 왜곡손실함수와 비트레이트손실함수에 가중치를 부여하는 단계(S140) 및 양자화변수를 산출하는 단계(S150)에 대해 설명하도록 한다.Hereinafter, the step of giving weight to the distortion loss function and the bitrate loss function (S140) and the step of calculating the quantization variable (S150) will be described.

단계(S120)에서 결정된 왜곡손실함수와 단계(S130)에서 추정된 비트레이트손실함수에 가중치를 부여한 후 서로 더하여 양자화변수를 산출할 수 있다. After weighting the distortion loss function determined in step S120 and the bitrate loss function estimated in step S130, a quantization variable can be calculated by adding them together.

이를 수학식으로 표현하면 다음과 같이 표시된다.Expressing this as an equation, it is expressed as follows.

여기서, D는 왜곡손실함수를 나타내며, R은 비트레이트손실함수를 나타낸다. 또한, LQ는 양자화 변수를 나타낸다.

Figure pat00002
은 각각 원본 이미지, 양자화 테이블, 압축된 인코딩 벡터를 의미하며, Enc, Dec은 JPEG 인코더, 디코더이다.Here, D denotes a distortion loss function, and R denotes a bitrate loss function. Also, L Q represents a quantization variable.
Figure pat00002
is the original image, quantization table, and compressed encoding vector, respectively, and Enc and Dec are JPEG encoders and decoders.

이하, 양자화변수의 최적값을 도출하는 단계(S160)에 대해 설명하도록 한다.Hereinafter, the step of deriving the optimal value of the quantization variable ( S160 ) will be described.

상술한 대로 양자화변수는 왜곡손실함수와 비트레이트손실함수를 함께 고려하여, 최적값을 도출하는 방향으로 학습하게 된다. 이러한 최적값은 상기 양자화 변수가 최소화되는 방향으로 도출할 수 있으며, 이에 한정되지 않고 다양한 방법에 의하여 도출할 수 있다.As described above, the quantization variable is learned in the direction of deriving an optimal value by considering both the distortion loss function and the bitrate loss function. Such an optimal value may be derived in a direction in which the quantization variable is minimized, but is not limited thereto, and may be derived by various methods.

이하, 양자화 변수의 최적값을 기반으로 양자화 테이블을 생성하는 단계(S170)에 대해 설명하도록 한다.Hereinafter, the step ( S170 ) of generating a quantization table based on the optimal value of the quantization variable will be described.

JPEG 압축 방식은 양자화 테이블을 사용하여 양자화 및 역양자화를 수행하게 된다. 양자화 테이블은 JPEG 압축 성능의 결정적인 요소로, 어떤 양자화 테이블을 사용하여 압축하는지에 따라 이미지의 품질이 크게 좌우될 수 있으며, 이를 구성하는 파라미터는 언제든지 사용자가 정의할 수 있으나, 대게는 표준이라 정해진 고정된 값을 사용한다.In the JPEG compression method, quantization and inverse quantization are performed using a quantization table. The quantization table is a decisive factor in JPEG compression performance. Depending on which quantization table is used for compression, the quality of the image can be greatly affected. The parameters constituting it can be defined by the user at any time, but it is usually fixed as a standard. use the specified value.

최종적으로 본 발명에 따라 생성된 양자화 테이블을 기반으로 비트레이트가 결정된다. Finally, the bit rate is determined based on the quantization table generated according to the present invention.

이 때, 양자화 테이블 자체만을 최적화하여 생성하고 나머지 과정에서 JPEG 표준값을 활용할 수 있다. 따라서, JPEG 코덱 자체의 변경을 요하는 경우 상응하는 디코더가 없는 경우 동작하지 않을 수 있으나 양자화 테이블의 값만을 최적화하는 경우 기존의 코덱을 변경하지 않고 사용할 수 있어 적용성이 높은 장점이 있다.In this case, only the quantization table itself can be optimized and generated, and the JPEG standard value can be used in the rest of the process. Therefore, when a change in the JPEG codec itself is required, it may not operate if there is no corresponding decoder. However, in case of optimizing only the value of the quantization table, the existing codec can be used without changing, so there is an advantage of high applicability.

도 3은 본 발명의 일 실시예에 따른 학습 프레임워크에 대한 구성도이다.3 is a block diagram of a learning framework according to an embodiment of the present invention.

도 3을 참조하면, JPEG 압축 과정은 색공간 변환 단계, DCT(Discrete Cosine Transform) 단계, 양자화 단계의 순서로 수행된다.Referring to FIG. 3 , the JPEG compression process is performed in the order of a color space conversion step, a discrete cosine transform (DCT) step, and a quantization step.

이하, 색공간 변환 단계에 대해 설명하도록 한다.Hereinafter, the color space conversion step will be described.

일반적으로 JPEG 이미지 압축은 RGB 색공간을 YCbCr 색공간으로 변환(RGB-to-YCbCr)한다. 색공간을 변환하는 이유는 사람의 눈이 색상 성분보다는 밝기(휘도) 성분에 더 민감하기 때문에 밝기 정보보다 색상 정보를 더 많이 압축하기 위해서이다. 이를 위해 다운샘플링을 하는데, Y성분은 그대로 유지하고 Cb와 Cr을 줄이는 방향으로 샘플링을 한다. 다운샘플링은 보통 J:a:b의 비율로 표현된다. 여기서 J는 샘플링을 시행할 픽셀블럭의 너비를 의미한다. 그리고 a는 J픽셀들의 첫번째 행에서 추출한 샘플들의 갯수를 의미한다. b는 J픽셀들의 두번째 행에서 추출된 샘플들의 갯수를 의미한다. JPEG에서는 주로 4:2:0 방식을 사용한다. 4:2:0 방식으로 Cb 성분과 Cr 성분을 다운샘플링해주면 8개 픽셀당 2개의 값을 추출하고 6개의 값을 버리게 되므로 그만큼 용량을 줄일 수 있다.In general, JPEG image compression converts the RGB color space to the YCbCr color space (RGB-to-YCbCr). The reason for converting the color space is to compress the color information more than the brightness information because the human eye is more sensitive to the brightness (luminance) component than the color component. For this purpose, downsampling is performed, and sampling is performed in the direction of reducing Cb and Cr while maintaining the Y component. Downsampling is usually expressed as a ratio of J:a:b. Here, J means the width of the pixel block to be sampled. And a means the number of samples extracted from the first row of J pixels. b denotes the number of samples extracted from the second row of J pixels. In JPEG, the 4:2:0 method is mainly used. If the Cb component and the Cr component are downsampled in the 4:2:0 method, 2 values are extracted per 8 pixels and 6 values are discarded, so the capacity can be reduced by that much.

이하, DCT 단계에 대해 설명하도록 한다.Hereinafter, the DCT step will be described.

다운샘플링 후에 각 채널은 8x8 블록들로 분할된다. 각 8x8 블록에 2D 이산코사인변환(DCT)을 적용한다. 그 결과 주파수 관점에서 이미지를 볼 수 있어 압축이 가능하도록 한다. 일반적으로 JPEG은 고주파 성분을 제거하여 이미지를 압축한다.After downsampling, each channel is divided into 8x8 blocks. 2D Discrete Cosine Transform (DCT) is applied to each 8x8 block. As a result, the image can be viewed in terms of frequency, enabling compression. In general, JPEG compresses images by removing high-frequency components.

이하, 양자화 단계에 대해 설명하도록 한다.Hereinafter, the quantization step will be described.

구체적으로, 양자화는 주파수 성분을 제거하기 위한 과정이다. 주파수 영역의 각 계수를 양자화 테이블로 나눈 후 반올림한 값들을 취한다. 이에 따라, DCT 계수들이 양자화 되어 높은 고주파 신호와 관련된 계수들을 제거할 수 있다.Specifically, quantization is a process for removing frequency components. After dividing each coefficient in the frequency domain by a quantization table, rounded values are taken. Accordingly, DCT coefficients are quantized to remove coefficients related to a high frequency signal.

이 과정에서, 양자화 테이블이 JPEG 압축 성능의 주요한 요소가 될 수 있다. 본 발명에서는 표준이 아닌 이미지별, 태스크별 양자화 테이블을 도출하여 적용함으로써 태스크에 최적화된 JPEG 압축이 이루어지도록 할 수 있다.In this process, the quantization table can be a major factor in JPEG compression performance. In the present invention, by deriving and applying a non-standard quantization table for each image and each task, JPEG compression optimized for the task can be achieved.

또한, 디코딩 과정에서도 생성된 양자화 테이블을 그대로 활용하여 디코딩함으로써 기존의 코덱을 변경하지 않고 디코딩이 가능하다.In addition, in the decoding process, decoding is possible without changing the existing codec by using the generated quantization table as it is for decoding.

도 4는 본 발명의 일 실시예에 따른 JPEG 압축 방법에 대한 구성도이다.4 is a block diagram of a JPEG compression method according to an embodiment of the present invention.

도 4를 참조하면, 구체적으로 본 발명에서 생성한 양자화 테이블을 적용하는 방법은 양자화 테이블 생성 단계 및 이후 단계의 순서로 수행된다. Referring to FIG. 4 , specifically, the method of applying the quantization table generated in the present invention is performed in the order of a quantization table generation step and a subsequent step.

이하 양자화 테이블 생성 단계에 대해 설명하도록 한다.Hereinafter, the step of generating the quantization table will be described.

이미지를 JPEG 인코더의 시작인 DCT를 수행하기 직전, 학습된 양자화 네트워크에 넣어, 도출되는 양자화 테이블을 파라미터화하여 양자화 과정(Quantizer)에서 이를 활용하면 된다. Just before DCT, which is the start of the JPEG encoder, the image is put into the learned quantization network, the derived quantization table is parameterized, and this can be utilized in the quantization process (Quantizer).

이하 양자화 테이블 생성 이후 단계에 대해 설명하도록 한다.Hereinafter, steps after generation of the quantization table will be described.

양자화 테이블 생성 이후 모든 과정은 기존의 표준 JPEG 인코딩 과정과 동일하게 수행된다. 디코딩하는 과정에서도, 이미 JPEG 비트스트림 내에 양자화 테이블 정보가 인코딩 되어있기 때문에, 이를 기반으로 자동으로 디코딩할 수가 있다. 따라서, 상술한바와 같이 양자화 테이블만을 최적화하여 제공하고 JPEG 베이스라인을 그대로 사용하기 때문에 기존의 코덱을 변경하지 않아도 사용할 수 있어 활용성이 높은 효과를 갖는다.After the quantization table is created, all processes are performed in the same way as the existing standard JPEG encoding process. In the process of decoding, since quantization table information is already encoded in the JPEG bitstream, it can be automatically decoded based on this. Therefore, as described above, since only the quantization table is optimized and provided and the JPEG baseline is used as it is, it can be used without changing the existing codec, which has a high usefulness effect.

도 5a는 본 발명의 일 실시예에 따른 태스크별 양자화 테이블 생성에 대한 구성도이다.5A is a block diagram for generating a quantization table for each task according to an embodiment of the present invention.

도 5a를 참조하면, 하나의 이미지가 다양한 태스크를 가질 때 태스크별로 서로 다른 양자화 테이블을 생성할 수 있다. 예를 들어, 하나의 이미지에서 이미지 품질 확보를 태스크로 가지는 경우 일반적인 R-D 최적화를 통하여 양자화 테이블을 생성할 수 있으나, 이미지 분류(classification), 이미지 분할(segmentation), 이미지 캡셔닝(captioning) 등 다른 태스크를 가지는 경우 최적화된 테이블이라고 보기 어렵다.Referring to FIG. 5A , when one image has various tasks, different quantization tables may be generated for each task. For example, when securing image quality in one image is a task, a quantization table can be generated through general R-D optimization, but other tasks such as image classification, image segmentation, and image captioning , it is difficult to see it as an optimized table.

따라서 태스크에 최적화된 양자화 테이블을 학습을 통하여 생성하고 이를 압축 과정에서 활용할 수 있다. 즉, 하나의 이미지를 JPEG 압축하는 과정에서 사전에 설정된 태스크별로 서로 다른 양자화 테이블이 도출되어 각 태스크의 최적화된 방식으로 압축이 가능하다. Therefore, a quantization table optimized for a task can be created through learning and used in the compression process. That is, in the process of JPEG compression of one image, different quantization tables are derived for each preset task, so that compression is possible in an optimized manner for each task.

도 5b는 본 발명의 일 실시예에 따른 이미지별 양자화 테이블 생성에 대한 구성도이다.5B is a configuration diagram for generating a quantization table for each image according to an embodiment of the present invention.

도 5b를 참조하면, 여러 이미지가 하나의 태스크를 가질 때 이미지별로 서로 다른 양자화 테이블을 생성할 수 있다. 예를 들어, 복수개의 이미지가 이미지 분류라는 하나의 태스크를 갖는 경우 이미지별로 학습을 통하여 서로 다른 양자화 테이블을 생성하고 이를 압축 과정에 활용할 수 있다.Referring to FIG. 5B , when several images have one task, different quantization tables may be generated for each image. For example, when a plurality of images have one task of image classification, different quantization tables can be created through learning for each image and used in the compression process.

도 5a 및 도 5b를 종합하면 각각의 이미지, 각각의 태스크에 따라 최적화된 양자화 테이블이 생성될 수 있으며 이를 압축 과정에서 활용할 수 있다. 즉, 특정 이미지에 대해서 특정 태스크에 최적화된 양자화 테이블을 생성하는 것이 가능하다.Combining FIGS. 5A and 5B , a quantization table optimized according to each image and each task can be generated, and this can be utilized in the compression process. That is, it is possible to generate a quantization table optimized for a specific task with respect to a specific image.

이하, 첨부된 도 6을 참조하여 본 발명의 다른 일 실시예에 따른 타겟 태스크별 양자화 테이블 생성 방법에 대해서 설명하도록 한다.Hereinafter, a method of generating a quantization table for each target task according to another embodiment of the present invention will be described with reference to FIG. 6 attached thereto.

도 6은 본 발명의 다른 일 실시예에 따른 타겟 태스크별 양자화 테이블 생성 방법에 대한 순서도이다.6 is a flowchart of a method of generating a quantization table for each target task according to another embodiment of the present invention.

도 6을 참조하면, 본 실시예에 따른 타겟 태스크별 양자화 테이블 생성 방법은 도 1 내지 도 5를 참조하여 상술한 실시예의 모든 단계를 포함하지만, 양자화 변수의 최적값을 기반으로 양자화 테이블을 생성(S170)한 후, 상기 양자화 테이블 기반으로 비트레이트를 결정하는 단계(S610)가 더 포함된다. 이하, 추가된 단계(S610)에 대해 설명하도록 한다.Referring to FIG. 6 , the method for generating a quantization table for each target task according to the present embodiment includes all the steps of the embodiment described above with reference to FIGS. 1 to 5, but generates a quantization table based on the optimal value of the quantization variable ( After S170), the step of determining a bit rate based on the quantization table (S610) is further included. Hereinafter, the added step (S610) will be described.

구체적으로, 본 발명에 따른 JPEG 압축 과정에서 JPEG 베이스라인을 그대로 사용하기 때문에 비트레이트를 결정하면 원하는 이미지 품질을 얻을 수 있다. 즉, 학습 과정에서 특정 양자화 테이블에 의해 사용자가 원하는 비트레이트가 나오는지 추정할 수 있으며, 추정에 의해 결정된 비트레이트를 가지고 JPEG 이미지 압축을 수행할 수 있다.Specifically, since the JPEG baseline is used as it is in the JPEG compression process according to the present invention, a desired image quality can be obtained by determining the bit rate. That is, in the learning process, it is possible to estimate whether a desired bit rate is obtained by a specific quantization table, and JPEG image compression can be performed with the bit rate determined by the estimation.

도 7은 본 발명의 일 실시예에 따른 압축 결과에 대한 그래프이다.7 is a graph of a compression result according to an embodiment of the present invention.

도 7을 참조하면, 압축 방법에 따른 R-D 커브 결과를 보여준다. 이미지 평가 방법으로는 Inception-v3를 사용한 이미지 분류, RNN 기반 모델로 생성한 이미지 캡션 평가(BLEU score), 이미지 품질 평가 척도인 PSNR 과 MS-SSIM 등을 사용하였다.Referring to FIG. 7 , the R-D curve result according to the compression method is shown. As image evaluation methods, image classification using Inception-v3, image caption evaluation (BLEU score) generated by an RNN-based model, and PSNR and MS-SSIM, which are image quality evaluation scales, were used.

구체적으로, 태스크가 이미지 분류 일 때 Inception-v3를 사용한 평가(710a, 710b)의 경우, 본 발명에 따라 양자화 테이블을 생성한 후 압축한 이미지와 JPEG 베이스라인에 따라 압축한 이미지의 결과를 비교하면 모든 비트레이트 영역에서 더 좋은 품질을 얻을 수 있음을 알 수 있다. 특히, 압축률이 높을수록 성능의 차이가 더 큰 것을 확인할 수 있다.Specifically, in the case of evaluation (710a, 710b) using Inception-v3 when the task is image classification, comparing the results of the compressed image and the compressed image according to the JPEG baseline after generating a quantization table according to the present invention It can be seen that better quality can be obtained in all bitrate areas. In particular, it can be seen that the higher the compression rate, the greater the difference in performance.

마찬가지로, 태스크가 이미지 캡셔닝일 때 BLEU를 사용한 평가(720a, 720b, 720c, 720d)의 경우에도, 본 발명에 따라 양자화 테이블을 생성한 후 압축한 이미지와 JPEG 베이스라인에 따라 압축한 이미지의 결과를 비교하면 모든 비트레이트 영역에서 더 좋은 품질을 얻을 수 있음을 알 수 있다. 특히, 압축률이 높을수록 성능의 차이가 더 큰 것을 확인할 수 있다.Similarly, even in the case of evaluation using BLEU (720a, 720b, 720c, 720d) when the task is image captioning, the result of the compressed image and the compressed image according to the JPEG baseline after generating the quantization table according to the present invention By comparison, it can be seen that better quality can be obtained in all bitrate regions. In particular, it can be seen that the higher the compression rate, the greater the difference in performance.

마지막으로, 태스크가 이미지 품질일 때 PSNR을 사용한 평가(730a)와 MS-SSIM(730b)의 경우에도 마찬가지 결과를 확인할 수 있다. PSNR을 사용한 평가(730a)의 경우 왜곡손실함수를 MSE와, MS-SSIM을 사용하였을 때 거의 동일한 결과를 보이며 2가지 경우 모두 JPEG 베이스라인에 따라 압축한 이미지의 결과와 비교하면 모든 비트레이트 영역에서 더 좋은 품질을 얻을 수 있으며, 압축률이 높을수록 성능의 차이가 더 큰 것을 확인할 수 있다. MS-SSIM을 사용한 평가(730b)의 경우 왜곡손실함수를 MS-SSIM을 사용하였을 때가 MSE를 사용하였을때보다 더 좋은 결과를 보이며 2가지 경우 모두 JPEG 베이스라인에 따라 압축한 이미지의 결과와 비교하면 모든 비트레이트 영역에서 더 좋은 품질을 얻을 수 있으며, 압축률이 높을수록 성능의 차이가 더 큰 것을 확인할 수 있다. Finally, when the task is image quality, the same result can be confirmed in the case of the evaluation 730a and the MS-SSIM 730b using PSNR. In the case of evaluation using PSNR (730a), the distortion loss function shows almost the same results when using MSE and MS-SSIM. Better quality can be obtained, and it can be seen that the higher the compression rate, the greater the difference in performance. In the case of evaluation using MS-SSIM (730b), the distortion loss function when MS-SSIM was used showed better results than when MSE was used. Better quality can be obtained in all bitrate areas, and it can be seen that the higher the compression rate, the greater the difference in performance.

도 8은 본 발명의 일 실시예에 따른 압축 결과를 비교한 이미지이다.8 is an image comparing compression results according to an embodiment of the present invention.

도 8을 참조하면, 압축 방법에 따른 결과를 보여준다. 구체적으로, 원본 이미지(810a), 본 발명에 따른 양자화 테이블을 생성한 후 압축한 이미지(820a) 및 JPEG 베이스라인에 따라 압축한 이미지(830a)를 나타낸다. 이를, 인식에 주요한 부분의 텍스쳐나 색 등을 더 잘 보존하는지에 대해 색으로 나타난 결과값이 원본이미지결과(810b), 본 발명에 따른 양자화 테이블을 생성한 후 압축한 이미지결과(820b) 및 JPEG 베이스라인에 따라 압축한 이미지결과(730b)로 나타낸다. 이 결과에서, 본 발명에 따른 양자화 테이블을 생성한 후 압축한 이미지(820a)의 비트레이? 0.298bpp이고 JPEG 베이스라인에 따라 압축한 이미지(830a)는 0.301bpp로 본 발명에 의한 결과가 상대적으로 덜 주요한 부분에 대한 압축률을 높여 더 낮은 비트레이트로 압축함에도 불구하고 더 높은 인식 성능을 유지할 수 있는 결과를 나타낸다.Referring to FIG. 8 , the results according to the compression method are shown. Specifically, an original image 810a, an image 820a compressed after generating a quantization table according to the present invention, and an image 830a compressed according to a JPEG baseline are shown. As for whether the texture or color of the main part for recognition is better preserved, the result value expressed in color is the original image result 810b, the image result 820b compressed after creating a quantization table according to the present invention, and JPEG An image result 730b compressed according to the baseline is shown. From this result, the bit-ray of the compressed image 820a after generating the quantization table according to the present invention? The image 830a compressed according to the 0.298bpp and JPEG baseline is 0.301bpp, so the result according to the present invention increases the compression rate for relatively less important parts, so that higher recognition performance can be maintained despite compression with a lower bitrate. indicates the result.

본 발명의 각 실시예에 개시된 기술적 특징들은 해당 실시예에만 한정되는 것은 아니고, 서로 양립 불가능하지 않은 이상, 각 실시예에 개시된 기술적 특징들은 서로 다른 실시예에 병합되어 적용될 수 있다.The technical features disclosed in each embodiment of the present invention are not limited only to the corresponding embodiment, and unless they are mutually incompatible, the technical features disclosed in each embodiment may be combined and applied to different embodiments.

이상, 본 발명의 타겟 태스크별 양자화 테이블 생성 방법의 실시예들에 대해 설명하였다. 본 발명은 상술한 실시예 및 첨부한 도면에 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상의 지식을 가진 자의 관점에서 다양한 수정 및 변형이 가능할 것이다. 따라서 본 발명의 범위는 본 명세서의 청구범위뿐만 아니라 이 청구범위와 균등한 것들에 의해 정해져야 한다.In the above, embodiments of the method for generating a quantization table for each target task of the present invention have been described. The present invention is not limited to the above-described embodiments and the accompanying drawings, and various modifications and variations will be possible from the point of view of those skilled in the art to which the present invention pertains. Accordingly, the scope of the present invention should be defined not only by the claims of the present specification, but also by those claims and their equivalents.

전술한 본 발명은, 프로그램이 기록된 매체에 컴퓨터가 읽을 수 있는 코드(또는, 애플리케이션이나 소프트웨어)로서 구현하는 것이 가능하다. 상술한 생성 방법은 메모리 등에 저장된 코드에 의하여 실현될 수 있다. The present invention described above can be implemented as computer-readable code (or application or software) on a medium in which a program is recorded. The above-described generating method may be realized by a code stored in a memory or the like.

컴퓨터가 읽을 수 있는 매체는, 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 매체의 예로는, HDD(Hard Disk Drive), SSD(Solid State Disk), SDD(Silicon Disk Drive), ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장 장치 등이 있으며, 또한 캐리어 웨이브(예를 들어, 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한, 상기 컴퓨터는 프로세서 또는 제어부를 포함할 수도 있다. 따라서, 상기의 상세한 설명은 모든 면에서 제한적으로 해석되어서는 아니되고 예시적인 것으로 고려되어야 한다. 본 발명의 범위는 첨부된 청구항의 합리적 해석에 의해 결정되어야 하고, 본 발명의 등가적 범위 내에서의 모든 변경은 본 발명의 범위에 포함된다.The computer-readable medium includes all types of recording devices in which data readable by a computer system is stored. Examples of computer-readable media include Hard Disk Drive (HDD), Solid State Disk (SSD), Silicon Disk Drive (SDD), ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc. There is also a carrier wave (eg, transmission over the Internet) that is implemented in the form of. In addition, the computer may include a processor or a control unit. Accordingly, the above detailed description should not be construed as restrictive in all respects but as exemplary. The scope of the present invention should be determined by a reasonable interpretation of the appended claims, and all modifications within the equivalent scope of the present invention are included in the scope of the present invention.

Claims (13)

타겟 태스크를 설정하는 단계;
상기 타겟 태스크에 대응하는 왜곡손실함수를 결정하는 단계;
미분가능한 형태로 표현되는 비트레이트손실함수를 추정하는 단계;
상기 왜곡손실함수와 상기 비트레이트손실함수에 각각 소정의 가중치를 부여한 후 서로 더하여 양자화 변수를 산출하는 단계; 및
상기 양자화 변수의 최적값을 도출하고 상기 최적값을 기반으로 양자화 테이블을 생성하는 단계;
를 포함하는 타겟 태스크별 양자화 테이블 생성 방법.
setting a target task;
determining a distortion loss function corresponding to the target task;
estimating a bitrate loss function expressed in a differentiable form;
calculating a quantization variable by adding predetermined weights to the distortion loss function and the bitrate loss function, respectively; and
deriving an optimal value of the quantization variable and generating a quantization table based on the optimal value;
A method of generating a quantization table for each target task comprising:
제1 항에 있어서,
상기 비트레이트손실함수를 추정하기 위한 회귀모델을 학습하는 단계를 더 포함하며,
상기 회귀모델은 뉴럴 네트워크 모델을 통하여 학습되는 타겟 태스크별 양자화 테이블 생성 방법.
According to claim 1,
Further comprising the step of learning a regression model for estimating the bitrate loss function,
The regression model is a method of generating a quantization table for each target task that is learned through a neural network model.
제2 항에 있어서,
상기 뉴럴 네트워크 모델은 LSTM(Long Short-Term Memory)인 타겟 태스크별 양자화 테이블 생성 방법.
3. The method of claim 2,
The method for generating a quantization table for each target task, wherein the neural network model is a Long Short-Term Memory (LSTM).
제2 항에 있어서,
상기 회귀모델은 허프만(Huffman) 모델을 추정하도록 학습되는 타겟 태스크별 양자화 테이블 생성 방법.
3. The method of claim 2,
The regression model is a method of generating a quantization table for each target task that is trained to estimate a Huffman model.
제4 항에 있어서,
상기 회귀모델은 다중 퍼셉트론(MLP)을 통하여 학습되는 타겟 태스크별 양자화 테이블 생성 방법.
5. The method of claim 4,
The regression model is a method of generating a quantization table for each target task that is learned through a multiple perceptron (MLP).
제5 항에 있어서,
상기 비트레이트손실함수는 DC 성분에 기반하는 제1 부분 및 AC 성분에 기반하는 제2 부분의 합으로 구성되며,
상기 제1 부분 및 상기 제2 부분은 각각 다중 퍼셉트론(MLP)을 통하여 학습되는 회귀모델에 의해 도출되는 타겟 태스크별 양자화 테이블 생성 방법.
6. The method of claim 5,
The bitrate loss function is composed of the sum of a first part based on a DC component and a second part based on an AC component,
The first part and the second part are each derived by a regression model trained through a multiple perceptron (MLP).
제6 항에 있어서,
상기 제2 부분은 LSTM(Long Short-Term Memory)을 통하여 학습되는 회귀모델에 의해 도출되는 결과를 입력변수로 하는 타겟 태스크별 양자화 테이블 생성 방법.
7. The method of claim 6,
The second part is a method of generating a quantization table for each target task in which a result derived by a regression model learned through LSTM (Long Short-Term Memory) is used as an input variable.
제2 항에 있어서,
상기 회귀모델은 랜덤 데이터를 합성하여 사용하는 학습 데이터를 이용하는 타겟 태스크별 양자화 테이블 생성 방법.
3. The method of claim 2,
The regression model is a method of generating a quantization table for each target task using training data that is used by synthesizing random data.
제1 항에 있어서,
상기 최적값은 상기 양자화 변수를 최소화하는 것인 타겟 태스크별 양자화 테이블 생성 방법.
According to claim 1,
wherein the optimal value minimizes the quantization variable.
제1 항에 있어서,
상기 타겟 태스크는 기설정 된 것 중 어느 하나인 타겟 태스크별 양자화 테이블 생성 방법.
According to claim 1,
The target task is any one of preset quantization table generation method for each target task.
제10 항에 있어서,
상기 기설정된 태스크들은 이미지 분류(classification), 이미지 분할(segmentation), 이미지 캡셔닝(captioning) 및 이미지 품질을 포함하는 타겟 태스크별 양자화 테이블 생성 방법.
11. The method of claim 10,
The preset tasks include image classification, image segmentation, image captioning, and image quality. A method of generating a quantization table for each target task.
제11 항에 있어서,
상기 기설정된 태스크들에 대응하는 상기 왜곡손실함수는 분류오류, MSE, 퍼셉츄얼 손실(Perceptual loss)을 포함하는 타겟 태스크별 양자화 테이블 생성 방법.
12. The method of claim 11,
The method of generating a quantization table for each target task, wherein the distortion loss function corresponding to the preset tasks includes a classification error, an MSE, and a perceptual loss.
제1 항에 있어서,
상기 생성된 양자화 테이블을 기반으로 비트레이트를 결정하는 단계;를 더 포함하는 타겟 태스크별 양자화 테이블 생성 방법.
According to claim 1,
The method of generating a quantization table for each target task further comprising; determining a bit rate based on the generated quantization table.
KR1020200132244A 2020-10-13 2020-10-13 Method for generating quantization table KR102506115B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200132244A KR102506115B1 (en) 2020-10-13 2020-10-13 Method for generating quantization table

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200132244A KR102506115B1 (en) 2020-10-13 2020-10-13 Method for generating quantization table

Publications (2)

Publication Number Publication Date
KR20220048875A true KR20220048875A (en) 2022-04-20
KR102506115B1 KR102506115B1 (en) 2023-03-03

Family

ID=81395457

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200132244A KR102506115B1 (en) 2020-10-13 2020-10-13 Method for generating quantization table

Country Status (1)

Country Link
KR (1) KR102506115B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100620606B1 (en) 2005-03-15 2006-09-06 에스케이 텔레콤주식회사 Jpeg quantization table design method using r-d optimization
KR20200050284A (en) * 2018-11-01 2020-05-11 삼성전자주식회사 Encoding apparatus and method of image using quantization table adaptive to image

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100620606B1 (en) 2005-03-15 2006-09-06 에스케이 텔레콤주식회사 Jpeg quantization table design method using r-d optimization
KR20200050284A (en) * 2018-11-01 2020-05-11 삼성전자주식회사 Encoding apparatus and method of image using quantization table adaptive to image

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Siwei Ma, et al., "Image and Video Compression with Neural Networks: A Review", IEEE Transactions on Circuits and Systems for Video Technology, 2019.04.07* *
Xiyang Luo, et al., "The Rate-Distortion-Accuracy Tradeoff: JPEG Case Study", Computer Vision and Pattern Recognition, 2020.08.03* *

Also Published As

Publication number Publication date
KR102506115B1 (en) 2023-03-03

Similar Documents

Publication Publication Date Title
US11159801B2 (en) Video characterization for smart encoding based on perceptual quality optimization
US11240496B2 (en) Low complexity mixed domain collaborative in-loop filter for lossy video coding
US9756326B2 (en) Video coding method using at least evaluated visual quality and related video coding apparatus
KR101213704B1 (en) Method and apparatus for video coding and decoding based on variable color format
JP5718363B2 (en) Video encoding / decoding method and apparatus using large size transform unit
JP4704374B2 (en) Video transcoding method and apparatus
JP5421757B2 (en) Image encoding device
EP3146719B1 (en) Re-encoding image sets using frequency-domain differences
US9538173B2 (en) Method and apparatus for encoding/decoding image by using adaptive loop filter on frequency domain using conversion
CN108574841B (en) Coding method and device based on self-adaptive quantization parameter
US20150063452A1 (en) High efficiency video coding (hevc) intra prediction encoding apparatus and method
JP2013502140A (en) Video encoding and decoding method and apparatus using adjustment of accuracy of motion vector
TW201742456A (en) Method of searching reference patches
JP2014082639A (en) Image encoder and method of the same
KR101912769B1 (en) Method and apparatus for decoding/encoding video signal using transform derived from graph template
KR20130054396A (en) Optimized deblocking filters
CN116916036A (en) Video compression method, device and system
CN115428451A (en) Video encoding method, encoder, system, and computer storage medium
US8442338B2 (en) Visually optimized quantization
JP6946979B2 (en) Video coding device, video coding method, and video coding program
KR102506115B1 (en) Method for generating quantization table
JP4942208B2 (en) Encoder
CN114793282A (en) Neural network based video compression with bit allocation
KR101583870B1 (en) Image encoding system, image decoding system and providing method thereof
KR20140120397A (en) Prediction unit mode determining method using Block Mode Complexity

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right