KR20200057849A - Image processing apparatus and method for retargetting image - Google Patents
Image processing apparatus and method for retargetting image Download PDFInfo
- Publication number
- KR20200057849A KR20200057849A KR1020180141141A KR20180141141A KR20200057849A KR 20200057849 A KR20200057849 A KR 20200057849A KR 1020180141141 A KR1020180141141 A KR 1020180141141A KR 20180141141 A KR20180141141 A KR 20180141141A KR 20200057849 A KR20200057849 A KR 20200057849A
- Authority
- KR
- South Korea
- Prior art keywords
- image
- resizing
- retargeting
- shift map
- training
- Prior art date
- Legal status (The legal status 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 status listed.)
- Withdrawn
Links
- 238000012545 processing Methods 0.000 title claims description 75
- 238000000034 method Methods 0.000 title claims description 38
- 238000003062 neural network model Methods 0.000 claims abstract description 88
- 238000012549 training Methods 0.000 claims description 100
- 238000003672 processing method Methods 0.000 claims description 11
- 230000015654 memory Effects 0.000 claims description 9
- 238000004891 communication Methods 0.000 claims description 3
- 230000006403 short-term memory Effects 0.000 claims description 3
- 230000008569 process Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 10
- 230000004913 activation Effects 0.000 description 7
- 238000011176 pooling Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001151 other effect Effects 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 230000008685 targeting Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4046—Scaling of whole images or parts thereof, e.g. expanding or contracting using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/20—Image enhancement or restoration using local operators
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Computational Linguistics (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하는 단계; 리사이징 영상을 미리 훈련된 신경망 모델에 입력하는 단계; 및 신경망 모델에서 출력되는 시프트 맵에 기초하여 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함하는 것을 특징으로 하는 일 실시예에 따른 영상 처리 방법이 개시된다.Obtaining a resized image whose size is changed from the original image according to a predetermined aspect ratio; Inputting a resizing image into a pre-trained neural network model; And obtaining a converted retargeting image from the resizing image based on the shift map output from the neural network model.
Description
본 개시는 영상 처리 분야에 관한 것이다. 보다 구체적으로, 본 개시는 영상 내 중요 부분의 왜곡이 최소화되도록 영상을 리타겟팅하는 영상 처리 장치 및 방법에 관한 것이다.The present disclosure relates to the field of image processing. More specifically, the present disclosure relates to an image processing apparatus and method for retargeting an image so that distortion of an important portion of the image is minimized.
카메라, 디스플레이 장치들의 발전에 따라 다양한 해상도 및 종횡비를 갖는 기기들이 출시되고 있다. 이러한 환경하에서, 카메라에 의해 촬영된 영상의 종횡비가 디스플레이 장치의 종횡비에 맞지 않는 상황이 발생할 수 있다. 예를 들어, 카메라에 의해 촬영된 영상이 4:3의 종횡비를 가지고 있고, 디스플레이 장치가 16:9의 종횡비를 가지고 있는 경우, 해당 영상을 디스플레이 장치에서 풀(full) 스크린으로 재생하기 위해서는 영상을 스트레칭(stretching)시켜야 하는데, 이러한 스트레칭은 영상의 왜곡을 야기한다.Devices having various resolutions and aspect ratios are being released according to the development of cameras and display devices. Under such an environment, a situation may arise in which the aspect ratio of the image captured by the camera does not match the aspect ratio of the display device. For example, when an image photographed by a camera has an aspect ratio of 4: 3, and a display device has an aspect ratio of 16: 9, the image is displayed in order to play the image on a full screen on the display device. It needs to be stretched, which causes distortion of the image.
영상의 종횡비 조절을 위한 영상 리타겟팅 기술이 이용되고 있다. 영상 리타겟팅 기술이란, 원본 영상 내 픽셀들의 위치를 변경하거나, 새로운 픽셀을 추가하거나, 기존 픽셀을 제거하는 방식 등으로 원본 영상으로부터 원하는 종횡비를 갖는 영상을 생성하는 기술을 의미한다. 그러나, 아직까지는 소정 종횡비를 갖는 영상을 생성하기 위한 효율적인 처리 방법이 제안되어 있지 않은 실정이다.Image retargeting technology for adjusting the aspect ratio of an image is used. The image retargeting technology refers to a technique of generating an image having a desired aspect ratio from an original image by changing positions of pixels in the original image, adding new pixels, or removing existing pixels. However, an efficient processing method for generating an image having a predetermined aspect ratio has not been proposed so far.
일 실시예에 따른 영상의 처리 장치 및 방법은 영상 내 중요 부분의 왜곡이 최소화되도록 영상을 리타겟팅 하는 것을 기술적 과제로 한다.An image processing apparatus and method according to an embodiment has a technical problem of retargeting an image so that distortion of an important part of the image is minimized.
또한, 일 실시예에 따른 영상의 처리 장치 및 방법은 시간적으로 관련된 복수의 영상들 사이의 연속성이 보존되도록 하는 것을 기술적 과제로 한다.In addition, an image processing apparatus and method according to an embodiment has a technical problem to ensure that continuity between a plurality of time-related images is preserved.
일 실시예에 따른 영상 처리 방법은,An image processing method according to an embodiment,
소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하는 단계; 상기 리사이징 영상을 미리 훈련된 신경망 모델에 입력하는 단계; 및 상기 신경망 모델에서 출력되는 시프트 맵에 기초하여 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함할 수 있다.Obtaining a resized image whose size is changed from the original image according to a predetermined aspect ratio; Inputting the resizing image into a pre-trained neural network model; And obtaining a retargeting image converted from the resizing image based on the shift map output from the neural network model.
예시적인 실시예에서, 상기 신경망 모델은, 상기 리사이징 영상을 입력받는 제 1 서브 모델, 상기 제 1 서브 모델로부터 출력되는 특징 맵을 히든 스테이트에 따라 처리하는 컨볼루션 LSTM(long short-term memory) 레이어 및 상기 컨볼루션 LSTM 레이어에서 출력되는 데이터를 처리하여 상기 시프트 맵을 출력하는 제 2 서브 모델을 포함할 수 있다.In an exemplary embodiment, the neural network model includes a convolutional long short-term memory (LSTM) layer that processes a first sub-model receiving the resizing image and a feature map output from the first sub-model according to a hidden state. And a second sub-model that outputs the shift map by processing data output from the convolution LSTM layer.
예시적인 실시예에서, 상기 컨볼루션 LSTM 레이어는, 이전 시간대의 원본 영상에 대응하는 리사이징 영상을 처리한 후 업데이트된 상기 히든 스테이트를 이용하여 상기 원본 영상에 대응하는 리사이징 영상을 처리할 수 있다.In an exemplary embodiment, the convolution LSTM layer may process a resizing image corresponding to the original image in a previous time period and then process the resizing image corresponding to the original image using the updated hidden state.
예시적인 실시예에서, 상기 제 1 서브 모델 및 제 2 서브 모델 각각은, 소정의 필터 커널을 이용하여 입력 데이터를 컨볼루션 처리하는 적어도 하나의 컨볼루션 레이어를 포함할 수 있다.In an exemplary embodiment, each of the first sub-model and the second sub-model may include at least one convolution layer that convokes input data using a predetermined filter kernel.
예시적인 실시예에서, 상기 리사이징 영상의 픽셀들의 제 1 위치 맵 및 제 2 위치 맵이 상기 제 2 서브 모델로 입력되며, 상기 제 1 위치 맵의 첫 번째 행과 마지막 행에는 상기 원본 영상과 상기 리사이징 영상 사이의 세로 크기들 사이의 비율에 대응하는 값이 할당되고, 상기 제 2 위치 맵의 첫 번째 열과 마지막 열에는, 상기 원본 영상과 상기 리사이징 영상 사이의 가로 크기들 사이의 비율에 대응하는 값이 할당될 수 있다.In an exemplary embodiment, a first location map and a second location map of pixels of the resizing image are input to the second sub-model, and the original image and the resizing are performed in the first row and the last row of the first location map. Values corresponding to ratios between vertical sizes between images are allocated, and values corresponding to ratios between horizontal sizes between the original image and the resizing image are assigned to first and last columns of the second location map. Can be assigned.
예시적인 실시예에서, 상기 제 1 위치 맵의 상기 첫 번째 행으로부터 상기 마지막 행까지 소정 차이를 갖는 값들이 순차적으로 각 행에 할당되고, 상기 제 2 위치 맵의 상기 첫 번째 열로부터 상기 마지막 열까지 소정 차이를 갖는 값들이 순차적으로 각 열에 할당될 수 있다.In an exemplary embodiment, values having a predetermined difference from the first row to the last row of the first location map are sequentially assigned to each row, from the first column to the last column of the second location map. Values having a predetermined difference may be sequentially assigned to each column.
예시적인 실시예에서, 상기 리타겟팅 영상을 획득하는 단계는, 상기 리사이징 영상으로부터 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 기초하여 변환된 영상을, 제 2 방향으로의 리타겟팅을 위한 시프트 맵을 기초로 변환하여 상기 리타겟팅 영상을 획득하는 단계를 포함할 수 있다.In an exemplary embodiment, the step of acquiring the retargeting image may include converting the converted image based on a shift map for retargeting in the first direction from the resizing image, and a shift map for retargeting in the second direction. And acquiring the retargeting image by converting based on.
예시적인 실시예에서, 상기 리타겟팅 영상을 획득하는 단계는, 이전 시간대의 시프트 맵과 현재 시간대의 상기 시프트 맵을 조합하여, 상기 현재 시간대의 시프트 맵을 갱신하는 단계; 및 상기 갱신된 상기 현재 시간대의 시프트 맵에 기초하여, 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함할 수 있다.In an exemplary embodiment, the step of acquiring the retargeting image may include updating a shift map of the current time zone by combining a shift map of the previous time zone and the shift map of the current time zone; And obtaining a converted retargeting image from the resizing image based on the updated shift map of the current time zone.
예시적인 실시예에서, GT(ground truth) 영상과 훈련용 리타겟팅 영상의 차이에 마스크를 적용한 결과에 대응하는 제 1 손실 정보가 감소되도록 상기 신경망 모델이 훈련될 수 있다.In an exemplary embodiment, the neural network model may be trained such that first loss information corresponding to a result of applying a mask to a difference between a ground truth (GT) image and a training retargeting image is reduced.
예시적인 실시예에서, 훈련용 리사이징 영상을 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 따라 변환시켜 획득된 영상과 GT 영상의 차이에 제 1 배경 마스크를 적용한 결과에 대응하는 제 2 손실 정보와, 상기 훈련용 리사이징 영상을 상기 제 1 방향으로의 리타겟팅을 위한 시프트 맵 및 제 2 방향으로의 리타겟팅을 위한 시프트 맵에 따라 변환시켜 획득된 훈련용 리타겟팅 영상과 상기 GT 영상의 차이에 제 1 전경 마스크를 적용한 결과에 대응하는 제 3 손실 정보가 감소되도록 상기 신경망 모델이 훈련될 수 있다.In an exemplary embodiment, the training resizing image is transformed according to a shift map for retargeting in the first direction, and second loss information corresponding to a result of applying a first background mask to a difference between the obtained image and the GT image. , Reconstruct the training resizing image according to the shift map for retargeting in the first direction and the shift map for retargeting in the second direction, and remove the difference between the training retargeting image and the GT image obtained. The neural network model may be trained such that third loss information corresponding to a result of applying one foreground mask is reduced.
예시적인 실시예에서, 상기 제 1 전경 마스크는, 훈련용 원본 영상에 대응하는 제 2 전경 마스크를 패딩하여 획득되며, 상기 제 1 배경 마스크는, 상기 제 2 전경 마스크에 대응하는 제 2 배경 마스크와, 상기 제 2 전경 마스크의 크기를 변경시켜 획득한 제 3 전경 마스크에 대응하는 제 3 배경 마스크를 서로 결합하여 획득될 수 있다.In an exemplary embodiment, the first foreground mask is obtained by padding a second foreground mask corresponding to a training original image, and the first background mask includes a second background mask corresponding to the second foreground mask. The third background mask corresponding to the third foreground mask obtained by changing the size of the second foreground mask may be obtained by combining each other.
예시적인 실시예에서, 상기 GT 영상은, 상기 훈련용 원본 영상에 상기 제 2 전경 마스크를 적용하여 획득한 전경 오브젝트와, 상기 훈련용 리사이징 영상에 상기 제 3 배경 마스크를 적용하여 획득한 배경 오브젝트를 결합하여 획득될 수 있다.In an exemplary embodiment, the GT image may include a foreground object obtained by applying the second foreground mask to the training original image and a background object obtained by applying the third background mask to the training resizing image. Can be obtained in combination.
예시적인 실시예에서, 이전 시간대의 훈련용 원본 영상에 대응하는 시프트 맵과 현재 시간대의 훈련용 원본 영상에 대응하는 시프트 맵 사이의 관계에 기초하여 도출되는 제 4 손실 정보가 감소되도록 상기 신경망 모델이 훈련될 수 있다.In an exemplary embodiment, the neural network model is configured such that the fourth loss information derived based on the relationship between the shift map corresponding to the original training image in the previous time zone and the shift map corresponding to the original training image in the current time zone is reduced. Can be trained.
일 실시예에 따른 영상 처리 장치는,An image processing apparatus according to an embodiment,
프로세서; 및 미리 훈련된 신경망 모델 및 적어도 하나의 프로그램을 저장하는 메모리를 포함하되, 상기 프로세서는, 상기 메모리에 저장된 상기 적어도 하나의 프로그램이 실행됨에 따라, 소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하고, 상기 리사이징 영상을 상기 신경망 모델에 입력하고, 상기 신경망 모델에서 출력되는 시프트 맵에 기초하여 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득할 수 있다.Processor; And a memory for storing a pre-trained neural network model and at least one program, wherein the processor is configured to display a resized image whose size is changed from an original image according to a predetermined aspect ratio as the at least one program stored in the memory is executed. Acquiring, inputting the resizing image into the neural network model, and obtaining a retargeting image converted from the resizing image based on a shift map output from the neural network model.
예시적인 실시예에서, 상기 영상 처리 장치는, 상기 리타겟팅 영상을 출력하는 디스플레이를 포함하되, 상기 프로세서는, 상기 디스플레이의 종횡비에 기초하여 상기 리사이징 영상의 종횡비를 결정할 수 있다.In an exemplary embodiment, the image processing apparatus includes a display that outputs the retargeting image, and the processor can determine an aspect ratio of the resizing image based on the aspect ratio of the display.
예시적인 실시예에서, 상기 프로세서는, 상기 리사이징 영상으로부터 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 기초하여 변환된 영상을, 제 2 방향으로의 리타겟팅을 위한 시프트 맵을 기초로 변환하여 상기 리타겟팅 영상을 획득할 수 있다.In an exemplary embodiment, the processor converts an image converted based on a shift map for retargeting from the resizing image to a first direction based on a shift map for retargeting in the second direction, and Retargeting images can be obtained.
예시적인 실시예에서, 상기 프로세서는, 이전 시간대의 시프트 맵과 현재 시간대의 상기 시프트 맵을 조합하여, 상기 현재 시간대의 시프트 맵을 갱신하고, 상기 갱신된 상기 현재 시간대의 시프트 맵에 기초하여, 상기 리사이징 영상을 변환시킬 수 있다.In an exemplary embodiment, the processor updates the shift map of the current time zone by combining the shift map of the previous time zone and the shift map of the current time zone, and based on the updated shift map of the current time zone, the Resizing images can be converted.
예시적인 실시예에서, 상기 프로세서는, 훈련용 원본 영상에 대응하는 훈련용 리사이징 영상을 상기 신경망 모델로 입력하되, 상기 신경망 모델은, 훈련용 리타겟팅 영상과 GT 영상 사이의 차이에 마스크를 적용한 결과에 대응하는 손실 정보가 감소되도록 훈련될 수 있다.In an exemplary embodiment, the processor inputs a training resizing image corresponding to a training original image into the neural network model, wherein the neural network model is a result of applying a mask to the difference between the training retargeting image and the GT image. It can be trained to reduce the loss information corresponding to.
예시적인 실시예에서, 상기 영상 처리 장치는, 상기 미리 훈련된 신경망 모델의 데이터를 외부 장치로부터 수신하는 통신 모듈을 더 포함할 수 있다.In an exemplary embodiment, the image processing device may further include a communication module that receives data of the pre-trained neural network model from an external device.
일 실시예에 따른 영상의 처리 장치 및 방법은 영상 내 중요 부분의 왜곡이 최소화되도록 영상을 리타겟팅할 수 있다.The apparatus and method for processing an image according to an embodiment may retarget the image to minimize distortion of an important part in the image.
또한, 일 실시예에 따른 영상의 처리 장치 및 방법은 시간적으로 관련된 복수의 영상들 사이의 연속성이 보존되도록 할 수 있다.In addition, the apparatus and method for processing an image according to an embodiment may ensure that continuity between a plurality of temporally related images is preserved.
다만, 일 실시예에 따른 영상의 처리 장치 및 방법이 달성할 수 있는 효과는 이상에서 언급한 것들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.However, the effects that the image processing apparatus and method according to an embodiment can achieve are not limited to those mentioned above, and other effects not mentioned are common in the art to which the present disclosure pertains from the following description. It will be clearly understood by those with knowledge.
본 명세서에서 인용되는 도면을 보다 충분히 이해하기 위하여 각 도면의 간단한 설명이 제공된다.
도 1은 일 실시예에 따른 영상 처리 장치가 적용되는 환경을 설명하기 위한 도면이다.
도 2는 일 실시예에 따른 영상 처리 방법을 설명하기 위한 순서도이다.
도 3은 일 실시예에 따른 리타겟팅 과정을 설명하기 위한 도면이다.
도 4는 일 실시예에 따른 신경망 모델의 구조를 설명하기 위한 도면이다.
도 5는 일 실시예에 따른 신경망 모델의 구조를 상세히 설명하기 위한 도면이다.
도 6 및 도 7은 제 2 서브 모델에 입력되는 위치 맵을 도시하는 예시적인 도면이다.
도 8은 훈련용 원본 영상에 대응하는 GT 영상을 생성하는데 이용되는 마스크를 도시하는 예시적인 도면이다.
도 9는 훈련용 원본 영상 및 훈련용 리사이징 영상에 기초하여 GT 영상을 생성하는 방법을 설명하기 위한 도면이다.
도 10 및 도 11은 신경망 모델의 훈련에 이용되는 전경 마스크와 배경 마스크를 생성하는 방법을 설명하기 위한 도면이다.
도 12는 신경망 모델의 훈련에 이용되는 손실 정보들을 설명하기 위한 도면이다.
도 13은 일 실시예에 따른 영상 처리 장치의 구성을 도시하는 블록도이다.A brief description of each drawing is provided to better understand the drawings cited herein.
1 is a view for explaining an environment to which an image processing apparatus according to an embodiment is applied.
2 is a flowchart illustrating an image processing method according to an embodiment.
3 is a view for explaining a retargeting process according to an embodiment.
4 is a diagram for explaining the structure of a neural network model according to an embodiment.
5 is a view for explaining the structure of a neural network model according to an embodiment in detail.
6 and 7 are exemplary views showing a location map input to the second sub-model.
8 is an exemplary diagram showing a mask used to generate a GT image corresponding to a training original image.
9 is a diagram for explaining a method of generating a GT image based on a training original image and a training resizing image.
10 and 11 are views for explaining a method of generating a foreground mask and a background mask used for training a neural network model.
12 is a diagram for explaining loss information used for training a neural network model.
13 is a block diagram showing the configuration of an image processing apparatus according to an embodiment.
본 개시는 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고, 이를 상세한 설명을 통해 설명하고자 한다. 그러나, 이는 본 개시를 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 개시의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.Since the present disclosure can be modified in various ways and have various embodiments, specific embodiments will be illustrated in the drawings and described through detailed description. However, this is not intended to limit the present disclosure to specific embodiments, and it should be understood that all modifications, equivalents, and substitutes included in the spirit and scope of the present disclosure are included.
실시예를 설명함에 있어서, 관련된 공지 기술에 대한 구체적인 설명이 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 실시예의 설명 과정에서 이용되는 숫자(예를 들어, 제 1, 제 2 등)는 하나의 구성요소를 다른 구성요소와 구분하기 위한 식별기호에 불과하다.In describing the embodiments, when it is determined that detailed descriptions of related known technologies may unnecessarily obscure the subject matter, detailed descriptions thereof will be omitted. In addition, the numbers (for example, first, second, etc.) used in the description of the embodiment are merely identification numbers for distinguishing one component from other components.
또한, 본 명세서에서 일 구성요소가 다른 구성요소와 "연결된다" 거나 "접속된다" 등으로 언급된 때에는, 상기 일 구성요소가 상기 다른 구성요소와 직접 연결되거나 또는 직접 접속될 수도 있지만, 특별히 반대되는 기재가 존재하지 않는 이상, 중간에 또 다른 구성요소를 매개하여 연결되거나 또는 접속될 수도 있다고 이해되어야 할 것이다.In addition, when one component is referred to as “connected” or “connected” with another component in the present specification, the one component may be directly connected to or directly connected to the other component, but is specifically opposed It should be understood that as long as there is no description to be made, it may be connected or connected through another element in the middle.
또한, 본 명세서에서 '~부(유닛)', '모듈' 등으로 표현되는 구성요소는 2개 이상의 구성요소가 하나의 구성요소로 합쳐지거나 또는 하나의 구성요소가 보다 세분화된 기능별로 2개 이상으로 분화될 수도 있다. 또한, 이하에서 설명할 구성요소 각각은 자신이 담당하는 주기능 이외에도 다른 구성요소가 담당하는 기능 중 일부 또는 전부의 기능을 추가적으로 수행할 수도 있으며, 구성요소 각각이 담당하는 주기능 중 일부 기능이 다른 구성요소에 의해 전담되어 수행될 수도 있음은 물론이다.In addition, in this specification, two or more components represented by '~ unit (unit)', 'module', etc. are combined into one component, or two or more components are divided into more detailed functions. It may be differentiated into. In addition, each of the components to be described below may additionally perform some or all of the functions of other components in addition to the main functions in charge of them, and some of the main functions of each component are different. Needless to say, it can also be carried out by components.
이하, 본 개시의 기술적 사상에 의한 실시예들을 차례로 상세히 설명한다.Hereinafter, embodiments according to the technical spirit of the present disclosure will be described in detail.
도 1은 일 실시예에 따른 영상 처리 장치(100)가 적용되는 환경을 설명하기 위한 도면이다.1 is a view for explaining an environment to which the
일 실시예에 따른 영상 처리 장치(100)는 원본 영상을 획득하고, 원본 영상에 기초하여 리타겟팅 영상을 획득한다. 영상 처리 장치(100)는 소정 종횡비와 상이한 종횡비를 갖는 원본 영상으로부터 소정 종횡비를 갖는 리타겟팅 영상을 생성할 수 있다. 영상 처리 장치(100)는 리타겟팅 영상을 디스플레이 장치(200)를 통해 디스플레이할 수 있다.The
일 실시예에서, 영상 처리 장치(100)는 디스플레이 장치(200) 내에 포함될 수 있다. 또는, 일 실시예에서, 영상 처리 장치(100)는 서버로 구현될 수 있고, 이 경우, 영상 처리 장치(100)는 리타겟팅 영상을 네트워크를 통해 디스플레이 장치(200)로 전송할 수도 있다. 일 실시예에서 네트워크는 유선 네트워크와 무선 네트워크를 포함할 수 있으며, 구체적으로, 근거리 네트워크(LAN: Local Area Network), 도시권 네트워크(MAN: Metropolitan Area Network), 광역 네트워크(WAN: Wide Area Network) 등의 다양한 네트워크를 포함할 수 있다. 또한, 네트워크는 공지의 월드 와이드 웹(WWW: World Wide Web)을 포함할 수도 있다. 그러나, 네트워크는 상기 열거된 네트워크에 국한되지 않고, 공지의 무선 데이터 네트워크나 공지의 전화 네트워크, 공지의 유무선 텔레비전 네트워크를 적어도 일부로 포함할 수도 있다.In one embodiment, the
일 실시예에 따른 영상 처리 장치(100)는 리타겟팅 영상을 생성할 때, 원본 영상 내 중요한 부분이 리타겟팅 영상에서도 원본 영상 내에서의 종횡비를 최대한 유지하도록 할 수 있다.When generating a retargeting image, the
도 2는 일 실시예에 따른 영상 처리 방법을 설명하기 위한 순서도이고, 도 3은 일 실시예에 따른 리타겟팅 과정을 설명하기 위한 도면이다.2 is a flowchart illustrating an image processing method according to an embodiment, and FIG. 3 is a diagram illustrating a retargeting process according to an embodiment.
S210 단계에서, 영상 처리 장치(100)는 소정 종횡비에 따라 원본 영상(10)으로부터 크기가 변경된 리사이징 영상(20)을 획득한다. In step S210, the
리사이징 영상(20)의 크기는 원본 영상(10)의 크기보다 클 수 있다. 예를 들어, 리사이징 영상(20)의 세로 방향 크기는 원본 영상(10)의 세로 방향 크기와 동일하되, 리사이징 영상(20)의 가로 방향 크기는 원본 영상(10)의 가로 방향 크기보다 클 수 있다. The size of the resizing
상기 소정 종횡비는 후술하는 리타겟팅 영상을 출력하는 디스플레이의 종횡비에 기초하여 결정될 수 있다. 예를 들어, 소정 종횡비는 리타겟팅 영상을 출력하는 디스플레이가 가지는 종횡비와 동일하게 결정될 수 있다. The predetermined aspect ratio may be determined based on an aspect ratio of a display outputting a retargeting image, which will be described later. For example, the predetermined aspect ratio may be determined to be the same as the aspect ratio of the display outputting the retargeting image.
영상 처리 장치(100)는 원본 영상(10)을 스케일링하여 크기가 변경된 리사이징 영상(20)을 획득할 수 있다. 일 예에서, 영상 처리 장치(100)는 원본 영상(10) 내 픽셀들을 보간(interpolation)하여 크기가 변경된 리사이징 영상(20)을 획득할 수 있다.The
S220 단계에서, 영상 처리 장치(100)는 리사이징 영상(20)을 미리 훈련된 신경망 모델(300)에 입력한다. 신경망 모델(300)은 예를 들어, 복수의 레이어로 이루어진 딥러닝(deep learning) 모델일 수 있다. 신경망 모델(300)의 구조 및 훈련 방법에 대해서는 도 8 이하를 참조하여 상세히 설명한다.In step S220, the
S230 단계에서, 영상 처리 장치(100)는 신경망 모델(300)에서 출력되는 시프트 맵(90)을 획득한다. 시프트 맵(90)은 리사이징 영상(20) 내 픽셀들의 위치를 변경하기 위한 정보를 포함한다. 예를 들어, 시프트 맵(90)은 리사이징 영상(20) 내 각 픽셀들이 리타겟팅 영상 내 어느 위치로 이동되어야 하는지의 정보를 포함할 수 있다. 시프트 맵(90)은 리사이징 영상(20)의 크기와 동일한 크기를 가질 수 있다.In step S230, the
S240 단계에서, 영상 처리 장치(100)는 시프트 맵(90)에 기초하여 리사이징 영상(20)으로부터 변환된 리타겟팅 영상을 획득한다.In operation S240, the
일 실시예에 따른 신경망 모델(300)은, 신경망 모델(300)은 출력되는 시프트 맵(90)에 따라 리사이징 영상(20)을 리타겟팅하더라도 원본 영상(10) 내 중요 부분의 비율이 리타겟팅 영상 내에서도 유지되도록 훈련될 수 있다.In the
도 4는 일 실시예에 따른 신경망 모델(300)의 구조를 설명하기 위한 도면이다.4 is a diagram for explaining the structure of a
도 4를 참조하면, 신경망 모델(300)은 제 1 서브 모델(310), 컨볼루션 LSTM 레이어(320) 및 제 2 서브 모델(330)을 포함할 수 있다.Referring to FIG. 4, the
제 1 서브 모델(310)은 리사이징 영상(20)을 입력받아 처리한다. 제 1 서브 모델(310)의 출력 데이터, 예를 들어, 특징 맵(feature map)은 컨볼루션 LSTM(long short-term memory) 레이어로 입력된다. 그리고, 컨볼루션 LSTM 레이어(320)에서 출력되는 데이터는 제 2 서브 모델(330)로 입력된다. 제 2 서브 모델(330)에서는 리사이징 영상(20)의 리타겟팅을 위한 시프트 맵(90)이 출력된다.The
일 예에서, 제 2 서브 모델(330)에서는 리사이징 영상(20) 내 전경 오브젝트를 추출하기 위한 전경 마스크(92), 리사이징 영상(20)을 제 1 방향을 따라 리타겟팅하기 위한 제 1 시프트 맵(94) 및 리사이징 영상(20)을 제 2 방향을 따라 리타겟팅하기 위한 제 2 시프트 맵(96)이 출력될 수 있다. In one example, the
예를 들어, 상기 제 1 시프트 맵(94)은 리사이징 영상(20) 내 픽셀들을 세로 방향으로 리타겟팅하는데 이용되며, 제 2 시프트 맵(96)은 리사이징 영상(20) 내 픽셀들을 가로 방향으로 리타겟팅하는데 이용될 수 있다. 일 실시예에서, 원본 영상(10)의 종횡비를 변환하기 위해 원본 영상(10)의 세로 크기만 변경시키고자 하는 경우, 제 2 서브 모델(330)은 제 1 시프트 맵(94)만을 출력하도록 구성될 수 있다. 반대로, 원본 영상(10)의 종횡비를 변환하기 위해 원본 영상(10)의 가로 크기만 변경시키고자 하는 경우, 제 2 서브 모델(330)은 제 2 시프트 맵(96)만을 출력하도록 구성될 수 있다.For example, the
제 2 서브 모델(330)에서 출력되는 전경 마스크(92)는 신경망 모델(300)이 제대로 훈련되었는지를 평가하기 위한 것으로서, 구현예에 따라, 제 2 서브 모델(330)은 전경 마스크(92)가 출력되지 않도록 구성될 수도 있다.The
컨볼루션 LSTM 레이어(320)는 제 1 서브 모델(310)에서 출력되는 데이터를 입력받아 히든 스테이트(hidden state)에 따라 처리하고, 처리된 결과를 제 2 서브 모델(330)로 전달한다. 컨볼루션 LSTM 레이어(320) 내 히든 스테이트는 제 1 서브 모델(310)에서 출력되는 데이터를 처리한 후, 업데이트되고, 업데이트된 히든 스테이트는 다음 시간대의 영상 처리를 위해 이용될 수 있다.The
예를 들어, t 시간 대의 원본 영상(10)에 대응하는 리사이징 영상(20)이 제 1 서브 모델(310)에서 처리되고, 제 1 서브 모델(310)에서 출력되는 데이터는 컨볼루션 LSTM 레이어(320)에서 히든 스테이트에 따라 처리된다. 여기서, t 시간 대의 리사이징 영상(20)을 처리하기 위해 이용되는 히든 스테이트는, 컨볼루션 LSTM 레이어(320)에서 t-1 시간대의 리사이징 영상(20)을 처리한 후 업데이트된 히든 스테이트일 수 있다. t 시간 대의 리사이징 영상(20)에 대해 제 1 서브 모델(310)에서 출력되는 데이터가 컨볼루션 LSTM 레이어(320)에서 히든 스테이트에 따라 처리되면, 히든 스테이트는 업데이트되고, 업데이트된 히든 스테이트는 t+1 시간대의 리사이징 영상(20)을 처리하는데 이용된다.For example, the resizing
즉, 일 실시예에 따른 신경망 모델(300)에서, 현재 시간대의 리사이징 영상(20)을 처리하는데 이용된 컨볼루션 LSTM 레이어(320)의 히든 스테이트가, 다음 시간대의 리사이징 영상(20)을 처리하는데 이용되기 때문에 여러 프레임들로 구성된 비디오를 리타겟팅하는데 있어, 프레임 간 연속성이 유지될 수 있다.That is, in the
도 5는 일 실시예에 따른 신경망 모델(300)의 구조를 상세히 설명하기 위한 도면이다.5 is a view for explaining the structure of the
도 5를 참조하면, 제 1 서브 모델(310)은 복수의 컨볼루션 레이어(convolution layer)를 포함할 수 있다. 각각의 컨볼루션 레이어는 미리 결정된 크기 및 개수의 필터 커널을 이용하여 입력 데이터를 컨볼루션 처리한 후, 컨볼루션 처리된 출력 데이터를 다음 레이어로 전달한다. 도 5는 제 1 서브 모델(310)이 5개의 컨볼루션 레이어를 포함하는 것으로 도시하고 있으나, 컨볼루션 레이어의 개수는 당업자에게 자명환 범위 내에서 다양하게 변경될 수 있다. 또한, 도 5에는 도시되어 있지 않지만, 제 1 서브 모델(310) 내 컨볼루션 레이어들 중 적어도 일부의 앞 또는 뒤에는 활성화 레이어 및/또는 풀링(pooling) 레이어가 위치할 수 있다. Referring to FIG. 5, the
어느 하나의 컨볼루션 레이어의 앞에 활성화 레이어 및/또는 풀링(pooling) 레이어가 위치하는 경우, 활성화 레이어 및/또는 풀링(pooling) 레이어의 출력 데이터는 상기 어느 하나의 컨볼루션 레이어로 입력될 수 있다. 또한, 어느 하나의 컨볼루션 레이어의 뒤에 활성화 레이어 및/또는 풀링(pooling) 레이어가 위치하는 경우, 상기 어느 하나의 컨볼루션 레이어의 출력 데이터는 활성화 레이어 및/또는 풀링(pooling) 레이어로 입력될 수 있다.When an active layer and / or a pooling layer is located in front of any one convolutional layer, output data of the active layer and / or a pooling layer may be input to any one of the convolutional layers. In addition, when an activation layer and / or a pooling layer is located behind one of the convolutional layers, the output data of the one of the convolutional layers may be input as an activation layer and / or a pooling layer. have.
활성화 레이어는 이전 레이어의 출력 결과에 대해 비선형(Non-linear) 특성을 부여할 수 있다. 활성화 레이어는 활성화 함수를 이용할 수 있다. 활성화 함수는 시그모이드 함수(sigmoid function), Tanh 함수, ReLU(Rectified Linear Unit) 함수 등을 포함할 수 있으나, 이에 한정되는 것은 아니다.The active layer may impart a non-linear characteristic to the output result of the previous layer. The activation layer may use an activation function. The activation function may include a sigmoid function, a tanh function, and a rectified linear unit (ReLU) function, but is not limited thereto.
제 2 서브 모델(330)은 복수의 디컨볼루션 레이어(deconvolution layer)를 포함할 수 있다. 각각의 디컨볼루션 레이어는 미리 결정된 크기 및 개수의 필터 커널을 이용하여 입력 데이터를 컨볼루션 처리한 후, 컨볼루션 처리된 출력 데이터를 다음 레이어로 전달한다. 도 5는 제 2 서브 모델(330)이 최종적으로 출력되는 데이터 각각을 위하여 5개의 디컨볼루션 레이어를 포함하는 것으로 도시하고 있으나, 디컨볼루션 레이어의 개수는 당업자에게 자명환 범위 내에서 다양하게 변경될 수 있다. The
앞서 설명한 바와 같이, 제 2 서브 모델(330)에서 전경 마스크(92), 제 1 시프트 맵(94) 및 제 2 시프트 맵(96)이 출력되는 경우, 전경 마스크(92), 제 1 시프트 맵(94) 및 제 2 시프트 맵(96) 각각의 출력을 위한 디컨볼루션 레이어들이 서로 병렬로 배치될 수 있다. 제 2 서브 모델(330)에서 제 1 시프트 맵(94)과 제 2 시프트 맵(96)만이 출력되는 경우, 전경 마스크(92)의 출력을 위한 디컨볼루션 레이어(dconv4-1, dconv5-1)는 제 2 서브 모델(330)에 포함되지 않을 수 있다. 마찬가지로, 제 2 서브 모델(330)에서 제 2 시프트 맵(96)만이 출력되는 경우, 전경 마스크(92)의 출력을 위한 디컨볼루션 레이어(dconv4-1, dconv5-1) 그리고, 제 1 시프트 맵(94)의 출력을 위한 디컨볼루션 레이어(dconv4-2, dconv5-2)가 제 2 서브 모델(330)에 포함되지 않을 수 있다.As described above, when the
또한, 도 5에는 도시되어 있지 않지만, 제 2 서브 모델(330) 내 디컨볼루션 레이어들 중 적어도 일부의 앞 또는 뒤에는 활성화 레이어 및/또는 풀링 레이어가 위치할 수 있다. In addition, although not illustrated in FIG. 5, an activation layer and / or a pooling layer may be located before or after at least some of the deconvolution layers in the
일 실시예에서, 제 2 서브 모델(330)에 포함된 디컨볼루션 레이어 중 적어도 하나의 디컨볼루션 레이어로 리사이징 영상(20) 내 픽셀들의 위치를 나타내는 위치 맵이 입력될 수도 있다.In one embodiment, a location map indicating the positions of pixels in the resizing
도 6 및 도 7은 제 2 서브 모델(330)에 입력되는 위치 맵을 도시하는 예시적인 도면이다.6 and 7 are exemplary views showing a location map input to the
제 2 서브 모델(330)에 포함된 디컨볼루션 레이어 중 적어도 하나의 디컨볼루션 레이어로 제 1 위치 맵(610, 710)과 제 2 위치 맵(630, 730)이 입력될 수 있는데, 제 1 위치 맵(610, 710)은 리사이징 영상(20) 내 픽셀들의 세로 방향 위치를 나타내고, 제 2 위치 맵(630, 730)은 리사이징 영상(20) 내 픽셀들의 가로 방향 위치를 나타낼 수 있다.The first location maps 610 and 710 and the second location maps 630 and 730 may be input as at least one deconvolution layer among the deconvolution layers included in the
일 실시예에서, 영상 처리 장치(100)는 제 1 위치 맵(610, 710) 및 제 2 위치 맵(630, 730을 생성하는 경우, 제 1 위치 맵(610, 710)과 제 2 위치 맵(630, 730)이 원본 영상(10)과 리사이징 영상(20) 사이의 크기 비율 정보를 포함하도록 할 수 있다.In one embodiment, when the
일 예에서, 영상 처리 장치(100)는 제 1 위치 맵(610, 710)의 첫 번째 행(611, 711)과 마지막 행(619, 719)에 포함된 픽셀들에, 원본 영상(10)과 리사이징 영상(20)의 세로 크기들 사이의 비율에 대응하는 값을 할당할 수 있다. 그리고, 영상 처리 장치(100)는 제 2 위치 맵(630, 730)의 첫 번째 열(631, 731)과 마지막 열(639, 739)에 포함된 픽셀들에, 원본 영상(10)과 리사이징 영상(20)의 가로 크기들 사이의 비율에 대응하는 값을 할당할 수 있다.In one example, the
도 6은 원본 영상(10)과 리사이징 영상(20)의 크기 및 종횡비가 동일할 때의 제 1 위치 맵(610) 및 제 2 위치 맵(630)을 도시하고 있다. 6 shows a
도 6을 참조하면, 제 1 위치 맵(610)의 첫 번째 행(611)에 포함된 픽셀들에는 원본 영상(10)과 리사이징 영상(20)의 세로 크기들 사이의 비율에 대응하는 값, 즉 1이 할당되되, 그 부호가 -로 결정될 수 있다. 그리고, 제 1 위치 맵(610)의 마지막 행(619)에 포함된 픽셀들에는 원본 영상(10)과 리사이징 영상(20)의 세로 크기들 사이의 비율에 대응하는 값, 즉 1이 할당되되, 그 부호가 +로 결정될 수 있다. 제 1 위치 맵(610)의 첫 번째 행(611)으로부터 마지막 행(619)까지 소정 차이를 갖는 값들이 순차적으로 각 행의 픽셀들에 할당될 수 있다. 예를 들어, 제 1 위치 맵(610)의 두 번째 행의 픽셀들에는, 첫 번째 행(611)의 픽셀들에 할당된 -1보다 a만큼 큰 값들이 할당될 수 있고, 제 1 위치 맵(610)의 세 번째 행의 픽셀들에는, 두 번째 행의 픽셀들에 할당된 값보다 a만큼 큰 값들이 할당될 수 있다.Referring to FIG. 6, pixels included in the
제 2 위치 맵(630)의 첫 번째 열(631)에 포함된 픽셀들에는 원본 영상(10)과 리사이징 영상(20)의 가로 크기들 사이의 비율에 대응하는 값, 즉 1이 할당되되, 그 부호가 -로 결정될 수 있다. 그리고, 제 2 위치 맵(630)의 마지막 열(639)에 포함된 픽셀들에는 원본 영상(10)과 리사이징 영상(20)의 가로 크기들 사이의 비율에 대응하는 값, 즉 1이 할당되되, 그 부호가 +로 결정될 수 있다. 제 2 위치 맵(630)의 첫 번째 열(631)으로부터 마지막 열(639)까지 소정 차이를 갖는 값들이 순차적으로 각 열의 픽셀들에 할당될 수 있다. 예를 들어, 제 2 위치 맵(630)의 두 번째 열의 픽셀들에는, 첫 번째 열(631)의 픽셀들에 할당된 -1보다 a만큼 큰 값들이 할당될 수 있고, 제 2 위치 맵(630)의 세 번째 열의 픽셀들에는, 두 번째 열의 픽셀들에 할당된 값보다 a만큼 큰 값들이 할당될 수 있다.Pixels included in the
도 7은 리사이징 영상(20)의 세로 크기와 원본 영상(10)의 세로 크기가 동일하고, 리사이징 영상(20)의 가로 크기가 원본 영상(10)의 가로 크기보다 1.5배 클 때의 제 1 위치 맵(710) 및 제 2 위치 맵(730)을 도시하고 있다. 7 shows the first position when the vertical size of the resizing
도 7을 참조하면, 제 1 위치 맵(710)의 첫 번째 행(711)에 포함된 픽셀들에는 원본 영상(10)과 리사이징 영상(20)의 세로 크기들 사이의 비율에 대응하는 값, 즉 1이 할당되되, 그 부호가 -로 결정될 수 있다. 그리고, 제 1 위치 맵(710)의 마지막 행(719)에 포함된 픽셀들에는 원본 영상(10)과 리사이징 영상(20)의 세로 크기들 사이의 비율에 대응하는 값, 즉 1이 할당되되, 그 부호가 +로 결정될 수 있다. 제 1 위치 맵(710)의 첫 번째 행(711)으로부터 마지막 행(719)까지 소정 차이를 갖는 값들이 순차적으로 각 행의 픽셀들에 할당될 수 있다. 예를 들어, 제 1 위치 맵(710)의 두 번째 행의 픽셀들에는, 첫 번째 행(711)의 픽셀들에 할당된 -1보다 a만큼 큰 값들이 할당될 수 있고, 제 1 위치 맵(710)의 세 번째 행의 픽셀들에는, 두 번째 행의 픽셀들에 할당된 값보다 a만큼 큰 값들이 할당될 수 있다.Referring to FIG. 7, pixels included in the
제 2 위치 맵(730)의 첫 번째 열(731)에 포함된 픽셀들에는 원본 영상(10)과 리사이징 영상(20)의 가로 크기들 사이의 비율에 대응하는 값, 즉 1.5가 할당되되, 그 부호가 -로 결정될 수 있다. 그리고, 제 2 위치 맵(730)의 마지막 열(739)에 포함된 픽셀들에는 원본 영상(10)과 리사이징 영상(20)의 가로 크기들 사이의 비율에 대응하는 값, 즉 1.5가 할당되되, 그 부호가 +로 결정될 수 있다. 제 2 위치 맵(730)의 첫 번째 열(731)으로부터 마지막 열(739)까지 소정 차이를 갖는 값들이 순차적으로 각 행의 픽셀들에 할당될 수 있다. 예를 들어, 제 2 위치 맵(730)의 두 번째 열의 픽셀들에는, 첫 번째 열(731)의 픽셀들에 할당된 -1.5보다 b만큼 큰 값들이 할당될 수 있고, 제 2 위치 맵(730)의 세 번째 열의 픽셀들에는, 두 번째 열의 픽셀들에 할당된 값보다 b만큼 큰 값들이 할당될 수 있다.Pixels included in the
도 6의 제 2 위치 맵(630)의 각각의 열을 따라 할당된 픽셀 값들의 차이인 a는 도 7의 제 2 위치 맵(730)의 각각의 열을 따라 할당된 픽셀 값들의 차이인 b보다 작을 수 있다. 왜냐하면, 도 6의 제 2 위치 맵(630)과 도 7의 제 2 위치 맵(730)의 가로 크기가 서로 동일할 때, 각각의 제 2 위치 맵(630, 730)의 첫 번째 열(631, 731)과 마지막 열(639, 739)에 할당되는 픽셀 값이 고정되어 있는 상태에서 각 열에 픽셀 값들이 동일 차이의 간격으로 할당되기 때문이다.The difference a of pixel values allocated along each column of the
도 6 및 도 7과 관련하여, 제 1 위치 맵(610, 710)의 첫 번째 행(611, 711)의 픽셀 값들이 -의 부호를 갖고, 제 1 위치 맵(610, 710)의 마지막 행(619, 719)의 픽셀 값들이 +의 부호를 갖는 것으로 설명하였으나, 일 예에서, 제 1 위치 맵(610, 710)의 첫 번째 행(611, 711)의 픽셀 값들이 +의 부호를 갖고, 제 1 위치 맵(610, 710)의 마지막 행(619, 719)의 픽셀 값들이 -의 부호를 가질 수 있다. 마찬가지로, 제 2 위치 맵(630, 730)의 첫 번째 열(631, 731)의 픽셀 값들이 -의 부호를 갖고, 제 2 위치 맵(630, 730)의 마지막 열(639, 739)의 픽셀 값들이 +의 부호를 갖는 것으로 설명하였으나, 일 예에서, 제 2 위치 맵(630, 730)의 첫 번째 열(631, 731)의 픽셀 값들이 +의 부호를 갖고, 제 2 위치 맵(630, 730)의 마지막 열(639, 739)의 픽셀 값들이 -의 부호를 가질 수 있다.6 and 7, the pixel values of the
일 실시예에서, 영상 처리 장치(100)는 여러 시간대의 원본 영상(10)들에 대응하는 리타겟팅 영상들 사이의 연속성을 유지하기 위하여, 이전 시간대의 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력되는 시프트 맵(90)과, 현재 시간대의 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력되는 시프트 맵(90)을 결합하여 현재 시간대의 리사이징 영상(20)을 리타겟팅할 수도 있다. In one embodiment, the
예를 들어, 영상 처리 장치(100)는 t-1 시간 대의 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력되는 시프트 맵(90)과, t 시간 대의 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력되는 시프트 맵(90)을 결합한 후, t 시간대의 리사이징 영상(20)을 리타겟팅할 수 있다. 각 시간대별 시프트 맵(90)의 갱신 과정은 아래의 수학식 1로 표현될 수 있다.For example, the
[수학식 1][Equation 1]
Sb'(t) = (t/(t+1))*Sb'(t-1)+(1/(t+1))*Sb(t)Sb '(t) = (t / (t + 1)) * Sb' (t-1) + (1 / (t + 1)) * Sb (t)
Sf'(t) = (t/(t+1))*Sf'(t-1)+(1/(t+1))*Sf(t)Sf '(t) = (t / (t + 1)) * Sf' (t-1) + (1 / (t + 1)) * Sf (t)
상기 수학식 1에서, Sb(t)는 t 시간대의 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력된 제 1 시프트 맵(94), Sb'(t)은 Sb(t)로부터 업데이트된 제 1 시프트 맵(94), Sb'(t-1)은 t-1 시간대 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력된 후, 업데이트된 제 1 시프트 맵(94), Sf(t)는 t 시간대의 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력된 제 2 시프트 맵(96), Sf'(t)은 Sf(t)로부터 업데이트된 제 2 시프트 맵(96), Sf'(t-1)은 t-1 시간대 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력된 후, 업데이트된 제 2 시프트 맵(96)을 의미한다. 상기 제 1 시프트 맵(94)은 리사이징 영상(20)을 세로 방향으로 리타겟팅하기 위한 시프트 맵, 제 2 시프트 맵(96)은 리사이징 영상(20)을 가로 방향으로 리타겟팅하기 위한 시프트 맵을 나타낼 수 있다.In Equation 1, Sb (t) is the
이하에서는, 도 8 내지 도 12를 참조하여, 신경망 모델(300)을 훈련시키는 방법에 대해 설명한다.Hereinafter, a method of training the
도 8은 훈련용 원본 영상(910)에 대응하는 GT 영상(930)을 생성하는데 이용되는 마스크를 도시하는 예시적인 도면이고, 도 9는 훈련용 원본 영상(910) 및 훈련용 리사이징 영상(920)에 기초하여 GT 영상(930)을 생성하는 방법을 설명하기 위한 도면이다.8 is an exemplary view showing a mask used to generate a
일 실시예에서, 마스크는 바이너리 마스크일 수 있다. 마스크 내 포함된 픽셀들은 두 가지 값 중 어느 하나의 값을 가질 수 있다. 전경 마스크는 영상 내 전경 오브젝트를 추출하기 위한 마스크로서, 예를 들어, 영상 내 중요 영역만을 추출하기 위해 이용될 수 있다. 배경 마스크는 영상 내 배경 오브젝트를 추출하기 위한 마스크로서, 예를 들어, 영상 내 비중요 영역만을 추출하기 위해 이용될 수 있다.In one embodiment, the mask may be a binary mask. Pixels included in the mask may have one of two values. The foreground mask is a mask for extracting a foreground object in an image, and may be used, for example, to extract only an important region in the image. The background mask is a mask for extracting a background object in an image, and can be used, for example, to extract only a non-critical region in the image.
영상 처리 장치(100)는 신경망 모델(300)의 훈련을 위해 훈련용 원본 영상(910)에 대응하는 GT(ground truth) 영상(930)을 생성할 수 있다. GT 영상(930)은 훈련용 리사이징 영상(920)과 동일한 종횡비 및 크기를 가질 수 있다. The
영상 처리 장치(100)는 GT 영상(930)을 생성하기 위해 도 8에 도시된 것과 같은 제 1 전경 마스크(32) 및 제 2 배경 마스크(44)를 획득할 수 있다.The
영상 처리 장치(100)는 훈련용 원본 영상(910)에 대응하는 제 1 전경 마스크(32)를 획득할 수 있다. 영상 처리 장치(100)는 훈련용 원본 영상(910) 및 그에 대응하는 제 1 전경 마스크(32)를 외부의 장치로부터 수신하거나, 관리자로부터 입력받을 수 있다. 훈련용 원본 영상(910)과 제 1 전경 마스크(32)는 동일한 크기 및 동일한 종횡비를 가질 수 있다. 일 실시예에서, 영상 처리 장치(100)는 훈련용 원본 영상(910)을 미리 저장된 알고리즘에 따라 분석하여, 훈련용 원본 영상(910) 내 중요 부분을 식별하고, 식별된 부분을 추출하기 위한 제 1 전경 마스크(32)를 생성할 수도 있다.The
영상 처리 장치(100)는 소정 종횡비에 따라 제 1 전경 마스크(32)를 스트레칭(stretching)한 제 2 전경 마스크(34)를 획득할 수 있다. 영상 처리 장치(100)는 제 1 전경 마스크(32)를 보간 처리하여 제 2 전경 마스크(34)를 생성할 수 있다.The
영상 처리 장치(100)는 제 1 전경 마스크(32)의 픽셀 값들을 반전시켜 제 1 전경 마스크(32)에 대응하는 제 1 배경 마스크(42)를 획득할 수 있다. 제 1 배경 마스크(42)는 후술하는 바와 같이, 제 3 배경 마스크(46)를 생성하는데 이용될 수 있다. 그리고, 영상 처리 장치(100)는 제 2 전경 마스크(34)의 픽셀 값들을 반전시켜 제 2 전경 마스크(34)에 대응하는 제 2 배경 마스크(44)를 획득할 수 있다. 여기서, 전경 마스크의 픽셀 값들을 반전시킨다는 것은, 전경 마스크 내 픽셀들에 할당된 어느 하나의 값을, 마스크에 할당 가능한 2가지 값 중 다른 하나로 변경하는 것을 의미할 수 있다. 예를 들어, 제 1 전경 마스크(32)에서 1의 값을 가지는 픽셀은, 제 1 배경 마스크(42)에서 0의 값을 가질 수 있다. 일 실시예에서, 상기 제 2 배경 마스크(44)는 제 1 배경 마스크(42)의 크기를 변경시켜 획득될 수도 있다.The
도 9를 참조하면, 영상 처리 장치(100)는 훈련용 원본 영상(910)에 제 1 전경 마스크(32)를 적용하여 훈련용 원본 영상(910)으로부터 전경 오브젝트(915)를 추출하고, 훈련용 리사이징 영상(920)에 제 2 배경 마스크(44)를 적용하여 훈련용 리사이징 영상(920)으로부터 배경 오브젝트(927)를 추출한다. 그리고, 영상 처리 장치(100)는 훈련용 원본 영상(910)에서 추출되는 전경 오브젝트(915)와 훈련용 리사이징 영상(920)에서 추출되는 배경 오브젝트(927)를 결합하여 GT 영상(930)을 생성한다. 여기서, 결합한다는 것은, 훈련용 원본 영상(910)에서 추출되는 오브젝트(915)와 훈련용 리사이징 영상(920)에 추출되는 오브젝트(927)를 합하여 하나의 GT 영상(930)을 생성한다는 것을 의미할 수 있다.Referring to FIG. 9, the
훈련용 리사이징 영상(920) 내 포함된 전경 오브젝트(925)는, 훈련용 원본 영상(910) 내 포함된 전경 오브젝트(915) 대비 크기 비율이 변경된 것이므로, 도 9에 도시된 바와 같이, GT 영상(930) 내에는 빈 영역(935)이 존재하게 된다. 다시 말하면, 제 2 배경 마스크(44)를 훈련용 리사이징 영상(920)에 적용하였을 때, 훈련용 리사이징 영상(920)에 포함된 전경 오브젝트(925)는 훈련용 리사이징 영상(920)에 포함된 그대로 추출되지 않고, 제 2 배경 마스크(44)를 거쳐 예를 들어, 0의 픽셀 값을 가지게 된다. 훈련용 원본 영상(910)에 포함된 전경 오브젝트(915)의 크기는 훈련용 리사이징 영상(920)에 포함된 전경 오브젝트(925)의 크기보다 작으므로, 훈련용 원본 영상(910)으로부터 추출된 전경 오브젝트(915)를 훈련용 리사이징 영상(920)으로부터 추출되는 배경 오브젝트(927)에 결합시키는 경우, 0의 픽셀 값을 가진 부분은 그대로 빈 공간(935)이 되는 것이다.As the
영상 처리 장치(100)는 신경망 모델(300)의 훈련을 위해, 훈련용 리사이징 영상(920)을 신경망 모델(300)로 입력한다. 신경망 모델(300)은 훈련용 리사이징 영상(920)에 대응하여 시프트 맵을 출력한다. 그리고, 신경망 모델(300)은 시프트 맵에 기초하여 훈련용 리사이징 영상(920)으로부터 변환된 훈련용 리타겟팅 영상과 GT 영상(930) 사이의 차이가 감소되도록 훈련할 수 있다. 일 예에서, 신경망 모델(300)은 훈련용 리타겟팅 영상과 GT 영상(930) 사이의 차이에 마스크를 적용한 결과에 대응하는 손실 정보가 감소되도록 훈련될 수 있다. 상기 손실 정보를 도출하기 위한 마스크는 앞서 도 8의 제 1 전경 마스크(32), 제 1 배경 마스크(42) 및 제 2 배경 마스크(44)에 기초하여 생성될 수 있는데, 이에 대해서는 도 10 및 도 11을 참조하여 설명한다.The
도 10 및 도 11은 신경망 모델(300)의 훈련에 이용되는 전경 마스크와 배경 마스크를 생성하는 방법을 설명하기 위한 도면이다.10 and 11 are diagrams for explaining a method of generating a foreground mask and a background mask used for training the
도 10을 참조하면, 영상 처리 장치(100)는 제 1 전경 마스크(32)를 패딩(padding)하여 제 3 전경 마스크(36)를 생성할 수 있다. 영상 처리 장치(100)는 제 3 전경 마스크(36)의 크기 및 종횡비가 GT 영상(930)의 크기 및 종횡비와 동일하도록 제 1 전경 마스크(32)를 패딩할 수 있다. 패딩에 따라 새롭게 생성되는 픽셀들에는, 제 1 전경 마스크(32)에 포함된 주변 픽셀 값들과 동일한 값들이 할당될 수 있다. 제 3 전경 마스크(36)는 GT 영상(930)으로부터 전경 오브젝트를 추출하는데 이용될 수 있다.Referring to FIG. 10, the
도 11을 참조하면, 영상 처리 장치(100)는 제 1 배경 마스크(42)와 제 2 배경 마스크(44)를 결합하여 제 3 배경 마스크(46)를 생성할 수 있다. 영상 처리 장치(100)는 제 1 배경 마스크(42)와 제 2 배경 마스크(44)를 합하여 하나의 제 3 배경 마스크(46)를 생성할 수 있다. 제 3 배경 마스크(46)는 GT 영상(930)으로부터 배경 오브젝트를 추출하는데 이용될 수 있다.Referring to FIG. 11, the
GT 영상(930), 제 3 전경 마스크(36) 및 제 3 배경 마스크(46)를 이용하여 신경망 모델(300)을 훈련시키는 방법은 도 12를 참조하여 설명한다.A method of training the
도 12는 신경망 모델(300)의 훈련에 이용되는 손실 정보들을 설명하기 위한 도면이다.12 is a diagram for describing loss information used for training the
영상 처리 장치(100)는 훈련용 원본 영상(910)에 대응하는 훈련용 리사이징 영상(920)을 신경망 모델(300)로 입력하고, 신경망 모델(300)에서는 훈련용 리사이징 영상(920)의 제 1 방향(예를 들어, 세로 방향)으로의 리타겟팅을 위한 제 1 시프트 맵(994)과 훈련용 리사이징 영상(920)의 제 2 방향(예를 들어, 가로 방향)으로의 리타겟팅을 위한 제 2 시프트 맵(996)이 출력된다.The
훈련용 리사이징 영상(920)은 제 1 시프트 맵(994)에 기초하여 리타겟팅되고, 리타겟팅된 영상과 GT 영상(930) 사이의 차이에 제 3 배경 마스크(46)가 적용된다. 제 3 배경 마스크(46)가 적용된 결과에 대응하는 제 1 손실 정보(1210)가 추출될 수 있다. 신경망 모델(300)은 제 1 손실 정보(1210)가 감소되도록 훈련될 수 있다. 일 예에서, 신경망 모델(300)은 제 1 손실 정보(1210)가 최소화되도록 훈련될 수 있다. 제 1 손실 정보(1210)는 아래의 수학식 2로 계산될 수 있다.The
[수학식 2][Equation 2]
상기 수학식 2에서, Lb는 제 1 손실 정보(1210), (x, y)는 영상 내 픽셀의 위치, I는 훈련용 리사이징 영상(920), Sb는 제 1 시프트 맵(994), GT는 GT 영상(930), Mb는 제 3 배경 마스크(46)를 나타낸다. In Equation 2, Lb is the
또한, 훈련용 리사이징 영상(920)은 제 1 시프트 맵(994) 및 제 2 시프트 맵(996)에 기초하여 리타겟팅되고, 훈련용 리사이징 영상(920)이 리타겟팅되어 생성된 훈련용 리타겟팅 영상과 GT 영상(930) 사이의 차이에 제 3 전경 마스크(36)가 적용된다. 제 3 전경 마스크(36)가 적용된 결과에 대응하는 제 2 손실 정보(1230)가 추출될 수 있다. 신경망 모델(300)은 제 2 손실 정보(1230)가 감소되도록 훈련될 수 있다. 일 예에서, 신경망 모델(300)은 제 2 손실 정보(1230)가 최소화되도록 훈련될 수 있다. 제 2 손실 정보(1230)는 아래의 수학식 3으로 계산될 수 있다.In addition, the
[수학식 3][Equation 3]
상기 수학식 3에서, Lf는 제 2 손실 정보(1230), (x, y)는 영상 내 픽셀의 위치, I는 훈련용 리사이징 영상(920), Sb는 제 1 시프트 맵(994), Sf는 제 2 시프트 맵(996), GT는 GT 영상(930), Mf는 제 3 전경 마스크(36)를 나타낸다.In Equation 3, Lf is the
일 실시예에서, 신경망 모델(300)은 이전 시간대의 훈련용 리사이징 영상(920)에 대응하는 시프트 맵과 현재 시간대의 훈련용 리사이징 영상(920)에 대응하는 시프트 맵 사이의 관계에 기초하여 도출되는 제 3 손실 정보가 감소되도록 훈련될 수 있다. 일 예에서, 신경망 모델(300)은 제 3 손실 정보가 최소화되도록 훈련될 수도 있다.In one embodiment, the
제 3 손실 정보는 여러 프레임들로 구성된 비디오에서 리타겟팅된 프레임들 사이의 연속성을 유지하기 위해 산출된다. 제 3 손실 정보는 Flow consistency loss에 대응할 수 있다. 제 3 손실 정보는 아래의 수학식 4에 따라 산출될 수 있다.The third loss information is calculated to maintain continuity between retargeted frames in a video composed of several frames. The third loss information may correspond to a flow consistency loss. The third loss information may be calculated according to Equation 4 below.
[수학식 4][Equation 4]
상기 수학식 4에서 warp는 플로우넷(flownet)을 이용한 워핑 함수를 나타내고, Sb(t)는 t 시간 대의 훈련용 리사이징 영상(920)을 입력받아 신경망 모델(300)이 출력하는 제 1 시프트 맵(994), Sb(t+1)은 t+1 시간 대의 훈련용 리사이징 영상(920)을 입력받아 신경망 모델(300)이 출력하는 제 1 시프트 맵(994), Sf(t)는 t 시간 대의 훈련용 리사이징 영상(920)을 입력받아 신경망 모델(300)이 출력하는 제 2 시프트 맵(996), Sf(t+1)은 t+1 시간 대의 훈련용 리사이징 영상(920)을 입력받아 신경망 모델(300)이 출력하는 제 2 시프트 맵(996)을 나타내고, Mo는 오클루젼 마스크(occlusion mask)로서 아래의 수학식 5로 산출된다.In Equation 4, warp denotes a warping function using a flownet, and Sb (t) is a first shift map output by the
[수학식 5][Equation 5]
상기 수학식 5에서 a는 미리 결정된 가중치를 나타내고, I(t)는 t 시간대의 훈련용 원본 영상(910)에 대응하는 훈련용 리사이징 영상(920), I(t+1)은 t+1 시간대의 훈련용 원본 영상(910)에 대응하는 훈련용 리사이징 영상(920)을 나타낸다.In Equation 5, a denotes a predetermined weight, and I (t) is a
신경망 모델(300)은 제 1 손실 정보(1210), 제 2 손실 정보(1230) 및 제 3 손실 정보를 조합한 최종 손실 정보가 감소되도록 훈련될 수 있다. 최종 손실 정보는 아래의 수학식 6에 따라 결정될 수 있다.The
[수학식 6][Equation 6]
최종 손실 정보 = a·제 1 손실 정보 + b·제 2 손실 정보 + c·제 3 손실 정보Final loss information = a · first loss information + b · second loss information + c · third loss information
상기 수학식 6에서, a, b, c는 각 손실 정보에 적용되는 미리 결정된 가중치이다.In Equation 6, a, b, and c are predetermined weights applied to each loss information.
일 실시예에 따른 신경망 모델(300)은, 훈련용 리사이징 영상(920)을 제 1 시프트 맵(994)에 기초하여 세로 방향으로 리타겟팅시킨 영상의 배경과 GT 영상(930)의 배경 사이의 차이가 감소 또는 최소화되도록 훈련되고, 훈련용 리사이징 영상(920)을 제 1 시프트 맵(994) 및 제 2 시프트 맵(996)에 기초하여 세로 및 가로 방향으로 리타겟팅시킨 영상의 전경과 GT 영상(930)의 전경 사이의 차이가 감소 또는 최소화되도록 훈련될 수 있다. 특히, 훈련용 리타겟팅 영상과 GT 영상(930) 사이의 차이에 제 3 전경 마스크(36)가 적용되는데, 제 3 전경 마스크(36)는 훈련용 원본 영상(910)에 포함된 전경 오브젝트와 동일 크기의 오브젝트를 추출할 수 있으며, GT 영상(930)은 훈련용 원본 영상(910)에 포함된 전경 오브젝트의 크기와 동일한 크기의 오브젝트를 포함하고 있으므로, 결국, 신경망 모델(300)은 훈련용 리타겟팅 영상에 포함된 전경 오브젝트가 훈련용 원본 영상(910)에 포함된 전경 오브젝트와 동일 또는 유사해지도록 훈련될 수 있는 것이다.In the
도 13은 일 실시예에 따른 영상 처리 장치(100)의 구성을 도시하는 블록도이다.13 is a block diagram showing the configuration of an
도 13을 참조하면, 일 실시예에 따른 영상 처리 장치(100)는 메모리(110) 및 프로세서(130)를 포함할 수 있다.Referring to FIG. 13, the
메모리(110)는 적어도 하나의 프로그램 및 신경망 모델(300)을 저장할 수 있다. 프로세서(130)는 메모리(110)에 저장된 적어도 하나의 프로그램이 실행됨에 따라 영상의 리타겟팅을 포함한 영상 처리 동작을 수행할 수 있다.The
구체적으로, 프로세서(130)는 소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하고, 리사이징 영상을 신경망 모델(300)에 입력할 수 있다. 프로세서(130)는 신경망 모델(300)에서 출력되는 시프트 맵에 기초하여 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득할 수 있다. 리사이징 영상을 신경망 모델(300)에 입력하고, 신경망 모델(300)에서 출력되는 시프트 맵에 기초하여 리타겟팅 영상을 생성하는 방법에 대해서는 앞서 상세히 설명하였으므로, 여기에서는 그 설명을 생략한다.Specifically, the
도 13에 도시되지는 않았지만, 프로세서(130)는 리타겟팅 영상을 디스플레이로 전송하여, 리타겟팅 영상이 디스플레이에 의해 재생되도록 할 수 있다. 또한, 프로세서(130)는 원본 영상으로부터 리사이징 영상을 획득하는데 있어, 리사이징 영상의 종횡비를 디스플레이가 가지는 종횡비에 기초하여 결정할 수 있다. 예를 들어, 프로세서(130)는 리사이징 영상의 종횡비를 디스플레이가 가지는 종횡비와 동일하게 결정할 수 있다.Although not shown in FIG. 13, the
일 실시예에 따른 영상 처리 장치(100)는 스마트폰, 태블릿 PC, 데스크탑 PC, 텔레비전, 스마트워치, 스마트글래스, 서버 등에 포함될 수 있다. The
영상 처리 장치(100)에 저장되는 신경망 모델(300)의 훈련은 다양한 장치에서 이루어질 수 있다.Training of the
일 실시예에서, 신경망 모델(300)의 훈련이 외부 장치(예를 들어, 서버 등)에서 수행되고, 훈련된 신경망 모델(300)이 영상 처리 장치(100)에 저장될 수 있다. In one embodiment, training of the
일 실시예에서, 신경망 모델(300)의 훈련이 외부 장치(예를 들어, 서버 등)에서 수행되고, 훈련된 신경망 모델(300)의 데이터가 네트워크를 통해 영상 처리 장치(100)의 통신 모듈(미도시)로 전송될 수도 있다. In one embodiment, training of the
또는, 일 예에서, 신경망 모델(300)이 영상 처리 장치(100)에 저장된 상태에서, 신경망 모델(300)의 훈련이 영상 처리 장치(100)에서 수행될 수 있다.Alternatively, in one example, while the
또는, 일 예에서, 신경망 모델(300)의 훈련이 외부 장치(예를 들어, 서버 등)에서 수행된 후, 신경망 모델(300)의 내부 가중치를 나타내는 정보가 외부 장치로부터 영상 처리 장치(100)로 네트워크를 통해 전송될 수도 있다. 영상 처리 장치(100)는 수신된 내부 가중치 정보에 따라 미리 저장된 신경망 모델(300)을 훈련시킬 수 있다.Alternatively, in one example, after training of the
한편, 상술한 본 개시의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 작성된 프로그램은 매체에 저장될 수 있다.Meanwhile, the above-described embodiments of the present disclosure can be written as a program that can be executed on a computer, and the created program can be stored in a medium.
매체는 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체는 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 매체에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체의 예시로, 애플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다.The medium may be a computer that continuously stores executable programs or may be temporarily stored for execution or download. In addition, the medium may be various recording means or storage means in the form of a combination of single or several hardware, and is not limited to a medium that is directly connected to a computer system, but may be distributed on a network. Examples of the medium include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical recording media such as CD-ROMs and DVDs, and magneto-optical media such as floptical disks, And program instructions including ROM, RAM, flash memory, and the like. In addition, examples of other media include an application store for distributing applications, a site for distributing or distributing various software, and a recording medium or storage medium managed by a server.
이상, 본 개시의 기술적 사상을 바람직한 실시예를 들어 상세하게 설명하였으나, 본 개시의 기술적 사상은 상기 실시예들에 한정되지 않고, 본 개시의 기술적 사상의 범위 내에서 당 분야에서 통상의 지식을 가진 자에 의하여 여러 가지 변형 및 변경이 가능하다.As described above, the technical idea of the present disclosure has been described in detail with reference to preferred embodiments, but the technical idea of the present disclosure is not limited to the above embodiments and has ordinary knowledge in the art within the scope of the technical idea of the present disclosure. Various modifications and changes are possible by the ruler.
100: 영상 처리 장치
110: 메모리
130: 프로세서100: image processing device
110: memory
130: processor
Claims (20)
상기 리사이징 영상을 미리 훈련된 신경망 모델에 입력하는 단계; 및
상기 신경망 모델에서 출력되는 시프트 맵에 기초하여 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함하는 것을 특징으로 하는 영상 처리 방법.
Obtaining a resized image whose size is changed from the original image according to a predetermined aspect ratio;
Inputting the resizing image into a pre-trained neural network model; And
And obtaining a converted retargeting image from the resizing image based on the shift map output from the neural network model.
상기 신경망 모델은,
상기 리사이징 영상을 입력받는 제 1 서브 모델, 상기 제 1 서브 모델로부터 출력되는 특징 맵을 히든 스테이트에 따라 처리하는 컨볼루션 LSTM(long short-term memory) 레이어 및 상기 컨볼루션 LSTM 레이어에서 출력되는 데이터를 처리하여 상기 시프트 맵을 출력하는 제 2 서브 모델을 포함하는 것을 특징으로 하는 영상 처리 방법.
According to claim 1,
The neural network model,
The first sub-model receiving the resizing image, the convolutional long short-term memory (LSTM) layer for processing the feature map output from the first sub-model according to the hidden state, and the data output from the convolutional LSTM layer And a second sub-model for processing and outputting the shift map.
상기 컨볼루션 LSTM 레이어는,
이전 시간대의 원본 영상에 대응하는 리사이징 영상을 처리한 후 업데이트된 상기 히든 스테이트를 이용하여 상기 원본 영상에 대응하는 리사이징 영상을 처리하는 것을 특징으로 하는 영상 처리 방법.
According to claim 2,
The convolution LSTM layer,
And processing the resizing image corresponding to the original image in the previous time period, and then processing the resizing image corresponding to the original image using the updated hidden state.
상기 제 1 서브 모델 및 제 2 서브 모델 각각은,
소정의 필터 커널을 이용하여 입력 데이터를 컨볼루션 처리하는 적어도 하나의 컨볼루션 레이어를 포함하는 것을 특징으로 하는 영상 처리 방법.
According to claim 2,
Each of the first sub-model and the second sub-model,
And at least one convolutional layer for convolutionally processing input data using a predetermined filter kernel.
상기 리사이징 영상의 픽셀들의 제 1 위치 맵 및 제 2 위치 맵이 상기 제 2 서브 모델로 입력되며,
상기 제 1 위치 맵의 첫 번째 행과 마지막 행에는 상기 원본 영상과 상기 리사이징 영상 사이의 세로 크기들 사이의 비율에 대응하는 값이 할당되고,
상기 제 2 위치 맵의 첫 번째 열과 마지막 열에는, 상기 원본 영상과 상기 리사이징 영상 사이의 가로 크기들 사이의 비율에 대응하는 값이 할당되는 것을 특징으로 하는 영상 처리 방법.
According to claim 2,
The first location map and the second location map of pixels of the resizing image are input to the second sub-model,
Values corresponding to ratios between vertical sizes between the original image and the resizing image are allocated to the first row and the last row of the first location map,
The first and last columns of the second location map are assigned values corresponding to a ratio between horizontal sizes between the original image and the resizing image.
상기 제 1 위치 맵의 상기 첫 번째 행으로부터 상기 마지막 행까지 소정 차이를 갖는 값들이 순차적으로 각 행에 할당되고,
상기 제 2 위치 맵의 상기 첫 번째 열로부터 상기 마지막 열까지 소정 차이를 갖는 값들이 순차적으로 각 열에 할당되는 것을 특징으로 하는 영상 처리 방법.
The method of claim 5,
Values having a predetermined difference from the first row to the last row of the first location map are sequentially assigned to each row,
An image processing method, characterized in that values having a predetermined difference from the first column to the last column of the second location map are sequentially assigned to each column.
상기 리타겟팅 영상을 획득하는 단계는,
상기 리사이징 영상으로부터 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 기초하여 변환된 영상을, 제 2 방향으로의 리타겟팅을 위한 시프트 맵을 기초로 변환하여 상기 리타겟팅 영상을 획득하는 단계를 포함하는 것을 특징으로 하는 영상 처리 방법.
According to claim 1,
Acquiring the retargeting image,
And converting the converted image based on the shift map for retargeting in the first direction from the resizing image, and obtaining the retargeting image by converting the converted image based on the shift map for retargeting in the second direction. Image processing method characterized in that.
상기 리타겟팅 영상을 획득하는 단계는,
이전 시간대의 시프트 맵과 현재 시간대의 상기 시프트 맵을 조합하여, 상기 현재 시간대의 시프트 맵을 갱신하는 단계; 및
상기 갱신된 상기 현재 시간대의 시프트 맵에 기초하여, 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함하는 것을 특징으로 하는 영상 처리 방법.
According to claim 1,
Acquiring the retargeting image,
Updating the shift map of the current time zone by combining the shift map of the previous time zone and the shift map of the current time zone; And
And obtaining a converted retargeting image from the resizing image based on the updated shift map of the current time zone.
GT(ground truth) 영상과 훈련용 리타겟팅 영상의 차이에 마스크를 적용한 결과에 대응하는 제 1 손실 정보가 감소되도록 상기 신경망 모델이 훈련되는 것을 특징으로 하는 영상 처리 방법.
According to claim 1,
An image processing method characterized in that the neural network model is trained such that first loss information corresponding to a result of applying a mask to a difference between a ground truth (GT) image and a training retargeting image is reduced.
훈련용 리사이징 영상을 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 따라 변환시켜 획득된 영상과 GT 영상의 차이에 제 1 배경 마스크를 적용한 결과에 대응하는 제 2 손실 정보와,
상기 훈련용 리사이징 영상을 상기 제 1 방향으로의 리타겟팅을 위한 시프트 맵 및 제 2 방향으로의 리타겟팅을 위한 시프트 맵에 따라 변환시켜 획득된 훈련용 리타겟팅 영상과 상기 GT 영상의 차이에 제 1 전경 마스크를 적용한 결과에 대응하는 제 3 손실 정보가 감소되도록 상기 신경망 모델이 훈련되는 것을 특징으로 하는 영상 처리 방법.
According to claim 1,
Second loss information corresponding to a result of applying a first background mask to a difference between an acquired image and a GT image by converting a training resizing image according to a shift map for retargeting in a first direction,
The difference between the training retargeting image and the GT image obtained by converting the training resizing image according to the shift map for retargeting in the first direction and the shift map for retargeting in the second direction is the first. The neural network model is trained so that the third loss information corresponding to the result of applying the foreground mask is reduced.
상기 제 1 전경 마스크는, 훈련용 원본 영상에 대응하는 제 2 전경 마스크를 패딩하여 획득되며,
상기 제 1 배경 마스크는, 상기 제 2 전경 마스크에 대응하는 제 2 배경 마스크와, 상기 제 2 전경 마스크의 크기를 변경시켜 획득한 제 3 전경 마스크에 대응하는 제 3 배경 마스크를 서로 결합하여 획득되는 것을 특징으로 하는 영상 처리 방법.
The method of claim 10,
The first foreground mask is obtained by padding a second foreground mask corresponding to the training original image,
The first background mask is obtained by combining a second background mask corresponding to the second foreground mask and a third background mask corresponding to a third foreground mask obtained by changing the size of the second foreground mask. Image processing method characterized in that.
상기 GT 영상은,
상기 훈련용 원본 영상에 상기 제 2 전경 마스크를 적용하여 획득한 전경 오브젝트와, 상기 훈련용 리사이징 영상에 상기 제 3 배경 마스크를 적용하여 획득한 배경 오브젝트를 결합하여 획득되는 것을 특징으로 하는 영상 처리 방법.
The method of claim 11,
The GT video,
An image processing method comprising obtaining a foreground object obtained by applying the second foreground mask to the training original image and a background object obtained by applying the third background mask to the training resizing image. .
이전 시간대의 훈련용 원본 영상에 대응하는 시프트 맵과 현재 시간대의 훈련용 원본 영상에 대응하는 시프트 맵 사이의 관계에 기초하여 도출되는 제 4 손실 정보가 감소되도록 상기 신경망 모델이 훈련되는 것을 특징으로 하는 영상 처리 방법.
According to claim 1,
The neural network model is trained such that the fourth loss information derived based on the relationship between the shift map corresponding to the original training image in the previous time zone and the shift map corresponding to the original training image in the current time period is reduced. Image processing method.
A program stored in a medium to execute the image processing method of any one of claims 1 to 13 in combination with hardware.
미리 훈련된 신경망 모델 및 적어도 하나의 프로그램을 저장하는 메모리를 포함하되,
상기 프로세서는, 상기 메모리에 저장된 상기 적어도 하나의 프로그램이 실행됨에 따라,
소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하고,
상기 리사이징 영상을 상기 신경망 모델에 입력하고,
상기 신경망 모델에서 출력되는 시프트 맵에 기초하여 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 것을 특징으로 하는 영상 처리 장치.
Processor; And
A pre-trained neural network model and a memory storing at least one program,
The processor, as the at least one program stored in the memory is executed,
Obtain a resized image whose size is changed from the original image according to a predetermined aspect ratio,
Input the resizing image into the neural network model,
An image processing apparatus characterized by acquiring a retargeting image converted from the resizing image based on a shift map output from the neural network model.
상기 영상 처리 장치는,
상기 리타겟팅 영상을 출력하는 디스플레이를 포함하되,
상기 프로세서는,
상기 디스플레이의 종횡비에 기초하여 상기 리사이징 영상의 종횡비를 결정하는 것을 특징으로 하는 영상 처리 장치.
The method of claim 15,
The image processing device,
It includes a display for outputting the retargeting image,
The processor,
And an aspect ratio of the resizing image is determined based on the aspect ratio of the display.
상기 프로세서는,
상기 리사이징 영상으로부터 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 기초하여 변환된 영상을, 제 2 방향으로의 리타겟팅을 위한 시프트 맵을 기초로 변환하여 상기 리타겟팅 영상을 획득하는 것을 특징으로 하는 영상 처리 장치.
The method of claim 15,
The processor,
And converting the converted image based on the shift map for retargeting in the first direction from the resizing image, and obtaining the retargeting image by converting the transformed image based on the shift map for retargeting in the second direction. Image processing device.
상기 프로세서는,
이전 시간대의 시프트 맵과 현재 시간대의 상기 시프트 맵을 조합하여, 상기 현재 시간대의 시프트 맵을 갱신하고, 상기 갱신된 상기 현재 시간대의 시프트 맵에 기초하여, 상기 리사이징 영상을 변환시키는 것을 특징으로 하는 영상 처리 장치.
The method of claim 15,
The processor,
An image characterized by combining the shift map of the previous time zone and the shift map of the current time zone, updating the shift map of the current time zone, and converting the resizing image based on the updated shift map of the current time zone. Processing unit.
상기 프로세서는,
훈련용 원본 영상에 대응하는 훈련용 리사이징 영상을 상기 신경망 모델로 입력하되,
상기 신경망 모델은, 훈련용 리타겟팅 영상과 GT 영상 사이의 차이에 마스크를 적용한 결과에 대응하는 손실 정보가 감소되도록 훈련되는 것을 특징으로 하는 영상 처리 장치.
The method of claim 15,
The processor,
The training resizing image corresponding to the original training image is input to the neural network model,
The neural network model, an image processing apparatus characterized in that the loss information corresponding to the result of applying the mask to the difference between the training retargeting image and the GT image is reduced.
상기 영상 처리 장치는,
상기 미리 훈련된 신경망 모델의 데이터를 외부 장치로부터 수신하는 통신 모듈을 더 포함하는 것을 특징으로 하는 영상 처리 장치.The method of claim 15,
The image processing device,
And a communication module receiving data of the pre-trained neural network model from an external device.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020180141141A KR20200057849A (en) | 2018-11-15 | 2018-11-15 | Image processing apparatus and method for retargetting image |
PCT/KR2019/015668 WO2020101434A1 (en) | 2018-11-15 | 2019-11-15 | Image processing device and method for retargeting of image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020180141141A KR20200057849A (en) | 2018-11-15 | 2018-11-15 | Image processing apparatus and method for retargetting image |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20200057849A true KR20200057849A (en) | 2020-05-27 |
Family
ID=70730338
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020180141141A Withdrawn KR20200057849A (en) | 2018-11-15 | 2018-11-15 | Image processing apparatus and method for retargetting image |
Country Status (2)
Country | Link |
---|---|
KR (1) | KR20200057849A (en) |
WO (1) | WO2020101434A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102542220B1 (en) * | 2022-09-19 | 2023-06-13 | 아주대학교 산학협력단 | Method of semantic segmentation based on self-knowledge distillation and semantic segmentation device based on self-knowledge distillation |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20220114698A1 (en) * | 2020-10-08 | 2022-04-14 | Nvidia Corporation | Image generation using one or more neural networks |
CN112561993B (en) * | 2020-12-07 | 2023-04-28 | 宁波大学 | Stereo image repositioning method |
GB202100316D0 (en) * | 2021-01-11 | 2021-02-24 | Samsung Electronics Co Ltd | Hybrid image retargeting |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB2539845B (en) * | 2015-02-19 | 2017-07-12 | Magic Pony Tech Ltd | Offline training of hierarchical algorithms |
GB2555136A (en) * | 2016-10-21 | 2018-04-25 | Nokia Technologies Oy | A method for analysing media content |
-
2018
- 2018-11-15 KR KR1020180141141A patent/KR20200057849A/en not_active Withdrawn
-
2019
- 2019-11-15 WO PCT/KR2019/015668 patent/WO2020101434A1/en active Application Filing
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102542220B1 (en) * | 2022-09-19 | 2023-06-13 | 아주대학교 산학협력단 | Method of semantic segmentation based on self-knowledge distillation and semantic segmentation device based on self-knowledge distillation |
Also Published As
Publication number | Publication date |
---|---|
WO2020101434A1 (en) | 2020-05-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102281017B1 (en) | Neural network model training method, apparatus and storage medium for image processing | |
US10755173B2 (en) | Video deblurring using neural networks | |
US12148123B2 (en) | Multi-stage multi-reference bootstrapping for video super-resolution | |
US20220060639A1 (en) | Live style transfer on a mobile device | |
KR20200057849A (en) | Image processing apparatus and method for retargetting image | |
WO2021177324A1 (en) | Image generating device, image generating method, recording medium generating method, learning model generating device, learning model generating method, learning model, data processing device, data processing method, inferring method, electronic instrument, generating method, program, and non-transitory computer-readable medium | |
CN112837245B (en) | Dynamic scene deblurring method based on multi-mode fusion | |
CN110033475B (en) | A method for detecting and eliminating moving objects in aerial images generated by high-resolution textures | |
KR20200128378A (en) | Image generation network training and image processing methods, devices, electronic devices, and media | |
CN108875900A (en) | Method of video image processing and device, neural network training method, storage medium | |
CN114339409B (en) | Video processing method, device, computer equipment and storage medium | |
JP7543080B2 (en) | Trained model and data processing device | |
KR102493492B1 (en) | Method and Device for Fast Adaptation through Meta-learning of Super Resolution Model | |
CN108875751B (en) | Image processing method and device, neural network training method and storage medium | |
CN112541867A (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN110958469A (en) | Video processing method and device, electronic equipment and storage medium | |
CN111968191B (en) | Automatic image synthesis system and method using comb-like neural network architecture | |
KR102303002B1 (en) | Method and Apparatus for Deblurring of Human and Scene Motion using Pseudo-blur Synthesizer | |
CN112995678B (en) | Video motion compensation method and device and computer equipment | |
KR102261544B1 (en) | Streaming server and method for object processing in multi-view video using the same | |
JP2022547594A (en) | Joint rolling shutter correction and image deblurring | |
CN112801876B (en) | Information processing method and device, electronic equipment and storage medium | |
Jeelani et al. | Expanding synthetic real-world degradations for blind video super resolution | |
CN113989460A (en) | Real-time sky replacement special effect control method and device for augmented reality scene | |
CN111696034A (en) | Image processing method and device and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PA0109 | Patent application |
Patent event code: PA01091R01D Comment text: Patent Application Patent event date: 20181115 |
|
PG1501 | Laying open of application | ||
PC1203 | Withdrawal of no request for examination |