WO2024210337A1 - 동영상을 처리하는 방법 및 장치 - Google Patents
동영상을 처리하는 방법 및 장치 Download PDFInfo
- Publication number
- WO2024210337A1 WO2024210337A1 PCT/KR2024/002801 KR2024002801W WO2024210337A1 WO 2024210337 A1 WO2024210337 A1 WO 2024210337A1 KR 2024002801 W KR2024002801 W KR 2024002801W WO 2024210337 A1 WO2024210337 A1 WO 2024210337A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- feature
- image feature
- convolution operation
- offset
- 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
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/11—Region-based segmentation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/44—Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/52—Scale-space analysis, e.g. wavelet analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/40—Extraction of image or video features
- G06V10/62—Extraction of image or video features relating to a temporal dimension, e.g. time-based feature extraction; Pattern tracking
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/40—Scenes; Scene-specific elements in video content
Definitions
- the present disclosure relates to a method for processing a video and a device for performing the same.
- Each frame in a video has different information due to the movement of objects in the video.
- information about the movement of objects in the video e.g., optical flow, etc.
- the frames can be aligned through an image warping process.
- techniques such as motion estimation to determine motion vectors that describe the transformation to an adjacent frame, or motion compensation to transform an adjacent frame to an input frame, may be used to align frames.
- a video processing method comprises: a step of extracting a first image feature from a first input image included in a scene; a step of extracting a second image feature from a second input image included in the scene, wherein the second input image is a target frame; and a step of generating a temporal feature associated with temporal change information between the first image feature and the second image feature based on the first image feature and the second image feature.
- a step of generating an output image based on the temporal feature may include a step of performing a first convolution operation on the first image feature and a second convolution operation on the second image feature, a step of generating an offset image feature based on a result of the first convolution operation and a result of the second convolution operation using an offset network configured to learn a displacement between a pixel in the first image feature and a pixel in the second image feature, a step of performing a third convolution operation on the offset image feature, a step of performing a fourth convolution operation on the offset image feature, and a step of generating the temporal feature by performing a first self-attention operation that uses a result of the second convolution operation as a first query, a result of the third convolution operation as a first key, and a result of the fourth convolution operation as a first value.
- a computer-readable recording medium stores one or more instructions that, when executed by at least one processor of a device for processing a moving image, cause the device to perform an operation including extracting a first image feature from a first input image included in a scene, extracting a second image feature from a second input image included in the scene, wherein the second input image is a target frame, generating a temporal feature associated with temporal change information between the first image feature and the second image feature based on the first image feature and the second image feature, and generating an output image based on the temporal feature
- generating the temporal feature comprises: performing a first convolution operation on the first image feature and performing a second convolution operation on the second image feature; generating an offset image feature based on a result of the first convolution operation and a result of the second convolution operation using an offset network configured to learn a displacement amount between a pixel in the first image feature and a pixel in the second image feature; and generating a third convolution operation on the
- the method may include generating the temporal feature by performing a convolution operation, performing a fourth convolution operation on the offset image feature, and performing a first self-attention operation that uses a result of the second convolution operation as a first query, a result of the third convolution operation as a first key, and a result of the fourth convolution operation as a first value.
- a device for processing a video comprises at least one processor; and a memory configured to store one or more instructions, wherein the one or more instructions, when executed by the at least one processor, cause the device to perform operations including extracting a first image feature from a first input image included in a scene, extracting a second image feature from a second input image included in the scene, wherein the second input image is a target frame, generating a temporal feature associated with temporal change information between the first image feature and the second image feature based on the first image feature and the second image feature, and generating an output image based on the temporal feature, wherein generating the temporal feature comprises performing a first convolution operation on the first image feature and performing a second convolution operation on the second image feature, generating an offset image feature based on a result of the first convolution operation and a result of the second convolution operation using an offset network configured to learn a displacement between pixels in the first image feature and pixels in the second image feature, and generating a third image feature for
- the method may include generating the temporal feature by performing a convolution operation, performing a fourth convolution operation on the offset image feature, and performing a first self-attention operation that uses a result of the second convolution operation as a first query, a result of the third convolution operation as a first key, and a result of the fourth convolution operation as a first value.
- FIG. 1 illustrates the overall structure of a video processing system according to one embodiment of the present disclosure.
- FIG. 2 illustrates a temporal attention module structure according to one embodiment of the present disclosure.
- FIG. 3 illustrates the structure of an offset network according to one embodiment of the present disclosure.
- FIG. 4 illustrates the structure of a spatial attention module according to one embodiment of the present disclosure.
- FIG. 5 illustrates the structure of a spatiotemporal attention module according to one embodiment of the present disclosure.
- FIG. 6a is a flowchart of a video processing method according to one embodiment of the present disclosure.
- FIG. 6b is a flowchart of a video processing method according to one embodiment of the present disclosure.
- FIG. 7 is a block diagram of a video processing device according to one embodiment of the present disclosure.
- FIG. 8 illustrates an example of a video processing system according to one embodiment of the present disclosure applied to a television.
- the expression “at least one of a, b, and c” may refer to “a,” “b,” “c,” “a and b,” “a and c,” “b and c,” “all of a, b, and c,” or variations thereof.
- first, second, etc. may be used to describe various components, but the components should not be limited by the terms. The terms are used only to distinguish one component from another.
- the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.
- components expressed as 'unit', 'module', etc. may be two or more components combined into one component, or one component may be divided into two or more with more detailed functions.
- each of the components described below may additionally perform some or all of the functions performed by other components in addition to the described functions, and it goes without saying that some of the main functions performed by each component may be performed exclusively by other components.
- the processor may be composed of one or more processors.
- one or more processors may be a general-purpose processor such as a CPU, an AP, a DSP (Digital Signal Processor), a graphics-only processor such as a GPU, a VPU (Vision Processing Unit), or an artificial intelligence-only processor such as an NPU.
- One or more processors control input data to be processed according to predefined operation rules or artificial intelligence models stored in a memory.
- the artificial intelligence-only processor may be designed with a hardware structure specialized for processing a specific artificial intelligence model.
- the predefined operation rules or artificial intelligence models are characterized by being created through learning.
- being created through learning means that the basic artificial intelligence model is learned by using a plurality of learning data by a learning algorithm, thereby creating a predefined operation rule or artificial intelligence model set to perform a specific (or, purpose) desired.
- Such learning may be performed in the device itself on which the artificial intelligence according to the present disclosure is performed, or may be performed through a separate server and/or system.
- Examples of the learning algorithm include supervised learning, unsupervised learning, semi-supervised learning, or reinforcement learning, but are not limited to the examples described above.
- the artificial intelligence model may be composed of multiple neural network layers.
- Each of the multiple neural network layers has multiple weight values, and performs neural network operations through operations between the operation results of the previous layer and the multiple weights.
- the multiple weights of the multiple neural network layers may be optimized by the learning results of the artificial intelligence model. For example, the multiple weights may be updated so that the loss value or cost value obtained from the artificial intelligence model is reduced or minimized during the learning process.
- the artificial neural network may include a deep neural network (DNN), and examples thereof include, but are not limited to, a convolutional neural network (CNN), a deep neural network (DNN), a recurrent neural network (RNN), a restricted boltzmann machine (RBM), a deep belief network (DBN), a bidirectional recurrent deep neural network (BRDNN), or deep Q-networks (DQN).
- DNN deep neural network
- CNN convolutional neural network
- DNN deep neural network
- RNN recurrent neural network
- RBM restricted boltzmann machine
- BBN deep belief network
- BNN bidirectional recurrent deep neural network
- DQN deep Q-networks
- a device-readable storage medium may be provided in the form of a non-transitory storage medium.
- a 'non-transitory storage medium' means a tangible device and does not contain a signal (e.g., electromagnetic waves), and this term does not distinguish between cases where data is stored semi-permanently in the storage medium and cases where data is stored temporarily.
- a 'non-transitory storage medium' may include a buffer in which data is temporarily stored.
- the method described in the present disclosure may be provided as included in a computer program product.
- the computer program product may be traded between a seller and a buyer as a commodity.
- the computer program product may be distributed in the form of a machine-readable storage medium (e.g., a compact disc read only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store or directly between two user devices (e.g., smartphones).
- a portion of the computer program product e.g., a downloadable app
- FIG. 1 illustrates the overall structure of a video processing system (100) according to one embodiment of the present disclosure.
- a video processing system (100) can restore a video using an artificial intelligence model.
- video restoration may include, but is not limited to, frame interpolation that creates and inserts a new frame between two frames, denoising that removes noise such as blur, or super resolution that converts a low-resolution (e.g., 1920x1080) video into a high-resolution (e.g., 3840x2160) video.
- a video processing system (100) according to one embodiment of the present disclosure, A first input image (11) which can be represented as, and A second input image (12) that can be displayed as is input, The output image (22) that can be displayed can be generated.
- the second input image (12) is a target frame that is a target of restoration.
- the first input image (11) is an adjacent frame included in the same scene as the second input image (12).
- the output image (22) is an image restored from the second input image (12).
- the video processing system (100) can determine whether the first input image (11) and the second input image (12) are included in the same scene based on the meta information of the video.
- the meta information of the video can include at least one of the scene information to which each frame belongs and the frame information in which a scene change occurs.
- the video processing system (100) can determine whether the first input image (11) and the second input image (12) are included in the same scene based on a change in the frame of the video.
- the subscripts of symbols representing images or features represent the order of frames corresponding to the image or feature.
- represents the image corresponding to the t-1th frame of the video represents an image corresponding to the t-th frame of the video.
- the operation of the video processing system (100) is described using the t-1th frame and the tth frame, but is not limited thereto, and the images input to the video processing system (100) need not necessarily be consecutive frames.
- the first input image (11) and the second input image (12) are included in the same scene, the first input image (11) may be the t-2th frame or the t+2th frame.
- the correlation between information included in the two input images can be utilized. Refraining from using input images with little correlation can help improve the quality of the restored video.
- the video processing system (100) according to one embodiment of the present disclosure can effectively utilize temporal information by restoring a video using input images included in the same scene.
- a video processing system (100) may include one or more of an input unit (110), a temporal attention module (140), a spatial attention module (150), a spatio-temporal attention module (160), and an output unit (170).
- the components of the video processing system (100) are not limited thereto, and the video processing system (100) may include additional components other than the components illustrated in FIG. 1, or may not include some of the configurations illustrated in FIG. 1.
- the video processing system (100) may be implemented in a form that does not include the spatial attention module (150) and the spatio-temporal attention module (160).
- the video processing system (100) may be implemented in a form that does not include the spatio-temporal attention module (160).
- the input unit (110) may include an input layer (120) and a feature extraction module (130) as a configuration for extracting image features from an input image.
- the feature extraction module (130) uses a first convolutional neural network (131) to extract features from a first input image (11).
- the first convolutional neural network (131) can include a plurality of convolutional layers and a plurality of activation functions.
- the activation function of the first convolutional neural network (131) can include, but is not limited to, sigmoid, ReLU (Rectified Linear Unit), leaky ReLU, GELU (Gaussian Error Linear Unit), Tanh, etc.
- the feature extraction module (130) uses a second convolutional neural network (132) to extract features from a second input image (12).
- the second convolutional neural network (132) can include a plurality of convolutional layers and a plurality of activation functions.
- the activation function of the second convolutional neural network (132) can include, but is not limited to, sigmoid, ReLU (Rectified Linear Unit), leaky ReLU, GELU (Gaussian Error Linear Unit), Tanh, etc.
- the feature extraction module (130) uses the input layer (120) and the third convolutional neural network (133) to extract features from the third input (13).
- the third input (13) is a matrix in which the first input image (11) and the second input image (12) are stacked in the channel direction.
- the input layer (120) can be a two-dimensional (2D) convolutional layer.
- the third convolutional neural network (133) can include a plurality of convolutional layers and a plurality of activation functions.
- the activation function of the third convolutional neural network (133) can include, but is not limited to, sigmoid, ReLU (Rectified Linear Unit), leaky ReLU, GELU (Gaussian Error Linear Unit), Tanh, etc.
- the number of layers included in the first convolutional neural network (131), the second convolutional neural network (132), and the third convolutional neural network (133) can be designed by considering various factors such as hardware specifications and desired image quality level.
- k an example in which the number of layers included in each convolutional neural network is k is described.
- the feature extraction module (130) has been described as including three convolutional neural networks, each of which performs a separate operation, but is not limited thereto, and the configuration of the feature extraction module (130) may be modified in various ways.
- the feature extraction module (130) may extract a first image feature (14) from a first input image (11), a second image feature (15) from a second input image (12), and a fourth image feature (17) from a third input (13) using one convolutional neural network.
- the first to third convolutional neural networks (131, 132, 133) may be included in one convolutional neural network.
- the feature extraction module (130) may extract a first image feature (14) from a first input image (11) using one convolutional neural network, extract a second image feature (15) from a second input image (12), and extract a fourth image feature (17) from a third input (13) using another convolutional neural network.
- the first and second convolutional neural networks (131, 132) may be included in one convolutional neural network.
- the superscript of a symbol representing an image or feature indicates the number of layers through which the image or feature has passed or the relative position of the image or feature within the video processing system (100). For example, represents the feature output from the kth layer, represents the features output from the k-1th layer.
- the output of the k-1th layer may be used as an input of the spatial attention module (150).
- the output of the k-1th layer may mean either the output of the k-1th convolutional layer in the second convolutional neural network (132), or the output of the activation function following the k-1th convolutional layer. Whether there is an activation function following the k-1th convolutional layer may be determined based on the design intent.
- the output of the k-1th layer may be understood as the input of the kth convolutional layer.
- the temporal attention module (140) is associated with temporal change information between the first image feature (14) and the second image feature (15) based on the first image feature (14) and the second image feature (15).
- a temporal feature (18) that can be expressed as a temporal attention module (140) can be generated.
- the temporal attention module (140) can perform an operation based on modified self-attention to generate the temporal feature (18). An example of the structure and operation of the temporal attention module (140) is described below with reference to FIGS. 2 and 3.
- the spatial attention module (150) provides a second input image (12) based on the second image features (15) and the third image features (16).
- a spatial feature (19) that can be expressed as a spatial attention module (150) can be generated.
- the spatial attention module (150) can perform an operation based on modified self-attention to generate the spatial feature (19).
- An example of the structure and operation of the spatial attention module (150) is described below with reference to FIG. 4.
- the temporal attention module (140) can generate temporal features (18) using features extracted from different frames, and the spatial attention module (150) can generate spatial features (19) using features extracted from one frame.
- the spatial attention module (150) takes as input the output of the last layer of the second convolutional neural network (132) and the output of the previous layer.
- a deeper layer can provide a larger receptive field, and features output from each layer can have different information even if they are generated from the same input.
- the second image feature (15) and the third image feature (16) are both features extracted from the second input image (12), they may each contain different information, and the spatial attention module (150) can generate the spatial feature (19) through a modified self-attention operation based on the second image feature (15) and the third image feature (16).
- the spatiotemporal attention module (160) provides information about the first input image (11) and the second input image (12) based on the fourth image feature (17), the temporal feature (18) and the spatial feature (19).
- a spatio-temporal feature (20) that can be expressed as a spatio-temporal attention module (160) can perform an operation based on modified self-attention to generate the spatio-temporal feature (20).
- An example of the structure and operation of the spatio-temporal attention module (160) is described below with reference to FIG. 5.
- the output unit (170) may include a feature aggregation module (171), an upscaling module (172), and an output layer (173) as a configuration for generating an output image (22) from spatiotemporal features (20).
- the feature integration module (171) may perform a convolution operation on an input obtained by matrix multiplying the spatiotemporal feature (20) and the second image feature (15).
- the feature integration module (171) may include one or more convolutional layers and one or more activation functions.
- the activation function of the feature integration module (171) may include, but is not limited to, sigmoid, ReLU (Rectified Linear Unit), leaky ReLU, GELU (Gaussian Error Linear Unit), Tanh, etc.
- the video processing system (100) may be implemented in a form that does not include the spatial attention module (150) and the spatiotemporal attention module (160).
- the feature integration module (171) may perform a convolution operation on the input obtained by matrix multiplying the temporal feature (18) and the second image feature (15).
- the video processing system (100) may be implemented in a form that does not include the spatiotemporal attention module (160).
- the feature integration module (171) may perform a convolution operation on an input obtained by matrix multiplying the intermediate feature and the second image feature (15).
- the intermediate feature may be obtained by combining the temporal feature (18) and the spatial feature (19) in the channel direction and then passing the combined result through a convolution layer for changing the number of channels.
- the upscaling module (172) outputs from the feature integration module (171), A convolution operation and a pixel shuffle operation can be performed on the input including the feature (21) and the second image feature (15), which can be represented as .
- the upscaling module (172) can include one or more convolution layers, one or more activation functions, and one or more pixel shuffle layers.
- the activation function of the upscaling module (172) can include, but is not limited to, sigmoid, ReLU (Rectified Linear Unit), leaky ReLU, GELU (Gaussian Error Linear Unit), Tanh, etc.
- the output unit (170) may perform a convolution operation on the output of the upscaling module (172) using the output layer (173) to generate an output image (22).
- the output layer (173) may be a two-dimensional (2D) convolution layer.
- FIG. 2 illustrates the structure of a temporal attention module (140) according to one embodiment of the present disclosure
- FIG. 3 illustrates the structure of first and second offset networks (250, 260) according to one embodiment of the present disclosure.
- the temporal attention module (140) can generate a temporal feature (18) associated with temporal change information between the first image feature (14) and the second image feature (15) based on the first image feature (14) and the second image feature (15).
- the temporal attention module (140) can perform an operation based on modified self-attention to generate the temporal feature (18).
- Self-attention can be understood as a network or computational process that generates projected features called query, key, and value from one input feature, multiplies a query (Q) and a key (K) by a matrix, calculates weights by applying a softmax function to the result of the matrix multiplication, and multiplies the weights and value (V) by a matrix to calculate the final output.
- self-attention a large weight can be applied to an element that is highly correlated with each element (e.g., pixel) of an input feature, and an output layer placed after self-attention can focus on an element with a larger weight among many elements of an input feature.
- a video processing system (100) may process time-series data (e.g., and ) as well as features extracted from a single input image (e.g., and ) should also be considered when performing self-attention operations.
- a video processing system (100) can effectively utilize temporal information to restore a video without a frame alignment process (e.g., optical flow estimation, image warping, etc.) that is prone to error and requires a large amount of computational effort, by generating a temporal feature (18) based on modified self-attention described below to restore the video.
- a frame alignment process e.g., optical flow estimation, image warping, etc.
- the temporal attention module (140) may include a convolution operation using a convolution layer (210) to generate a first query (202), which may be denoted as Q 1 , for the first image feature (14).
- the temporal attention module (140) may include a convolution operation using a convolution layer (240) to generate a second query (205), which may be denoted as Q 2 , for the second image feature (15).
- the temporal attention module (140) may include an operation to generate a first offset (206), which may be denoted as Offset t-1 , from a first query (202) using a first offset network (250).
- the temporal attention module (140) may include an operation to generate a second offset (208), which may be denoted as Offset t , from a second query (240), using a second offset network (260).
- the temporal attention module (140) adds a third offset (Offset(t, t-1)) (207) obtained by subtracting the first offset (206) from the second offset (208) to the first image feature.
- a third offset (Offset(t, t-1)) (207) obtained by subtracting the first offset (206) from the second offset (208) to the first image feature.
- the image feature (201) may be referred to as an offset image feature.
- the first offset network (250) and the second offset network (260) are neural networks that learn the amount of pixel displacement between the first image feature (14) and the second image feature (15). For example, when an object moves in a video, the positions (e.g., indices) of pixels corresponding to the object in the first image feature (14) and the second image feature (15) change.
- the third offset (207) corresponds to the difference between the first offset (206) associated with the t-1th frame and the second offset (208) associated with the tth frame, and includes information about the amount of displacement equivalent to the difference in pixel positions between the two frames.
- the third offset (207) can represent the width and height corresponding to the amount of pixel displacement as x-axis values and y-axis values, respectively.
- the temporal attention module (140) can generate an image feature (201) with an offset applied that reflects information about the amount of movement of pixels between two frames by adding a third offset (207) to the first image feature (14).
- the first offset network (250) and the second offset network (260) may each include one or more convolutional layers and one or more activation functions.
- the first offset network (250) and the second offset network (260) may each include depthwise convolutional layers (310, 340), a Gaussian Error Linear Unit (GELU) activation function (320, 350), and pointwise convolutional layers (330, 360).
- GELU Gaussian Error Linear Unit
- the structure of the first offset network (250) and the second offset network (260) is not limited thereto, and various convolution-based networks that can reduce the amount of computation, such as, for example, convolution, dilated convolution, transposed convolution, separable convolution, depthwise separable convolution, and grouped convolution, can be used, and activation functions such as sigmoid, ReLU (Rectified Linear Unit), leaky ReLU, and Tanh can be used.
- temporal attention module (140) comprising two offset networks, each of which performs a separate operation
- the present disclosure is not limited thereto, and the configuration of the temporal attention module (140) may be modified in various ways.
- it may include an operation of generating a third offset (207) from the first and second queries (202, 205) using a single offset network.
- the first and second offset networks (250, 260) may be included in a single neural network.
- the temporal attention module (140) may include a convolution operation using a convolution layer (220) to generate a first value (203), which may be denoted as V 1 , for the image feature (201) to which the offset has been applied.
- the temporal attention module (140) may include a convolution operation using a convolution layer (230) to generate a first key (204), which may be denoted as K 1 , for the image features (201) to which the offset is applied.
- the temporal attention module (140) can multiply the second query (205) and the first key (204) by a matrix, apply a softmax (270) function to the matrix multiplication result to calculate a weight, and then multiply the weight and the first value (203) by a matrix to generate a temporal feature (18).
- the modified self-attention performed by the temporal attention module (140) is characterized by generating two queries (e.g., a first query (202), a second query (205)) using two input features (e.g., a first image feature (14), a second image feature (15)), calculating an offset (207) from each query, and generating a key (204) and a value (203) using the feature (201) to which the offset is applied.
- the video processing system (100) according to one embodiment of the present disclosure can effectively utilize temporal information to restore a video without a frame alignment process by considering the amount of movement between pixels in two frames at the feature level, not at the image level.
- FIG. 4 illustrates the structure of a spatial attention module (150) according to one embodiment of the present disclosure.
- the spatial attention module (150) can generate a spatial feature (19) based on the second image feature (15) and the third image feature (16).
- the spatial attention module (150) can perform an operation based on modified self-attention to generate the spatial feature (19).
- the spatial attention module (150) may include a convolution operation using a convolution layer (410) to generate a second value (401), which may be denoted as V 2 , for the third image feature (16).
- the spatial attention module (150) may include a convolution operation using a convolution layer (420) to generate a second key (402), which may be denoted as K 2 , for the third image feature (16).
- the spatial attention module (150) may include a convolution operation using a convolution layer (430) to generate a third query (403), which may be denoted as Q 3 , for the second image feature (15).
- the spatial attention module (150) can multiply a third query (403) and a second key (402) by a matrix, apply a softmax (440) function to the matrix multiplication result to calculate a weight, and then multiply the weight and the second value (401) by a matrix to generate a spatial feature (19).
- the modified self-attention performed by the spatial attention module (150) is characterized by generating a query (e.g., a third query (403)) using the output of the final layer of the convolutional neural network (e.g., the second image feature (15)), and generating a key (e.g., the second key (402)) and a value (e.g., the second value (401)) using the output (16) of the previous layer of the final layer.
- a query e.g., a third query (403)
- a key e.g., the second key (402)
- a value e.g., the second value (401)
- FIG. 5 illustrates the structure of a spatiotemporal attention module (160) according to one embodiment of the present disclosure.
- the spatiotemporal attention module (160) can generate spatiotemporal features (20) based on the fourth image feature (17), the temporal feature (18) and the spatial feature (19).
- the spatiotemporal attention module (160) can perform operations based on modified self-attention to generate the spatiotemporal features (20).
- the spatiotemporal attention module (160) may include a convolution operation to generate a third value (501), which may be denoted as V 3 , for the temporal feature (18) using a convolution layer (510).
- the spatiotemporal attention module (160) may include a convolution operation to generate a third key (502), which may be denoted as K 3 , for the temporal feature (18) using a convolution layer (520).
- the spatiotemporal attention module (160) may include a convolution operation using a convolution layer (530) to generate a fourth query (503), which may be denoted as Q 4 , for the fourth image feature (17).
- the spatiotemporal attention module (160) may include a convolution operation to generate a fourth key (504), which may be denoted as K 4 , for the spatial feature (19) using a convolution layer (540).
- the spatiotemporal attention module (160) may include a convolution operation to generate a fourth value (505), which may be denoted as V 4 , for the spatial feature (19) using a convolution layer (550).
- the spatiotemporal attention module (160) may multiply the fourth query (503) and the third key (502) by a matrix, apply a softmax (560) function to the matrix multiplication result, calculate a weight for the temporal feature (18), and matrix-multiply the weight for the temporal feature (18) and the third value (501).
- the spatiotemporal attention module (160) may multiply the fourth query (503) and the fourth key (504) by a matrix, apply a softmax (570) function to the matrix multiplication result, calculate a weight for the spatial feature (19), and matrix-multiply the weight for the spatial feature (19) and the fourth value (505).
- the spatiotemporal attention module (160) can generate spatiotemporal features (20) by adding the result of multiplying the weight for the temporal feature (18) by the third value (501) and the result of multiplying the weight for the spatial feature (19) by the fourth value (505) by the matrix.
- the modified self-attention performed by the spatiotemporal attention module (160) is characterized by generating one query (e.g., the fourth query (503)), two keys (e.g., the first key (502), the second key (504)), and two values (e.g., the first value (501), the second value (505)) from three inputs (e.g., the fourth image feature (17), the temporal feature (18), and the spatial feature (19)), and generating the spatiotemporal feature (20) through two self-attention operations.
- the video processing system (100) according to one embodiment of the present disclosure can effectively combine temporal information and spatial information to process a video.
- FIG. 6a is a flowchart of a video processing method (600) according to one embodiment of the present disclosure.
- FIG. 6b is a flowchart of a video processing method (600) according to one embodiment of the present disclosure.
- the video processing method (600) can be performed by a video processing device equipped with a video processing system (100) (e.g., a video processing device (700) described below in FIG. 7).
- a first image feature (14) may be extracted from a first input image (11) included in the same scene as a second input image (12), which is a target frame.
- Operation 610 may correspond to an operation of a feature extraction module (130).
- operation 610 may be performed using a first convolutional neural network (131).
- a second image feature (15) may be extracted from a second input image (12).
- Operation 620 may correspond to the operation of a feature extraction module (130).
- operation 620 may be performed using a second convolutional neural network (132).
- a temporal feature (18) associated with temporal change information between the first image feature (14) and the second image feature (15) can be generated based on the first image feature (14) and the second image feature (15).
- Operation 630 can correspond to the operation of the temporal attention module (140).
- a first convolution operation may be performed on a first image feature (14), and a second convolution operation may be performed on a second image feature (15).
- an image feature (201) may be generated based on a first convolution operation result and a second convolution operation result using an offset network (250, 260) that learns the amount of pixel displacement between a first image feature (14) and a second image feature (15).
- operation 632 may generate a first offset (206) from the first convolution operation result using the first offset network (250), generate a second offset (208) from the second convolution operation result using the second offset network (260), and generate an image feature (201) with the offset applied by adding a third offset (207) obtained by subtracting the first offset (206) from the second offset (208) to the first image feature (14).
- the first offset network (250) may include a depthwise convolution layer (310), a Gaussian Error Linear Unit (GELU) activation function (320), and a pointwise convolution layer (330), and the second offset network (260) may include a depthwise convolution layer (340), a Gaussian Error Linear Unit (GELU) activation function (350), and a pointwise convolution layer (360).
- GELU Gaussian Error Linear Unit
- a third convolution operation can be performed on the image feature (201) to which the offset is applied.
- a fourth convolution operation can be performed on the image feature (201) to which the offset is applied.
- a self-attention operation can be performed using the second convolution operation result as a query, the third convolution operation result as a key, and the fourth convolution operation result as a value to generate a temporal feature (18).
- an output image (22) may be generated based on the temporal feature (18). Operation 640 may correspond to the operation of the output unit (170).
- the video processing method (600) may further include an operation of generating a spatial feature (19) for the second input image (12) based on the second image feature (15) and the third image feature (16).
- the third image feature (16) is an output of the k-1th layer in the second convolutional neural network (132), and k is the number of layers included in the second convolutional neural network (132).
- the operation of generating a spatial feature (19) may include an operation of generating a spatial feature (19) by performing a fifth convolution operation on a second image feature (15), performing a sixth convolution operation on a third image feature (16), performing a seventh convolution operation on the third image feature (16), and performing a self-attention operation that uses the fifth convolution operation result as a query, the sixth convolution operation result as a key, and the seventh convolution operation result as a value.
- operation 640 may generate an output image (22) further based on spatial features (19).
- the video processing method (600) may further include an operation of extracting a fourth image feature (17) from a third input (13), which is a matrix in which the first input image (11) and the second input image (12) are stacked in the channel direction, and an operation of generating spatiotemporal features (20) for the first input image (11) and the second input image (12) based on the fourth image feature (17), the temporal features (18) and the spatial features (19).
- operation 640 may generate an output image (22) further based on spatiotemporal features (20).
- the operation of generating spatiotemporal features (20) includes: performing an eighth convolution operation on the fourth image feature (17), performing a ninth convolution operation on the temporal feature (18), performing a tenth convolution operation on the temporal feature (18), performing an eleventh convolution operation on the spatial feature (19), performing a twelfth convolution operation on the spatial feature (19), performing a self-attention operation that uses the result of the eighth convolution operation as a query, the result of the ninth convolution operation as a key, and the result of the tenth convolution operation as a value to generate a first intermediate result, performing a self-attention operation that uses the result of the eighth convolution operation as a query, the result of the eleventh convolution operation as a key, and the result of the twelfth convolution operation as a value to generate a second intermediate result, and generating the first intermediate result and the second intermediate result.
- it may include an action to generate spatiotemporal features (20).
- FIG. 7 is a block diagram of a video processing device (700) according to one embodiment of the present disclosure.
- the video processing device (700) illustrated in FIG. 7 can process a video by performing the operation of the video processing system (100) described above.
- the video to be processed may be at least one of a video stored in the video processing device (700) and a video received by the video processing device (700) from an external device (e.g., a server of an OTT (over the top) service provider that provides a video via the Internet).
- an external device e.g., a server of an OTT (over the top) service provider that provides a video via the Internet.
- the video processing device (700) may include one or more of a processor (710), a memory (720), and a communication interface (730).
- the components of the video processing device (700) are not limited thereto, and may include more components than those illustrated in FIG. 7, or may not include some of the components illustrated in FIG. 7.
- the video processing device (700) may be a television or a mobile device (e.g., a smartphone, a smartwatch, a tablet PC, etc.) that further includes a display for displaying a video or an interface for receiving a user input.
- the video processing device (700) may be a graphics card or may include a graphics card that is included in a PC (e.g., a desktop, a laptop, etc.) and processes a video stored in the storage (e.g., an SSD, an HDD, etc.) of the PC or a video received via the Internet.
- a PC e.g., a desktop, a laptop, etc.
- a video stored in the storage e.g., an SSD, an HDD, etc.
- some or all of the processor (710), memory (720), and communication interface (730) may be implemented in the form of a single chip, and the processor (710) may include one or more processors.
- the processor (710) is a configuration that controls a series of processes to operate the video processing device (700), and may be configured with one or more processors.
- the one or more processors may be a general-purpose processor such as a CPU (Central Processing Unit), an AP (Application Processor), a DSP (Digital Signal Processor), a graphics-only processor such as a GPU (Graphics Processing Unit), a VPU (Vision Processing Unit), or an AI-only processor such as an NPU (Neural Processing Unit).
- the AI-only processor may be designed with a hardware structure specialized for processing a specific AI model.
- the processor (710) can write data to the memory (720), read data stored in the memory (720), and process data according to predefined operation rules or artificial intelligence models, particularly by executing a program stored in the memory (720). Accordingly, the processor (710) can perform the operations of the video processing system (100) described above.
- the memory (720) is configured to store various programs or data, and may be configured as a storage medium or a combination of storage media, such as a ROM, a RAM, a hard disk, a CD-ROM, and a DVD.
- the memory (720) may not exist separately and may be configured to be included in the processor (710).
- the memory (720) may be configured as a volatile memory, a nonvolatile memory, or a combination of volatile memory and nonvolatile memory.
- a program for performing operations of the video processing system (100) described above may be stored in the memory (720).
- the memory (720) may also provide stored data to the processor (710) according to a request of the processor (710).
- the communication interface (730) is a configuration for transmitting and receiving signals (e.g., control commands, data, etc.) with an external device wired or wirelessly, and may be configured to include a communication chipset that supports various communication protocols.
- the communication interface (730) may receive a signal from the outside and output it to the processor (710), or transmit a signal output from the processor (710) to the outside.
- the video processing device (700) is a television or a mobile device
- the communication interface (730) may be a module capable of receiving a video through the Internet.
- the video processing device (700) may be an interface (e.g., ISA (industry standard architecture bus), VESA Local Bus, NuBus, PCI (peripheral component interconnect bus), PCIE (PCI Express), etc.) capable of transmitting and receiving signals with a CPU, RAM, or storage through a main board.
- the communication interface (730) may receive a video from an external device.
- FIG. 8 illustrates an example in which a video processing system (100) according to one embodiment of the present disclosure is applied to a television (800).
- the television (800) may correspond to a video processing device (700).
- the television (800) may include dedicated hardware (e.g., a chip) for driving the video processing system (100), in which case the dedicated hardware may correspond to the video processing device (700).
- the television (800) can receive video from various external devices through the network (810).
- the external devices can include various types of devices that can provide video to the television (800) through the network (810), such as an IPTV transmitter (820) managed by an IPTV broadcast provider, an OTT server (830) of an OTT service provider, and a streaming server (840) of a video streaming service provider.
- the external device may store or transmit a video in a compressed state due to various reasons such as network transmission speed, network usage cost, server maintenance cost, etc.
- the television (800) may receive a low-quality video due to loss during the transmission process.
- the television (800) that receives a low-quality video due to various reasons can improve the video quality using the video processing system (100) and then play it back.
- the video processing system (100) can improve the video quality in real time without a frame alignment process by separately extracting temporal information and spatial information of the video and then effectively combining them. This can improve the experience of the television (800) user.
- a video processing method comprises: a step of extracting a first image feature from a first input image included in a scene; a step of extracting a second image feature from a second input image included in the scene, wherein the second input image is a target frame; and a step of generating a temporal feature associated with temporal change information between the first image feature and the second image feature based on the first image feature and the second image feature.
- a step of generating an output image based on the temporal feature may include a step of performing a first convolution operation on the first image feature and a second convolution operation on the second image feature, a step of generating an offset image feature based on a result of the first convolution operation and a result of the second convolution operation using an offset network configured to learn a displacement between a pixel in the first image feature and a pixel in the second image feature, a step of performing a third convolution operation on the offset image feature, a step of performing a fourth convolution operation on the offset image feature, and a step of generating the temporal feature by performing a first self-attention operation that uses a result of the second convolution operation as a first query, a result of the third convolution operation as a first key, and a result of the fourth convolution operation as a first value.
- the step of generating the offset image feature may include the step of generating a first offset from a result of the first convolution operation using a first offset network, the step of generating a second offset from a result of the second convolution operation using a second offset network, and the step of generating the offset image feature by adding a third offset obtained by subtracting the first offset from the second offset to the first image feature.
- the offset network may include a depthwise convolutional layer, a Gaussian Error Linear Unit (GELU) activation function, and a pointwise convolutional layer.
- GELU Gaussian Error Linear Unit
- the step of extracting the first image feature may include the step of extracting the first image feature using a first convolutional layer
- the step of extracting the second image feature may include the step of extracting the second image feature using a second convolutional layer.
- the video processing method may further include a step of generating a spatial feature for the second input image based on the second image feature and the third image feature, wherein the output image may be generated further based on the spatial feature, and the third image feature is an output of a k-1th layer in the second convolutional neural network, where k is the number of layers included in the second convolutional neural network.
- the step of generating the spatial feature may include the step of performing a fifth convolution operation on the second image feature, the step of performing a sixth convolution operation on the third image feature, the step of performing a seventh convolution operation on the third image feature, and the step of performing a second self-attention operation that uses a result of the fifth convolution operation as a second query, a result of the sixth convolution operation as a second key, and a result of the seventh convolution operation as a second value to generate the spatial feature.
- the video processing method may further include the steps of extracting a fourth image feature from a matrix including the first input image and the second input image stacked in the channel direction, and generating a spatio-temporal feature for the first input image and the second input image based on the fourth image feature, the temporal feature, and the spatial feature, and the output image may be generated further based on the spatio-temporal feature.
- the step of generating the spatiotemporal feature comprises: performing an eighth convolution operation on the fourth image feature, performing a ninth convolution operation on the temporal feature, performing a tenth convolution operation on the temporal feature, performing an eleventh convolution operation on the spatial feature, performing a twelfth convolution operation on the spatial feature, performing a third self-attention operation that uses a result of the eighth convolution operation as a third query, a result of the ninth convolution operation as a third key, and a result of the tenth convolution operation as a third value to generate a first intermediate result, performing a fourth self-attention operation that uses a result of the eighth convolution operation as a fourth query, a result of the eleventh convolution operation as a fourth key, and a result of the twelfth convolution operation as a fourth value to generate a second intermediate result, and performing the first intermediate result and the A step of generating the spatiotemporal features by adding a second intermediate result may be included.
- the video processing method may further include a step of determining whether the first input image and the second input image are included in the scene based on at least one of meta information of the video or a change in a frame of the video.
- a computer-readable recording medium stores one or more instructions that, when executed by at least one processor of a device for processing a moving image, cause the device to perform an operation including extracting a first image feature from a first input image included in a scene, extracting a second image feature from a second input image included in the scene, wherein the second input image is a target frame, generating a temporal feature associated with temporal change information between the first image feature and the second image feature based on the first image feature and the second image feature, and generating an output image based on the temporal feature
- generating the temporal feature comprises: performing a first convolution operation on the first image feature and performing a second convolution operation on the second image feature; generating an offset image feature based on a result of the first convolution operation and a result of the second convolution operation using an offset network configured to learn a displacement amount between a pixel in the first image feature and a pixel in the second image feature; and generating a third convolution operation on the
- the method may include generating the temporal feature by performing a convolution operation, performing a fourth convolution operation on the offset image feature, and performing a first self-attention operation that uses a result of the second convolution operation as a first query, a result of the third convolution operation as a first key, and a result of the fourth convolution operation as a first value.
- a device (700) for processing a video comprises at least one processor (710); and may include a memory (720) configured to store one or more instructions, wherein the one or more instructions, when executed by the at least one processor (710), cause the device (700) to perform operations including extracting a first image feature from a first input image included in a scene, extracting a second image feature from a second input image included in the scene, wherein the second input image is a target frame, generating a temporal feature associated with temporal change information between the first image feature and the second image feature based on the first image feature and the second image feature, and generating an output image based on the temporal feature, wherein generating the temporal feature comprises performing a first convolution operation on the first image feature and performing a second convolution operation on the second image feature, using an offset network configured to learn a shift amount between pixels in the first image feature and pixels in the second image feature, and generating an output image based on the first convolution operation result and the second convolution operation
- the method may include generating the temporal feature by generating an offset image feature based on the result, performing a third convolution operation on the offset image feature, performing a fourth convolution operation on the offset image feature, and performing a first self-attention operation that uses a result of the second convolution operation as a first query, a result of the third convolution operation as a first key, and a result of the fourth convolution operation as a first value.
- generating the offset image feature may include generating a first offset from a result of the first convolution operation using a first offset network, generating a second offset from a result of the second convolution operation using a second offset network, and generating the offset image feature by adding a third offset obtained by subtracting the first offset from the second offset to the first image feature.
- the offset network may include a depthwise convolutional layer, a Gaussian Error Linear Unit (GELU) activation function, and a pointwise convolutional layer.
- GELU Gaussian Error Linear Unit
- extracting the first image feature may include extracting the first image feature using a first convolutional layer
- extracting the second image feature may include extracting the second image feature using a second convolutional layer
- the operation may further comprise generating a spatial feature for the second input image based on the second image feature and the third image feature, wherein the output image may be generated further based on the spatial feature, wherein the third image feature is an output of a k-1th layer in the second convolutional neural network, where k is the number of layers included in the second convolutional neural network.
- generating the spatial feature may include performing a fifth convolution operation on the second image feature, performing a sixth convolution operation on the third image feature, performing a seventh convolution operation on the third image feature, and performing a second self-attention operation that uses a result of the fifth convolution operation as a second query, a result of the sixth convolution operation as a second key, and a result of the seventh convolution operation as a second value to generate the spatial feature.
- the operation may further include extracting a fourth image feature from a matrix including the first input image and the second input image stacked in the channel direction, and generating a spatio-temporal feature for the first input image and the second input image based on the fourth image feature, the temporal feature and the spatial feature, wherein the output image may be generated further based on the spatio-temporal feature.
- generating the spatiotemporal feature comprises performing an eighth convolution operation on the fourth image feature, performing a ninth convolution operation on the temporal feature, performing a tenth convolution operation on the temporal feature, performing an eleventh convolution operation on the spatial feature, performing a twelfth convolution operation on the spatial feature, performing a third self-attention operation that uses a result of the eighth convolution operation as a third query, a result of the ninth convolution operation as a third key, and a result of the tenth convolution operation as a third value to generate a first intermediate result, performing a fourth self-attention operation that uses a result of the eighth convolution operation as a fourth query, a result of the eleventh convolution operation as a fourth key, and a result of the twelfth convolution operation as a fourth value to generate a second intermediate result, and generating the first intermediate result and the It may include generating said spatiotemporal features by adding a second intermediate result.
- the operation may further include determining whether the first input image and the second input image are included in the scene based on at least one of meta information of the video or a change in a frame of the video.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Analysis (AREA)
Abstract
장면(scene) 내에 포함된 제1 입력 이미지로부터 제1 이미지 특징을 추출하는 단계, 상기 장면 내에 포함된 제2 입력 이미지로부터 제2 이미지 특징을 추출하는 단계로서, 상기 제2 입력 이미지는 타겟 프레임이고, 상기 제1 이미지 특징 및 상기 제2 이미지 특징에 기초하여 상기 제1 이미지 특징과 상기 제2 이미지 특징 사이의 시간적 변화 정보와 연관된 시간적 특징(temporal feature)을 생성하는 단계, 및 상기 시간적 특징에 기초하여 출력 이미지를 생성하는 단계를 포함하는, 동영상 처리 방법이 제공된다.
Description
본 개시는 동영상을 처리하는 방법 및 이를 수행하는 장치에 관한 것이다.
동영상에 포함된 각 프레임은 동영상 내 객체의 움직임에 의해 서로 다른 정보를 갖는다. 복수의 프레임(예: 시간적 정보)을 이용하여 동영상을 복원하는 경우, 동영상 내 객체의 움직임에 관한 정보(예: 광 흐름(optical flow) 등)가 계산될 수 있고 이미지 와핑(warping) 과정을 통해 프레임들이 정렬(align)될 수 있다.
예를 들어, 프레임의 정렬을 위해, 인접 프레임으로의 변환을 설명하는 모션 벡터를 결정하기 위한 모션 추정(motion estimation) 또는 인접 프레임을 입력 프레임으로 변환하기 위한 모션 보상(motion compensation) 등의 기술들이 사용될 수 있다.
그러나 열화된 입력 프레임, 휘도(luminance)의 급격한 변화, 객체의 급격한 동작, 또는 다른 객체에 의해 가려진 객체 등과 같은 다양한 원인으로 인해 광 흐름을 계산하는 데 오류가 발생하기 쉽다. 또한 입력 프레임의 해상도에 따라 광 흐름을 계산하고 이미지 와핑을 수행하는 데 높은 연산량이 필요할 수 있다. 광 흐름 계산 시 오류가 발생하면, 오류를 포함하는 광 흐름을 이용하여 복원된 동영상에서도 잡음이나 아티팩트(artifact)가 발생할 수 있다.
본 개시의 일 측면에 따르면, 동영상 처리 방법은 장면(scene) 내에 포함된 제1 입력 이미지로부터 제1 이미지 특징을 추출하는 단계; 상기 장면 내에 포함된 제2 입력 이미지로부터 제2 이미지 특징을 추출하는 단계로서, 상기 제2 입력 이미지는 타겟 프레임이고; 상기 제1 이미지 특징 및 상기 제2 이미지 특징에 기초하여 상기 제1 이미지 특징과 상기 제2 이미지 특징 사이의 시간적 변화 정보와 연관된 시간적 특징(temporal feature)을 생성하는 단계; 및 상기 시간적 특징에 기초하여 출력 이미지를 생성하는 단계;를 포함할 수 있고, 상기 시간적 특징을 생성하는 단계는, 상기 제1 이미지 특징에 대하여 제1 컨볼루션 연산을 수행하고, 상기 제2 이미지 특징에 대하여 제2 컨볼루션 연산을 수행하는 단계, 상기 제1 이미지 특징 내의 픽셀과 상기 제2 이미지 특징 내의 픽셀 사이의 이동량을 학습하도록 구성된 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과 및 상기 제2 컨볼루션 연산 결과에 기초하여 오프셋 이미지 특징을 생성하는 단계, 상기 오프셋 이미지 특징에 대하여 제3 컨볼루션 연산을 수행하는 단계, 상기 오프셋 이미지 특징에 대하여 제4 컨볼루션 연산을 수행하는 단계, 및 상기 제2 컨볼루션 연산 결과를 제1 쿼리(query)로서 이용하고, 상기 제3 컨볼루션 연산 결과를 제1 키(key)로서 이용하고, 상기 제4 컨볼루션 연산 결과를 제1 밸류(value)로서 이용하는 제1 셀프-어텐션 연산을 수행하여 상기 시간적 특징을 생성하는 단계를 포함할 수 있다.
본 개시의 일 측면에 따르면, 컴퓨터 판독 가능한 기록 매체는 동영상을 처리하는 장치의 적어도 하나의 프로세서에 의해 실행될 때, 상기 장치가, 장면(scene) 내에 포함된 제1 입력 이미지로부터 제1 이미지 특징을 추출하고, 상기 장면 내에 포함된 제2 입력 이미지로부터 제2 이미지 특징을 추출하되, 상기 제2 입력 이미지는 타겟 프레임이고, 상기 제1 이미지 특징 및 상기 제2 이미지 특징에 기초하여 상기 제1 이미지 특징과 상기 제2 이미지 특징 사이의 시간적 변화 정보와 연관된 시간적 특징(temporal feature)을 생성하고, 상기 시간적 특징에 기초하여 출력 이미지를 생성하는 것을 포함하는 동작을 수행하게 할 수 있는 하나 이상의 인스트럭션을 저장하고, 상기 시간적 특징을 생성하는 것은, 상기 제1 이미지 특징에 대하여 제1 컨볼루션 연산을 수행하고, 상기 제2 이미지 특징에 대하여 제2 컨볼루션 연산을 수행하는 것, 상기 제1 이미지 특징 내의 픽셀과 상기 제2 이미지 특징 내의 픽셀 사이의 이동량을 학습하도록 구성된 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과 및 상기 제2 컨볼루션 연산 결과에 기초하여 오프셋 이미지 특징을 생성하는 것, 상기 오프셋 이미지 특징에 대하여 제3 컨볼루션 연산을 수행하는 것, 상기 오프셋 이미지 특징에 대하여 제4 컨볼루션 연산을 수행하는 것, 및 상기 제2 컨볼루션 연산 결과를 제1 쿼리(query)로서 이용하고, 상기 제3 컨볼루션 연산 결과를 제1 키(key)로서 이용하고, 상기 제4 컨볼루션 연산 결과를 제1 밸류(value)로서 이용하는 제1 셀프-어텐션 연산을 수행하여 상기 시간적 특징을 생성하는 것을 포함할 수 있다.
본 개시의 일 측면에 따르면, 동영상을 처리하는 장치는, 적어도 하나의 프로세서; 및 하나 이상의 인스트럭션을 저장하도록 구성된 메모리를 포함할 수 있고, 상기 하나 이상의 인스트럭션은, 상기 적어도 하나의 프로세서에 의해 실행될 때, 상기 장치가, 장면(scene) 내에 포함된 제1 입력 이미지로부터 제1 이미지 특징을 추출하고, 상기 장면 내에 포함된 제2 입력 이미지로부터 제2 이미지 특징을 추출하되, 상기 제2 입력 이미지는 타겟 프레임이고, 상기 제1 이미지 특징 및 상기 제2 이미지 특징에 기초하여 상기 제1 이미지 특징과 상기 제2 이미지 특징 사이의 시간적 변화 정보와 연관된 시간적 특징(temporal feature)을 생성하고, 상기 시간적 특징에 기초하여 출력 이미지를 생성하는 것을 포함하는 동작을 수행하게 할 수 있고, 상기 시간적 특징을 생성하는 것은, 상기 제1 이미지 특징에 대하여 제1 컨볼루션 연산을 수행하고, 상기 제2 이미지 특징에 대하여 제2 컨볼루션 연산을 수행하는 것, 상기 제1 이미지 특징 내의 픽셀과 상기 제2 이미지 특징 내의 픽셀 사이의 이동량을 학습하도록 구성된 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과 및 상기 제2 컨볼루션 연산 결과에 기초하여 오프셋 이미지 특징을 생성하는 것, 상기 오프셋 이미지 특징에 대하여 제3 컨볼루션 연산을 수행하는 것, 상기 오프셋 이미지 특징에 대하여 제4 컨볼루션 연산을 수행하는 것, 및 상기 제2 컨볼루션 연산 결과를 제1 쿼리(query)로서 이용하고, 상기 제3 컨볼루션 연산 결과를 제1 키(key)로서 이용하고, 상기 제4 컨볼루션 연산 결과를 제1 밸류(value)로서 이용하는 제1 셀프-어텐션 연산을 수행하여 상기 시간적 특징을 생성하는 것을 포함할 수 있다.
도 1은 본 개시의 일 실시예에 따른 동영상 처리 시스템의 전체적인 구조를 도시한다.
도 2는 본 개시의 일 실시예에 따른 시간적 어텐션 모듈 구조를 도시한다.
도 3은 본 개시의 일 실시예에 따른 오프셋 네트워크의 구조를 도시한다.
도 4는 본 개시의 일 실시예에 따른 공간적 어텐션 모듈의 구조를 도시한다.
도 5는 본 개시의 일 실시예에 따른 시공간적 어텐션 모듈의 구조를 도시한다.
도 6a는 본 개시의 일 실시예에 따른 동영상 처리 방법의 순서도이다.
도 6b는 본 개시의 일 실시예에 따른 동영상 처리 방법의 순서도이다.
도 7은 본 개시의 일 실시예에 따른 동영상 처리 장치의 블록도이다.
도 8은 본 개시의 일 실시예에 따른 동영상 처리 시스템이 텔레비전에 적용된 예시를 도시한다.
본 개시에서, "a, b 및 c 중 적어도 하나"의 표현은 "a", "b", "c", "a 및 b", "a 및 c", "b 및 c", "a, b 및 c 모두", 또는 그 변형들을 지칭할 수 있다.
본 개시에서 사용되는 용어는 실시예에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 발명의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 이해되어야 한다.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는 데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 실시예의 권리범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함할 수 있다. 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 용어들은 본 명세서에 기재된 기술분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가질 수 있다.
본 개시에서, "포함하다" 또는 "가지다" 등의 용어는 본 개시에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.
본 개시에서 '~부(유닛)', '모듈' 등으로 표현되는 구성요소는 2개 이상의 구성요소가 하나의 구성요소로 합쳐지거나 또는 하나의 구성요소가 보다 세분화된 기능별로 2개 이상으로 분화될 수도 있다. 또한 이하에서 설명할 구성요소 각각은 설명된 기능 이외에도 다른 구성요소가 담당하는 기능 중 일부 또는 전부의 기능을 추가적으로 수행할 수도 있으며, 구성요소 각각이 담당하는 주기능 중 일부 기능이 다른 구성요소에 의해 전담되어 수행될 수도 있음은 물론이다.
본 개시에서, 인공지능과 관련된 기능은 프로세서와 메모리를 통해 동작된다. 프로세서는 하나 또는 복수의 프로세서로 구성될 수 있다. 이때, 하나 또는 복수의 프로세서는 CPU, AP, DSP(Digital Signal Processor) 등과 같은 범용 프로세서, GPU, VPU(Vision Processing Unit)와 같은 그래픽 전용 프로세서 또는 NPU와 같은 인공지능 전용 프로세서일 수 있다. 하나 또는 복수의 프로세서는, 메모리에 저장된 기 정의된 동작 규칙 또는 인공지능 모델에 따라, 입력 데이터를 처리하도록 제어한다. 일 실시예에서, 하나 또는 복수의 프로세서가 인공지능 전용 프로세서인 경우, 인공지능 전용 프로세서는, 특정 인공지능 모델의 처리에 특화된 하드웨어 구조로 설계될 수 있다.
기 정의된 동작 규칙 또는 인공지능 모델은 학습을 통해 만들어진 것을 특징으로 한다. 여기서, 학습을 통해 만들어진다는 것은, 기본 인공지능 모델이 학습 알고리즘에 의하여 다수의 학습 데이터들을 이용하여 학습됨으로써, 원하는 특정(또는, 목적)을 수행하도록 설정된 기 정의된 동작 규칙 또는 인공지능 모델이 만들어짐을 의미한다. 이러한 학습은 본 개시에 따른 인공지능이 수행되는 기기 자체에서 이루어질 수도 있고, 별도의 서버 및/또는 시스템을 통해 이루어질 수도 있다. 학습 알고리즘의 예로는, 지도형 학습(supervised learning), 비지도형 학습(unsupervised learning), 준지도형 학습(semi-supervised learning) 또는 강화 학습(reinforcement learning)이 있으나, 전술한 예에 한정되지 않는다.
인공지능 모델은, 복수의 신경망 레이어들로 구성될 수 있다. 복수의 신경망 레이어들 각각은 복수의 가중치들(weight values)을 갖고 있으며, 이전(previous) 레이어의 연산 결과와 복수의 가중치들 간의 연산을 통해 신경망 연산을 수행한다. 복수의 신경망 레이어들이 갖고 있는 복수의 가중치들은 인공지능 모델의 학습 결과에 의해 최적화될 수 있다. 예를 들어, 학습 과정 동안 인공지능 모델에서 획득한 로스(loss) 값 또는 코스트(cost) 값이 감소 또는 최소화되도록 복수의 가중치들이 갱신될 수 있다. 인공 신경망은 심층 신경망(DNN: Deep Neural Network)을 포함할 수 있으며, 예를 들어, CNN(Convolutional Neural Network), DNN(Deep Neural Network), RNN(Recurrent Neural Network), RBM(Restricted Boltzmann Machine), DBN(Deep Belief Network), BRDNN(Bidirectional Recurrent Deep Neural Network) 또는 DQN(Deep Q-Networks) 등이 있으나, 전술한 예에 한정되지 않는다.
본 개시에서, 기기로 읽을 수 있는 저장매체는, 비일시적(non-transitory) 저장매체의 형태로 제공될 수 있다. 여기서, '비일시적 저장매체'는 실재(tangible)하는 장치이고, 신호(signal)(예: 전자기파)를 포함하지 않는다는 것을 의미할 뿐이며, 이 용어는 데이터가 저장매체에 반영구적으로 저장되는 경우와 임시적으로 저장되는 경우를 구분하지 않는다. 예로, '비일시적 저장매체'는 데이터가 임시적으로 저장되는 버퍼를 포함할 수 있다.
일 실시예에 따르면, 본 개시에 설명된 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어를 통해 또는 두개의 사용자 장치들(예: 스마트폰들) 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품(예: 다운로더블 앱(downloadable app))의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.
이하에서는 첨부한 도면을 참고하여 본 개시의 실시예에 대하여 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 개시는 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다.
도 1은 본 개시의 일 실시예에 따른 동영상 처리 시스템(100)의 전체적인 구조를 도시한다.
본 개시의 일 실시예에 따른 동영상 처리 시스템(100)은 인공지능 모델을 이용하여 동영상을 복원할 수 있다. 예를 들어, 동영상의 복원은 두 프레임 사이에 새로운 프레임을 생성하여 삽입하는 프레임 보간(frame interpolation), 블러(blur) 등의 잡음을 제거하는 디노이징(denoising), 또는 저해상도(예: 1920x1080)의 동영상을 고해상도(예: 3840x2160)의 동영상으로 변환하는 초해상도(super resolution) 등을 포함할 수 있으나, 이에 제한되는 것은 아니다.
본 개시의 일 실시예에 따른 동영상 처리 시스템(100)은, 로 표시될 수 있는 제1 입력 이미지 (11), 및 로 표시될 수 있는 제2 입력 이미지(12)를 입력 받아, 로 표시될 수 있는 출력 이미지(22)를 생성할 수 있다. 제2 입력 이미지(12)는 복원의 대상인 타겟 프레임이다. 제1 입력 이미지(11)는 제2 입력 이미지(12)와 동일한 장면(scene) 내에 포함된 인접 프레임이다. 출력 이미지(22)는 제2 입력 이미지(12)로부터 복원된 이미지이다.
일 예로서, 동영상 처리 시스템(100)은 동영상의 메타 정보에 기초하여 제1 입력 이미지(11)와 제2 입력 이미지(12)가 동일한 장면 내에 포함되었는지 여부를 결정할 수 있다. 동영상의 메타 정보는 각각의 프레임이 속한 장면 정보 및 장면 전환이 일어나는 프레임 정보 중 적어도 하나를 포함할 수 있다. 다른 예로서, 동영상 처리 시스템(100)은 동영상의 프레임의 변화에 기초하여 제1 입력 이미지(11)와 제2 입력 이미지(12)가 동일한 장면 내에 포함되었는지 여부를 결정할 수 있다.
본 개시에서, 이미지 또는 특징을 나타내는 기호의 아래 첨자는 해당 이미지 또는 특징과 대응되는 프레임의 순서를 나타낸다. 예를 들어, 는 동영상의 t-1번째 프레임에 대응되는 이미지를 나타내고, 는 동영상의 t번째 프레임에 대응되는 이미지 나타낸다. 본 개시에서는 설명의 편의를 위해 t-1번째 프레임과 t번째 프레임을 이용하여 동영상 처리 시스템(100)의 동작을 설명하지만, 이에 제한되지 않으며, 동영상 처리 시스템(100)에 입력되는 이미지가 반드시 연속된 프레임일 필요는 없다. 다시 말하면, 제1 입력 이미지(11)와 제2 입력 이미지(12)가 동일한 장면 내에 포함되었다면, 제1 입력 이미지(11)는 t-2번째 프레임일 수도 있고, t+2번째 프레임일 수도 있다.
서로 다른 프레임에 해당하는 2개의 입력 이미지를 이용하여 동영상을 복원하기 위해서는 2개의 입력 이미지에 포함된 정보(예: 동영상 내 객체의 종류, 위치, 움직임 등) 간의 관련성이 이용될 수 있다. 관련성이 희박한 입력 이미지의 사용을 자제하는 것은 복원된 동영상의 품질 향상에 도움될 수 있다. 본 개시의 일 실시예에 따른 동영상 처리 시스템(100)은 동일한 장면 내에 포함된 입력 이미지들을 이용하여 동영상을 복원함으로써 시간적 정보를 효과적으로 활용할 수 있다.
본 개시의 일 실시예에 따른 동영상 처리 시스템(100)은 입력부(110), 시간적 어텐션(temporal attention) 모듈(140), 공간적 어텐션(spatial attention) 모듈(150), 시공간적 어텐션(spatio-temporal attention) 모듈(160) 및 출력부(170) 중 하나 이상을 포함할 수 있다. 다만, 동영상 처리 시스템(100)의 구성요소는 이에 제한되지 않으며, 동영상 처리 시스템(100)은 도 1에 도시된 구성요소 이외에 추가적인 구성요소를 포함할 수도 있고, 도 1에 도시된 구성 중 일부를 포함하지 않을 수도 있다. 일 예로서, 동영상 처리 시스템(100)은 공간적 어텐션 모듈(150) 및 시공간적 어텐션 모듈(160)을 포함하지 않은 형태로 구현될 수 있다. 다른 예로서, 동영상 처리 시스템(100)은 시공간적 어텐션 모듈(160)을 포함하지 않은 형태로 구현될 수 있다.
일 실시예에서, 입력부(110)는 입력 이미지로부터 이미지 특징을 추출하기 위한 구성으로서, 입력 레이어(120) 및 특징 추출 모듈(130)을 포함할 수 있다.
일 실시예에서, 특징 추출 모듈(130)은 제1 컨볼루션 신경망(131)을 이용하여, 제1 입력 이미지(11)로부터 로 표시될 수 있는 제1 이미지 특징(14)을 추출할 수 있다. 제1 컨볼루션 신경망(131)은 복수의 컨볼루션 레이어 및 복수의 활성화 함수를 포함할 수 있다. 예를 들어, 제1 컨볼루션 신경망(131)의 활성화 함수는 시그모이드(sigmoid), ReLU(Rectified Linear Unit), leaky ReLU, GELU(Gaussian Error Linear Unit), Tanh 등을 포함할 수 있으나, 이에 제한되는 것은 아니다.
일 실시예에서, 특징 추출 모듈(130)은 제2 컨볼루션 신경망(132)을 이용하여, 제2 입력 이미지(12)로부터 로 표시될 수 있는 제2 이미지 특징(15)을 추출할 수 있다. 제2 컨볼루션 신경망(132)은 복수의 컨볼루션 레이어 및 복수의 활성화 함수를 포함할 수 있다. 예를 들어, 제2 컨볼루션 신경망(132)의 활성화 함수는 시그모이드(sigmoid), ReLU(Rectified Linear Unit), leaky ReLU, GELU(Gaussian Error Linear Unit), Tanh 등을 포함할 수 있으나, 이에 제한되는 것은 아니다.
일 실시예에서, 특징 추출 모듈(130)은 입력 레이어(120) 및 제3 컨볼루션 신경망(133)을 이용하여, 제3 입력(13)으로부터 로 표시될 수 있는 제4 이미지 특징(17)을 추출할 수 있다. 제3 입력(13)은 제1 입력 이미지(11)와 제2 입력 이미지(12)를 채널 방향으로 쌓은 행렬이다. 입력 레이어(120)는 2차원(2D) 컨볼루션 레이어일 수 있다. 제3 컨볼루션 신경망(133)은 복수의 컨볼루션 레이어 및 복수의 활성화 함수를 포함할 수 있다. 예를 들어, 제3 컨볼루션 신경망(133)의 활성화 함수는 시그모이드(sigmoid), ReLU(Rectified Linear Unit), leaky ReLU, GELU(Gaussian Error Linear Unit), Tanh 등을 포함할 수 있으나, 이에 제한되는 것은 아니다.
제1 컨볼루션 신경망(131), 제2 컨볼루션 신경망(132) 및 제3 컨볼루션 신경망(133)에 포함된 레이어의 개수는 하드웨어 사양, 원하는 화질 수준 등 다양한 요소를 고려하여 설계될 수 있으나, 본 개시에서는 설명의 편의를 위해 각 컨볼루션 신경망에 포함된 레이어의 개수가 k개인 예시가 설명된다.
이상에서, 특징 추출 모듈(130)이 3개의 컨볼루션 신경망을 포함하고, 각각의 컨볼루션 신경망이 별개의 동작을 수행하는 것으로 설명되었으나, 이에 제한되지 않으며, 특징 추출 모듈(130)의 구성은 다양하게 변형될 수 있다.
일 예로서, 특징 추출 모듈(130)은 하나의 컨볼루션 신경망을 이용하여, 제1 입력 이미지(11)로부터 제1 이미지 특징(14)을 추출하고, 제2 입력 이미지(12)로부터 제2 이미지 특징(15)을 추출하고, 제3 입력(13)으로부터 제4 이미지 특징(17)을 추출할 수 있다. 예를 들어, 제1 내지 제3 컨볼루션 신경망(131, 132, 133)은 하나의 컨볼루션 신경망에 포함될 수 있다.
다른 예로서, 특징 추출 모듈(130)은 하나의 컨볼루션 신경망을 이용하여, 제1 입력 이미지(11)로부터 제1 이미지 특징(14)을 추출하고, 제2 입력 이미지(12)로부터 제2 이미지 특징(15)을 추출할 수 있으며, 다른 하나의 컨볼루션 신경망을 이용하여 제3 입력(13)으로부터 제4 이미지 특징(17)을 추출할 수 있다. 예를 들어, 제1 및 제2 컨볼루션 신경망(131, 132)은 하나의 컨볼루션 신경망에 포함될 수 있다.
본 개시에서, 이미지 또는 특징을 나타내는 기호의 위 첨자는 해당 이미지 또는 특징이 통과한 레이어의 개수 또는 동영상 처리 시스템(100) 내에서의 해당 이미지 또는 특징의 상대적인 위치를 나타낸다. 예를 들어, 는 k번째 레이어로부터 출력된 특징을 나타내고, 는 k-1번째 레이어로부터 출력된 특징을 나타낸다.
일 실시예에서, 제2 컨볼루션 신경망(132)이 k개의 레이어를 포함하는 경우, k-1번째 레이어의 출력인, 로 표시될 수 있는, 제3 이미지 특징 (16)은 공간적 어텐션 모듈(150)의 입력으로 사용될 수 있다. 여기서, k-1번째 레이어의 출력은 제2 컨볼루션 신경망(132) 내의 k-1번째 컨볼루션 레이어의 출력, 또는 k-1번째 컨볼루션 레이어 다음의 활성화 함수의 출력 중 어느 하나를 의미할 수 있다. k-1번째 컨볼루션 레이어 다음에 활성화 함수가 존재하는지 여부는 설계 의도에 기초하여 결정될 수 있다. k-1번째 레이어의 출력은 k번째 컨볼루션 레이어의 입력으로 이해될 수 있다. 동영상 처리 시스템(100)이 제3 이미지 특징(16)을 이용하여 동영상을 복원하는 동작에 관하여는 공간적 어텐션 모듈(150)의 동작과 함께 후술하기로 한다.
일 실시예에서, 시간적 어텐션 모듈(140)은 제1 이미지 특징(14) 및 제2 이미지 특징(15)에 기초하여 제1 이미지 특징(14)과 제2 이미지 특징(15) 사이의 시간적 변화 정보와 연관된, 로 표시될 수 있는, 시간적 특징(temporal feature)(18)을 생성할 수 있다. 시간적 어텐션 모듈(140)은 시간적 특징(18)을 생성하기 위해 수정된 셀프-어텐션(self-attention)에 기초한 연산을 수행할 수 있다. 시간적 어텐션 모듈(140)의 구조 및 동작의 예시는 도 2 및 도 3을 참조하여 후술된다.
일 실시예에서, 공간적 어텐션 모듈(150)은 제2 이미지 특징(15) 및 제3 이미지 특징(16)에 기초하여 제2 입력 이미지(12)에 대한, 로 표시될 수 있는, 공간적 특징(spatial feature)(19)을 생성할 수 있다. 공간적 어텐션 모듈(150)은 공간적 특징(19)을 생성하기 위해 수정된 셀프-어텐션에 기초한 연산을 수행할 수 있다. 공간적 어텐션 모듈(150)의 구조 및 동작의 예시는 도 4를 참조하여 후술된다.
일 실시예에서, 시간적 어텐션 모듈(140)이 서로 다른 프레임으로부터 추출된 특징들을 이용하여 시간적 특징(18)을 생성할 수 있고, 공간적 어텐션 모듈(150)은 하나의 프레임으로부터 추출된 특징들을 이용하여 공간적 특징(19)을 생성할 수 있다. 이때, 공간적 어텐션 모듈(150)은 제2 컨볼루션 신경망(132)의 마지막 레이어의 출력 및 그 이전 레이어의 출력을 입력으로 한다. 컨볼루션 신경망에서, 더 깊은 레이어는 더 큰 수용 영역(receptive field)을 제공할 수 있고, 각 레이어에서 출력되는 특징들은 동일한 입력으로부터 생성되었더라도 서로 다른 정보를 가질 수 있다. 따라서 제2 이미지 특징(15)과 제3 이미지 특징(16)은 모두 제2 입력 이미지(12)로부터 추출된 특징들이지만 각자가 다른 정보를 포함할 수 있으며, 공간적 어텐션 모듈(150)은 제2 이미지 특징(15)과 제3 이미지 특징(16)에 기초한 수정된 셀프-어텐션 연산을 통해 공간적 특징(19)을 생성할 수 있다.
일 실시예에서, 시공간적 어텐션 모듈(160)은 제4 이미지 특징(17), 시간적 특징(18) 및 공간적 특징(19)에 기초하여 제1 입력 이미지(11) 및 제2 입력 이미지(12)에 대한, 로 표시될 수 있는, 시공간적 특징(spatio-temporal feature)(20)을 생성할 수 있다. 시공간적 어텐션 모듈(160)은 시공간적 특징(20)을 생성하기 위해 수정된 셀프-어텐션에 기초한 연산을 수행할 수 있다. 시공간적 어텐션 모듈(160)의 구조 및 동작의 예시는 도 5를 참조하여 후술된다.
일 실시예에서, 출력부(170)는 시공간적 특징(20)으로부터 출력 이미지(22)를 생성하기 위한 구성으로서, 특징 통합(feature aggregation) 모듈(171), 업스케일링(upscaling) 모듈(172) 및 출력 레이어(173)를 포함할 수 있다.
일 실시예에서, 특징 통합 모듈(171)은 시공간적 특징(20)과 제2 이미지 특징(15)을 행렬 곱한 입력에 대해 컨볼루션 연산을 수행할 수 있다. 특징 통합 모듈(171)은 하나 이상의 컨볼루션 레이어 및 하나 이상의 활성화 함수를 포함할 수 있다. 예를 들어, 특징 통합 모듈(171)의 활성화 함수는 시그모이드(sigmoid), ReLU(Rectified Linear Unit), leaky ReLU, GELU(Gaussian Error Linear Unit), Tanh 등을 포함할 수 있으나, 이에 제한되는 것은 아니다.
전술한 바와 같이, 일 실시예에서, 동영상 처리 시스템(100)은 공간적 어텐션 모듈(150) 및 시공간적 어텐션 모듈(160)을 포함하지 않은 형태로 구현될 수 있다. 이 경우, 특징 통합 모듈(171)은 시간적 특징(18)과 제2 이미지 특징(15)을 행렬 곱한 입력에 대해 컨볼루션 연산을 수행할 수 있다.
전술한 바와 같이, 일 실시예에서, 동영상 처리 시스템(100)은 시공간적 어텐션 모듈(160)을 포함하지 않은 형태로 구현될 수 있다. 이 경우, 특징 통합 모듈(171)은 중간 특징과 제2 이미지 특징(15)을 행렬 곱하여 획득된 입력에 대해 컨볼루션 연산을 수행할 수 있다. 중간 특징은 시간적 특징(18)과 공간적 특징(19)을 채널 방향으로 결합한 후 결합 결과를 채널 수 변경을 위한 컨볼루션 레이어를 통해 통과시킴으로써 획득될 수 있다.
일 실시예에서, 업스케일링 모듈(172)은 특징 통합 모듈(171)에서 출력된, 로 표시될 수 있는, 특징(21)과 제2 이미지 특징(15)을 더한 입력에 대해 컨볼루션 연산 및 픽셀 셔플(pixel shuffle) 연산을 수행할 수 있다. 업스케일링 모듈(172)은 하나 이상의 컨볼루션 레이어, 하나 이상의 활성화 함수 및 하나 이상의 픽셀 셔플 레이어를 포함할 수 있다. 예를 들어, 업스케일링 모듈(172)의 활성화 함수는 시그모이드(sigmoid), ReLU(Rectified Linear Unit), leaky ReLU, GELU(Gaussian Error Linear Unit), Tanh 등을 포함할 수 있으나, 이에 제한되는 것은 아니다.
일 실시예에서, 출력부(170)는 출력 레이어(173)를 이용하여 업스케일링 모듈(172)의 출력에 대해 컨볼루션 연산을 수행하여 출력 이미지(22)를 생성할 수 있다. 출력 레이어(173)는 2차원(2D) 컨볼루션 레이어일 수 있다.
도 2는 본 개시의 일 실시예에 따른 시간적 어텐션 모듈(140)의 구조를 도시하고, 도 3은 본 개시의 일 실시예에 따른 제1 및 제2 오프셋 네트워크(250, 260)의 구조를 도시한다.
전술한 바와 같이, 일 실시예에서, 시간적 어텐션 모듈(140)은 제1 이미지 특징(14) 및 제2 이미지 특징(15)에 기초하여 제1 이미지 특징(14)과 제2 이미지 특징(15) 사이의 시간적 변화 정보와 연관된 시간적 특징(18)을 생성할 수 있다. 시간적 어텐션 모듈(140)은 시간적 특징(18)을 생성하기 위해 수정된 셀프-어텐션에 기초한 연산을 수행할 수 있다.
셀프-어텐션은 하나의 입력 특징으로부터 쿼리(query), 키(key), 밸류(value)라고 불리는 투영된 특징들을 생성하고, 쿼리(Q)와 키(K)를 행렬 곱하고, 행렬 곱 결과에 소프트맥스(softmax) 함수를 적용하여 가중치를 계산하고, 가중치와 밸류(V)를 행렬 곱하여 최종 출력을 계산하는 네트워크 또는 연산 과정으로 이해될 수 있다. 셀프-어텐션에 의해, 입력 특징의 각 요소(예: 픽셀)와 연관성이 많은 요소에 큰 가중치가 적용될 수 있으며, 셀프-어텐션 이후에 배치된 출력 레이어는 입력 특징의 많은 요소들 중 가중치가 더 큰 요소에 집중할 수 있다. 이하에서는, 쿼리(Q)와 키(K)를 행렬 곱한 후 소프트맥스(softmax) 함수를 적용하여 가중치를 계산하고, 가중치와 밸류(V)를 행렬 곱하는 연산을 "셀프-어텐션 연산"이라고 지칭한다. 다만, 이하에서 설명되는 바와 같이, 본 개시의 일 실시예에 따른 동영상 처리 시스템(100)은 시계열적 데이터(예: 및 )뿐만 아니라 하나의 입력 이미지로부터 추출된 특징들(예: 및 )을 처리하기 위하여서도 셀프-어텐션 연산을 수행함에 유의해야 한다.
본 개시의 일 실시예에 따른 동영상 처리 시스템(100)은, 이하에서 설명될 수정된 셀프-어텐션에 기초한 시간적 특징(18)을 생성하여 동영상을 복원함으로써, 오류가 발생하기 쉽고 연산량 부담이 큰 프레임 정렬(alignment) 과정(예: 광 흐름 추정, 이미지 와핑 등) 없이도 시간적 정보를 효과적으로 활용하여 동영상을 복원할 수 있다.
도 2를 참조하면, 일 실시예에서, 시간적 어텐션 모듈(140)은 컨볼루션 레이어(210)를 이용하여, 제1 이미지 특징(14)에 대하여, Q1으로 표시될 수 있는, 제1 쿼리(202)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 시간적 어텐션 모듈(140)은 컨볼루션 레이어(240)를 이용하여, 제2 이미지 특징(15)에 대하여, Q2로 표시될 수 있는, 제2 쿼리(205)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 시간적 어텐션 모듈(140)은 제1 오프셋 네트워크(250)를 이용하여, 제1 쿼리(202)로부터, Offsett-1로 표시될 수 있는, 제1 오프셋(206)을 생성하는 연산을 포함할 수 있다.
일 실시예에서, 시간적 어텐션 모듈(140)은 제2 오프셋 네트워크(260)를 이용하여, 제2 쿼리(240)로부터, Offsett로 표시될 수 있는, 제2 오프셋(208)을 생성하는 연산을 포함할 수 있다.
일 실시예에서, 시간적 어텐션 모듈(140)은 제1 이미지 특징에, 제2 오프셋(208)에서 제1 오프셋(206)을 감산하여 획득되는 제3 오프셋(Offset(t, t-1))(207)을 더하여, 로 표시될 수 있는, 오프셋이 적용된 이미지 특징(201)을 생성하는 연산을 포함할 수 있다. 일 실시예에서, 이미지 특징(201)은 오프셋 이미지 특징으로 지칭될 수 있다.
제1 오프셋 네트워크(250) 및 제2 오프셋 네트워크(260)는 제1 이미지 특징(14)과 제2 이미지 특징(15) 사이의 픽셀 간 이동량을 학습하는 뉴럴 네트워크이다. 예를 들어, 동영상 내에서 객체가 이동한 경우, 제1 이미지 특징(14)과 제2 이미지 특징(15)에서 해당 객체에 대응하는 픽셀의 위치(예: 인덱스)가 달라진다. 제3 오프셋(207)은 t-1번째 프레임과 연관된 제1 오프셋(206)과 t번째 프레임과 연관된 제2 오프셋(208)의 차이에 해당하는 것으로서, 두 프레임 간의 픽셀의 위치 차이만큼의 이동량에 관한 정보를 포함하게 된다. 예를 들어, 제3 오프셋(207)은 픽셀의 이동량에 해당하는 너비(width)와 높이(height)를 각각 x축 값과 y축 값으로 나타낼 수 있다. 시간적 어텐션 모듈(140)은 제1 이미지 특징(14)에 제3 오프셋(207)을 더함으로써 두 프레임 간의 픽셀의 이동량에 관한 정보가 반영된 오프셋이 적용된 이미지 특징(201)을 생성할 수 있다.
일 실시예에서, 제1 오프셋 네트워크(250)와 제2 오프셋 네트워크(260)는 각각 하나 이상의 컨볼루션 레이어와 하나 이상의 활성화 함수를 포함할 수 있다. 예를 들어, 도 3에 도시된 바와 같이, 제1 오프셋 네트워크(250)와 제2 오프셋 네트워크(260)는 각각 깊이 별(depthwise) 컨볼루션 레이어(310, 340), GELU(Gaussian Error Linear Unit) 활성화 함수(320, 350), 및 포인트 별(pointwise) 컨볼루션 레이어(330, 360)를 포함할 수 있다. 다만, 제1 오프셋 네트워크(250)와 제2 오프셋 네트워크(260)의 구조는 이에 제한되지 않으며, 예를 들어, 컨볼루션, 확장된(dilated) 컨볼루션, 전치된(transposed) 컨볼루션, 분리 가능한(separable) 컨볼루션, 깊이 별 분리 가능한(depthwise separable) 컨볼루션, 그룹(grouped) 컨볼루션 등 연산량을 줄일 수 있는 다양한 컨볼루션 기반의 네트워크가 사용될 수 있으며, 시그모이드(sigmoid), ReLU(Rectified Linear Unit), leaky ReLU, Tanh 등의 활성화 함수가 사용될 수 있다.
이상에서 제공된 예시들이 2개의 오프셋 네트워크를 포함하는 시간적 어텐션 모듈(140)과 연관되고 각각의 오프셋 네트워크가 별개의 동작을 수행하지만, 본 개시는 이에 제한되지 않으며, 시간적 어텐션 모듈(140)의 구성은 다양하게 변형될 수 있다. 예를 들어, 하나의 오프셋 네트워크를 이용하여 제1 및 제2 쿼리(202, 205)로부터 제3 오프셋(207)을 생성하는 연산을 포함할 수 있다. 예를 들어, 제1 및 제2 오프셋 네트워크(250, 260)는 하나의 뉴럴 네트워크에 포함될 수 있다.
다시 도 2를 참조하면, 일 실시예에서, 시간적 어텐션 모듈(140)은 컨볼루션 레이어(220)를 이용하여, 오프셋이 적용된 이미지 특징(201)에 대하여, V1으로 표시될 수 있는, 제1 밸류(203)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 시간적 어텐션 모듈(140)은 컨볼루션 레이어(230)를 이용하여, 오프셋이 적용된 이미지 특징(201)에 대하여, K1으로 표시될 수 있는, 제1 키(204)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 시간적 어텐션 모듈(140)은 제2 쿼리(205)와 제1 키(204)를 행렬 곱한 후 행렬 곱 결과에 소프트맥스(270) 함수를 적용하여 가중치를 계산하고, 가중치와 제1 밸류(203)를 행렬 곱하여 시간적 특징(18)을 생성할 수 있다.
전술한 바와 같이, 시간적 어텐션 모듈(140)이 수행하는 수정된 셀프-어텐션은 2개의 입력 특징(예: 제1 이미지 특징(14), 제2 이미지 특징(15))을 이용하여 2개의 쿼리(예: 제1 쿼리(202), 제2 쿼리(205))를 생성하고, 각각의 쿼리로부터 오프셋(207)을 계산하며, 오프셋이 적용된 특징(201)을 이용하여 키(204)와 밸류(203)를 생성하는 것을 특징으로 한다. 다시 말하면, 본 개시의 일 실시예에 따른 동영상 처리 시스템(100)은 이미지 레벨이 아닌, 특징 레벨에서 두 프레임에서의 픽셀 간 이동량을 고려함으로써 프레임 정렬(alignment) 과정 없이도 시간적 정보를 효과적으로 활용하여 동영상을 복원할 수 있다.
도 4는 본 개시의 일 실시예에 따른 공간적 어텐션 모듈(150)의 구조를 도시한다.
전술한 바와 같이, 공간적 어텐션 모듈(150)은 제2 이미지 특징(15) 및 제3 이미지 특징(16)에 기초하여 공간적 특징(spatial feature)(19)을 생성할 수 있다. 공간적 어텐션 모듈(150)은 공간적 특징(19)을 생성하기 위해 수정된 셀프-어텐션에 기초한 연산을 수행할 수 있다.
일 실시예에서, 공간적 어텐션 모듈(150)은 컨볼루션 레이어(410)를 이용하여, 제3 이미지 특징(16)에 대하여, V2로 표시될 수 있는, 제2 밸류(401)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 공간적 어텐션 모듈(150)은 컨볼루션 레이어(420)를 이용하여, 제3 이미지 특징(16)에 대하여, K2로 표시될 수 있는, 제2 키(402)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 공간적 어텐션 모듈(150)은 컨볼루션 레이어(430)를 이용하여, 제2 이미지 특징(15)에 대하여, Q3로 표시될 수 있는, 제3 쿼리(403)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 공간적 어텐션 모듈(150)은 제3 쿼리(403)와 제2 키(402)를 행렬 곱한 후 행렬 곱 결과에 소프트맥스(440) 함수를 적용하여 가중치를 계산하고, 가중치와 제2 밸류(401)를 행렬 곱하여 공간적 특징(19)을 생성할 수 있다.
공간적 어텐션 모듈(150)이 수행하는 수정된 셀프-어텐션은 컨볼루션 신경망의 최종 레이어의 출력(예: 제2 이미지 특징(15))을 이용하여 쿼리(예: 제3 쿼리(403))를 생성하고, 최종 레이어의 이전 레이어의 출력(16)을 이용하여 키(예: 제2 키(402))와 밸류(예: 제2 밸류(401))를 생성하는 것을 특징으로 한다. 이에 따르면, 본 개시의 일 실시예에 따른 동영상 처리 시스템(100)은 시간적 방향뿐만 아니라 공간적 방향으로도 셀프-어텐션을 별도로 적용하여 입력 이미지에 포함된 공간적 정보를 효과적으로 활용할 수 있다.
도 5는 본 개시의 일 실시예에 따른 시공간적 어텐션 모듈(160)의 구조를 도시한다.
전술한 바와 같이, 시공간적 어텐션 모듈(160)은 제4 이미지 특징(17), 시간적 특징(18) 및 공간적 특징(19)에 기초하여 시공간적 특징(20)을 생성할 수 있다. 시공간적 어텐션 모듈(160)은 시공간적 특징(20)을 생성하기 위해 수정된 셀프-어텐션에 기초한 연산을 수행할 수 있다.
일 실시예에서, 시공간적 어텐션 모듈(160)은 컨볼루션 레이어(510)를 이용하여, 시간적 특징(18)에 대하여, V3로 표시될 수 있는, 제3 밸류(501)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 시공간적 어텐션 모듈(160)은 컨볼루션 레이어(520)를 이용하여, 시간적 특징(18)에 대하여, K3로 표시될 수 있는, 제3 키(502)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 시공간적 어텐션 모듈(160)은 컨볼루션 레이어(530)를 이용하여, 제4 이미지 특징(17)에 대하여, Q4로 표시될 수 있는, 제4 쿼리(503)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 시공간적 어텐션 모듈(160)은 컨볼루션 레이어(540)를 이용하여, 공간적 특징(19)에 대하여, K4로 표시될 수 있는, 제4 키(504)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 시공간적 어텐션 모듈(160)은 컨볼루션 레이어(550)를 이용하여, 공간적 특징(19)에 대하여, V4로 표시될 수 있는, 제4 밸류(505)를 생성하기 위한 컨볼루션 연산을 포함할 수 있다.
일 실시예에서, 시공간적 어텐션 모듈(160)은 제4 쿼리(503)와 제3 키(502)를 행렬 곱한 후 행렬 곱 결과에 소프트맥스(560) 함수를 적용하여 시간적 특징(18)에 대한 가중치를 계산하고, 시간적 특징(18)에 대한 가중치와 제3 밸류(501)를 행렬 곱할 수 있다. 또한 시공간적 어텐션 모듈(160)은 제4 쿼리(503)와 제4 키(504)를 행렬 곱한 후 행렬 곱 결과에 소프트맥스(570) 함수를 적용하여 공간적 특징(19)에 대한 가중치를 계산하고, 공간적 특징(19)에 대한 가중치와 제4 밸류(505)를 행렬 곱할 수 있다. 시공간적 어텐션 모듈(160)은 시간적 특징(18)에 대한 가중치와 제3 밸류(501)를 행렬 곱한 결과와 공간적 특징(19)에 대한 가중치와 제4 밸류(505)를 행렬 곱한 결과를 더하여 시공간적 특징(20)을 생성할 수 있다.
시공간적 어텐션 모듈(160)이 수행하는 수정된 셀프-어텐션은 3개의 입력(예: 제4 이미지 특징(17), 시간적 특징(18), 공간적 특징(19))으로부터 1개의 쿼리(예: 제4 쿼리(503)), 2개의 키(예: 제1 키(502), 제2 키(504)), 2개의 밸류(예: 제1 밸류(501), 제2 밸류(505))를 생성하고, 2번의 셀프-어텐션 연산을 통해 시공간적 특징(20)을 생성하는 것을 특징으로 한다. 이에 따르면, 본 개시의 일 실시예에 따른 동영상 처리 시스템(100)은 시간적 정보와 공간적 정보를 효과적으로 결합하여 동영상을 처리할 수 있다.
도 6a는 본 개시의 일 실시예에 따른 동영상 처리 방법(600)의 순서도이다. 도 6b는 본 개시의 일 실시예에 따른 동영상 처리 방법(600)의 순서도이다. 동영상 처리 방법(600)은 동영상 처리 시스템(100)을 탑재한 동영상 처리 장치(예: 도 7에서 후술되는 동영상 처리 장치(700))에 의해 수행될 수 있다.
도 6a를 참조하면, 동작 610에서, 타겟 프레임인 제2 입력 이미지(12)와 동일한 장면(scene) 내에 포함된 제1 입력 이미지(11)로부터 제1 이미지 특징(14)을 추출할 수 있다. 동작 610은 특징 추출 모듈(130)의 동작에 대응될 수 있다. 일 실시예에서, 동작 610은 제1 컨볼루션 신경망(131)을 이용하여 수행될 수 있다.
동작 620에서, 제2 입력 이미지(12)로부터 제2 이미지 특징(15)을 추출할 수 있다. 동작 620은 특징 추출 모듈(130)의 동작에 대응될 수 있다. 일 실시예에서, 동작 620은 제2 컨볼루션 신경망(132)을 이용하여 수행될 수 있다.
동작 630에서, 제1 이미지 특징(14) 및 제2 이미지 특징(15)에 기초하여 제1 이미지 특징(14)과 제2 이미지 특징(15) 사이의 시간적 변화 정보와 연관된 시간적 특징(18)을 생성할 수 있다. 동작 630은 시간적 어텐션 모듈(140)의 동작에 대응될 수 있다.
예를 들어, 도 6b를 참조하면, 동작 631에서, 제1 이미지 특징(14)에 대하여 제1 컨볼루션 연산을 수행하고, 제2 이미지 특징(15)에 대하여 제2 컨볼루션 연산을 수행할 수 있다.
동작 632에서, 제1 이미지 특징(14)과 제2 이미지 특징(15) 사이의 픽셀 간 이동량을 학습하는 오프셋 네트워크(250, 260)를 이용하여, 제1 컨볼루션 연산 결과 및 제2 컨볼루션 연산 결과에 기초하여 이미지 특징(201)을 생성할 수 있다. 일 실시예에서, 동작 632는 제1 오프셋 네트워크(250)를 이용하여, 제1 컨볼루션 연산 결과로부터 제1 오프셋(206)을 생성하고, 제2 오프셋 네트워크(260)를 이용하여, 제2 컨볼루션 연산 결과로부터 제2 오프셋(208)을 생성하고, 제1 이미지 특징(14)에, 제2 오프셋(208)에서 제1 오프셋(206)을 감산하여 획득되는 제3 오프셋(207)을 더하여 오프셋이 적용된 이미지 특징(201)을 생성할 수 있다. 일 실시예에서, 제1 오프셋 네트워크(250)는 깊이 별(depthwise) 컨볼루션 레이어(310), GELU(Gaussian Error Linear Unit) 활성화 함수(320), 및 포인트 별(pointwise) 컨볼루션 레이어(330)를 포함할 수 있고, 제2 오프셋 네트워크(260)는 깊이 별(depthwise) 컨볼루션 레이어(340), GELU(Gaussian Error Linear Unit) 활성화 함수(350), 및 포인트 별(pointwise) 컨볼루션 레이어(360)를 포함할 수 있다.
동작 633에서, 오프셋이 적용된 이미지 특징(201)에 대하여 제3 컨볼루션 연산을 수행할 수 있다.
동작 634에서, 오프셋이 적용된 이미지 특징(201)에 대하여 제4 컨볼루션 연산을 수행할 수 있다.
동작 635에서, 제2 컨볼루션 연산 결과를 쿼리(query)로서 이용하고, 제3 컨볼루션 연산 결과를 키(key)로서 이용하고, 제4 컨볼루션 연산 결과를 밸류(value)로서 이용하는 셀프-어텐션 연산을 수행하여 시간적 특징(18)을 생성할 수 있다.
다시 도 6a를 참조하면, 동작 640에서, 시간적 특징(18)에 기초하여 출력 이미지(22)를 생성할 수 있다. 동작 640은 출력부(170)의 동작에 대응될 수 있다.
일 실시예에서, 동영상 처리 방법(600)은 제2 이미지 특징(15) 및 제3 이미지 특징(16)에 기초하여 제2 입력 이미지(12)에 대한 공간적 특징(19)을 생성하는 동작을 더 포함할 수 있다. 이때, 제3 이미지 특징(16)은 제2 컨볼루션 신경망(132) 내 k-1번째 레이어의 출력이고, k는 제2 컨볼루션 신경망(132)에 포함된 레이어의 개수이다. 일 실시예에서, 공간적 특징(19)을 생성하는 동작은, 제2 이미지 특징(15)에 대하여 제5 컨볼루션 연산을 수행하고, 제3 이미지 특징(16)에 대하여 제6 컨볼루션 연산을 수행하고, 제3 이미지 특징(16)에 대하여 제7 컨볼루션 연산을 수행하고, 제5 컨볼루션 연산 결과를 쿼리로서 이용하고, 제6 컨볼루션 연산 결과를 키로서 이용하고, 제7 컨볼루션 연산 결과를 밸류로서 이용하는 셀프-어텐션 연산을 수행하여 공간적 특징(19)을 생성하는 동작을 포함할 수 있다.
일 실시예에서, 동작 640은 공간적 특징(19)에 더 기초하여 출력 이미지(22)를 생성할 수 있다.
일 실시예에서, 동영상 처리 방법(600)은, 제1 입력 이미지(11)와 제2 입력 이미지(12)를 채널 방향으로 쌓은 행렬인 제3 입력(13)으로부터 제4 이미지 특징(17)을 추출하는 동작, 및 제4 이미지 특징(17), 시간적 특징(18) 및 공간적 특징(19)에 기초하여 제1 입력 이미지(11) 및 제2 입력 이미지(12)에 대한 시공간적 특징(20)을 생성하는 동작을 더 포함할 수 있다.
일 실시예에서, 동작 640은 시공간적 특징(20)에 더 기초하여 출력 이미지(22)를 생성할 수 있다.
일 실시예에서, 시공간적 특징(20)을 생성하는 동작은, 제4 이미지 특징(17)에 대하여 제8 컨볼루션 연산을 수행하는 동작, 시간적 특징(18)에 대하여 제9 컨볼루션 연산을 수행하는 동작, 시간적 특징(18)에 대하여 제10 컨볼루션 연산을 수행하는 동작, 공간적 특징(19)에 대하여 제11 컨볼루션 연산을 수행하는 동작, 공간적 특징(19)에 대하여 제12 컨볼루션 연산을 수행하는 동작, 제8 컨볼루션 연산 결과를 쿼리로서 이용하고, 제9 컨볼루션 연산 결과를 키로서 이용하고, 제10 컨볼루션 연산 결과를 밸류로서 이용하는 셀프-어텐션 연산을 수행하여 제1 중간 결과를 생성하고, 제8 컨볼루션 연산 결과를 쿼리로서 이용하고, 제11 컨볼루션 연산 결과를 키로서 이용하고, 제12 컨볼루션 연산 결과를 밸류로서 이용하는 셀프-어텐션 연산을 수행하여 제2 중간 결과를 생성하고, 제1 중간 결과 및 제2 중간 결과를 더하여 시공간적 특징(20)을 생성하는 동작을 포함할 수 있다.
도 7은 본 개시의 일 실시예에 따른 동영상 처리 장치(700)의 블록도이다.
도 7에 도시된 동영상 처리 장치(700)는 전술한 동영상 처리 시스템(100)의 동작을 수행하여 동영상을 처리할 수 있다. 처리 대상인 동영상은 동영상 처리 장치(700)에 저장된 동영상, 및 동영상 처리 장치(700)가 외부 장치(예: 인터넷을 통해 동영상을 제공하는 OTT(over the top) 서비스 제공자의 서버 등)로부터 수신한 동영상 중 적어도 하나일 수도 있다.
일 실시예에서, 동영상 처리 장치(700)는 프로세서(710), 메모리(720) 및 통신 인터페이스(730) 중 하나 이상을 포함할 수 있다. 다만, 동영상 처리 장치(700)의 구성요소는 이에 제한되지 않으며, 도 7에 도시된 것보다 더 많은 구성요소를 포함할 수도 있고, 도 7에 도시된 구성요소들 중 일부를 포함하지 않을 수도 있다. 일 예로서, 동영상 처리 장치(700)는 동영상을 표시하기 위한 디스플레이 또는 사용자 입력을 수신하는 인터페이스 등을 더 포함하는 텔레비전 또는 모바일 장치(예: 스마트폰, 스마트워치, 태블릿PC 등)일 수도 있다. 다른 예로서, 동영상 처리 장치(700)는 PC(예: 데스크톱, 랩톱 등)에 포함되어 PC의 스토리지(예: SSD, HDD 등)에 저장된 동영상 또는 인터넷을 통해 수신되는 동영상을 처리하는 그래픽 카드이거나 그래픽 카드를 포함할 수도 있다. 일 실시예에서, 프로세서(710), 메모리(720) 및 통신 인터페이스(730) 중 일부 또는 전부는 하나의 칩(chip) 형태로 구현될 수도 있으며, 프로세서(710)는 하나 이상의 프로세서를 포함할 수 있다.
일 실시예에서, 프로세서(710)는 동영상 처리 장치(700)가 동작하도록 일련의 과정을 제어하는 구성으로서, 하나 또는 복수의 프로세서로 구성될 수 있다. 이때, 하나 또는 복수의 프로세서는 CPU(Central Processing Unit), AP(Application Processor), DSP(Digital Signal Processor) 등과 같은 범용 프로세서, GPU(Graphic Processing Unit), VPU(Vision Processing Unit)와 같은 그래픽 전용 프로세서 또는 NPU(Neural Processing Unit)와 같은 인공지능 전용 프로세서일 수 있다. 예를 들어, 하나 또는 복수의 프로세서가 인공지능 전용 프로세서인 경우, 인공지능 전용 프로세서는, 특정 인공지능 모델의 처리에 특화된 하드웨어 구조로 설계될 수 있다.
일 실시예에서, 프로세서(710)는 메모리(720)에 데이터를 기록하거나, 메모리(720)에 저장된 데이터를 읽을 수 있으며, 특히 메모리(720)에 저장된 프로그램을 실행함으로써 미리 정의된 동작 규칙 또는 인공지능 모델에 따라 데이터를 처리할 수 있다. 따라서, 프로세서(710)는 전술한 동영상 처리 시스템(100)의 동작들을 수행할 수 있다.
일 실시예에서, 메모리(720)는 다양한 프로그램이나 데이터를 저장하기 위한 구성으로서, 롬(ROM), 램(RAM), 하드디스크, CD-ROM 및 DVD 등과 같은 저장 매체 또는 저장 매체들의 조합으로 구성될 수 있다. 메모리(720)는 별도로 존재하지 않고 프로세서(710)에 포함되도록 구성될 수도 있다. 메모리(720)는 휘발성 메모리, 비휘발성 메모리 또는 휘발성 메모리와 비휘발성 메모리의 조합으로 구성될 수도 있다. 메모리(720)에는 전술한 동영상 처리 시스템(100)의 동작들을 수행하기 위한 프로그램이 저장될 수 있다. 메모리(720)는 프로세서(710)의 요청에 따라 저장된 데이터를 프로세서(710)에 제공할 수도 있다.
일 실시예에서, 통신 인터페이스(730)는 외부의 장치와 유선 또는 무선으로 신호(예: 제어 명령, 데이터 등)를 송수신하기 위한 구성으로서, 다양한 통신 프로토콜을 지원하는 통신 칩셋을 포함하도록 구성될 수 있다. 통신 인터페이스(730)는 외부로부터 신호를 수신하여 프로세서(710)로 출력하거나, 프로세서(710)로부터 출력된 신호를 외부로 전송할 수 있다. 일 예로서, 동영상 처리 장치(700)가 텔레비전 또는 모바일 장치인 경우, 통신 인터페이스(730)는 인터넷을 통해 동영상을 수신할 수 있는 모듈일 수 있다. 다른 예로서, 동영상 처리 장치(700)가 그래픽 카드인 경우, 메인보드를 통해 CPU, RAM, 또는 스토리지와 신호를 주고받을 수 있는 인터페이스(예: ISA(industry standard architecture bus), VESA Local Bus, NuBus, PCI(peripheral component interconnect bus), PCIE(PCI Express) 등)일 수 있다. 일 실시예에 따르면, 통신 인터페이스(730)는 외부 장치로부터 동영상을 수신할 수 있다.
도 8은 본 개시의 일 실시예에 따른 동영상 처리 시스템(100)이 텔레비전(800)에 적용된 예시를 도시한다. 일 예로서, 텔레비전(800)은 동영상 처리 장치(700)에 대응될 수 있다. 다른 예로서, 텔레비전(800)은 동영상 처리 시스템(100)을 구동하기 위한 전용 하드웨어(예: 칩)을 포함할 수 있으며, 이 경우 전용 하드웨어가 동영상 처리 장치(700)에 대응될 수 있다.
도 8에서, 텔레비전(800)은 네트워크(810)를 통해 다양한 외부 장치로부터 동영상을 수신할 수 있다. 예를 들어, 외부 장치는 IPTV 방송 제공자가 관리하는 IPTV 송신기(820), OTT 서비스 제공자의 OTT 서버(830), 동영상 스트리밍 서비스 제공자의 스트리밍 서버(840) 등 네트워크(810)를 통해 텔레비전(800)에 동영상을 제공할 수 있는 다양한 형태의 장치를 포함할 수 있다.
일 실시예에서, 외부 장치는 네트워크 전송 속도, 네트워크 사용 비용, 서버의 유지 비용 등 다양한 원인에 의해 동영상을 압축한 상태로 보관 또는 전송할 수 있다. 일 실시예에서, 외부 장치가 텔레비전(800)으로 고화질의 동영상을 전송하더라도 전송 과정에서의 손실 등에 의해 텔레비전(800)이 저화질의 동영상을 수신할 수도 있다. 다양한 원인에 의해 저화질의 동영상을 수신한 텔레비전(800)은 동영상 처리 시스템(100)을 이용하여 동영상의 화질을 개선한 후 재생할 수 있다. 전술한 바와 같이, 동영상 처리 시스템(100)은 동영상의 시간적 정보와 공간적 정보를 별도로 추출한 후 이들을 효과적으로 결합함으로써 프레임 정렬(alignment) 과정 없이도 동영상의 화질을 실시간으로 개선할 수 있으며, 텔레비전(800) 사용자의 경험을 향상시킬 수 있다.
본 개시의 일 측면에 따르면, 동영상 처리 방법은 장면(scene) 내에 포함된 제1 입력 이미지로부터 제1 이미지 특징을 추출하는 단계; 상기 장면 내에 포함된 제2 입력 이미지로부터 제2 이미지 특징을 추출하는 단계로서, 상기 제2 입력 이미지는 타겟 프레임이고; 상기 제1 이미지 특징 및 상기 제2 이미지 특징에 기초하여 상기 제1 이미지 특징과 상기 제2 이미지 특징 사이의 시간적 변화 정보와 연관된 시간적 특징(temporal feature)을 생성하는 단계; 및 상기 시간적 특징에 기초하여 출력 이미지를 생성하는 단계;를 포함할 수 있고, 상기 시간적 특징을 생성하는 단계는, 상기 제1 이미지 특징에 대하여 제1 컨볼루션 연산을 수행하고, 상기 제2 이미지 특징에 대하여 제2 컨볼루션 연산을 수행하는 단계, 상기 제1 이미지 특징 내의 픽셀과 상기 제2 이미지 특징 내의 픽셀 사이의 이동량을 학습하도록 구성된 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과 및 상기 제2 컨볼루션 연산 결과에 기초하여 오프셋 이미지 특징을 생성하는 단계, 상기 오프셋 이미지 특징에 대하여 제3 컨볼루션 연산을 수행하는 단계, 상기 오프셋 이미지 특징에 대하여 제4 컨볼루션 연산을 수행하는 단계, 및 상기 제2 컨볼루션 연산 결과를 제1 쿼리(query)로서 이용하고, 상기 제3 컨볼루션 연산 결과를 제1 키(key)로서 이용하고, 상기 제4 컨볼루션 연산 결과를 제1 밸류(value)로서 이용하는 제1 셀프-어텐션 연산을 수행하여 상기 시간적 특징을 생성하는 단계를 포함할 수 있다.
일 실시예에서, 상기 오프셋 이미지 특징을 생성하는 단계는, 제1 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과로부터 제1 오프셋을 생성하는 단계, 제2 오프셋 네트워크를 이용하여, 상기 제2 컨볼루션 연산 결과로부터 제2 오프셋을 생성하는 단계, 및 상기 제1 이미지 특징에, 상기 제2 오프셋에서 상기 제1 오프셋을 감산하여 획득되는 제3 오프셋을 더하여 상기 오프셋 이미지 특징을 생성하는 단계를 포함할 수 있다.
일 실시예에서, 상기 오프셋 네트워크는 깊이 별(depthwise) 컨볼루션 레이어, GELU(Gaussian Error Linear Unit) 활성화 함수, 및 포인트 별(pointwise) 컨볼루션 레이어를 포함할 수 있다.
일 실시예에서, 상기 제1 이미지 특징을 추출하는 단계는, 제1 컨볼루션 레이어를 이용하여 상기 제1 이미지 특징을 추출하는 단계를 포함할 수 있고, 상기 제2 이미지 특징을 추출하는 단계는, 제2 컨볼루션 레이어를 이용하여 상기 제2 이미지 특징을 추출하는 단계를 포함할 수 있다.
일 실시예에서, 상기 동영상 처리 방법은 상기 제2 이미지 특징 및 제3 이미지 특징에 기초하여 상기 제2 입력 이미지에 대한 공간적 특징(spatial feature)을 생성하는 단계를 더 포함할 수 있고, 상기 출력 이미지는 상기 공간적 특징에 더 기초하여 생성될 수 있고, 상기 제3 이미지 특징은 상기 제2 컨볼루션 신경망 내 k-1번째 레이어의 출력이고, k는 상기 제2 컨볼루션 신경망에 포함된 레이어의 개수이다.
일 실시예에서, 상기 공간적 특징을 생성하는 단계는, 상기 제2 이미지 특징에 대하여 제5 컨볼루션 연산을 수행하는 단계, 상기 제3 이미지 특징에 대하여 제6 컨볼루션 연산을 수행하는 단계, 상기 제3 이미지 특징에 대하여 제7 컨볼루션 연산을 수행하는 단계, 및 상기 제5 컨볼루션 연산 결과를 제2 쿼리로서 이용하고, 상기 제6 컨볼루션 연산 결과를 제2 키로서 이용하고, 상기 제7 컨볼루션 연산 결과를 제2 밸류로서 이용하는 제2 셀프-어텐션 연산을 수행하여 상기 공간적 특징을 생성하는 단계를 포함할 수 있다.
일 실시예에서, 상기 동영상 처리 방법은, 채널 방향으로 적층된 상기 제1 입력 이미지와 상기 제2 입력 이미지를 포함하는 행렬로부터 제4 이미지 특징을 추출하는 단계, 및 상기 제4 이미지 특징, 상기 시간적 특징 및 상기 공간적 특징에 기초하여 상기 제1 입력 이미지 및 상기 제2 입력 이미지에 대한 시공간적 특징(spatio-temporal feature)을 생성하는 단계를 더 포함할 수 있고, 상기 출력 이미지는 상기 시공간적 특징에 더 기초하여 생성될 수 있다.
일 실시예에서, 상기 시공간적 특징을 생성하는 단계는, 상기 제4 이미지 특징에 대하여 제8 컨볼루션 연산을 수행하는 단계, 상기 시간적 특징에 대하여 제9 컨볼루션 연산을 수행하는 단계, 상기 시간적 특징에 대하여 제10 컨볼루션 연산을 수행하는 단계, 상기 공간적 특징에 대하여 제11 컨볼루션 연산을 수행하는 단계, 상기 공간적 특징에 대하여 제12 컨볼루션 연산을 수행하는 단계, 상기 제8 컨볼루션 연산 결과를 제3 쿼리로서 이용하고, 상기 제9 컨볼루션 연산 결과를 제3 키로서 이용하고, 상기 제10 컨볼루션 연산 결과를 제3 밸류로서 이용하는 제3 셀프-어텐션 연산을 수행하여 제1 중간 결과를 생성하는 단계, 상기 제8 컨볼루션 연산 결과를 제4 쿼리로서 이용하고, 상기 제11 컨볼루션 연산 결과를 제4 키로서 이용하고, 상기 제12 컨볼루션 연산 결과를 제4 밸류로서 이용하는 제4 셀프-어텐션 연산을 수행하여 제2 중간 결과를 생성하는 단계, 및 상기 제1 중간 결과 및 상기 제2 중간 결과를 더하여 상기 시공간적 특징을 생성하는 단계를 포함할 수 있다.
일 실시예에서, 상기 동영상 처리 방법은 상기 동영상의 메타 정보 또는 상기 동영상의 프레임의 변화 중 적어도 하나에 기초하여, 상기 제1 입력 이미지와 상기 제2 입력 이미지가 상기 장면 내에 포함되었는지 여부를 결정하는 단계를 더 포함할 수 있다.
본 개시의 일 측면에 따르면, 컴퓨터 판독 가능한 기록 매체는 동영상을 처리하는 장치의 적어도 하나의 프로세서에 의해 실행될 때, 상기 장치가, 장면(scene) 내에 포함된 제1 입력 이미지로부터 제1 이미지 특징을 추출하고, 상기 장면 내에 포함된 제2 입력 이미지로부터 제2 이미지 특징을 추출하되, 상기 제2 입력 이미지는 타겟 프레임이고, 상기 제1 이미지 특징 및 상기 제2 이미지 특징에 기초하여 상기 제1 이미지 특징과 상기 제2 이미지 특징 사이의 시간적 변화 정보와 연관된 시간적 특징(temporal feature)을 생성하고, 상기 시간적 특징에 기초하여 출력 이미지를 생성하는 것을 포함하는 동작을 수행하게 할 수 있는 하나 이상의 인스트럭션을 저장하고, 상기 시간적 특징을 생성하는 것은, 상기 제1 이미지 특징에 대하여 제1 컨볼루션 연산을 수행하고, 상기 제2 이미지 특징에 대하여 제2 컨볼루션 연산을 수행하는 것, 상기 제1 이미지 특징 내의 픽셀과 상기 제2 이미지 특징 내의 픽셀 사이의 이동량을 학습하도록 구성된 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과 및 상기 제2 컨볼루션 연산 결과에 기초하여 오프셋 이미지 특징을 생성하는 것, 상기 오프셋 이미지 특징에 대하여 제3 컨볼루션 연산을 수행하는 것, 상기 오프셋 이미지 특징에 대하여 제4 컨볼루션 연산을 수행하는 것, 및 상기 제2 컨볼루션 연산 결과를 제1 쿼리(query)로서 이용하고, 상기 제3 컨볼루션 연산 결과를 제1 키(key)로서 이용하고, 상기 제4 컨볼루션 연산 결과를 제1 밸류(value)로서 이용하는 제1 셀프-어텐션 연산을 수행하여 상기 시간적 특징을 생성하는 것을 포함할 수 있다.
본 개시의 일 측면에 따르면, 동영상을 처리하는 장치(700)는, 적어도 하나의 프로세서(710); 및 하나 이상의 인스트럭션을 저장하도록 구성된 메모리(720)를 포함할 수 있고, 상기 하나 이상의 인스트럭션은, 상기 적어도 하나의 프로세서(710)에 의해 실행될 때, 상기 장치(700)가, 장면(scene) 내에 포함된 제1 입력 이미지로부터 제1 이미지 특징을 추출하고, 상기 장면 내에 포함된 제2 입력 이미지로부터 제2 이미지 특징을 추출하되, 상기 제2 입력 이미지는 타겟 프레임이고, 상기 제1 이미지 특징 및 상기 제2 이미지 특징에 기초하여 상기 제1 이미지 특징과 상기 제2 이미지 특징 사이의 시간적 변화 정보와 연관된 시간적 특징(temporal feature)을 생성하고, 상기 시간적 특징에 기초하여 출력 이미지를 생성하는 것을 포함하는 동작을 수행하게 할 수 있고, 상기 시간적 특징을 생성하는 것은, 상기 제1 이미지 특징에 대하여 제1 컨볼루션 연산을 수행하고, 상기 제2 이미지 특징에 대하여 제2 컨볼루션 연산을 수행하는 것, 상기 제1 이미지 특징 내의 픽셀과 상기 제2 이미지 특징 내의 픽셀 사이의 이동량을 학습하도록 구성된 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과 및 상기 제2 컨볼루션 연산 결과에 기초하여 오프셋 이미지 특징을 생성하는 것, 상기 오프셋 이미지 특징에 대하여 제3 컨볼루션 연산을 수행하는 것, 상기 오프셋 이미지 특징에 대하여 제4 컨볼루션 연산을 수행하는 것, 및 상기 제2 컨볼루션 연산 결과를 제1 쿼리(query)로서 이용하고, 상기 제3 컨볼루션 연산 결과를 제1 키(key)로서 이용하고, 상기 제4 컨볼루션 연산 결과를 제1 밸류(value)로서 이용하는 제1 셀프-어텐션 연산을 수행하여 상기 시간적 특징을 생성하는 것을 포함할 수 있다.
일 실시예에서, 상기 오프셋 이미지 특징을 생성하는 것은, 제1 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과로부터 제1 오프셋을 생성하는 것, 제2 오프셋 네트워크를 이용하여, 상기 제2 컨볼루션 연산 결과로부터 제2 오프셋을 생성하는 것, 및 상기 제1 이미지 특징에, 상기 제2 오프셋에서 상기 제1 오프셋을 감산하여 획득되는 제3 오프셋을 더하여 상기 오프셋 이미지 특징을 생성하는 것을 포함할 수 있다.
일 실시예에서, 상기 오프셋 네트워크는 깊이 별(depthwise) 컨볼루션 레이어, GELU(Gaussian Error Linear Unit) 활성화 함수, 및 포인트 별(pointwise) 컨볼루션 레이어를 포함할 수 있다.
일 실시예에서, 상기 제1 이미지 특징을 추출하는 것은, 제1 컨볼루션 레이어를 이용하여 상기 제1 이미지 특징을 추출하는 것을 포함할 수 있고, 상기 제2 이미지 특징을 추출하는 것은, 제2 컨볼루션 레이어를 이용하여 상기 제2 이미지 특징을 추출하는 것을 포함할 수 있다.
일 실시예에서, 상기 동작은 상기 제2 이미지 특징 및 제3 이미지 특징에 기초하여 상기 제2 입력 이미지에 대한 공간적 특징(spatial feature)을 생성하는 것을 더 포함할 수 있고, 상기 출력 이미지는 상기 공간적 특징에 더 기초하여 생성될 수 있고, 상기 제3 이미지 특징은 상기 제2 컨볼루션 신경망 내 k-1번째 레이어의 출력이고, k는 상기 제2 컨볼루션 신경망에 포함된 레이어의 개수이다.
일 실시예에서, 상기 공간적 특징을 생성하는 것은, 상기 제2 이미지 특징에 대하여 제5 컨볼루션 연산을 수행하는 것, 상기 제3 이미지 특징에 대하여 제6 컨볼루션 연산을 수행하는 것, 상기 제3 이미지 특징에 대하여 제7 컨볼루션 연산을 수행하는 것, 및 상기 제5 컨볼루션 연산 결과를 제2 쿼리로서 이용하고, 상기 제6 컨볼루션 연산 결과를 제2 키로서 이용하고, 상기 제7 컨볼루션 연산 결과를 제2 밸류로서 이용하는 제2 셀프-어텐션 연산을 수행하여 상기 공간적 특징을 생성하는 것을 포함할 수 있다.
일 실시예에서, 상기 동작은, 채널 방향으로 적층된 상기 제1 입력 이미지와 상기 제2 입력 이미지를 포함하는 행렬로부터 제4 이미지 특징을 추출하는 것, 및 상기 제4 이미지 특징, 상기 시간적 특징 및 상기 공간적 특징에 기초하여 상기 제1 입력 이미지 및 상기 제2 입력 이미지에 대한 시공간적 특징(spatio-temporal feature)을 생성하는 것을 더 포함할 수 있고, 상기 출력 이미지는 상기 시공간적 특징에 더 기초하여 생성될 수 있다.
일 실시예에서, 상기 시공간적 특징을 생성하는 것은, 상기 제4 이미지 특징에 대하여 제8 컨볼루션 연산을 수행하는 것, 상기 시간적 특징에 대하여 제9 컨볼루션 연산을 수행하는 것, 상기 시간적 특징에 대하여 제10 컨볼루션 연산을 수행하는 것, 상기 공간적 특징에 대하여 제11 컨볼루션 연산을 수행하는 것, 상기 공간적 특징에 대하여 제12 컨볼루션 연산을 수행하는 것, 상기 제8 컨볼루션 연산 결과를 제3 쿼리로서 이용하고, 상기 제9 컨볼루션 연산 결과를 제3 키로서 이용하고, 상기 제10 컨볼루션 연산 결과를 제3 밸류로서 이용하는 제3 셀프-어텐션 연산을 수행하여 제1 중간 결과를 생성하는 것, 상기 제8 컨볼루션 연산 결과를 제4 쿼리로서 이용하고, 상기 제11 컨볼루션 연산 결과를 제4 키로서 이용하고, 상기 제12 컨볼루션 연산 결과를 제4 밸류로서 이용하는 제4 셀프-어텐션 연산을 수행하여 제2 중간 결과를 생성하는 것, 및 상기 제1 중간 결과 및 상기 제2 중간 결과를 더하여 상기 시공간적 특징을 생성하는 것을 포함할 수 있다.
일 실시예에서, 상기 동작은, 상기 동영상의 메타 정보 또는 상기 동영상의 프레임의 변화 중 적어도 하나에 기초하여 상기 제1 입력 이미지와 상기 제2 입력 이미지가 상기 장면 내에 포함되었는지 여부를 결정하는 것을 더 포함할 수 있다.
Claims (15)
- 장면(scene) 내에 포함된 제1 입력 이미지로부터 제1 이미지 특징을 추출하는 단계;상기 장면 내에 포함된 제2 입력 이미지로부터 제2 이미지 특징을 추출하는 단계로서, 상기 제2 입력 이미지는 타겟 프레임이고;상기 제1 이미지 특징 및 상기 제2 이미지 특징에 기초하여 상기 제1 이미지 특징과 상기 제2 이미지 특징 사이의 시간적 변화 정보와 연관된 시간적 특징(temporal feature)을 생성하는 단계; 및상기 시간적 특징에 기초하여 출력 이미지를 생성하는 단계;를 포함하고,상기 시간적 특징을 생성하는 단계는,상기 제1 이미지 특징에 대하여 제1 컨볼루션 연산을 수행하고, 상기 제2 이미지 특징에 대하여 제2 컨볼루션 연산을 수행하는 단계,상기 제1 이미지 특징 내의 픽셀과 상기 제2 이미지 특징 내의 픽셀 사이의 이동량을 학습하도록 구성된 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과 및 상기 제2 컨볼루션 연산 결과에 기초하여 오프셋 이미지 특징을 생성하는 단계,상기 오프셋 이미지 특징에 대하여 제3 컨볼루션 연산을 수행하는 단계,상기 오프셋 이미지 특징에 대하여 제4 컨볼루션 연산을 수행하는 단계, 및상기 제2 컨볼루션 연산 결과를 제1 쿼리(query)로서 이용하고, 상기 제3 컨볼루션 연산 결과를 제1 키(key)로서 이용하고, 상기 제4 컨볼루션 연산 결과를 제1 밸류(value)로서 이용하는 제1 셀프-어텐션 연산을 수행하여 상기 시간적 특징을 생성하는 단계를 포함하는, 동영상 처리 방법.
- 제1항에 있어서,상기 오프셋 이미지 특징을 생성하는 단계는,제1 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과로부터 제1 오프셋을 생성하는 단계,제2 오프셋 네트워크를 이용하여, 상기 제2 컨볼루션 연산 결과로부터 제2 오프셋을 생성하는 단계, 및상기 제1 이미지 특징에, 상기 제2 오프셋에서 상기 제1 오프셋을 감산하여 획득되는 제3 오프셋을 더하여 상기 오프셋 이미지 특징을 생성하는 단계를 포함하는, 동영상 처리 방법.
- 제1항 또는 제2항에 있어서,상기 오프셋 네트워크는깊이 별(depthwise) 컨볼루션 레이어,GELU(Gaussian Error Linear Unit) 활성화 함수, 및포인트 별(pointwise) 컨볼루션 레이어를 포함하는, 동영상 처리 방법.
- 제1항 내지 제3항 중 어느 한 항에 있어서,상기 제1 이미지 특징을 추출하는 단계는, 제1 컨볼루션 레이어를 이용하여 상기 제1 이미지 특징을 추출하는 단계를 포함하고,상기 제2 이미지 특징을 추출하는 단계는, 제2 컨볼루션 레이어를 이용하여 상기 제2 이미지 특징을 추출하는 단계를 포함하는, 동영상 처리 방법.
- 제1항 내지 제4항 중 어느 한 항에 있어서,상기 동영상 처리 방법은 상기 제2 이미지 특징 및 제3 이미지 특징에 기초하여 상기 제2 입력 이미지에 대한 공간적 특징(spatial feature)을 생성하는 단계를 더 포함하고,상기 출력 이미지는 상기 공간적 특징에 더 기초하여 생성되고,상기 제3 이미지 특징은 상기 제2 컨볼루션 신경망 내 k-1번째 레이어의 출력이고, k는 상기 제2 컨볼루션 신경망에 포함된 레이어의 개수인, 동영상 처리 방법.
- 제1항 내지 제5항 중 어느 한 항에 있어서,상기 공간적 특징을 생성하는 단계는,상기 제2 이미지 특징에 대하여 제5 컨볼루션 연산을 수행하는 단계,상기 제3 이미지 특징에 대하여 제6 컨볼루션 연산을 수행하는 단계,상기 제3 이미지 특징에 대하여 제7 컨볼루션 연산을 수행하는 단계, 및상기 제5 컨볼루션 연산 결과를 제2 쿼리로서 이용하고, 상기 제6 컨볼루션 연산 결과를 제2 키로서 이용하고, 상기 제7 컨볼루션 연산 결과를 제2 밸류로서 이용하는 제2 셀프-어텐션 연산을 수행하여 상기 공간적 특징을 생성하는 단계를 포함하는, 동영상 처리 방법.
- 제1항 내지 제6항 중 어느 한 항에 있어서,상기 동영상 처리 방법은,채널 방향으로 적층된 상기 제1 입력 이미지와 상기 제2 입력 이미지를 포함하는 행렬로부터 제4 이미지 특징을 추출하는 단계, 및상기 제4 이미지 특징, 상기 시간적 특징 및 상기 공간적 특징에 기초하여 상기 제1 입력 이미지 및 상기 제2 입력 이미지에 대한 시공간적 특징(spatio-temporal feature)을 생성하는 단계를 더 포함하고,상기 출력 이미지는 상기 시공간적 특징에 더 기초하여 생성되는, 동영상 처리 방법.
- 제1항 내지 제7항 중 어느 한 항에 있어서,상기 시공간적 특징을 생성하는 단계는,상기 제4 이미지 특징에 대하여 제8 컨볼루션 연산을 수행하는 단계,상기 시간적 특징에 대하여 제9 컨볼루션 연산을 수행하는 단계,상기 시간적 특징에 대하여 제10 컨볼루션 연산을 수행하는 단계,상기 공간적 특징에 대하여 제11 컨볼루션 연산을 수행하는 단계,상기 공간적 특징에 대하여 제12 컨볼루션 연산을 수행하는 단계,상기 제8 컨볼루션 연산 결과를 제3 쿼리로서 이용하고, 상기 제9 컨볼루션 연산 결과를 제3 키로서 이용하고, 상기 제10 컨볼루션 연산 결과를 제3 밸류로서 이용하는 제3 셀프-어텐션 연산을 수행하여 제1 중간 결과를 생성하는 단계상기 제8 컨볼루션 연산 결과를 제4 쿼리로서 이용하고, 상기 제11 컨볼루션 연산 결과를 제4 키로서 이용하고, 상기 제12 컨볼루션 연산 결과를 제4 밸류로서 이용하는 제4 셀프-어텐션 연산을 수행하여 제2 중간 결과를 생성하는 단계, 및상기 제1 중간 결과 및 상기 제2 중간 결과를 더하여 상기 시공간적 특징을 생성하는 단계를 포함하는, 동영상 처리 방법.
- 제1항 내지 제8항 중 어느 한 항에 있어서,상기 동영상의 메타 정보 또는 상기 동영상의 프레임의 변화 중 적어도 하나에 기초하여, 상기 제1 입력 이미지와 상기 제2 입력 이미지가 상기 장면 내에 포함되었는지 여부를 결정하는 단계를 더 포함하는, 동영상 처리 방법.
- 제1항 내지 제9항 중 어느 한 항의 방법을 수행하기 위한 컴퓨터 프로그램을 저장한, 컴퓨터 판독 가능한 기록 매체.
- 동영상을 처리하는 장치(700)에 있어서,적어도 하나의 프로세서(710); 및하나 이상의 인스트럭션을 저장하도록 구성된 메모리(720)를 포함하고,상기 하나 이상의 인스트럭션은, 상기 적어도 하나의 프로세서(710)에 의해 실행될 때, 상기 장치(700)가,장면(scene) 내에 포함된 제1 입력 이미지로부터 제1 이미지 특징을 추출하고,상기 장면 내에 포함된 제2 입력 이미지로부터 제2 이미지 특징을 추출하되, 상기 제2 입력 이미지는 타겟 프레임이고,상기 제1 이미지 특징 및 상기 제2 이미지 특징에 기초하여 상기 제1 이미지 특징과 상기 제2 이미지 특징 사이의 시간적 변화 정보와 연관된 시간적 특징(temporal feature)을 생성하고,상기 시간적 특징에 기초하여 출력 이미지를 생성하는 것을 포함하는 동작을 수행하게 하되,상기 시간적 특징을 생성하는 것은,상기 제1 이미지 특징에 대하여 제1 컨볼루션 연산을 수행하고, 상기 제2 이미지 특징에 대하여 제2 컨볼루션 연산을 수행하는 것,상기 제1 이미지 특징 내의 픽셀과 상기 제2 이미지 특징 내의 픽셀 사이의 이동량을 학습하도록 구성된 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과 및 상기 제2 컨볼루션 연산 결과에 기초하여 오프셋 이미지 특징을 생성하는 것,상기 오프셋 이미지 특징에 대하여 제3 컨볼루션 연산을 수행하는 것,상기 오프셋 이미지 특징에 대하여 제4 컨볼루션 연산을 수행하는 것, 및상기 제2 컨볼루션 연산 결과를 제1 쿼리(query)로서 이용하고, 상기 제3 컨볼루션 연산 결과를 제1 키(key)로서 이용하고, 상기 제4 컨볼루션 연산 결과를 제1 밸류(value)로서 이용하는 제1 셀프-어텐션 연산을 수행하여 상기 시간적 특징을 생성하는 것을 포함하는, 장치.
- 제11항에 있어서,상기 오프셋 이미지 특징을 생성하는 것은,제1 오프셋 네트워크를 이용하여, 상기 제1 컨볼루션 연산 결과로부터 제1 오프셋을 생성하는 것,제2 오프셋 네트워크를 이용하여, 상기 제2 컨볼루션 연산 결과로부터 제2 오프셋을 생성하는 것, 및상기 제1 이미지 특징에, 상기 제2 오프셋에서 상기 제1 오프셋을 감산하여 획득되는 제3 오프셋을 더하여 상기 오프셋 이미지 특징을 생성하는 것을 포함하는, 장치.
- 제11항 내지 제12항 중 어느 한 항에 있어서,상기 제1 이미지 특징을 추출하는 것은, 제1 컨볼루션 레이어를 이용하여 상기 제1 이미지 특징을 추출하는 것을 포함하고,상기 제2 이미지 특징을 추출하는 것은, 제2 컨볼루션 레이어를 이용하여 상기 제2 이미지 특징을 추출하는 것을 포함하는, 장치.
- 제11항 내지 제13항 중 어느 한 항에 있어서,상기 동작은 상기 제2 이미지 특징 및 제3 이미지 특징에 기초하여 상기 제2 입력 이미지에 대한 공간적 특징(spatial feature)을 생성하는 것을 더 포함하고,상기 출력 이미지는 상기 공간적 특징에 더 기초하여 생성되고,상기 제3 이미지 특징은 상기 제2 컨볼루션 신경망 내 k-1번째 레이어의 출력이고, k는 상기 제2 컨볼루션 신경망에 포함된 레이어의 개수인, 장치.
- 제11항 내지 제14항 중 어느 한 항에 있어서,상기 동작은,채널 방향으로 적층된 상기 제1 입력 이미지와 상기 제2 입력 이미지를 포함하는 행렬로부터 제4 이미지 특징을 추출하는 것, 및상기 제4 이미지 특징, 상기 시간적 특징 및 상기 공간적 특징에 기초하여 상기 제1 입력 이미지 및 상기 제2 입력 이미지에 대한 시공간적 특징(spatio-temporal feature)을 생성하는 것을 더 포함하고,상기 출력 이미지는 상기 시공간적 특징에 더 기초하여 생성되는, 장치.
Priority Applications (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202480024201.7A CN121100359A (zh) | 2023-04-05 | 2024-03-05 | 用于处理视频的方法和装置 |
| EP24711109.9A EP4468234A4 (en) | 2023-04-05 | 2024-03-05 | METHOD AND DEVICE FOR VIDEO PROCESSING |
| US18/618,665 US20240338831A1 (en) | 2023-04-05 | 2024-03-27 | Method and apparatus for processing video |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR20230045040 | 2023-04-05 | ||
| KR10-2023-0045040 | 2023-04-05 | ||
| KR1020230113187A KR20240149295A (ko) | 2023-04-05 | 2023-08-28 | 동영상을 처리하는 방법 및 이를 수행하는 장치 |
| KR10-2023-0113187 | 2023-08-28 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US18/618,665 Continuation US20240338831A1 (en) | 2023-04-05 | 2024-03-27 | Method and apparatus for processing video |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024210337A1 true WO2024210337A1 (ko) | 2024-10-10 |
Family
ID=90571537
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2024/002801 Ceased WO2024210337A1 (ko) | 2023-04-05 | 2024-03-05 | 동영상을 처리하는 방법 및 장치 |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2024210337A1 (ko) |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2017191608A (ja) * | 2016-04-15 | 2017-10-19 | 株式会社リコー | 対象識別方法、対象識別装置、及び分類器訓練方法 |
| KR20190123946A (ko) * | 2018-04-25 | 2019-11-04 | 연세대학교 산학협력단 | 학습을 이용한 조인트 필터링 장치 및 방법 |
| CN113362230A (zh) * | 2021-07-12 | 2021-09-07 | 昆明理工大学 | 一种基于小波变换的可逆流模型图像超分辨率的方法 |
| CN114897726A (zh) * | 2022-05-10 | 2022-08-12 | 中山大学 | 基于三维生成对抗网络的胸腔ct图像伪影去除方法与系统 |
| KR20230044830A (ko) * | 2021-09-27 | 2023-04-04 | 주식회사 카카오엔터프라이즈 | 이미지 처리 방법 및 장치 |
-
2024
- 2024-03-05 WO PCT/KR2024/002801 patent/WO2024210337A1/ko not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2017191608A (ja) * | 2016-04-15 | 2017-10-19 | 株式会社リコー | 対象識別方法、対象識別装置、及び分類器訓練方法 |
| KR20190123946A (ko) * | 2018-04-25 | 2019-11-04 | 연세대학교 산학협력단 | 학습을 이용한 조인트 필터링 장치 및 방법 |
| CN113362230A (zh) * | 2021-07-12 | 2021-09-07 | 昆明理工大学 | 一种基于小波变换的可逆流模型图像超分辨率的方法 |
| KR20230044830A (ko) * | 2021-09-27 | 2023-04-04 | 주식회사 카카오엔터프라이즈 | 이미지 처리 방법 및 장치 |
| CN114897726A (zh) * | 2022-05-10 | 2022-08-12 | 中山大学 | 基于三维生成对抗网络的胸腔ct图像伪影去除方法与系统 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20210182616A1 (en) | Method and apparatus for training neural network model used for image processing, and storage medium | |
| WO2021054706A1 (en) | Teaching gan (generative adversarial networks) to generate per-pixel annotation | |
| US9344690B2 (en) | Image demosaicing | |
| WO2022005157A1 (en) | Electronic device and controlling method of electronic device | |
| WO2020017871A1 (ko) | 영상 처리 장치 및 그 동작방법 | |
| WO2021101087A1 (en) | Electronic apparatus and controlling method thereof | |
| US20210327033A1 (en) | Video processing method and apparatus, and computer storage medium | |
| CN110796662A (zh) | 一种实时的语义视频分割方法 | |
| WO2021107592A1 (en) | System and method for precise image inpainting to remove unwanted content from digital images | |
| WO2020231005A1 (ko) | 영상 처리 장치 및 그 동작방법 | |
| JP7787704B2 (ja) | 画像からシーンテキストを除去するための方法及びシステム | |
| CN116882511A (zh) | 机器学习方法以及设备 | |
| US20240338831A1 (en) | Method and apparatus for processing video | |
| CN115362481A (zh) | 运动模糊鲁棒图像特征描述符 | |
| Kim et al. | Enhancing video frame interpolation with region of motion loss and self-attention mechanisms: A dual approach to address large, nonlinear motions | |
| CN116524532B (zh) | 动作识别方法、装置、存储介质以及电子设备 | |
| WO2024014706A1 (ko) | 화질 개선을 수행하는 신경망 모델을 학습시키는 전자 장치 및 그 제어 방법 | |
| WO2024210337A1 (ko) | 동영상을 처리하는 방법 및 장치 | |
| WO2020138630A1 (en) | Display apparatus and image processing method thereof | |
| WO2019198900A1 (en) | Electronic apparatus and control method thereof | |
| KR20240149295A (ko) | 동영상을 처리하는 방법 및 이를 수행하는 장치 | |
| WO2023163494A1 (ko) | 전자 장치 및 그 제어 방법 | |
| WO2021100985A1 (en) | Electronic apparatus and control method thereof | |
| CN113763445A (zh) | 静态图像获取方法、系统和电子设备 | |
| CN101472054B (zh) | 加强数字视频的方法以及使用该方法的装置 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| ENP | Entry into the national phase |
Ref document number: 2024711109 Country of ref document: EP Effective date: 20240320 |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24711109 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |