WO2020101434A1 - 영상의 리타겟팅을 위한 영상 처리 장치 및 방법 - Google Patents
영상의 리타겟팅을 위한 영상 처리 장치 및 방법 Download PDFInfo
- Publication number
- WO2020101434A1 WO2020101434A1 PCT/KR2019/015668 KR2019015668W WO2020101434A1 WO 2020101434 A1 WO2020101434 A1 WO 2020101434A1 KR 2019015668 W KR2019015668 W KR 2019015668W WO 2020101434 A1 WO2020101434 A1 WO 2020101434A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- resizing
- retargeting
- training
- neural network
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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 OR CALCULATING; 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]
Definitions
- 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.
- 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.
- 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 has a technical problem of retargeting an image so that distortion of an important part of the image is minimized.
- an image processing apparatus and method has a technical problem to ensure that continuity between a plurality of time-related images is preserved.
- An image processing method may include obtaining a resized image whose size is changed from an 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.
- 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.
- 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.
- FIG. 1 is a view for explaining an environment to which an image processing apparatus according to an embodiment is applied.
- FIG. 2 is a flowchart illustrating an image processing method according to an embodiment.
- FIG. 3 is a view for explaining a retargeting process according to an embodiment.
- FIG. 4 is a diagram for explaining the structure of a neural network model according to an embodiment.
- FIG. 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.
- FIG. 8 is an exemplary diagram showing a mask used to generate a GT image corresponding to a training original image.
- FIG. 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.
- FIG. 13 is a block diagram showing the configuration of an image processing apparatus according to an embodiment.
- An image processing method may include obtaining a resized image whose size is changed from an 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.
- 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 convolutional long short-term memory
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- GT ground truth
- 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.
- the neural network model may be trained such that third loss information corresponding to a result of applying one foreground mask is reduced.
- the first foreground mask is obtained by padding a second foreground mask corresponding to a training original image
- 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.
- 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.
- 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 includes a 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.
- 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.
- 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.
- 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.
- 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.
- the image processing device may further include a communication module that receives data of the pre-trained neural network model from an external device.
- one component 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.
- 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.
- 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.
- FIG. 1 is a view for explaining an environment to which the image processing apparatus 100 according to an embodiment is applied.
- the image processing apparatus 100 acquires an original image and acquires a retargeting image based on the original image.
- the image processing apparatus 100 may generate a retargeting image having a predetermined aspect ratio from an original image having an aspect ratio different from a predetermined aspect ratio.
- the image processing apparatus 100 may display the retargeting image through the display apparatus 200.
- the image processing apparatus 100 may be included in the display apparatus 200.
- the image processing apparatus 100 may be implemented as a server, and in this case, the image processing apparatus 100 may transmit the retargeting image to the display apparatus 200 through a network.
- the network may include a wired network and a wireless network, specifically, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), and the like. It can include a variety of networks.
- the network may include a known World Wide Web (WWW).
- WWW World Wide Web
- the network is not limited to the networks listed above, and may include at least part of a known wireless data network, a known telephone network, and a known wired / wireless television network.
- the image processing apparatus 100 may enable an important portion of the original image to maintain the aspect ratio within the original image as much as possible even in the retargeting image.
- FIG. 2 is a flowchart illustrating an image processing method according to an embodiment
- FIG. 3 is a diagram illustrating a retargeting process according to an embodiment.
- step S210 the image processing apparatus 100 obtains a resized image 20 whose size is changed from the original image 10 according to a predetermined aspect ratio.
- the size of the resizing image 20 may be larger than the size of the original image 10.
- the vertical size of the resizing image 20 is the same as the vertical size of the original image 10, but the horizontal size of the resizing image 20 may be larger than the horizontal size of the original image 10. .
- the predetermined aspect ratio may be determined based on an aspect ratio of a display outputting a retargeting image, which will be described later.
- the predetermined aspect ratio may be determined to be the same as the aspect ratio of the display outputting the retargeting image.
- the image processing apparatus 100 may obtain a resized image 20 whose size is changed by scaling the original image 10. In one example, the image processing apparatus 100 may obtain a resized image 20 whose size is changed by interpolating pixels in the original image 10.
- the image processing apparatus 100 inputs the resizing image 20 into the pre-trained neural network model 300.
- the neural network model 300 may be, for example, a deep learning model composed of a plurality of layers. The structure and training method of the neural network model 300 will be described in detail with reference to FIG. 8 and below.
- the image processing apparatus 100 acquires a shift map 90 output from the neural network model 300.
- the shift map 90 includes information for changing the positions of pixels in the resizing image 20.
- the shift map 90 may include information about where each pixel in the resizing image 20 should be moved.
- the shift map 90 may have the same size as the size of the resizing image 20.
- the image processing apparatus 100 acquires the converted retargeting image from the resizing image 20 based on the shift map 90.
- the neural network model 300 re-targets a significant portion of the original image 10 even if the resizing image 20 is retargeted according to the output shift map 90. Can be trained to stay within.
- FIG. 4 is a diagram for explaining the structure of a neural network model 300 according to an embodiment.
- the neural network model 300 may include a first sub-model 310, a convolutional LSTM layer 320 and a second sub-model 330.
- the first sub-model 310 receives and processes the resizing image 20.
- the output data of the first sub-model 310 for example, a feature map, is input into a convolutional long short-term memory (LSTM) layer.
- LSTM convolutional long short-term memory
- data output from the convolution LSTM layer 320 is input to the second sub-model 330.
- a shift map 90 for retargeting the resizing image 20 is output.
- the second sub-model 330 includes a foreground mask 92 for extracting a foreground object in the resizing image 20 and a first shift map for retargeting the resizing image 20 along the first direction ( 94) and the second shift map 96 for retargeting the resizing image 20 along the second direction may be output.
- the first shift map 94 is used to retarget pixels in the resizing image 20 in the vertical direction
- the second shift map 96 repixels pixels in the resizing image 20 in the horizontal direction. It can be used to target.
- the second sub-model 330 in order to change only the vertical size of the original image 10 in order to convert the aspect ratio of the original image 10, the second sub-model 330 is configured to output only the first shift map 94 Can be.
- the second sub-model 330 may be configured to output only the second shift map 96. .
- the foreground mask 92 output from the second sub-model 330 is for evaluating whether the neural network model 300 is properly trained, and according to an embodiment, the second sub-model 330 has a foreground mask 92 It may be configured not to be output.
- the convolution LSTM layer 320 receives the data output from the first sub-model 310 and processes it according to a hidden state, and transmits the processed result to the second sub-model 330.
- the hidden state in the convolution LSTM layer 320 is updated after processing the data output from the first sub-model 310, and the updated hidden state can be used for image processing in a next time period.
- the resizing image 20 corresponding to the original image 10 in time t is processed in the first sub-model 310, and data output from the first sub-model 310 is a convolution LSTM layer 320 ) According to the hidden state.
- the hidden state used to process the resizing image 20 in the t time zone may be an updated hidden state after processing the resizing image 20 in the t-1 time period in the convolution LSTM layer 320.
- the hidden state is updated, and the updated hidden state is t + It is used to process the resizing image 20 in one hour.
- the hidden state of the convolution LSTM layer 320 used to process the resizing image 20 in the current time period is used to process the resizing image 20 in the next time period. Since it is used, in retargeting a video composed of several frames, continuity between frames can be maintained.
- 5 is a view for explaining the structure of the neural network model 300 according to an embodiment in detail.
- the first sub-model 310 may include a plurality of convolutional layers. Each convolutional layer convolutionally processes input data using a predetermined size and number of filter kernels, and then transmits the convolutional output data to the next layer.
- FIG. 5 shows that the first sub-model 310 includes five convolutional layers, but the number of convolutional layers may be variously changed within the scope of an autonomous ring by those skilled in the art.
- an activation layer and / or a pooling layer may be located before or after at least some of the convolutional layers in the first sub-model 310.
- output data of the active layer and / or a pooling layer may be input to any 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.
- 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.
- the second sub-model 330 may include a plurality of deconvolution layers. Each deconvolution layer convolutionally processes the input data using a predetermined size and number of filter kernels, and then delivers the convolutional output data to the next layer.
- FIG. 5 shows that the second sub-model 330 includes five deconvolution layers for each of the data finally output, but the number of deconvolution layers is variously changed within the scope of an autonomous ring by those skilled in the art. Can be.
- the foreground mask 92, the first shift map 94, and the second shift map 96 are output from the second sub-model 330
- the foreground mask 92, the first shift map ( 94) and deconvolution layers for the output of each of the second shift map 96 may be arranged in parallel with each other.
- deconvolution layers for outputting the foreground mask 92 (dconv4-1, dconv5-1) May not be included in the second sub-model 330.
- the deconvolution layers for outputting the foreground mask 92 (dconv4-1, dconv5-1) and the first shift map
- the deconvolution layers dconv4-2 and dconv5-2 for the output of 94 may not be included in the second sub-model 330.
- an activation layer and / or a pooling layer may be located before or after at least some of the deconvolution layers in the second sub-model 330.
- a location map indicating the positions of pixels in the resizing image 20 may be input to at least one deconvolution layer among the deconvolution layers included in the second sub-model 330.
- 6 and 7 are exemplary views showing a location map input to the second sub-model 330.
- 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 second sub-model 330.
- the location maps 610 and 710 may indicate vertical positions of pixels in the resizing image 20, and the second location maps 630 and 730 may indicate horizontal positions of pixels in the resizing image 20.
- the first location maps 610 and 710 and the second location map ( 630 and 730 may include size ratio information between the original image 10 and the resizing image 20.
- the image processing apparatus 100 includes the original image 10 and the pixels included in the first row 611 and 711 and the last row 619 and 719 of the first location maps 610 and 710. A value corresponding to a ratio between vertical sizes of the resizing image 20 may be assigned.
- the image processing apparatus 100 includes pixels included in the first column 631 and 731 and the last column 639 and 739 of the second location maps 630 and 730, and the original image 10 and the resizing image. A value corresponding to the ratio between the horizontal sizes of 20 may be assigned.
- FIG. 6 shows a first location map 610 and a second location map 630 when the size and aspect ratio of the original image 10 and the resizing image 20 are the same.
- pixels included in the first row 611 of the first location map 610 include values corresponding to a ratio between vertical sizes of the original image 10 and the resizing image 20, that is, 1 is assigned, but the sign can be determined as-.
- the pixels included in the last row 619 of the first location map 610 are assigned a value corresponding to the ratio between the vertical sizes of the original image 10 and the resizing image 20, that is, 1, The sign can be determined as +.
- Values having a predetermined difference from the first row 611 of the first location map 610 to the last row 619 may be sequentially assigned to pixels of each row.
- the pixels in the second row of the first location map 610 may be assigned values greater than a assigned to pixels in the first row 611 as much as a, and the first location map ( The pixels in the third row of 610 may be assigned values larger than a allocated to the pixels in the second row.
- Pixels included in the first column 631 of the second location map 630 are assigned a value corresponding to a ratio between the horizontal sizes of the original image 10 and the resizing image 20, that is, 1
- the sign can be determined by-.
- a value corresponding to the ratio between the horizontal sizes of the original image 10 and the resizing image 20 is assigned to the pixels included in the last column 639 of the second location map 630, that is, 1
- the sign can be determined as +.
- Values having a predetermined difference from the first column 631 of the second location map 630 to the last column 639 may be sequentially assigned to pixels of each column.
- the pixels in the second column of the second location map 630 may be assigned values greater than a assigned to pixels in the first column 631 as a, and the second location map 630 ), Pixels larger than a value assigned to pixels in the second column may be assigned to pixels in the third column.
- pixels included in the first row 711 of the first location map 710 include values corresponding to a ratio between vertical sizes of the original image 10 and the resizing image 20, that is, 1 is assigned, but the sign can be determined as-.
- a value corresponding to a ratio between vertical sizes of the original image 10 and the resizing image 20 is assigned to the pixels included in the last row 719 of the first location map 710, namely 1 The sign can be determined as +.
- Values having a predetermined difference from the first row 711 of the first location map 710 to the last row 719 may be sequentially assigned to pixels of each row.
- the pixels of the second row of the first location map 710 may be assigned values greater than a assigned to pixels of the first row 711 by a, and the first location map ( Pixels in the third row of 710 may be assigned values larger than a that are allocated to the pixels in the second row.
- Pixels included in the first column 731 of the second location map 730 are assigned a value corresponding to a ratio between horizontal sizes of the original image 10 and the resizing image 20, that is, 1.5.
- the sign can be determined by-.
- a value corresponding to the ratio between the horizontal sizes of the original image 10 and the resizing image 20 is assigned to the pixels included in the last column 739 of the second location map 730, that is, 1.5.
- the sign can be determined as +. Values having a predetermined difference from the first column 731 of the second location map 730 to the last column 739 may be sequentially assigned to pixels of each row.
- the pixels in the second column of the second location map 730 may be assigned values greater than b, which are assigned to pixels in the first column 731, and a second location map 730. ), Pixels larger than b may be assigned to pixels in the third column.
- the difference a of pixel values allocated along each column of the second location map 630 of FIG. 6 is greater than a difference b of the pixel values allocated along each column of the second location map 730 of FIG. 7. It can be small. Because, when the horizontal size of the second location map 630 of FIG. 6 and the second location map 730 of FIG. 7 are equal to each other, the first column 631 of each second location map 630, 730, This is because the pixel values assigned to the 731) and the last columns 639 and 739 are fixed and the pixel values are allocated to the columns at equal intervals.
- the pixel values of the first row 611, 711 of the first location map 610, 710 have a sign of-, and the last row of the first location map 610, 710 (although the pixel values of 619 and 719 are described as having a sign of +, in one example, the pixel values of the first row 611 and 711 of the first location maps 610 and 710 have a sign of +, Pixel values of the last rows 619 and 719 of the 1 location map 610 and 710 may have a sign of-.
- pixel values of the first column 631, 731 of the second location map 630, 730 have a sign of-
- pixel values of the last column 639, 739 of the second location map 630, 730 Although they are described as having a sign of +, in one example, the pixel values of the first column 631, 731 of the second position map 630, 730 have a sign of +, and the second position map 630, 730 ), The pixel values of the last columns 639 and 739 may have a sign of-.
- the image processing apparatus 100 corresponds to a resizing image 20 of a previous time zone in order to maintain continuity between retargeting images corresponding to original images 10 of various time zones. Retargeting the resizing image 20 of the current time zone by combining the shift map 90 output from the 300 and the shift map 90 output from the neural network model 300 corresponding to the resizing image 20 of the current time zone. You may.
- the image processing apparatus 100 may correspond to the shift map 90 output from the neural network model 300 corresponding to the resizing image 20 in the t-1 time zone, and the resizing image 20 in the t time zone. After combining the shift map 90 output from the neural network model 300, the resizing image 20 in time t may be retargeted.
- the update process of the shift map 90 for each time zone may be expressed by Equation 1 below.
- Equation 1 Sb (t) is the first shift map 94 output from the neural network model 300 corresponding to the resizing image 20 in time t, and Sb '(t) is updated from Sb (t).
- the updated first shift map 94 and Sf (t) is the second shift map 96 output from the neural network model 300 corresponding to the resizing image 20 in the t time zone, and Sf '(t) is the second shift map 96 updated from Sf (t).
- Sf '(t-1) means the updated second shift map 96 after being output from the neural network model 300 corresponding to the t-1 time zone resizing image 20.
- the first shift map 94 is a shift map for retargeting the resizing image 20 in the vertical direction
- the second shift map 96 is a shift map for retargeting the resizing image 20 in the horizontal direction. Can be.
- FIG. 8 is an exemplary view showing a mask used to generate a GT image 930 corresponding to the training original image 910
- FIG. 9 is an original training image 910 and a training resizing image 920.
- 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.
- the image processing apparatus 100 may generate a ground truth (GT) image 930 corresponding to the original training image 910 for training the neural network model 300.
- GT image 930 may have the same aspect ratio and size as the training resizing image 920.
- the image processing apparatus 100 may obtain the first foreground mask 32 and the second background mask 44 as illustrated in FIG. 8 to generate the GT image 930.
- the image processing apparatus 100 may obtain a first foreground mask 32 corresponding to the training original image 910.
- the image processing apparatus 100 may receive a training original image 910 and a corresponding first foreground mask 32 from an external device or input from an administrator.
- the original training image 910 and the first foreground mask 32 may have the same size and the same aspect ratio.
- the image processing apparatus 100 analyzes the original image 910 for training according to a pre-stored algorithm, identifies an important part in the original image 910 for training, and extracts the identified part. 1
- a foreground mask 32 may be created.
- the image processing apparatus 100 may obtain a second foreground mask 34 that stretches the first foreground mask 32 according to a predetermined aspect ratio.
- the image processing apparatus 100 may generate the second foreground mask 34 by interpolating the first foreground mask 32.
- the image processing apparatus 100 may acquire the first background mask 42 corresponding to the first foreground mask 32 by inverting pixel values of the first foreground mask 32.
- the first background mask 42 can be used to generate the third background mask 46, as described below.
- the image processing apparatus 100 may acquire the second background mask 44 corresponding to the second foreground mask 34 by inverting the pixel values of the second foreground mask 34.
- inverting the pixel values of the foreground mask may mean changing one value assigned to pixels in the foreground mask to another of two values that can be assigned to the mask.
- a pixel having a value of 1 in the first foreground mask 32 may have a value of 0 in the first background mask 42.
- the second background mask 44 may be obtained by changing the size of the first background mask 42.
- the image processing apparatus 100 applies the first foreground mask 32 to the training original image 910 to extract the foreground object 915 from the training original image 910, and for training A second background mask 44 is applied to the resizing image 920 to extract the background object 927 from the training resizing image 920. Then, the image processing apparatus 100 generates a GT image 930 by combining the foreground object 915 extracted from the training original image 910 and the background object 927 extracted from the training resizing image 920. do.
- combining means that one GT image 930 is generated by combining the object 915 extracted from the training original image 910 and the object 927 extracted from the training resizing image 920. Can be.
- the GT image An empty area 935 exists in the 930.
- the foreground object 925 included in the training resizing image 920 remains as it is included in the training resizing image 920. It is not extracted, and has a pixel value of 0, for example, through the second background mask 44.
- the foreground extracted from the training original image 910 When the object 915 is combined with the background object 927 extracted from the training resizing image 920, a portion having a pixel value of 0 becomes an empty space 935.
- the image processing apparatus 100 inputs a training resizing image 920 into the neural network model 300 for training the neural network model 300.
- the neural network model 300 outputs a shift map corresponding to the training resizing image 920.
- the neural network model 300 may train to reduce the difference between the training retargeting image and the GT image 930 converted from the training resizing image 920 based on the shift map.
- the neural network model 300 may be trained to reduce loss information corresponding to a result of applying a mask to a difference between the training retargeting image and the GT image 930.
- the mask for deriving the loss information may be generated based on the first foreground mask 32, the first background mask 42, and the second background mask 44 of FIG. 8, as described above. This will be described with reference to 11.
- 10 and 11 are diagrams for explaining a method of generating a foreground mask and a background mask used for training the neural network model 300.
- the image processing apparatus 100 may pad the first foreground mask 32 to generate a third foreground mask 36.
- the image processing apparatus 100 may pad the first foreground mask 32 such that the size and aspect ratio of the third foreground mask 36 are the same as the size and aspect ratio of the GT image 930. Pixels newly generated according to padding may be assigned the same values as the surrounding pixel values included in the first foreground mask 32.
- the third foreground mask 36 may be used to extract foreground objects from the GT image 930.
- the image processing apparatus 100 may generate a third background mask 46 by combining the first background mask 42 and the second background mask 44.
- the image processing apparatus 100 may generate one third background mask 46 by combining the first background mask 42 and the second background mask 44.
- the third background mask 46 may be used to extract a background object from the GT image 930.
- a method of training the neural network model 300 using the GT image 930, the third foreground mask 36 and the third background mask 46 will be described with reference to FIG. 12.
- 12 is a diagram for describing loss information used for training the neural network model 300.
- the image processing apparatus 100 inputs a training resizing image 920 corresponding to the training original image 910 into the neural network model 300, and in the neural network model 300, the first of the training resizing image 920.
- a first shift map 994 for retargeting in the direction (eg, portrait) and a second for retargeting in the second direction (eg, landscape) of the training resizing image 920 The shift map 996 is output.
- the training resizing image 920 is retargeted based on the first shift map 994, and a third background mask 46 is applied to the difference between the retargeted image and the GT image 930.
- the first loss information 1210 corresponding to the result of applying the third background mask 46 may be extracted.
- the neural network model 300 may be trained such that the first loss information 1210 is reduced. In one example, the neural network model 300 may be trained such that the first loss information 1210 is minimized.
- the first loss information 1210 may be calculated by Equation 2 below.
- Lb is the first loss information 1210
- (x, y) is a position of a pixel in the image
- I is a training resizing image 920
- Sb is a first shift map 994
- GT is The GT image 930
- Mb represent the third background mask 46.
- the training resizing image 920 is retargeted based on the first shift map 994 and the second shift map 996, and the training resizing image 920 is generated by retargeting the training retargeting image.
- the third foreground mask 36 is applied to the difference between the and the GT image 930.
- the second loss information 1230 corresponding to the result of applying the third foreground mask 36 may be extracted.
- the neural network model 300 may be trained to reduce the second loss information 1230. In one example, the neural network model 300 may be trained such that the second loss information 1230 is minimized.
- the second loss information 1230 may be calculated by Equation 3 below.
- Lf is the second loss information 1230
- (x, y) is the position of the pixel in the image
- I is the training resizing image 920
- Sb is the first shift map 994
- Sf is The second shift map 996
- GT is a GT image 930
- Mf is a third foreground mask 36.
- the neural network model 300 is derived based on a relationship between a shift map corresponding to the training resizing image 920 of the previous time zone and a shift map corresponding to the training resizing image 920 of the current time zone.
- the third loss information can be trained to be reduced.
- the neural network model 300 may be trained to minimize third loss information.
- 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.
- Equation 4 warp denotes a warping function using a flownet
- Sb (t) is a first shift map output by the neural network model 300 after receiving a training resizing image 920 for t time zone ( 994)
- Sb (t + 1) is a first shift map 994 received by the resizing image 920 for training in the t + 1 time zone and output by the neural network model 300
- Sf (t) is training in the t time zone.
- the second shift map 996, Sf (t + 1) output by the neural network model 300 after receiving the resizing image 920 for use, and Sf (t + 1) receive the training resizing image 920 for the t + 1 time zone and receive the neural network model ( 300) represents the second shift map 996 output
- Mo is an occlusion mask, and is calculated by Equation 5 below.
- Equation 5 a denotes a predetermined weight, and I (t) is a training resizing image 920 corresponding to the training image 910 of time t, and I (t + 1) is time t + 1.
- the neural network model 300 may be trained so that the final loss information combining the first loss information 1210, the second loss information 1230, and the third loss information is reduced.
- the final loss information may be determined according to Equation 6 below.
- Equation 6 a, b, and c are predetermined weights applied to each loss information.
- the third foreground mask 36 is applied to the difference between the retargeting image for training and the GT image 930, and the third foreground mask 36 is the same as the foreground object included in the training original image 910.
- the neural network model 300 is used for training
- the foreground object included in the targeting image may be trained to be the same or similar to the foreground object included in the training original image 910.
- FIG. 13 is a block diagram showing the configuration of an image processing apparatus 100 according to an embodiment.
- the image processing apparatus 100 may include a memory 110 and a processor 130.
- the memory 110 may store at least one program and neural network model 300.
- the processor 130 may perform an image processing operation including retargeting of an image as at least one program stored in the memory 110 is executed.
- the processor 130 may obtain a resized image whose size is changed from the original image according to a predetermined aspect ratio, and input the resized image to the neural network model 300.
- the processor 130 may obtain a converted retargeting image from the resizing image based on the shift map output from the neural network model 300.
- a method of inputting a resizing image into the neural network model 300 and generating a retargeting image based on a shift map output from the neural network model 300 has been described in detail above, and thus description thereof is omitted here.
- the processor 130 may transmit the retargeting image to the display so that the retargeting image is reproduced by the display.
- the processor 130 may determine an aspect ratio of the resizing image based on the aspect ratio of the display. For example, the processor 130 may determine the aspect ratio of the resizing image to be the same as the aspect ratio of the display.
- the image processing apparatus 100 may be included in a smart phone, a tablet PC, a desktop PC, a television, a smart watch, a smart glass, and a server.
- Training of the neural network model 300 stored in the image processing apparatus 100 may be performed in various devices.
- training of the neural network model 300 is performed on an external device (eg, a server, etc.), and the trained neural network model 300 may be stored in the image processing apparatus 100.
- an external device eg, a server, etc.
- training of the neural network model 300 is performed on an external device (for example, a server), and data of the trained neural network model 300 is communicated through the network to the communication module 100 of the image processing apparatus 100 (Not shown).
- an external device for example, a server
- data of the trained neural network model 300 is communicated through the network to the communication module 100 of the image processing apparatus 100 (Not shown).
- training of the neural network model 300 may be performed in the image processing apparatus 100.
- the image processing apparatus 100 may train the pre-stored neural network model 300 according to the received internal weight information.
- the above-described embodiments of the present disclosure may be written as a program executable on a computer, and the created program may be stored in a medium or a computer program product.
- the media or computer program product may be to continuously store a program executable on a computer or to temporarily store it for execution or download.
- the media or computer program product may be various recording means or storage means in the form of a combination of single or several hardware, and is not limited to being directly connected to any computer system, but may be distributed on a network.
- Examples of media or computer program products 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. optical medium), and program instructions including ROM, RAM, flash memory, and the like.
- examples of other media or computer program products include an application store for distributing applications or a recording medium or storage medium managed by a site, server, or the like that supplies or distributes various software.
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
소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하는 단계; 리사이징 영상을 미리 훈련된 신경망 모델에 입력하는 단계; 및 신경망 모델에서 출력되는 시프트 맵에 기초하여 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함하는 것을 특징으로 하는 일 실시예에 따른 영상 처리 방법이 개시된다.
Description
본 개시는 영상 처리 분야에 관한 것이다. 보다 구체적으로, 본 개시는 영상 내 중요 부분의 왜곡이 최소화되도록 영상을 리타겟팅하는 영상 처리 장치 및 방법에 관한 것이다.
카메라, 디스플레이 장치들의 발전에 따라 다양한 해상도 및 종횡비를 갖는 기기들이 출시되고 있다. 이러한 환경하에서, 카메라에 의해 촬영된 영상의 종횡비가 디스플레이 장치의 종횡비에 맞지 않는 상황이 발생할 수 있다. 예를 들어, 카메라에 의해 촬영된 영상이 4:3의 종횡비를 가지고 있고, 디스플레이 장치가 16:9의 종횡비를 가지고 있는 경우, 해당 영상을 디스플레이 장치에서 풀(full) 스크린으로 재생하기 위해서는 영상을 스트레칭(stretching)시켜야 하는데, 이러한 스트레칭은 영상의 왜곡을 야기한다.
영상의 종횡비 조절을 위한 영상 리타겟팅 기술이 이용되고 있다. 영상 리타겟팅 기술이란, 원본 영상 내 픽셀들의 위치를 변경하거나, 새로운 픽셀을 추가하거나, 기존 픽셀을 제거하는 방식 등으로 원본 영상으로부터 원하는 종횡비를 갖는 영상을 생성하는 기술을 의미한다. 그러나, 아직까지는 소정 종횡비를 갖는 영상을 생성하기 위한 효율적인 처리 방법이 제안되어 있지 않은 실정이다.
일 실시예에 따른 영상의 처리 장치 및 방법은 영상 내 중요 부분의 왜곡이 최소화되도록 영상을 리타겟팅 하는 것을 기술적 과제로 한다.
또한, 일 실시예에 따른 영상의 처리 장치 및 방법은 시간적으로 관련된 복수의 영상들 사이의 연속성이 보존되도록 하는 것을 기술적 과제로 한다.
일 실시예에 따른 영상 처리 방법은, 소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하는 단계; 상기 리사이징 영상을 미리 훈련된 신경망 모델에 입력하는 단계; 및 상기 신경망 모델에서 출력되는 시프트 맵에 기초하여 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함할 수 있다.
일 실시예에 따른 영상의 처리 장치 및 방법은 영상 내 중요 부분의 왜곡이 최소화되도록 영상을 리타겟팅할 수 있다.
또한, 일 실시예에 따른 영상의 처리 장치 및 방법은 시간적으로 관련된 복수의 영상들 사이의 연속성이 보존되도록 할 수 있다.
다만, 일 실시예에 따른 영상의 처리 장치 및 방법이 달성할 수 있는 효과는 이상에서 언급한 것들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 개시가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
본 명세서에서 인용되는 도면을 보다 충분히 이해하기 위하여 각 도면의 간단한 설명이 제공된다.
도 1은 일 실시예에 따른 영상 처리 장치가 적용되는 환경을 설명하기 위한 도면이다.
도 2는 일 실시예에 따른 영상 처리 방법을 설명하기 위한 순서도이다.
도 3은 일 실시예에 따른 리타겟팅 과정을 설명하기 위한 도면이다.
도 4는 일 실시예에 따른 신경망 모델의 구조를 설명하기 위한 도면이다.
도 5는 일 실시예에 따른 신경망 모델의 구조를 상세히 설명하기 위한 도면이다.
도 6 및 도 7은 제 2 서브 모델에 입력되는 위치 맵을 도시하는 예시적인 도면이다.
도 8은 훈련용 원본 영상에 대응하는 GT 영상을 생성하는데 이용되는 마스크를 도시하는 예시적인 도면이다.
도 9는 훈련용 원본 영상 및 훈련용 리사이징 영상에 기초하여 GT 영상을 생성하는 방법을 설명하기 위한 도면이다.
도 10 및 도 11은 신경망 모델의 훈련에 이용되는 전경 마스크와 배경 마스크를 생성하는 방법을 설명하기 위한 도면이다.
도 12는 신경망 모델의 훈련에 이용되는 손실 정보들을 설명하기 위한 도면이다.
도 13은 일 실시예에 따른 영상 처리 장치의 구성을 도시하는 블록도이다.
일 실시예에 따른 영상 처리 방법은, 소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하는 단계; 상기 리사이징 영상을 미리 훈련된 신경망 모델에 입력하는 단계; 및 상기 신경망 모델에서 출력되는 시프트 맵에 기초하여 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함할 수 있다.
예시적인 실시예에서, 상기 신경망 모델은, 상기 리사이징 영상을 입력받는 제 1 서브 모델, 상기 제 1 서브 모델로부터 출력되는 특징 맵을 히든 스테이트에 따라 처리하는 컨볼루션 LSTM(long short-term memory) 레이어 및 상기 컨볼루션 LSTM 레이어에서 출력되는 데이터를 처리하여 상기 시프트 맵을 출력하는 제 2 서브 모델을 포함할 수 있다.
예시적인 실시예에서, 상기 컨볼루션 LSTM 레이어는, 이전 시간대의 원본 영상에 대응하는 리사이징 영상을 처리한 후 업데이트된 상기 히든 스테이트를 이용하여 상기 원본 영상에 대응하는 리사이징 영상을 처리할 수 있다.
예시적인 실시예에서, 상기 제 1 서브 모델 및 제 2 서브 모델 각각은, 소정의 필터 커널을 이용하여 입력 데이터를 컨볼루션 처리하는 적어도 하나의 컨볼루션 레이어를 포함할 수 있다.
예시적인 실시예에서, 상기 리사이징 영상의 픽셀들의 제 1 위치 맵 및 제 2 위치 맵이 상기 제 2 서브 모델로 입력되며, 상기 제 1 위치 맵의 첫 번째 행과 마지막 행에는 상기 원본 영상과 상기 리사이징 영상 사이의 세로 크기들 사이의 비율에 대응하는 값이 할당되고, 상기 제 2 위치 맵의 첫 번째 열과 마지막 열에는, 상기 원본 영상과 상기 리사이징 영상 사이의 가로 크기들 사이의 비율에 대응하는 값이 할당될 수 있다.
예시적인 실시예에서, 상기 제 1 위치 맵의 상기 첫 번째 행으로부터 상기 마지막 행까지 소정 차이를 갖는 값들이 순차적으로 각 행에 할당되고, 상기 제 2 위치 맵의 상기 첫 번째 열로부터 상기 마지막 열까지 소정 차이를 갖는 값들이 순차적으로 각 열에 할당될 수 있다.
예시적인 실시예에서, 상기 리타겟팅 영상을 획득하는 단계는, 상기 리사이징 영상으로부터 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 기초하여 변환된 영상을, 제 2 방향으로의 리타겟팅을 위한 시프트 맵을 기초로 변환하여 상기 리타겟팅 영상을 획득하는 단계를 포함할 수 있다.
예시적인 실시예에서, 상기 리타겟팅 영상을 획득하는 단계는, 이전 시간대의 시프트 맵과 현재 시간대의 상기 시프트 맵을 조합하여, 상기 현재 시간대의 시프트 맵을 갱신하는 단계; 및 상기 갱신된 상기 현재 시간대의 시프트 맵에 기초하여, 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함할 수 있다.
예시적인 실시예에서, GT(ground truth) 영상과 훈련용 리타겟팅 영상의 차이에 마스크를 적용한 결과에 대응하는 제 1 손실 정보가 감소되도록 상기 신경망 모델이 훈련될 수 있다.
예시적인 실시예에서, 훈련용 리사이징 영상을 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 따라 변환시켜 획득된 영상과 GT 영상의 차이에 제 1 배경 마스크를 적용한 결과에 대응하는 제 2 손실 정보와, 상기 훈련용 리사이징 영상을 상기 제 1 방향으로의 리타겟팅을 위한 시프트 맵 및 제 2 방향으로의 리타겟팅을 위한 시프트 맵에 따라 변환시켜 획득된 훈련용 리타겟팅 영상과 상기 GT 영상의 차이에 제 1 전경 마스크를 적용한 결과에 대응하는 제 3 손실 정보가 감소되도록 상기 신경망 모델이 훈련될 수 있다.
예시적인 실시예에서, 상기 제 1 전경 마스크는, 훈련용 원본 영상에 대응하는 제 2 전경 마스크를 패딩하여 획득되며, 상기 제 1 배경 마스크는, 상기 제 2 전경 마스크에 대응하는 제 2 배경 마스크와, 상기 제 2 전경 마스크의 크기를 변경시켜 획득한 제 3 전경 마스크에 대응하는 제 3 배경 마스크를 서로 결합하여 획득될 수 있다.
예시적인 실시예에서, 상기 GT 영상은, 상기 훈련용 원본 영상에 상기 제 2 전경 마스크를 적용하여 획득한 전경 오브젝트와, 상기 훈련용 리사이징 영상에 상기 제 3 배경 마스크를 적용하여 획득한 배경 오브젝트를 결합하여 획득될 수 있다.
예시적인 실시예에서, 이전 시간대의 훈련용 원본 영상에 대응하는 시프트 맵과 현재 시간대의 훈련용 원본 영상에 대응하는 시프트 맵 사이의 관계에 기초하여 도출되는 제 4 손실 정보가 감소되도록 상기 신경망 모델이 훈련될 수 있다.
일 실시예에 따른 영상 처리 장치는, 프로세서; 및 미리 훈련된 신경망 모델 및 적어도 하나의 프로그램을 저장하는 메모리를 포함하되, 상기 프로세서는, 상기 메모리에 저장된 상기 적어도 하나의 프로그램이 실행됨에 따라, 소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하고, 상기 리사이징 영상을 상기 신경망 모델에 입력하고, 상기 신경망 모델에서 출력되는 시프트 맵에 기초하여 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득할 수 있다.
예시적인 실시예에서, 상기 영상 처리 장치는, 상기 리타겟팅 영상을 출력하는 디스플레이를 포함하되, 상기 프로세서는, 상기 디스플레이의 종횡비에 기초하여 상기 리사이징 영상의 종횡비를 결정할 수 있다.
예시적인 실시예에서, 상기 프로세서는, 상기 리사이징 영상으로부터 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 기초하여 변환된 영상을, 제 2 방향으로의 리타겟팅을 위한 시프트 맵을 기초로 변환하여 상기 리타겟팅 영상을 획득할 수 있다.
예시적인 실시예에서, 상기 프로세서는, 이전 시간대의 시프트 맵과 현재 시간대의 상기 시프트 맵을 조합하여, 상기 현재 시간대의 시프트 맵을 갱신하고, 상기 갱신된 상기 현재 시간대의 시프트 맵에 기초하여, 상기 리사이징 영상을 변환시킬 수 있다.
예시적인 실시예에서, 상기 프로세서는, 훈련용 원본 영상에 대응하는 훈련용 리사이징 영상을 상기 신경망 모델로 입력하되, 상기 신경망 모델은, 훈련용 리타겟팅 영상과 GT 영상 사이의 차이에 마스크를 적용한 결과에 대응하는 손실 정보가 감소되도록 훈련될 수 있다.
예시적인 실시예에서, 상기 영상 처리 장치는, 상기 미리 훈련된 신경망 모델의 데이터를 외부 장치로부터 수신하는 통신 모듈을 더 포함할 수 있다.
본 개시는 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고, 이를 상세한 설명을 통해 설명하고자 한다. 그러나, 이는 본 개시를 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 개시의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.
실시예를 설명함에 있어서, 관련된 공지 기술에 대한 구체적인 설명이 요지를 불필요하게 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 실시예의 설명 과정에서 이용되는 숫자(예를 들어, 제 1, 제 2 등)는 하나의 구성요소를 다른 구성요소와 구분하기 위한 식별기호에 불과하다.
또한, 본 명세서에서 일 구성요소가 다른 구성요소와 "연결된다" 거나 "접속된다" 등으로 언급된 때에는, 상기 일 구성요소가 상기 다른 구성요소와 직접 연결되거나 또는 직접 접속될 수도 있지만, 특별히 반대되는 기재가 존재하지 않는 이상, 중간에 또 다른 구성요소를 매개하여 연결되거나 또는 접속될 수도 있다고 이해되어야 할 것이다.
또한, 본 명세서에서 '~부(유닛)', '모듈' 등으로 표현되는 구성요소는 2개 이상의 구성요소가 하나의 구성요소로 합쳐지거나 또는 하나의 구성요소가 보다 세분화된 기능별로 2개 이상으로 분화될 수도 있다. 또한, 이하에서 설명할 구성요소 각각은 자신이 담당하는 주기능 이외에도 다른 구성요소가 담당하는 기능 중 일부 또는 전부의 기능을 추가적으로 수행할 수도 있으며, 구성요소 각각이 담당하는 주기능 중 일부 기능이 다른 구성요소에 의해 전담되어 수행될 수도 있음은 물론이다.
이하, 본 개시의 기술적 사상에 의한 실시예들을 차례로 상세히 설명한다.
도 1은 일 실시예에 따른 영상 처리 장치(100)가 적용되는 환경을 설명하기 위한 도면이다.
일 실시예에 따른 영상 처리 장치(100)는 원본 영상을 획득하고, 원본 영상에 기초하여 리타겟팅 영상을 획득한다. 영상 처리 장치(100)는 소정 종횡비와 상이한 종횡비를 갖는 원본 영상으로부터 소정 종횡비를 갖는 리타겟팅 영상을 생성할 수 있다. 영상 처리 장치(100)는 리타겟팅 영상을 디스플레이 장치(200)를 통해 디스플레이할 수 있다.
일 실시예에서, 영상 처리 장치(100)는 디스플레이 장치(200) 내에 포함될 수 있다. 또는, 일 실시예에서, 영상 처리 장치(100)는 서버로 구현될 수 있고, 이 경우, 영상 처리 장치(100)는 리타겟팅 영상을 네트워크를 통해 디스플레이 장치(200)로 전송할 수도 있다. 일 실시예에서 네트워크는 유선 네트워크와 무선 네트워크를 포함할 수 있으며, 구체적으로, 근거리 네트워크(LAN: Local Area Network), 도시권 네트워크(MAN: Metropolitan Area Network), 광역 네트워크(WAN: Wide Area Network) 등의 다양한 네트워크를 포함할 수 있다. 또한, 네트워크는 공지의 월드 와이드 웹(WWW: World Wide Web)을 포함할 수도 있다. 그러나, 네트워크는 상기 열거된 네트워크에 국한되지 않고, 공지의 무선 데이터 네트워크나 공지의 전화 네트워크, 공지의 유무선 텔레비전 네트워크를 적어도 일부로 포함할 수도 있다.
일 실시예에 따른 영상 처리 장치(100)는 리타겟팅 영상을 생성할 때, 원본 영상 내 중요한 부분이 리타겟팅 영상에서도 원본 영상 내에서의 종횡비를 최대한 유지하도록 할 수 있다.
도 2는 일 실시예에 따른 영상 처리 방법을 설명하기 위한 순서도이고, 도 3은 일 실시예에 따른 리타겟팅 과정을 설명하기 위한 도면이다.
S210 단계에서, 영상 처리 장치(100)는 소정 종횡비에 따라 원본 영상(10)으로부터 크기가 변경된 리사이징 영상(20)을 획득한다.
리사이징 영상(20)의 크기는 원본 영상(10)의 크기보다 클 수 있다. 예를 들어, 리사이징 영상(20)의 세로 방향 크기는 원본 영상(10)의 세로 방향 크기와 동일하되, 리사이징 영상(20)의 가로 방향 크기는 원본 영상(10)의 가로 방향 크기보다 클 수 있다.
상기 소정 종횡비는 후술하는 리타겟팅 영상을 출력하는 디스플레이의 종횡비에 기초하여 결정될 수 있다. 예를 들어, 소정 종횡비는 리타겟팅 영상을 출력하는 디스플레이가 가지는 종횡비와 동일하게 결정될 수 있다.
영상 처리 장치(100)는 원본 영상(10)을 스케일링하여 크기가 변경된 리사이징 영상(20)을 획득할 수 있다. 일 예에서, 영상 처리 장치(100)는 원본 영상(10) 내 픽셀들을 보간(interpolation)하여 크기가 변경된 리사이징 영상(20)을 획득할 수 있다.
S220 단계에서, 영상 처리 장치(100)는 리사이징 영상(20)을 미리 훈련된 신경망 모델(300)에 입력한다. 신경망 모델(300)은 예를 들어, 복수의 레이어로 이루어진 딥러닝(deep learning) 모델일 수 있다. 신경망 모델(300)의 구조 및 훈련 방법에 대해서는 도 8 이하를 참조하여 상세히 설명한다.
S230 단계에서, 영상 처리 장치(100)는 신경망 모델(300)에서 출력되는 시프트 맵(90)을 획득한다. 시프트 맵(90)은 리사이징 영상(20) 내 픽셀들의 위치를 변경하기 위한 정보를 포함한다. 예를 들어, 시프트 맵(90)은 리사이징 영상(20) 내 각 픽셀들이 리타겟팅 영상 내 어느 위치로 이동되어야 하는지의 정보를 포함할 수 있다. 시프트 맵(90)은 리사이징 영상(20)의 크기와 동일한 크기를 가질 수 있다.
S240 단계에서, 영상 처리 장치(100)는 시프트 맵(90)에 기초하여 리사이징 영상(20)으로부터 변환된 리타겟팅 영상을 획득한다.
일 실시예에 따른 신경망 모델(300)은, 신경망 모델(300)은 출력되는 시프트 맵(90)에 따라 리사이징 영상(20)을 리타겟팅하더라도 원본 영상(10) 내 중요 부분의 비율이 리타겟팅 영상 내에서도 유지되도록 훈련될 수 있다.
도 4는 일 실시예에 따른 신경망 모델(300)의 구조를 설명하기 위한 도면이다.
도 4를 참조하면, 신경망 모델(300)은 제 1 서브 모델(310), 컨볼루션 LSTM 레이어(320) 및 제 2 서브 모델(330)을 포함할 수 있다.
제 1 서브 모델(310)은 리사이징 영상(20)을 입력받아 처리한다. 제 1 서브 모델(310)의 출력 데이터, 예를 들어, 특징 맵(feature map)은 컨볼루션 LSTM(long short-term memory) 레이어로 입력된다. 그리고, 컨볼루션 LSTM 레이어(320)에서 출력되는 데이터는 제 2 서브 모델(330)로 입력된다. 제 2 서브 모델(330)에서는 리사이징 영상(20)의 리타겟팅을 위한 시프트 맵(90)이 출력된다.
일 예에서, 제 2 서브 모델(330)에서는 리사이징 영상(20) 내 전경 오브젝트를 추출하기 위한 전경 마스크(92), 리사이징 영상(20)을 제 1 방향을 따라 리타겟팅하기 위한 제 1 시프트 맵(94) 및 리사이징 영상(20)을 제 2 방향을 따라 리타겟팅하기 위한 제 2 시프트 맵(96)이 출력될 수 있다.
예를 들어, 상기 제 1 시프트 맵(94)은 리사이징 영상(20) 내 픽셀들을 세로 방향으로 리타겟팅하는데 이용되며, 제 2 시프트 맵(96)은 리사이징 영상(20) 내 픽셀들을 가로 방향으로 리타겟팅하는데 이용될 수 있다. 일 실시예에서, 원본 영상(10)의 종횡비를 변환하기 위해 원본 영상(10)의 세로 크기만 변경시키고자 하는 경우, 제 2 서브 모델(330)은 제 1 시프트 맵(94)만을 출력하도록 구성될 수 있다. 반대로, 원본 영상(10)의 종횡비를 변환하기 위해 원본 영상(10)의 가로 크기만 변경시키고자 하는 경우, 제 2 서브 모델(330)은 제 2 시프트 맵(96)만을 출력하도록 구성될 수 있다.
제 2 서브 모델(330)에서 출력되는 전경 마스크(92)는 신경망 모델(300)이 제대로 훈련되었는지를 평가하기 위한 것으로서, 구현예에 따라, 제 2 서브 모델(330)은 전경 마스크(92)가 출력되지 않도록 구성될 수도 있다.
컨볼루션 LSTM 레이어(320)는 제 1 서브 모델(310)에서 출력되는 데이터를 입력받아 히든 스테이트(hidden state)에 따라 처리하고, 처리된 결과를 제 2 서브 모델(330)로 전달한다. 컨볼루션 LSTM 레이어(320) 내 히든 스테이트는 제 1 서브 모델(310)에서 출력되는 데이터를 처리한 후, 업데이트되고, 업데이트된 히든 스테이트는 다음 시간대의 영상 처리를 위해 이용될 수 있다.
예를 들어, 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)을 처리하는데 이용된다.
즉, 일 실시예에 따른 신경망 모델(300)에서, 현재 시간대의 리사이징 영상(20)을 처리하는데 이용된 컨볼루션 LSTM 레이어(320)의 히든 스테이트가, 다음 시간대의 리사이징 영상(20)을 처리하는데 이용되기 때문에 여러 프레임들로 구성된 비디오를 리타겟팅하는데 있어, 프레임 간 연속성이 유지될 수 있다.
도 5는 일 실시예에 따른 신경망 모델(300)의 구조를 상세히 설명하기 위한 도면이다.
도 5를 참조하면, 제 1 서브 모델(310)은 복수의 컨볼루션 레이어(convolution layer)를 포함할 수 있다. 각각의 컨볼루션 레이어는 미리 결정된 크기 및 개수의 필터 커널을 이용하여 입력 데이터를 컨볼루션 처리한 후, 컨볼루션 처리된 출력 데이터를 다음 레이어로 전달한다. 도 5는 제 1 서브 모델(310)이 5개의 컨볼루션 레이어를 포함하는 것으로 도시하고 있으나, 컨볼루션 레이어의 개수는 당업자에게 자명환 범위 내에서 다양하게 변경될 수 있다. 또한, 도 5에는 도시되어 있지 않지만, 제 1 서브 모델(310) 내 컨볼루션 레이어들 중 적어도 일부의 앞 또는 뒤에는 활성화 레이어 및/또는 풀링(pooling) 레이어가 위치할 수 있다.
어느 하나의 컨볼루션 레이어의 앞에 활성화 레이어 및/또는 풀링(pooling) 레이어가 위치하는 경우, 활성화 레이어 및/또는 풀링(pooling) 레이어의 출력 데이터는 상기 어느 하나의 컨볼루션 레이어로 입력될 수 있다. 또한, 어느 하나의 컨볼루션 레이어의 뒤에 활성화 레이어 및/또는 풀링(pooling) 레이어가 위치하는 경우, 상기 어느 하나의 컨볼루션 레이어의 출력 데이터는 활성화 레이어 및/또는 풀링(pooling) 레이어로 입력될 수 있다.
활성화 레이어는 이전 레이어의 출력 결과에 대해 비선형(Non-linear) 특성을 부여할 수 있다. 활성화 레이어는 활성화 함수를 이용할 수 있다. 활성화 함수는 시그모이드 함수(sigmoid function), Tanh 함수, ReLU(Rectified Linear Unit) 함수 등을 포함할 수 있으나, 이에 한정되는 것은 아니다.
제 2 서브 모델(330)은 복수의 디컨볼루션 레이어(deconvolution layer)를 포함할 수 있다. 각각의 디컨볼루션 레이어는 미리 결정된 크기 및 개수의 필터 커널을 이용하여 입력 데이터를 컨볼루션 처리한 후, 컨볼루션 처리된 출력 데이터를 다음 레이어로 전달한다. 도 5는 제 2 서브 모델(330)이 최종적으로 출력되는 데이터 각각을 위하여 5개의 디컨볼루션 레이어를 포함하는 것으로 도시하고 있으나, 디컨볼루션 레이어의 개수는 당업자에게 자명환 범위 내에서 다양하게 변경될 수 있다.
앞서 설명한 바와 같이, 제 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)에 포함되지 않을 수 있다.
또한, 도 5에는 도시되어 있지 않지만, 제 2 서브 모델(330) 내 디컨볼루션 레이어들 중 적어도 일부의 앞 또는 뒤에는 활성화 레이어 및/또는 풀링 레이어가 위치할 수 있다.
일 실시예에서, 제 2 서브 모델(330)에 포함된 디컨볼루션 레이어 중 적어도 하나의 디컨볼루션 레이어로 리사이징 영상(20) 내 픽셀들의 위치를 나타내는 위치 맵이 입력될 수도 있다.
도 6 및 도 7은 제 2 서브 모델(330)에 입력되는 위치 맵을 도시하는 예시적인 도면이다.
제 2 서브 모델(330)에 포함된 디컨볼루션 레이어 중 적어도 하나의 디컨볼루션 레이어로 제 1 위치 맵(610, 710)과 제 2 위치 맵(630, 730)이 입력될 수 있는데, 제 1 위치 맵(610, 710)은 리사이징 영상(20) 내 픽셀들의 세로 방향 위치를 나타내고, 제 2 위치 맵(630, 730)은 리사이징 영상(20) 내 픽셀들의 가로 방향 위치를 나타낼 수 있다.
일 실시예에서, 영상 처리 장치(100)는 제 1 위치 맵(610, 710) 및 제 2 위치 맵(630, 730을 생성하는 경우, 제 1 위치 맵(610, 710)과 제 2 위치 맵(630, 730)이 원본 영상(10)과 리사이징 영상(20) 사이의 크기 비율 정보를 포함하도록 할 수 있다.
일 예에서, 영상 처리 장치(100)는 제 1 위치 맵(610, 710)의 첫 번째 행(611, 711)과 마지막 행(619, 719)에 포함된 픽셀들에, 원본 영상(10)과 리사이징 영상(20)의 세로 크기들 사이의 비율에 대응하는 값을 할당할 수 있다. 그리고, 영상 처리 장치(100)는 제 2 위치 맵(630, 730)의 첫 번째 열(631, 731)과 마지막 열(639, 739)에 포함된 픽셀들에, 원본 영상(10)과 리사이징 영상(20)의 가로 크기들 사이의 비율에 대응하는 값을 할당할 수 있다.
도 6은 원본 영상(10)과 리사이징 영상(20)의 크기 및 종횡비가 동일할 때의 제 1 위치 맵(610) 및 제 2 위치 맵(630)을 도시하고 있다.
도 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만큼 큰 값들이 할당될 수 있다.
제 2 위치 맵(630)의 첫 번째 열(631)에 포함된 픽셀들에는 원본 영상(10)과 리사이징 영상(20)의 가로 크기들 사이의 비율에 대응하는 값, 즉 1이 할당되되, 그 부호가 -로 결정될 수 있다. 그리고, 제 2 위치 맵(630)의 마지막 열(639)에 포함된 픽셀들에는 원본 영상(10)과 리사이징 영상(20)의 가로 크기들 사이의 비율에 대응하는 값, 즉 1이 할당되되, 그 부호가 +로 결정될 수 있다. 제 2 위치 맵(630)의 첫 번째 열(631)으로부터 마지막 열(639)까지 소정 차이를 갖는 값들이 순차적으로 각 열의 픽셀들에 할당될 수 있다. 예를 들어, 제 2 위치 맵(630)의 두 번째 열의 픽셀들에는, 첫 번째 열(631)의 픽셀들에 할당된 -1보다 a만큼 큰 값들이 할당될 수 있고, 제 2 위치 맵(630)의 세 번째 열의 픽셀들에는, 두 번째 열의 픽셀들에 할당된 값보다 a만큼 큰 값들이 할당될 수 있다.
도 7은 리사이징 영상(20)의 세로 크기와 원본 영상(10)의 세로 크기가 동일하고, 리사이징 영상(20)의 가로 크기가 원본 영상(10)의 가로 크기보다 1.5배 클 때의 제 1 위치 맵(710) 및 제 2 위치 맵(730)을 도시하고 있다.
도 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만큼 큰 값들이 할당될 수 있다.
제 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만큼 큰 값들이 할당될 수 있다.
도 6의 제 2 위치 맵(630)의 각각의 열을 따라 할당된 픽셀 값들의 차이인 a는 도 7의 제 2 위치 맵(730)의 각각의 열을 따라 할당된 픽셀 값들의 차이인 b보다 작을 수 있다. 왜냐하면, 도 6의 제 2 위치 맵(630)과 도 7의 제 2 위치 맵(730)의 가로 크기가 서로 동일할 때, 각각의 제 2 위치 맵(630, 730)의 첫 번째 열(631, 731)과 마지막 열(639, 739)에 할당되는 픽셀 값이 고정되어 있는 상태에서 각 열에 픽셀 값들이 동일 차이의 간격으로 할당되기 때문이다.
도 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)의 픽셀 값들이 -의 부호를 가질 수 있다.
일 실시예에서, 영상 처리 장치(100)는 여러 시간대의 원본 영상(10)들에 대응하는 리타겟팅 영상들 사이의 연속성을 유지하기 위하여, 이전 시간대의 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력되는 시프트 맵(90)과, 현재 시간대의 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력되는 시프트 맵(90)을 결합하여 현재 시간대의 리사이징 영상(20)을 리타겟팅할 수도 있다.
예를 들어, 영상 처리 장치(100)는 t-1 시간 대의 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력되는 시프트 맵(90)과, t 시간 대의 리사이징 영상(20)에 대응하여 신경망 모델(300)에서 출력되는 시프트 맵(90)을 결합한 후, t 시간대의 리사이징 영상(20)을 리타겟팅할 수 있다. 각 시간대별 시프트 맵(90)의 갱신 과정은 아래의 수학식 1로 표현될 수 있다.
상기 수학식 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)을 가로 방향으로 리타겟팅하기 위한 시프트 맵을 나타낼 수 있다.
이하에서는, 도 8 내지 도 12를 참조하여, 신경망 모델(300)을 훈련시키는 방법에 대해 설명한다.
도 8은 훈련용 원본 영상(910)에 대응하는 GT 영상(930)을 생성하는데 이용되는 마스크를 도시하는 예시적인 도면이고, 도 9는 훈련용 원본 영상(910) 및 훈련용 리사이징 영상(920)에 기초하여 GT 영상(930)을 생성하는 방법을 설명하기 위한 도면이다.
일 실시예에서, 마스크는 바이너리 마스크일 수 있다. 마스크 내 포함된 픽셀들은 두 가지 값 중 어느 하나의 값을 가질 수 있다. 전경 마스크는 영상 내 전경 오브젝트를 추출하기 위한 마스크로서, 예를 들어, 영상 내 중요 영역만을 추출하기 위해 이용될 수 있다. 배경 마스크는 영상 내 배경 오브젝트를 추출하기 위한 마스크로서, 예를 들어, 영상 내 비중요 영역만을 추출하기 위해 이용될 수 있다.
영상 처리 장치(100)는 신경망 모델(300)의 훈련을 위해 훈련용 원본 영상(910)에 대응하는 GT(ground truth) 영상(930)을 생성할 수 있다. GT 영상(930)은 훈련용 리사이징 영상(920)과 동일한 종횡비 및 크기를 가질 수 있다.
영상 처리 장치(100)는 GT 영상(930)을 생성하기 위해 도 8에 도시된 것과 같은 제 1 전경 마스크(32) 및 제 2 배경 마스크(44)를 획득할 수 있다.
영상 처리 장치(100)는 훈련용 원본 영상(910)에 대응하는 제 1 전경 마스크(32)를 획득할 수 있다. 영상 처리 장치(100)는 훈련용 원본 영상(910) 및 그에 대응하는 제 1 전경 마스크(32)를 외부의 장치로부터 수신하거나, 관리자로부터 입력받을 수 있다. 훈련용 원본 영상(910)과 제 1 전경 마스크(32)는 동일한 크기 및 동일한 종횡비를 가질 수 있다. 일 실시예에서, 영상 처리 장치(100)는 훈련용 원본 영상(910)을 미리 저장된 알고리즘에 따라 분석하여, 훈련용 원본 영상(910) 내 중요 부분을 식별하고, 식별된 부분을 추출하기 위한 제 1 전경 마스크(32)를 생성할 수도 있다.
영상 처리 장치(100)는 소정 종횡비에 따라 제 1 전경 마스크(32)를 스트레칭(stretching)한 제 2 전경 마스크(34)를 획득할 수 있다. 영상 처리 장치(100)는 제 1 전경 마스크(32)를 보간 처리하여 제 2 전경 마스크(34)를 생성할 수 있다.
영상 처리 장치(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)의 크기를 변경시켜 획득될 수도 있다.
도 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)을 생성한다는 것을 의미할 수 있다.
훈련용 리사이징 영상(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)이 되는 것이다.
영상 처리 장치(100)는 신경망 모델(300)의 훈련을 위해, 훈련용 리사이징 영상(920)을 신경망 모델(300)로 입력한다. 신경망 모델(300)은 훈련용 리사이징 영상(920)에 대응하여 시프트 맵을 출력한다. 그리고, 신경망 모델(300)은 시프트 맵에 기초하여 훈련용 리사이징 영상(920)으로부터 변환된 훈련용 리타겟팅 영상과 GT 영상(930) 사이의 차이가 감소되도록 훈련할 수 있다. 일 예에서, 신경망 모델(300)은 훈련용 리타겟팅 영상과 GT 영상(930) 사이의 차이에 마스크를 적용한 결과에 대응하는 손실 정보가 감소되도록 훈련될 수 있다. 상기 손실 정보를 도출하기 위한 마스크는 앞서 도 8의 제 1 전경 마스크(32), 제 1 배경 마스크(42) 및 제 2 배경 마스크(44)에 기초하여 생성될 수 있는데, 이에 대해서는 도 10 및 도 11을 참조하여 설명한다.
도 10 및 도 11은 신경망 모델(300)의 훈련에 이용되는 전경 마스크와 배경 마스크를 생성하는 방법을 설명하기 위한 도면이다.
도 10을 참조하면, 영상 처리 장치(100)는 제 1 전경 마스크(32)를 패딩(padding)하여 제 3 전경 마스크(36)를 생성할 수 있다. 영상 처리 장치(100)는 제 3 전경 마스크(36)의 크기 및 종횡비가 GT 영상(930)의 크기 및 종횡비와 동일하도록 제 1 전경 마스크(32)를 패딩할 수 있다. 패딩에 따라 새롭게 생성되는 픽셀들에는, 제 1 전경 마스크(32)에 포함된 주변 픽셀 값들과 동일한 값들이 할당될 수 있다. 제 3 전경 마스크(36)는 GT 영상(930)으로부터 전경 오브젝트를 추출하는데 이용될 수 있다.
도 11을 참조하면, 영상 처리 장치(100)는 제 1 배경 마스크(42)와 제 2 배경 마스크(44)를 결합하여 제 3 배경 마스크(46)를 생성할 수 있다. 영상 처리 장치(100)는 제 1 배경 마스크(42)와 제 2 배경 마스크(44)를 합하여 하나의 제 3 배경 마스크(46)를 생성할 수 있다. 제 3 배경 마스크(46)는 GT 영상(930)으로부터 배경 오브젝트를 추출하는데 이용될 수 있다.
GT 영상(930), 제 3 전경 마스크(36) 및 제 3 배경 마스크(46)를 이용하여 신경망 모델(300)을 훈련시키는 방법은 도 12를 참조하여 설명한다.
도 12는 신경망 모델(300)의 훈련에 이용되는 손실 정보들을 설명하기 위한 도면이다.
영상 처리 장치(100)는 훈련용 원본 영상(910)에 대응하는 훈련용 리사이징 영상(920)을 신경망 모델(300)로 입력하고, 신경망 모델(300)에서는 훈련용 리사이징 영상(920)의 제 1 방향(예를 들어, 세로 방향)으로의 리타겟팅을 위한 제 1 시프트 맵(994)과 훈련용 리사이징 영상(920)의 제 2 방향(예를 들어, 가로 방향)으로의 리타겟팅을 위한 제 2 시프트 맵(996)이 출력된다.
훈련용 리사이징 영상(920)은 제 1 시프트 맵(994)에 기초하여 리타겟팅되고, 리타겟팅된 영상과 GT 영상(930) 사이의 차이에 제 3 배경 마스크(46)가 적용된다. 제 3 배경 마스크(46)가 적용된 결과에 대응하는 제 1 손실 정보(1210)가 추출될 수 있다. 신경망 모델(300)은 제 1 손실 정보(1210)가 감소되도록 훈련될 수 있다. 일 예에서, 신경망 모델(300)은 제 1 손실 정보(1210)가 최소화되도록 훈련될 수 있다. 제 1 손실 정보(1210)는 아래의 수학식 2로 계산될 수 있다.
상기 수학식 2에서, Lb는 제 1 손실 정보(1210), (x, y)는 영상 내 픽셀의 위치, I는 훈련용 리사이징 영상(920), Sb는 제 1 시프트 맵(994), GT는 GT 영상(930), Mb는 제 3 배경 마스크(46)를 나타낸다.
또한, 훈련용 리사이징 영상(920)은 제 1 시프트 맵(994) 및 제 2 시프트 맵(996)에 기초하여 리타겟팅되고, 훈련용 리사이징 영상(920)이 리타겟팅되어 생성된 훈련용 리타겟팅 영상과 GT 영상(930) 사이의 차이에 제 3 전경 마스크(36)가 적용된다. 제 3 전경 마스크(36)가 적용된 결과에 대응하는 제 2 손실 정보(1230)가 추출될 수 있다. 신경망 모델(300)은 제 2 손실 정보(1230)가 감소되도록 훈련될 수 있다. 일 예에서, 신경망 모델(300)은 제 2 손실 정보(1230)가 최소화되도록 훈련될 수 있다. 제 2 손실 정보(1230)는 아래의 수학식 3으로 계산될 수 있다.
상기 수학식 3에서, Lf는 제 2 손실 정보(1230), (x, y)는 영상 내 픽셀의 위치, I는 훈련용 리사이징 영상(920), Sb는 제 1 시프트 맵(994), Sf는 제 2 시프트 맵(996), GT는 GT 영상(930), Mf는 제 3 전경 마스크(36)를 나타낸다.
일 실시예에서, 신경망 모델(300)은 이전 시간대의 훈련용 리사이징 영상(920)에 대응하는 시프트 맵과 현재 시간대의 훈련용 리사이징 영상(920)에 대응하는 시프트 맵 사이의 관계에 기초하여 도출되는 제 3 손실 정보가 감소되도록 훈련될 수 있다. 일 예에서, 신경망 모델(300)은 제 3 손실 정보가 최소화되도록 훈련될 수도 있다.
제 3 손실 정보는 여러 프레임들로 구성된 비디오에서 리타겟팅된 프레임들 사이의 연속성을 유지하기 위해 산출된다. 제 3 손실 정보는 Flow consistency loss에 대응할 수 있다. 제 3 손실 정보는 아래의 수학식 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로 산출된다.
상기 수학식 5에서 a는 미리 결정된 가중치를 나타내고, I(t)는 t 시간대의 훈련용 원본 영상(910)에 대응하는 훈련용 리사이징 영상(920), I(t+1)은 t+1 시간대의 훈련용 원본 영상(910)에 대응하는 훈련용 리사이징 영상(920)을 나타낸다.
신경망 모델(300)은 제 1 손실 정보(1210), 제 2 손실 정보(1230) 및 제 3 손실 정보를 조합한 최종 손실 정보가 감소되도록 훈련될 수 있다. 최종 손실 정보는 아래의 수학식 6에 따라 결정될 수 있다.
상기 수학식 6에서, a, b, c는 각 손실 정보에 적용되는 미리 결정된 가중치이다.
일 실시예에 따른 신경망 모델(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)에 포함된 전경 오브젝트와 동일 또는 유사해지도록 훈련될 수 있는 것이다.
도 13은 일 실시예에 따른 영상 처리 장치(100)의 구성을 도시하는 블록도이다.
도 13을 참조하면, 일 실시예에 따른 영상 처리 장치(100)는 메모리(110) 및 프로세서(130)를 포함할 수 있다.
메모리(110)는 적어도 하나의 프로그램 및 신경망 모델(300)을 저장할 수 있다. 프로세서(130)는 메모리(110)에 저장된 적어도 하나의 프로그램이 실행됨에 따라 영상의 리타겟팅을 포함한 영상 처리 동작을 수행할 수 있다.
구체적으로, 프로세서(130)는 소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하고, 리사이징 영상을 신경망 모델(300)에 입력할 수 있다. 프로세서(130)는 신경망 모델(300)에서 출력되는 시프트 맵에 기초하여 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득할 수 있다. 리사이징 영상을 신경망 모델(300)에 입력하고, 신경망 모델(300)에서 출력되는 시프트 맵에 기초하여 리타겟팅 영상을 생성하는 방법에 대해서는 앞서 상세히 설명하였으므로, 여기에서는 그 설명을 생략한다.
도 13에 도시되지는 않았지만, 프로세서(130)는 리타겟팅 영상을 디스플레이로 전송하여, 리타겟팅 영상이 디스플레이에 의해 재생되도록 할 수 있다. 또한, 프로세서(130)는 원본 영상으로부터 리사이징 영상을 획득하는데 있어, 리사이징 영상의 종횡비를 디스플레이가 가지는 종횡비에 기초하여 결정할 수 있다. 예를 들어, 프로세서(130)는 리사이징 영상의 종횡비를 디스플레이가 가지는 종횡비와 동일하게 결정할 수 있다.
일 실시예에 따른 영상 처리 장치(100)는 스마트폰, 태블릿 PC, 데스크탑 PC, 텔레비전, 스마트워치, 스마트글래스, 서버 등에 포함될 수 있다.
영상 처리 장치(100)에 저장되는 신경망 모델(300)의 훈련은 다양한 장치에서 이루어질 수 있다.
일 실시예에서, 신경망 모델(300)의 훈련이 외부 장치(예를 들어, 서버 등)에서 수행되고, 훈련된 신경망 모델(300)이 영상 처리 장치(100)에 저장될 수 있다.
일 실시예에서, 신경망 모델(300)의 훈련이 외부 장치(예를 들어, 서버 등)에서 수행되고, 훈련된 신경망 모델(300)의 데이터가 네트워크를 통해 영상 처리 장치(100)의 통신 모듈(미도시)로 전송될 수도 있다.
또는, 일 예에서, 신경망 모델(300)이 영상 처리 장치(100)에 저장된 상태에서, 신경망 모델(300)의 훈련이 영상 처리 장치(100)에서 수행될 수 있다.
또는, 일 예에서, 신경망 모델(300)의 훈련이 외부 장치(예를 들어, 서버 등)에서 수행된 후, 신경망 모델(300)의 내부 가중치를 나타내는 정보가 외부 장치로부터 영상 처리 장치(100)로 네트워크를 통해 전송될 수도 있다. 영상 처리 장치(100)는 수신된 내부 가중치 정보에 따라 미리 저장된 신경망 모델(300)을 훈련시킬 수 있다.
한편, 상술한 본 개시의 실시예들은 컴퓨터에서 실행될 수 있는 프로그램으로 작성가능하고, 작성된 프로그램은 매체 또는 컴퓨터 프로그램 제품에 저장될 수 있다.
매체 또는 컴퓨터 프로그램 제품은 컴퓨터로 실행 가능한 프로그램을 계속 저장하거나, 실행 또는 다운로드를 위해 임시 저장하는 것일 수도 있다. 또한, 매체 또는 컴퓨터 프로그램 제품은 단일 또는 수개 하드웨어가 결합된 형태의 다양한 기록수단 또는 저장수단일 수 있는데, 어떤 컴퓨터 시스템에 직접 접속되는 것에 한정되지 않고, 네트워크 상에 분산 존재하는 것일 수도 있다. 매체 또는 컴퓨터 프로그램 제품의 예시로는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등을 포함하여 프로그램 명령어가 저장되도록 구성된 것이 있을 수 있다. 또한, 다른 매체 또는 컴퓨터 프로그램 제품의 예시로, 애플리케이션을 유통하는 앱 스토어나 기타 다양한 소프트웨어를 공급 내지 유통하는 사이트, 서버 등에서 관리하는 기록매체 내지 저장매체도 들 수 있다.
이상, 본 개시의 기술적 사상을 바람직한 실시예를 들어 상세하게 설명하였으나, 본 개시의 기술적 사상은 상기 실시예들에 한정되지 않고, 본 개시의 기술적 사상의 범위 내에서 당 분야에서 통상의 지식을 가진 자에 의하여 여러 가지 변형 및 변경이 가능하다.
Claims (15)
- 소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하는 단계;상기 리사이징 영상을 미리 훈련된 신경망 모델에 입력하는 단계; 및상기 신경망 모델에서 출력되는 시프트 맵에 기초하여 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함하는 것을 특징으로 하는 영상 처리 방법.
- 제1항에 있어서,상기 신경망 모델은,상기 리사이징 영상을 입력받는 제 1 서브 모델, 상기 제 1 서브 모델로부터 출력되는 특징 맵을 히든 스테이트에 따라 처리하는 컨볼루션 LSTM(long short-term memory) 레이어 및 상기 컨볼루션 LSTM 레이어에서 출력되는 데이터를 처리하여 상기 시프트 맵을 출력하는 제 2 서브 모델을 포함하는 것을 특징으로 하는 영상 처리 방법.
- 제2항에 있어서,상기 컨볼루션 LSTM 레이어는,이전 시간대의 원본 영상에 대응하는 리사이징 영상을 처리한 후 업데이트된 상기 히든 스테이트를 이용하여 상기 원본 영상에 대응하는 리사이징 영상을 처리하는 것을 특징으로 하는 영상 처리 방법.
- 제2항에 있어서,상기 제 1 서브 모델 및 제 2 서브 모델 각각은,소정의 필터 커널을 이용하여 입력 데이터를 컨볼루션 처리하는 적어도 하나의 컨볼루션 레이어를 포함하는 것을 특징으로 하는 영상 처리 방법.
- 제2항에 있어서,상기 리사이징 영상의 픽셀들의 제 1 위치 맵 및 제 2 위치 맵이 상기 제 2 서브 모델로 입력되며,상기 제 1 위치 맵의 첫 번째 행과 마지막 행에는 상기 원본 영상과 상기 리사이징 영상 사이의 세로 크기들 사이의 비율에 대응하는 값이 할당되고,상기 제 2 위치 맵의 첫 번째 열과 마지막 열에는, 상기 원본 영상과 상기 리사이징 영상 사이의 가로 크기들 사이의 비율에 대응하는 값이 할당되는 것을 특징으로 하는 영상 처리 방법.
- 제5항에 있어서,상기 제 1 위치 맵의 상기 첫 번째 행으로부터 상기 마지막 행까지 소정 차이를 갖는 값들이 순차적으로 각 행에 할당되고,상기 제 2 위치 맵의 상기 첫 번째 열로부터 상기 마지막 열까지 소정 차이를 갖는 값들이 순차적으로 각 열에 할당되는 것을 특징으로 하는 영상 처리 방법.
- 제1항에 있어서,상기 리타겟팅 영상을 획득하는 단계는,상기 리사이징 영상으로부터 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 기초하여 변환된 영상을, 제 2 방향으로의 리타겟팅을 위한 시프트 맵을 기초로 변환하여 상기 리타겟팅 영상을 획득하는 단계를 포함하는 것을 특징으로 하는 영상 처리 방법.
- 제1항에 있어서,상기 리타겟팅 영상을 획득하는 단계는,이전 시간대의 시프트 맵과 현재 시간대의 상기 시프트 맵을 조합하여, 상기 현재 시간대의 시프트 맵을 갱신하는 단계; 및상기 갱신된 상기 현재 시간대의 시프트 맵에 기초하여, 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 단계를 포함하는 것을 특징으로 하는 영상 처리 방법.
- 제1항에 있어서,GT(ground truth) 영상과 훈련용 리타겟팅 영상의 차이에 마스크를 적용한 결과에 대응하는 제 1 손실 정보가 감소되도록 상기 신경망 모델이 훈련되는 것을 특징으로 하는 영상 처리 방법.
- 제1항에 있어서,훈련용 리사이징 영상을 제 1 방향으로의 리타겟팅을 위한 시프트 맵에 따라 변환시켜 획득된 영상과 GT 영상의 차이에 제 1 배경 마스크를 적용한 결과에 대응하는 제 2 손실 정보와,상기 훈련용 리사이징 영상을 상기 제 1 방향으로의 리타겟팅을 위한 시프트 맵 및 제 2 방향으로의 리타겟팅을 위한 시프트 맵에 따라 변환시켜 획득된 훈련용 리타겟팅 영상과 상기 GT 영상의 차이에 제 1 전경 마스크를 적용한 결과에 대응하는 제 3 손실 정보가 감소되도록 상기 신경망 모델이 훈련되는 것을 특징으로 하는 영상 처리 방법.
- 제10항에 있어서,상기 제 1 전경 마스크는, 훈련용 원본 영상에 대응하는 제 2 전경 마스크를 패딩하여 획득되며,상기 제 1 배경 마스크는, 상기 제 2 전경 마스크에 대응하는 제 2 배경 마스크와, 상기 제 2 전경 마스크의 크기를 변경시켜 획득한 제 3 전경 마스크에 대응하는 제 3 배경 마스크를 서로 결합하여 획득되는 것을 특징으로 하는 영상 처리 방법.
- 제11항에 있어서,상기 GT 영상은,상기 훈련용 원본 영상에 상기 제 2 전경 마스크를 적용하여 획득한 전경 오브젝트와, 상기 훈련용 리사이징 영상에 상기 제 3 배경 마스크를 적용하여 획득한 배경 오브젝트를 결합하여 획득되는 것을 특징으로 하는 영상 처리 방법.
- 제1항에 있어서,이전 시간대의 훈련용 원본 영상에 대응하는 시프트 맵과 현재 시간대의 훈련용 원본 영상에 대응하는 시프트 맵 사이의 관계에 기초하여 도출되는 제 4 손실 정보가 감소되도록 상기 신경망 모델이 훈련되는 것을 특징으로 하는 영상 처리 방법.
- 제1항 내지 제13항 중 어느 하나의 항의 영상 처리 방법을 실행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.
- 프로세서; 및미리 훈련된 신경망 모델 및 적어도 하나의 프로그램을 저장하는 메모리를 포함하되,상기 프로세서는, 상기 메모리에 저장된 상기 적어도 하나의 프로그램이 실행됨에 따라,소정 종횡비에 따라 원본 영상으로부터 크기가 변경된 리사이징 영상을 획득하고,상기 리사이징 영상을 상기 신경망 모델에 입력하고,상기 신경망 모델에서 출력되는 시프트 맵에 기초하여 상기 리사이징 영상으로부터 변환된 리타겟팅 영상을 획득하는 것을 특징으로 하는 영상 처리 장치.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2018-0141141 | 2018-11-15 | ||
| KR1020180141141A KR20200057849A (ko) | 2018-11-15 | 2018-11-15 | 영상의 리타겟팅을 위한 영상 처리 장치 및 방법 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020101434A1 true WO2020101434A1 (ko) | 2020-05-22 |
Family
ID=70730338
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2019/015668 Ceased WO2020101434A1 (ko) | 2018-11-15 | 2019-11-15 | 영상의 리타겟팅을 위한 영상 처리 장치 및 방법 |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR20200057849A (ko) |
| WO (1) | WO2020101434A1 (ko) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112561993A (zh) * | 2020-12-07 | 2021-03-26 | 宁波大学 | 一种立体图像重定位方法 |
| WO2022149746A1 (en) * | 2021-01-11 | 2022-07-14 | Samsung Electronics Co., Ltd. | Method and system for image retargeting |
| CN114930380A (zh) * | 2020-10-08 | 2022-08-19 | 辉达公司 | 使用一个或更多个神经网络的图像生成 |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR102542220B1 (ko) * | 2022-09-19 | 2023-06-13 | 아주대학교 산학협력단 | 자가 지식 증류법 기반 의미론적 영상 분할 방법 및 자가 지식 증류법 기반 의미론적 영상 분할 장치 |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2016132148A1 (en) * | 2015-02-19 | 2016-08-25 | Magic Pony Technology Limited | Machine learning for visual processing |
| US20180114071A1 (en) * | 2016-10-21 | 2018-04-26 | Nokia Technologies Oy | Method for analysing media content |
-
2018
- 2018-11-15 KR KR1020180141141A patent/KR20200057849A/ko not_active Withdrawn
-
2019
- 2019-11-15 WO PCT/KR2019/015668 patent/WO2020101434A1/ko not_active Ceased
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2016132148A1 (en) * | 2015-02-19 | 2016-08-25 | Magic Pony Technology Limited | Machine learning for visual processing |
| US20180114071A1 (en) * | 2016-10-21 | 2018-04-26 | Nokia Technologies Oy | Method for analysing media content |
Non-Patent Citations (3)
| Title |
|---|
| LI, YUE ET AL.: "Learning a Convolutional Neural Network for Image Compact-Resolution", IEEE TRANSACTIONS ON IMAGE PROCESSING, 28 September 2018 (2018-09-28), pages 1 - 16, XP011703593, Retrieved from the Internet <URL:https://sci-hub.Se/https://ieeexplore.ieee.org/absttact/document/8476610> [retrieved on 20200212] * |
| PRITCH, YAEL ET AL.: "Shift-Map Image Editing", 2009 IEEE 12TH INTERNATIONAL CONFERENCE ON COMPUTER VISION, vol. 15, 2 October 2009 (2009-10-02), pages 1 - 158, XP031672510, Retrieved from the Internet <URL:https://www.cse.huji.ac.il/~peleg/papers/iccv09-shiftmap.pdf> [retrieved on 20200210] * |
| YAMASHITA, RIKIYA ET AL.: "Convolutional neural networks: an overview and application in radiology", INSIGHTS INTO IMAGING, 22 June 2018 (2018-06-22), pages 61 1 - 629, XP055580998, Retrieved from the Internet <URL:https://link.springer.com/content/pdf/10.1007/s13244-018-0639-9.pdf> [retrieved on 20200212] * |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114930380A (zh) * | 2020-10-08 | 2022-08-19 | 辉达公司 | 使用一个或更多个神经网络的图像生成 |
| US12591949B2 (en) | 2020-10-08 | 2026-03-31 | Nvidia Corporation | Image generation using one or more neural networks |
| CN112561993A (zh) * | 2020-12-07 | 2021-03-26 | 宁波大学 | 一种立体图像重定位方法 |
| CN112561993B (zh) * | 2020-12-07 | 2023-04-28 | 宁波大学 | 一种立体图像重定位方法 |
| WO2022149746A1 (en) * | 2021-01-11 | 2022-07-14 | Samsung Electronics Co., Ltd. | Method and system for image retargeting |
| US12033297B2 (en) | 2021-01-11 | 2024-07-09 | Samsung Electronics Co., Ltd. | Method and system for image retargeting |
Also Published As
| Publication number | Publication date |
|---|---|
| KR20200057849A (ko) | 2020-05-27 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2017213439A1 (ko) | 멀티 스티커를 이용한 영상 생성 방법 및 장치 | |
| WO2020017871A1 (ko) | 영상 처리 장치 및 그 동작방법 | |
| WO2021091021A1 (ko) | 화재 검출 시스템 | |
| WO2020111426A1 (en) | Method and system of presenting moving images or videos corresponding to still images | |
| WO2020226317A1 (en) | Image processing apparatus and image processing method thereof | |
| EP3776377A1 (en) | Method and system for dnn based imaging | |
| WO2023022539A1 (en) | Efficient inverse tone mapping network for standard dynamic range (sdr) to high dynamic range (hdr) conversion on hdr display | |
| WO2019035581A1 (ko) | 서버, 디스플레이장치 및 그 제어방법 | |
| WO2020116768A1 (ko) | 영상 처리 장치 및 그 동작방법 | |
| WO2009151292A2 (ko) | 영상 변환 방법 및 장치 | |
| WO2015111826A1 (ko) | 참조 영역 분할을 이용한 인페인팅 장치 및 방법 | |
| WO2021096339A1 (ko) | 이미지 변형 방법 | |
| WO2016060439A1 (ko) | 영상 처리 방법 및 장치 | |
| WO2022196945A1 (ko) | 개체군 분산 모사 모델 기반 개체군 분산 예측 장치 및 이를 이용한 개체군 분산 예측 방법 | |
| WO2021241804A1 (ko) | 다중 플로우 기반 프레임 보간 장치 및 방법 | |
| WO2020122478A2 (ko) | 기계 학습 기반으로 파라미터를 학습하는 영상 처리 장치 및 동작 방법 | |
| WO2019132091A1 (ko) | 머신러닝 기반의 동적 파라미터에 의한 업스케일된 동영상의 노이즈 제거방법 | |
| WO2022004970A1 (ko) | 신경망 기반의 특징점 학습 장치 및 방법 | |
| WO2020101300A1 (ko) | 영상 처리 장치 및 그 동작방법 | |
| KR20200057849A (ko) | 영상의 리타겟팅을 위한 영상 처리 장치 및 방법 | |
| WO2023003090A1 (ko) | 립싱크 영상 제공 장치, 방법 및 컴퓨터 프로그램과 립싱크 영상 표시 장치, 방법 및 컴퓨터 프로그램 | |
| WO2021230707A1 (ko) | 압축 영상의 노이즈를 추출하는 방법 및 장치, 압축 영상의 노이즈를 저감하는 방법 및 장치 | |
| WO2021029719A1 (ko) | 영상을 변환하는 컴퓨팅 장치 및 그 동작 방법 | |
| WO2022197001A1 (en) | Method and electronic device for removing artifact in high resolution image | |
| WO2022245177A1 (en) | Method and electronic device for obtaining reconstructed image |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19885987 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19885987 Country of ref document: EP Kind code of ref document: A1 |
