KR102609572B1 - Device and method for predicting video and computer readable program for the same - Google Patents

Device and method for predicting video and computer readable program for the same Download PDF

Info

Publication number
KR102609572B1
KR102609572B1 KR1020220043017A KR20220043017A KR102609572B1 KR 102609572 B1 KR102609572 B1 KR 102609572B1 KR 1020220043017 A KR1020220043017 A KR 1020220043017A KR 20220043017 A KR20220043017 A KR 20220043017A KR 102609572 B1 KR102609572 B1 KR 102609572B1
Authority
KR
South Korea
Prior art keywords
movement
type
video
probability distribution
predicting
Prior art date
Application number
KR1020220043017A
Other languages
Korean (ko)
Other versions
KR20230076721A (en
KR102609572B9 (en
Inventor
김계영
문지환
Original Assignee
숭실대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 숭실대학교 산학협력단 filed Critical 숭실대학교 산학협력단
Publication of KR20230076721A publication Critical patent/KR20230076721A/en
Application granted granted Critical
Publication of KR102609572B1 publication Critical patent/KR102609572B1/en
Publication of KR102609572B9 publication Critical patent/KR102609572B9/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/14Picture signal circuitry for video frequency region
    • H04N5/144Movement detection
    • H04N5/145Movement estimation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

동영상 예측 장치, 방법 및 이를 위한 컴퓨터 판독가능 프로그램이 개시된다. 본 발명에 따른 동영상 예측 장치는, 동영상 프레임 내 적어도 하나 이상의 객체의 움직임을 예측하여 예측 동영상 프레임을 생성하는 동영상 예측 장치로서, 상기 객체의 시간에 따른 움직임을 분석하여 상기 객체의 움직임의 유형을 판단하는 객체 움직임 분석부, 상기 판단된 움직임의 유형에 따라 시간에 따른 움직임을 학습하고 객체 움직임을 예측하는 객체 움직임 예측부 및 기설정된 손실함수를 적용하여 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 손실함수 적용부를 포함한다. 따라서, 상술한 본 발명에 따르면, 통계적 확률분포와 시공간 변경에 따른 객체 이동 정보를 CNN-LSTM 방식을 사용하여 학습하고, MSE 와 옵티컬 플로우를 통한 손실을 계산하여 학습함으로써 비디오 예측 모델의 학습 효율성을 증진시킬 수 있다.A video prediction device, method, and computer readable program therefor are disclosed. A video prediction device according to the present invention is a video prediction device that generates a predicted video frame by predicting the movement of at least one object within a video frame, and determines the type of movement of the object by analyzing the movement of the object over time. an object motion analysis unit, an object motion prediction unit that learns movement over time according to the type of the determined motion and predicts the object motion, and a difference between the predicted object motion and the actual object motion by applying a preset loss function. It includes a loss function application section that determines . Therefore, according to the present invention described above, the statistical probability distribution and object movement information according to space-time changes are learned using the CNN-LSTM method, and the learning efficiency of the video prediction model is improved by calculating and learning the loss through MSE and optical flow. It can be promoted.

Description

동영상 예측 장치, 방법 및 이를 위한 컴퓨터 판독가능 프로그램{Device and method for predicting video and computer readable program for the same}Video prediction device, method, and computer readable program therefor {Device and method for predicting video and computer readable program for the same}

본 발명은 동영상 예측 장치, 방법 및 이를 위한 컴퓨터 판독가능 프로그램에 관한 것으로서, 보다 상세하게는, 동영상 프레임 내 적어도 하나 이상의 객체의 움직임을 예측하여 예측 동영상 프레임을 생성하는 동영상 예측 장치, 방법 및 이를 위한 컴퓨터 판독가능 프로그램이다.The present invention relates to a video prediction device, a method, and a computer-readable program therefor. More specifically, a video prediction device, a method, and a video prediction device for generating a predicted video frame by predicting the movement of at least one object in a video frame, and a computer-readable program therefor. It is a computer readable program.

영상 내 객체 탐지 및 분리하는 딥러닝 모델의 정확도가 점점 높아지고 있다. 이에 따라 자연스럽게 동영상과 딥러닝 모델을 결합하여 유의미한 정보를 얻으려는 연구가 활발해지고 있다. 이러한 연구를 동영상 예측(Video Prediction)으로 불리는데, 비정상적인 상황을 탐지하는 Abnormal Detection, 게임에서 강화학습과 DCNN(Deep Convolutional Neural Network)을 결합하여 게임을 학습하는 등의 여러 분야가 존재한다. The accuracy of deep learning models for detecting and separating objects in images is increasing. Accordingly, research to obtain meaningful information by combining video and deep learning models is becoming more active. This research is called video prediction, and there are several fields such as Abnormal Detection, which detects abnormal situations, and learning games by combining reinforcement learning and DCNN (Deep Convolutional Neural Network) in games.

특히, 동영상 예측 기술 중 동영상의 프레임을 학습하여 동영상이 끝난 시점 이후의 프레임을 생성하는 기술이 존재한다. 이러한 동영상 종료 시점 이후의 프레임 생성 기술은 다양하게 실생활에 도움을 줄 수 있다.In particular, among video prediction technologies, there is a technology that learns the frames of a video and generates frames after the video ends. This technology for creating frames after the end of a video can be helpful in various ways in real life.

예컨대, 범죄 현장에서 특정 물체에 가려져 CCTV 추적이 어려울 때 해당 시점 이후에 프레임을 생성하여 그 추적에 도움이 될 수 있고, 현시점 이후의 도로의 차량 혼잡도를 예측하여 혼잡하지 않은 도로로 운전자를 유도하는데 도움이 될 수 있다. 또한, 구름의 이동 경로 및 생성 소멸 정보를 예측하여 기후 변화 예측에 도움이 될 수 있다.For example, when it is difficult to track CCTV because it is obscured by a specific object at a crime scene, a frame can be created after that point to help with tracking, and it can help guide drivers to less congested roads by predicting the level of vehicle congestion on the road after the current point. This can be. Additionally, it can be helpful in predicting climate change by predicting cloud movement paths and creation/disappearance information.

그러나, 이러한 동영상 예측 기술은 시간의 흐름에 따른 영상 데이터를 학습하기 때문에 GPU 메모리 사용량이 많고 그 결과를 얻기까지 학습 시간이 길다는 단점이 있다. 또한, 얼굴인식, 객체 탐지 기술과 달리 그 연구기간이 길지 않기 때문에 프레임 내 객체의 동작 변화를 추적, 예측하는데 적합한 손실함수가 따로 존재하지 않는다는 문제점이 있다.However, because this video prediction technology learns video data over time, it has the disadvantage of requiring a lot of GPU memory and a long learning time to obtain the results. In addition, unlike face recognition and object detection technologies, the research period is not long, so there is a problem that there is no separate loss function suitable for tracking and predicting changes in the motion of objects within a frame.

한국 등록특허공보 제10-0802207호Korean Patent Publication No. 10-0802207

본 발명의 일 측면에 따르면, 객체의 시간에 따른 움직임의 유형을 판단하여 그 움직임의 유형에 따라 시간에 따른 움직임을 학습하고 다음 시간의 객체 움직임을 예측하며, 기설정된 손실함수를 적용하여 이렇게 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 동영상 예측 장치, 방법 및 이를 위한 컴퓨터 판독가능 프로그램을 제공하는데 그 목적이 있다.According to one aspect of the present invention, the type of movement of an object over time is determined, the movement over time is learned according to the type of movement, the object movement of the next time is predicted, and a preset loss function is applied to make this prediction. The purpose is to provide a video prediction device, method, and computer-readable program for determining the difference between object movement and actual object movement.

본 발명의 일 실시예에 따른 동영상 예측 장치는, 동영상 프레임 내 적어도 하나 이상의 객체의 움직임을 예측하여 예측 동영상 프레임을 생성하는 동영상 예측 장치로서, 상기 객체의 시간에 따른 움직임을 분석하여 상기 객체의 움직임의 유형을 판단하는 객체 움직임 분석부, 상기 판단된 움직임의 유형에 따라 시간에 따른 움직임을 학습하고 객체 움직임을 예측하는 객체 움직임 예측부 및 기설정된 손실함수를 적용하여 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 손실함수 적용부를 포함한다. A video prediction device according to an embodiment of the present invention is a video prediction device that generates a predicted video frame by predicting the movement of at least one object within a video frame, and analyzes the movement of the object over time to determine the movement of the object. An object motion analysis unit that determines the type of movement, an object motion prediction unit that learns movement over time and predicts object movement according to the type of the determined movement, and a preset loss function is applied to compare the predicted object movement and the actual object. It includes a loss function application unit that determines the difference between movements.

한편, 객체 움직임 분석부는, 시간에 따른 움직임의 통계적 확률분포가 일정한 통계적 정상성을 갖는 제 1 유형 또는, 시간에 따른 움직임의 통계적 확률분포가 불규칙한 통계적 비정상성을 갖는 제 2 유형으로 상기 객체의 움직임의 유형을 판단하는 것일 수 있다.Meanwhile, the object motion analysis unit determines the movement of the object in a first type in which the statistical probability distribution of movement over time has a certain statistical normality, or a second type in which the statistical probability distribution of movement over time has statistical abnormality that is irregular. It may be to determine the type of.

또한, 객체 움직임 예측부는, 상기 제 1 유형의 객체에 대해서는, 이전 시간의 움직임의 통계적 확률분포와 현재 시간의 통계적 확률분포에 기초하여 다음 시간의 확률분포를 예측함으로써 상기 제 1 유형의 객체의 움직임을 예측하고, 상기 제 2 유형의 객체에 대해서는, 이전 시간에 다음 프레임을 예측한 값과 현재 시간에 다음 프레임을 예측한 값 간의 차분 값을 기초로 상기 제 2 유형의 객체의 움직임의 통계적 확률분포의 특징값을 산출하고, 산출된 특징값을 학습하여 다음 시간의 통계적 확률분포를 예측함으로써 상기 제 2 유형의 객체의 움직임을 예측할 수 있다.In addition, the object motion prediction unit predicts the movement of the first type of object by predicting the probability distribution of the next time based on the statistical probability distribution of the movement of the previous time and the statistical probability distribution of the current time. Predicting, and for the second type of object, a statistical probability distribution of the movement of the second type of object based on the difference value between the value predicting the next frame at the previous time and the value predicting the next frame at the current time. The movement of the second type of object can be predicted by calculating feature values, learning the calculated feature values, and predicting the statistical probability distribution for the next time.

또한, 객체 움직임 분석부는 복수의 ST-LSTM(Spatio-Temporal Long Short-Term Memory) 셀들을 포함하는 단일의 ST-LSTM 계층으로 구성되며,각각의 상기 ST-LSTM 셀은 시간에 따른 동영상 프레임의 변화를 통계적 정상성과 통계적 비정상성으로 해석한 값을 나타내는 셀 상태 값과, 동영상에 대한 시공간적 정보를 분석한 값을 저장하는 이중 메모리 구조로 구성될 수 있다.In addition, the object motion analysis unit consists of a single ST-LSTM layer including a plurality of ST-LSTM (Spatio-Temporal Long Short-Term Memory) cells, and each ST-LSTM cell changes the video frame over time. It can be composed of a dual memory structure that stores cell state values representing values interpreted as statistical normality and statistical abnormality, and values analyzing spatiotemporal information about the video.

또한, 객체 움직임 예측부는, 복수의 MIM(Memory In Memory) 블록들을 포함하는 복수의 MIM 블록 계층으로 구성되며, 상기 각각의 MIM 블록은 ST-LSTM 셀로 구성되되, 상기 ST-LSTM 셀의 망각 게이트를 상기 제 1 유형의 객체의 움직임을 예측하기 위한 제 1 망각 게이트와 상기 제 2 유형의 객체의 움직임을 예측하기 위한 제 2 망각 게이트로 분리하여 구성하고, 상기 제 2 망각 게이트의 출력값이 상기 제 1 망각 게이트로 입력되도록 계단식 연산으로 구성할 수 있다.In addition, the object motion prediction unit is composed of a plurality of MIM block layers including a plurality of MIM (Memory In Memory) blocks, and each MIM block is composed of an ST-LSTM cell, and the forget gate of the ST-LSTM cell is It is divided into a first forgetting gate for predicting the movement of the first type of object and a second forgetting gate for predicting the movement of the second type of object, and the output value of the second forgetting gate is the first forgetting gate. It can be configured as a cascade operation to be input into the forget gate.

또한, 손실함수 적용부는, 예측된 동영상 프레임과 실제 동영상 프레임 간의 옵티컬 플로우(Optical Flow) 차이를 계산하고 이를 스칼라 형태의 손실로 변환한 옵티컬 플로우 손실과, MSE(Mean Square Error) 손실함수를 적용하여 계산한 MSE 손실을 가중치를 두고 합산하여 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 것일 수 있다. In addition, the loss function application unit calculates the difference in optical flow between the predicted video frame and the actual video frame, converts it into a scalar loss, and applies the optical flow loss and the MSE (Mean Square Error) loss function. The calculated MSE loss may be weighted and summed to determine the difference between the predicted object motion and the actual object motion.

본 발명의 다른 실시예에 따른 동영상 예측 방법은, 동영상 프레임 내 적어도 하나 이상의 객체의 움직임을 예측하여 예측 동영상 프레임을 생성하는 동영상 예측 장치에서의 동영상 예측 방법으로서, 객체 움직임 분석부에서 상기 객체의 시간에 따른 움직임을 분석하여 상기 객체의 움직임의 유형을 판단하는 단계, 객체 움직임 예측부에서 상기 판단된 움직임의 유형에 따라 시간에 따른 움직임을 학습하고 객체 움직임을 예측하는 단계 및 손실함수 적용부에서 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 단계를 포함한다.A video prediction method according to another embodiment of the present invention is a video prediction method in a video prediction device that generates a predicted video frame by predicting the movement of at least one object within a video frame, wherein the object motion analysis unit determines the time of the object. Analyzing the movement according to and determining the type of movement of the object, Learning the movement over time and predicting the object movement according to the type of the determined movement in the object motion prediction unit, and Predicting the object movement in the loss function application unit It includes determining the difference between the predicted object motion and the actual object motion.

한편, 객체의 움직임의 유형은, 시간에 따른 움직임의 통계적 확률분포가 일정한 통계적 정상성을 갖는 제 1 유형 또는, 시간에 따른 움직임의 통계적 확률분포가 불규칙한 통계적 비정상성을 갖는 제 2 유형을 포함할 수 있다.On the other hand, the type of movement of the object may include a first type in which the statistical probability distribution of movement over time has a constant statistical normality, or a second type in which the statistical probability distribution of movement over time has an irregular statistical abnormality. You can.

또한, 객체 움직임을 예측하는 단계는, 상기 제 1 유형의 객체에 대해서는, 이전 시간의 움직임의 통계적 확률분포와 현재 시간의 통계적 확률분포에 기초하여 다음 시간의 확률분포를 예측함으로써 제 1 유형의객체의 움직임을 예측하고, 상기 제 2 유형의 객체에 대해서는, 이전 시간에 다음 프레임을 예측한 값과 현재 시간에 다음 프레임을 예측한 값 간의 차분 값을 기초로 제 2 유형의 객체의 움직임의 통계적 확률분포의 특징값을 산출하고, 산출된 특징값을 학습하여 다음 시간의 통계적 확률분포를 예측함으로써 상기 제 2 유형의 객체의 움직임을 예측하는 것일 수 있다.In addition, the step of predicting object movement involves predicting the probability distribution of the next time based on the statistical probability distribution of movement of the previous time and the statistical probability distribution of the current time for the first type of object. Predicting the movement of, and for the second type of object, a statistical probability of movement of the second type of object based on the difference value between the value predicting the next frame at the previous time and the value predicting the next frame at the current time. The movement of the second type of object may be predicted by calculating feature values of the distribution, learning the calculated feature values, and predicting the statistical probability distribution for the next time.

또한, 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 단계는, 예측된 동영상 프레임과 실제 동영상 프레임 간의 옵티컬 플로우(Optical Flow) 차이를 계산하고 이를 스칼라 형태의 손실로 변환한 옵티컬 플로우 손실과, MSE(Mean Square Error) 손실함수를 적용하여 계산한 MSE 손실을 가중치를 두고 합산하여 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단할 수 있다.In addition, the step of determining the difference between the predicted object movement and the actual object movement involves calculating the optical flow difference between the predicted video frame and the actual video frame and converting it into a scalar loss. And, the MSE loss calculated by applying the MSE (Mean Square Error) loss function can be weighted and summed to determine the difference between the predicted object motion and the actual object motion.

또한, 본 발명의 또 다른 실시예는 동영상 예측 방법을 실행하도록 구성된, 컴퓨터로 판독가능한 기록매체에 저장된 프로그램을 포함할 수 있다.Additionally, another embodiment of the present invention may include a program stored in a computer-readable recording medium configured to execute a video prediction method.

상술한 본 발명에 따르면, 통계적 확률분포와 시공간 변경에 따른 객체 이동 정보를 CNN-LSTM 방식을 사용하여 학습하고, MSE 와 옵티컬 플로우를 통한 손실을 계산하여 학습함으로써 비디오 예측 모델의 학습 효율성을 증진시킬 수 있다.According to the present invention described above, object movement information according to statistical probability distribution and space-time changes is learned using the CNN-LSTM method, and the loss is calculated and learned through MSE and optical flow to improve the learning efficiency of the video prediction model. You can.

도 1은 본 발명의 일 실시예에 따른 동영상 예측 장치의 블록도이다.
도 2는 시간에 따른 객체의 움직임의 변화를 도시한 도면이다.
도 3은 도 1에 도시된 동영상 예측 장치의 구체적인 구성을 도시한 도면이다.
도 4는 도 3에 도시된 ST-LSTM 셀의 구체적인 구성을 도시한 도면이다.
도 5는 도 3에 도시된 MIM 블록의 구체적인 구성을 도시한 도면이다.
도 6은 도 5에 도시된 제 2 망각게이트의 구체적인 구성을 도시한 도면이다.
도 7은 도 5에 도시된 제 1 망각게이트의 구체적인 구성을 도시한 도면이다.
도 8은 예측된 동영상 프레임과 실제 동영상 프레임에서의 옵티컬 플로우의 예시를 도시한 도면이다.
도 9는 본 발명의 다른 실시예에 따른 동영상 예측 방법의 순서도이다.
1 is a block diagram of a video prediction device according to an embodiment of the present invention.
Figure 2 is a diagram showing changes in the movement of an object over time.
FIG. 3 is a diagram showing a specific configuration of the video prediction device shown in FIG. 1.
FIG. 4 is a diagram showing the specific configuration of the ST-LSTM cell shown in FIG. 3.
FIG. 5 is a diagram showing the specific configuration of the MIM block shown in FIG. 3.
FIG. 6 is a diagram showing the specific configuration of the second forgetting gate shown in FIG. 5.
FIG. 7 is a diagram showing the specific configuration of the first forgetting gate shown in FIG. 5.
Figure 8 is a diagram showing examples of optical flow in predicted video frames and actual video frames.
Figure 9 is a flowchart of a video prediction method according to another embodiment of the present invention.

후술하는 본 발명에 대한 상세한 설명은, 본 발명이 실시될 수 있는 특정 실시예를 예시로서 도시하는 첨부 도면을 참조한다. 이들 실시예는 당업자가 본 발명을 실시할 수 있기에 충분하도록 상세히 설명된다. 본 발명의 다양한 실시예는 서로 다르지만 상호 배타적일 필요는 없음이 이해되어야 한다. 예를 들어, 여기에 기재되어 있는 특정 형상, 구조 및 특성은 일 실시예와 관련하여 본 발명의 정신 및 범위를 벗어나지 않으면서 다른 실시예로 구현될 수 있다. 또한, 각각의 개시된 실시예 내의 개별 구성요소의 위치 또는 배치는 본 발명의 정신 및 범위를 벗어나지 않으면서 변경될 수 있음이 이해되어야 한다. 따라서, 후술하는 상세한 설명은 한정적인 의미로서 취하려는 것이 아니며, 본 발명의 범위는, 적절하게 설명된다면, 그 청구항들이 주장하는 것과 균등한 모든 범위와 더불어 첨부된 청구항에 의해서만 한정된다. 도면에서 유사한 참조부호는 여러 측면에 걸쳐서 동일하거나 유사한 기능을 지칭한다.The detailed description of the present invention described below refers to the accompanying drawings, which show by way of example specific embodiments in which the present invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention. It should be understood that the various embodiments of the invention are different from one another but are not necessarily mutually exclusive. For example, specific shapes, structures and characteristics described herein may be implemented in one embodiment without departing from the spirit and scope of the invention. Additionally, it should be understood that the location or arrangement of individual components within each disclosed embodiment may be changed without departing from the spirit and scope of the invention. Accordingly, the detailed description that follows is not intended to be taken in a limiting sense, and the scope of the invention is limited only by the appended claims, together with all equivalents to what those claims assert, if properly described. Similar reference numbers in the drawings refer to identical or similar functions across various aspects.

이하, 도면들을 참조하여 본 발명의 바람직한 실시예들을 보다 상세하게 설명하기로 한다.Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the drawings.

도 1은 본 발명의 일 실시예에 따른 동영상 예측 장치의 블록도이고, 도 2는 시간에 따른 객체의 움직임의 변화를 도시한 도면이며, 도 3은 도 1에 도시된 동영상 예측 장치의 구체적인 구성을 도시한 도면이고, 도 4는 도 3에 도시된 ST-LSTM 셀의 구체적인 구성을 도시한 도면이고, 도 5는 도 3에 도시된 MIM 블록의 구체적인 구성을 도시한 도면이며, 도 6은 도 5에 도시된 제 2 망각게이트의 구체적인 구성을 도시한 도면이고, 도 7은 도 5에 도시된 제 1 망각게이트의 구체적인 구성을 도시한 도면이며, 도 8은 예측된 동영상 프레임과 실제 동영상 프레임에서의 옵티컬 플로우의 예시를 도시한 도면이다.FIG. 1 is a block diagram of a video prediction device according to an embodiment of the present invention, FIG. 2 is a diagram showing a change in the movement of an object over time, and FIG. 3 is a specific configuration of the video prediction device shown in FIG. 1. is a diagram illustrating, FIG. 4 is a diagram illustrating a specific configuration of the ST-LSTM cell shown in FIG. 3, FIG. 5 is a diagram illustrating a specific configuration of the MIM block shown in FIG. 3, and FIG. 6 is a diagram illustrating a specific configuration of the ST-LSTM cell shown in FIG. 3. 5 is a diagram showing the specific configuration of the second forgetting gate, and FIG. 7 is a diagram showing the specific configuration of the first forgetting gate shown in FIG. 5, and FIG. 8 is a diagram showing the detailed configuration of the first forgetting gate shown in FIG. 5, and FIG. 8 shows the predicted video frame and the actual video frame. This is a diagram showing an example of optical flow.

본 실시예에 따른 동영상 예측 장치(100)는, 동영상 프레임 내 적어도 하나 이상의 객체의 움직임을 예측하여 예측 동영상 프레임을 생성하는 동영상 예측 장치(100)로서, 객체 움직임 분석부(110), 객체 움직임 예측부(120) 및 손실함수 적용부(130)를 포함할 수 있다The video prediction device 100 according to this embodiment is a video prediction device 100 that generates a predicted video frame by predicting the movement of at least one object in a video frame, and includes an object motion analysis unit 110 and object motion prediction. It may include a unit 120 and a loss function application unit 130.

먼저, 객체 움직임 분석부(110)는 객체의 시간에 따른 움직임을 분석하여 상기 객체의 움직임의 유형을 판단한다. First, the object motion analysis unit 110 analyzes the movement of the object over time and determines the type of movement of the object.

객체 움직임 분석부(110)는, 시간에 따른 움직임의 통계적 확률분포가 일정한 통계적 정상성을 갖는 제1 유형과, 시간에 따른 움직임의 통계적 확률분포가 불규칙한 통계적 비정상성을 갖는 제2 유형으로 상기 객체의 움직임의 유형을 판단한다. The object motion analysis unit 110 divides the object into a first type having statistical normality where the statistical probability distribution of movement over time is constant, and a second type having statistical abnormality where the statistical probability distribution of movement over time is irregular. Determine the type of movement.

여기서, 제1 유형은 도 2의 (a) 에서와 같이, 여러 시간 구간에 걸쳐 시간에 따른 동영상 프레임의 변화의 통계적 성질이 시간에 따라 변화하지 않는 객체 움직임의 유형을 의미한다. 즉, 제 1 유형은 시간에 따른 객체 움직임의 평균과 분산값이 일정하게 유지되는 움직임으로서, 객체의 움직임이 통계적 정상성을 갖는 유형을 의미한다. Here, the first type refers to a type of object movement in which the statistical properties of changes in video frames over time over several time intervals do not change over time, as shown in (a) of FIG. 2. That is, the first type is a movement in which the average and variance values of the object movement over time are kept constant, meaning a type in which the movement of the object has statistical normality.

또한, 제2 유형은 도 2의 (b) 내지 (f) 에서와 같이, 여러 시간 구간에 걸쳐 시간에 따른 동영상 프레임의 변화의 통계적 성질이 시간에 따라 일정하게 유지되지 않는 객체 움직임의 유형을 의미한다. 즉, 제2 유형은 시간에 따른 객체 움직임의 평균과 분산값이 불규칙하게 변화하는 움직임으로서, 객체의 움직임이 통계적 비정상성을 갖는 유형을 의미한다.In addition, the second type refers to a type of object movement in which the statistical properties of changes in video frames over time over several time intervals are not kept constant over time, as shown in (b) to (f) of FIG. 2. do. In other words, the second type is a movement in which the average and variance values of the object movement change irregularly over time, meaning a type in which the movement of the object has statistical abnormality.

예컨대, 이러한 제 2 유형의 움직임은 전체 시간에서 시간과 무관한 변화를 갖는 결정론적 추세 움직임, 분포가 변경되는 주기 움직임, 느리지만 꾸준한 변화를 갖는 확률 보행 움직임, 또는 이 세가지 움직임이 조합된 움직임을 가질 수 있다.For example, this second type of movement can be deterministic trend movement with time-independent changes throughout time, periodic movement with changing distributions, stochastic walking movement with slow but steady changes, or a combination of all three. You can have it.

먼저, 확률 보행 움직임은 아래 수학식 1 과 같이, 마지막 값에 백색 잡음인 확률적 구성요소를 더한 값으로 예측될 수 있다. First, the stochastic walking movement can be predicted as the final value plus the stochastic component, which is white noise, as shown in Equation 1 below.

[수학식 1][Equation 1]

여기서, 는 백색 잡음으로 정규 분포를 따르는 무작위 값으로 설정되는데, 이로써, 객체 움직임 분석부(110)는 분산이 시간에 지남에 따라 변화하는 확률 보행 움직임에 대해 임의의 보행을 예측할 수 없다. here, is set to a random value that follows a normal distribution as white noise. As a result, the object motion analysis unit 110 cannot predict random walking for probability walking movements whose variance changes over time.

또한, 아래 수학식 2 에서와 같이, 이동 상수가 존재하는 확률 보행 모델이 정의될 수 있으며, 이러한 확률 보행 모델은 확률 보행 움직임에 이동 상수(drift) 인 α 을 더한 값으로 예측하는 경우이다.In addition, as shown in Equation 2 below, a probability walking model in which a movement constant exists can be defined, and this probability walking model is predicted by adding α, which is a movement constant (drift), to the probability walking movement.

[수학식 2][Equation 2]

결정론적 추세 움직임은 마지막 시간에 따른 결과값이 아닌 시간에 따른 추세()에 따라 결정되는 움직임을 의미한다. 이러한 결정론적 추세 움직임은 시간에 독립적인 고정된 추세에 따라 변화하는 평균값을 갖으며, 아래 수학식 3 과 같이 표현될 수 있다.Deterministic trend movement is a trend over time (rather than the result over the last hour). ) refers to the movement determined according to the This deterministic trend movement has an average value that changes according to a fixed trend independent of time, and can be expressed as Equation 3 below.

[수학식 3][Equation 3]

마지막으로, 이러한 확률 보행 움직임과 결정론적 추세 움직임이 조합된 움직임이 아래 수학식 4 와 같이 정의될 수 있다.Lastly, the movement that combines this probability walking movement and deterministic trend movement can be defined as Equation 4 below.

[수학식 4][Equation 4]

상술한 바와 같이 객체 움직임의 유형을 분석하기 위해, 본 실시예에 따른 객체 움직임 분석부(110)는 도 3 에서와 같이, 복수의 ST-LSTM(Spatio-Temporal LSTM) 셀을 포함하는 단일의 ST-LSTM 계층으로 구성될 수 있다.In order to analyze the type of object movement as described above, the object motion analysis unit 110 according to the present embodiment uses a single ST including a plurality of ST-LSTM (Spatio-Temporal LSTM) cells, as shown in FIG. 3. -Can be composed of LSTM layers.

각각의 ST-LSTM 셀은 도 4 에서와 같이, 시간에 따른 동영상 프레임의 변화를 통계적 정상성과 통계적 비정상성으로 해석한 값을 나타내는 셀 상태 값()과 동영상에 대한 시공간적 정보를 분석한 값()을 저장하는 이중 메모리 구조(도 4 의 Standard Temporal Memory, Spatio-temporal Memory)로 구성될 수 있다. 이러한 셀 상태 값()은 이전 셀에서 이후 셀로 이동하며(도 3 의 점선 참조), 동영상에 대한 시공간적 정보를 분석한 값() 은 전방전파의 결과물로서, 지그재그 방식으로 전달(도 3 의 실선 참조)될 수 있다.As shown in FIG. 4, each ST-LSTM cell has a cell state value (cell state value ( ) and the value of analyzing the spatiotemporal information about the video ( ) may be configured with a dual memory structure (Standard Temporal Memory, Spatio-temporal Memory in FIG. 4). These cell state values ( ) moves from the previous cell to the next cell (see the dotted line in Figure 3), and is a value obtained by analyzing spatiotemporal information about the video ( ) is the result of forward propagation and can be transmitted in a zigzag manner (see solid line in FIG. 3).

한편, 동영상 내 객체의 움직임은 시공간에 대해 통계적 확률분포가 정상성을 갖기도 하고 비정상성을 갖기도 한다. 예컨대, 어떤 동영상에서 새가 일정한 속도로 날아간다고 가정했을 때, 새가 날아가는 속도는 통계적 확률분포가 정상성을 갖으나, 공간적인 관점에서 날개가 움직이는 것은 통계적 확률분포가 비정상성을 갖는다. 그러나, 기존의 CNN-LSTM 기반의 동영상 학습 모델은 날개의 움직임 같은 통계적 확률분포가 비정상성을 갖는 움직임에 대해 학습할 때 효과적이지 못하다. 이는, LSTM에서 망각 게이트가 작동할 때, 통계적 확률분포가 정상성을 갖는 움직임에 대해 먼저 기억하기 때문이다. 즉, LSTM 모델은 최대한 변화가 없는 방향으로 학습하려는 성향 때문에 변화가 많은 통계적 확률분포가 비정상성을 갖는 움직임에 대해서는 망각하는 것이다.Meanwhile, the movement of objects in a video may have normal or non-normal statistical probability distributions in space and time. For example, assuming that a bird flies at a constant speed in a video, the statistical probability distribution of the bird's flying speed is normal, but the statistical probability distribution of the wing movement from a spatial perspective is non-stationary. However, the existing CNN-LSTM-based video learning model is not effective when learning movements with non-stationary statistical probability distributions, such as wing movement. This is because when the forgetting gate operates in LSTM, it first remembers the movements in which the statistical probability distribution is stationary. In other words, because the LSTM model has a tendency to learn in a direction with as little change as possible, it forgets about movements that have non-stationarity in statistical probability distributions with many changes.

따라서, 본 실시예에 따른 동영상 예측 장치(100)는 객체 움직임 예측부(120)를 더 구비할 수 있다. 객체 움직임 예측부(120)는 객체 움직임 분석부(110)에서 판단된 객체의 움직임의 유형에 따라 분리하여 시간에 따른 움직임을 학습하고 다음 시간의 객체의 움직임을 예측한다.Accordingly, the video prediction device 100 according to this embodiment may further include an object motion prediction unit 120. The object motion prediction unit 120 separates the objects according to the type of movement determined by the object motion analysis unit 110, learns the movement over time, and predicts the object movement at the next time.

보다 구체적으로, 객체 움직임 예측부(120)는, 제 1 유형의 객체에 대해서는, 이전 시간의 움직임의 통계적 확률분포와 현재 시간의 통계적 확률분포에 기초하여 다음 시간의 확률분포를 예측함으로써 다음 시간의 객체의 움직임을 예측할 수 있다. 또한, 객체 움직임 예측부(120)는 제 2 유형의 객체에 대해서는, 이전 시간에 다음 프레임을 예측한 값과 현재 시간에 다음 프레임을 예측한 값 간의 차분 값을 기초로 해당 객체의 움직임의 통계적 확률분포의 특징값을 산출하고, 산출된 특징값을 학습하여 다음 시간의 통계적 확률분포를 예측함으로써 다음 시간의 객체의 움직임을 예측할 수 있다.More specifically, the object motion prediction unit 120 predicts the probability distribution of the next time for the first type of object based on the statistical probability distribution of the movement of the previous time and the statistical probability distribution of the current time, thereby predicting the probability distribution of the next time. The movement of objects can be predicted. In addition, for the second type of object, the object motion prediction unit 120 calculates the statistical probability of movement of the object based on the difference value between the value predicting the next frame at the previous time and the value predicting the next frame at the current time. The movement of an object at the next time can be predicted by calculating the characteristic value of the distribution, learning the calculated characteristic value, and predicting the statistical probability distribution for the next time.

이를 위해, 본 실시예에 따른 객체 움직임 예측부(120)는 도 3 에서와 같이, 복수의 MIM(Memory In Memory) 블록을 포함하는 복수의 MIM 블록 계층으로 구성될 수 있다. 또한, 각각의 MIM 블록은 도 5 에서와 같이, 기본적으로 ST-LSTM 셀로 구성되되, ST-LSTM 셀의 망각 게이트를 두 개의 계단식 연산을 사용하는 망각 게이트(MIM-N, MIM-S, 121,122)로 구성될 수 있다.To this end, the object motion prediction unit 120 according to the present embodiment may be composed of a plurality of MIM (Memory In Memory) block layers including a plurality of MIM (Memory In Memory) blocks, as shown in FIG. 3. In addition, as shown in Figure 5, each MIM block is basically composed of ST-LSTM cells, but the forgetting gate of the ST-LSTM cell is a forgetting gate (MIM-N, MIM-S, 121, 122) using two cascade operations. It can be composed of:

보다 구체적으로, 본 실시예에 따른 MIM 블록은 ST-LSTM 셀의 망각 게이트를 제 1 유형의 객체의 움직임을 예측하기 위한 제 1 망각 게이트(121)와 상기 제 2 유형의 객체의 움직임을 예측하기 위한 제 2 망각 게이트(122)로 분리하여 구성될 수 있고, 상기 제 2 망각 게이트(122)의 출력값이 상기 제 1 망각 게이트(121)로 입력되는 계단식 연산으로 구성될 수 있다.More specifically, the MIM block according to this embodiment includes a forget gate of an ST-LSTM cell, a first forget gate 121 for predicting the movement of a first type of object, and a first forgetting gate 121 for predicting the movement of the second type of object. It may be configured separately as a second forgetting gate 122, and may be configured as a cascade operation in which the output value of the second forgetting gate 122 is input to the first forgetting gate 121.

먼저, 제2 망각 게이트(122)는 도 6 에서와 같이, t-1번째 프레임을 입력으로 하는 학습 상태에서 번째 MIM 블록의 결과()와 t번째 프레임을 입력으로 하는 학습 상태에서 번째 MIM 블록의 결과()를 입력으로 하여 객체의 움직임의 통계적 확률분포(N)의 값을 저장하며 이를 다음 시간과 비교하여 학습을 진행한다. 이러한, 제 2 망각 게이트의 연산과정은 아래 수학식 5 를 따른다.First, the second forget gate 122 is in a learning state with the t-1th frame as input, as shown in FIG. 6. Result of the second MIM block ( ) and in a learning state with the tth frame as input Result of the second MIM block ( ) as input, the value of the statistical probability distribution (N) of the object's movement is stored, and learning is performed by comparing this with the next time. The calculation process of the second forget gate follows Equation 5 below.

[수학식 5][Equation 5]

제 2 망각게이트(122)는 의 차분연산을 통해 t-1 에서 t 로 시간이 흐를 때 프레임 내 발생하는 객체의 움직임의 비정상적 통계적 확률분포 (N)의 특징값을 산출하고 이를 학습한다. 즉, 제 2 망각게이트(122)는 의 차분연산으로 얻어지는 특징값()을 산출하고, 이를 통해 다음 시간의 비정상적 통계적 확률분포를 예측함으로써 다음 시간의 객체의 움직임을 예측할 수 있다. The second forgetting gate 122 is class Through the difference operation of , the characteristic value of the abnormal statistical probability distribution (N) of the movement of the object that occurs within the frame as time passes from t-1 to t is calculated and learned. That is, the second forgetting gate 122 is class Feature values obtained by the difference operation of ( ), and by predicting the abnormal statistical probability distribution for the next time through this, the movement of the object for the next time can be predicted.

한편, 제 1 망각게이트(121)는 도 7 에서와 같이, 제 2 망각게이트(122)의 출력(), 직전시간 셀상태()를 입력으로 하여 객체의 움직임의 통계적 확률분포(S)를 저장하며 이를 기초로 다음 시간의 객체의 움직임의 정상적 통계적 확률분포를 예측한다. 이러한, 제1 망각게이트(121)의 연산과정은 아래 수학식 6 을 따른다.Meanwhile, as shown in FIG. 7, the first forget gate 121 outputs the output of the second forget gate 122 ( ), cell status at the previous time ( ) as input to store the statistical probability distribution (S) of the object's movement, and based on this, predict the normal statistical probability distribution of the object's movement at the next time. The calculation process of the first forget gate 121 follows Equation 6 below.

[수학식 6][Equation 6]

즉, 제 1 망각게이트(121)는 직전 및 현재시간의 프레임의 정상적 통계적 확률분포()와, 제 2 망각게이트(122)의 출력(), 직전시간 셀상태()를 기초로 다음 시간의 확률분포를 예측한다. That is, the first forgetting gate 121 is a normal statistical probability distribution ( ), and the output of the second forgetting gate 122 ( ), cell status at the previous time ( ), predict the probability distribution for the next time based on

이렇게 계단식으로 연결된 제 1 망각게이트(121)와 제 2 망각게이트(122)는 객체의 움직임에 있어 비정상적 통계적 확률분포가 유망한 값을 가지면, 현재 갖고 있는 정보를 재사용하고 그렇지 않으면 기존의 망각 게이트로서의 역할을 수행하여 비정상적 통계적 확률분포의 변화를 포착할 수 있다. 이러한 제 1 망각게이트(121) 및 제 2 망각게이트(122)를 포함하는 MIM 블록(120)의 전체 연산과정은 아래 수학식 7 과 같이 정의될 수 있다.The first forgetting gate 121 and the second forgetting gate 122, connected in a cascade manner, reuse the information they currently have if the abnormal statistical probability distribution in the movement of the object has a promising value, and otherwise act as the existing forgetting gate. You can capture changes in abnormal statistical probability distributions by performing . The entire calculation process of the MIM block 120 including the first forget gate 121 and the second forget gate 122 can be defined as Equation 7 below.

[수학식 7][Equation 7]

여기서, , 은 도 5 의 input modulation gate 로서, input gate 에 비선형성을 추가하여 학습이 효율적으로 진행되게 하는 구성이고, , , 은 각각 도 5 의 input gate, forget gate 이다. 또한, 는 다음 프레임을 예측한 값이고, 는 동영상의 확률분포정보 값이며, 은 프레임들에 대한 변환정보 값이다. here, , is the input modulation gate in Figure 5, which is a configuration that allows learning to proceed efficiently by adding non-linearity to the input gate, , , are the input gate and forget gate of Figure 5, respectively. also, is the predicted value for the next frame, is the probability distribution information value of the video, is the conversion information value for the frames.

즉, 제 1 및 제 2 망각게이트(121,122)를 갖는 MIM 블록으로 구성된 객체 움직임 예측부(120)는 다음 프레임을 예측한 값(H), 동영상의 확률분포정보(C) 및 프레임들에 대한 변환정보(M)를 연결하여 tanh 연산을 통해 비선형성을 추가하고 전달함으로써, 통계적 확률분포가 정상성 및 비정상성을 갖는 객체의 움직임을 효율적으로 학습할 뿐만 아니라 시간에 따른 영상 정보의 변환과정도 학습할 수 있는 것이다. That is, the object motion prediction unit 120 composed of MIM blocks with first and second forgetting gates 121 and 122 predicts the next frame (H), probability distribution information (C) of the video, and transforms the frames. By connecting information (M) and adding and transmitting non-linearity through the tanh operation, not only can the movement of objects with normal and non-normal statistical probability distributions be efficiently learned, but also the conversion process of image information over time. It can be done.

손실함수 적용부(130)는 기설정된 손실함수를 적용하여 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단한다. The loss function application unit 130 determines the difference between the predicted object movement and the actual object movement by applying a preset loss function.

한편, 종래의 동영상 예측 모델에서는 학습 과정에서 예측한 프레임과 실제 프레임 간의 차이를 완전히 설명할 수 있는 손실함수가 존재하지 않는다. 또한, 시간의 흐름에 따라 변화하는 영상 데이터는 학습 시 필요한 메모리 공간이 클 뿐 아니라 컨볼루션 연산시 필요한 파라미터와 역전파시 계산해야하는 변수가 많은 문제점을 갖는다.Meanwhile, in conventional video prediction models, there is no loss function that can completely explain the difference between the frames predicted during the learning process and the actual frames. In addition, image data that changes over time not only requires a large memory space for learning, but also has many parameters needed for convolution calculations and variables that must be calculated during backpropagation.

따라서, 본 실시예에 다른 손실함수 적용부(130)는 옵티컬 플로우 손실을 손실함수에 추가하여 예측된 프레임과 실제 프레임 사이의 차이, 즉, 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단한다.Therefore, in this embodiment, the loss function application unit 130 adds the optical flow loss to the loss function and determines the difference between the predicted frame and the actual frame, that is, the difference between the predicted object motion and the actual object motion. .

보다 구체적으로, 손실함수 적용부(130)는 먼저 현재 시간의 프레임에서 다음 시간의 프레임으로 이동했을 때 발생하는 광학 흐름을 계산한다. 손실함수 적용부(130)는 t 시간의 프레임에서 t+1 시간의 프레임으로 이동했을 때 발생하는 x,y 축의 변경인 2차원 벡터 값을 산출할 수 있으며, 그 예시적 결과는 도 8 과 같다. 도 8 에 따르면, 도 8 의 (a) 는 t 에서 t+1 시간 사이에서 발생한 예측된 프레임의 옵티컬 플로우 결과를 벡터로 표현한 결과이며, 도 8 의 (b) 는 t 에서 t+1 시간 사이에서 발생한 실제 프레임의 옵티컬 플로우 결과를 벡터로 표현한 결과이다.More specifically, the loss function application unit 130 first calculates the optical flow that occurs when moving from the current time frame to the next time frame. The loss function application unit 130 can calculate a two-dimensional vector value that is the change in the x and y axes that occurs when moving from the t time frame to the t+1 time frame, and an example result is shown in FIG. 8. . According to FIG. 8, (a) in FIG. 8 is a vector representation of the optical flow result of the predicted frame occurring between time t and t+1, and (b) in FIG. 8 is the result of expressing the optical flow result of the predicted frame occurring between time t and t+1. This is the result of expressing the optical flow result of the actual frame that occurred as a vector.

손실함수 적용부(130)는, 예측된 동영상 프레임과 실제 동영상 프레임 간의 옵티컬 플로우(Optical Flow) 차이를 계산하고 이를 스칼라 형태의 손실로 변환한 옵티컬 플로우 손실을 얻을 수 있다.The loss function application unit 130 may calculate the optical flow difference between the predicted video frame and the actual video frame and obtain the optical flow loss by converting it into a scalar loss.

보다 구체적으로, 손실함수 적용부(130)는 예측된 프레임 상에서 시간의 흐름에 따라 발생한 옵티컬 플로우(, )와 실제 프레임 상에서 시간의 흐름에 따라 발생한 옵티컬 플로우(, )를 상호 비교하여 이들 간의 차이를 아래 수학식 8 에 따라 스칼라 형태로 변환함으로써 최종적인 옵티컬 플로우 손실()을 얻을 수 있다.More specifically, the loss function application unit 130 calculates the optical flow (optical flow) that occurred over time in the predicted frame. , ) and the optical flow that occurred over time on the actual frame ( , ) are compared with each other and the difference between them is converted to a scalar form according to Equation 8 below to obtain the final optical flow loss ( ) can be obtained.

[수학식 8][Equation 8]

손실함수 적용부(130)는 옵티컬 플로우 손실과 MSE(Mean Square Error) 손실을 결합하여 전체 손실을 얻을 수 있다. 보다 구체적으로, 손실함수 적용부(130)는 옵티컬 플로우 손실()과 MSE(Mean Square Error) 손실()을 아래 수학식 9 에서와 같이, 가중치를 두고 합산하여 전체 손실()을 산출할 수 있다. 이때, 각각의 가중치(, )의 합은 1 이 될 수 있다.The loss function application unit 130 can obtain the total loss by combining the optical flow loss and the MSE (Mean Square Error) loss. More specifically, the loss function application unit 130 applies optical flow loss ( ) and MSE (Mean Square Error) loss ( ) are weighted and summed as in Equation 9 below to obtain the total loss ( ) can be calculated. At this time, each weight ( , ) can be 1.

[수학식 9][Equation 9]

이로써, 실제로 관측되어야 할 이동 방향과 예측한 이동 방향의 차이를 통해 영상 내 객체가 움직이는 속도와 방향을 알 수 있게 되어 학습 효율성과 속도가 증대될 수 있다. As a result, the speed and direction of movement of objects in the image can be known through the difference between the direction of movement that should actually be observed and the direction of movement that is predicted, thereby increasing learning efficiency and speed.

도 9 는 본 발명의 다른 실시예에 따른 동영상 예측 방법의 순서도이다.Figure 9 is a flowchart of a video prediction method according to another embodiment of the present invention.

본 실시예에 따른 동영상 예측 방법은, 동영상 프레임 내 적어도 하나 이상의 객체의 움직임을 예측하여 예측 동영상 프레임을 생성하는 동영상 예측 장치에서의 동영상 예측 방법으로서, 객체 움직임 분석부에서 상기 객체의 시간에 따른 움직임을 분석하여 상기 객체의 움직임의 유형을 판단하는 단계(S10), 객체 움직임 예측부에서 상기 판단된 움직임의 유형에 따라 시간에 따른 움직임을 학습하고 객체 움직임을 예측하는 단계(S20) 및 손실함수 적용부에서 기설정된 손실함수를 적용하여 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 단계(S30)를 포함한다.The video prediction method according to this embodiment is a video prediction method in a video prediction device that generates a predicted video frame by predicting the movement of at least one object in a video frame, wherein the object motion analysis unit moves the object over time. Analyzing and determining the type of movement of the object (S10), Learning the movement over time and predicting the object movement according to the type of the determined movement in the object motion prediction unit (S20), and Applying a loss function It includes a step (S30) of determining the difference between the predicted object motion and the actual object motion by applying a loss function preset in the unit.

한편, 객체의 움직임의 유형은, 시간에 따른 움직임의 통계적 확률분포가 일정한 통계적 정상성을 갖는 제 1 유형 또는 시간에 따른 움직임의 통계적 확률분포가 불규칙한 통계적 비정상성을 갖는 제 2 유형을 포함할 수 있다.On the other hand, the type of movement of the object may include a first type in which the statistical probability distribution of the movement over time has a certain statistical normality, or a second type in which the statistical probability distribution of the movement over time has an irregular statistical abnormality. there is.

또한, 객체 움직임을 예측하는 단계(S20)는, 상기 제 1 유형의 객체에 대해서는, 이전 시간의 움직임의 통계적 확률분포와 현재 시간의 통계적 확률분포에 기초하여 다음 시간의 확률분포를 예측함으로써 제 1 유형의객체의 움직임을 예측하고, 상기 제 2 유형의 객체에 대해서는, 이전 시간에 다음 프레임을 예측한 값과 현재 시간에 다음 프레임을 예측한 값 간의 차분 값을 기초로 제 2 유형의객체의 움직임의 통계적 확률분포의 특징값을 산출하고, 산출된 특징값을 학습하여 다음 시간의 통계적 확률분포를 예측함으로써 제 2 유형의객체의 움직임을 예측하는 것일 수 있다.In addition, the step of predicting object movement (S20) is to predict the probability distribution of the next time for the first type of object based on the statistical probability distribution of the movement of the previous time and the statistical probability distribution of the current time, thereby predicting the first type of object. Predicting the movement of a tangible object, and for the second type of object, the movement of the second type of object based on the difference value between the value predicting the next frame at the previous time and the value predicting the next frame at the current time. The movement of the second type of object may be predicted by calculating the characteristic value of the statistical probability distribution, learning the calculated characteristic value, and predicting the statistical probability distribution for the next time.

또한, 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 단계(S30)는, 예측된 동영상 프레임과 실제 동영상 프레임 간의 옵티컬 플로우(Optical Flow) 차이를 계산하고 이를 스칼라 형태의 손실로 변환한 옵티컬 플로우 손실과, MSE(Mean Square Error) 손실함수를 적용하여 계산한 MSE 손실을 가중치를 두고 합산하여 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 것일 수 있다.In addition, the step of determining the difference between the predicted object motion and the actual object motion (S30) involves calculating the optical flow difference between the predicted video frame and the actual video frame and converting it into a scalar loss. The optical flow loss and the MSE (Mean Square Error) loss calculated by applying the MSE (Mean Square Error) loss function may be weighted and added to determine the difference between the predicted object movement and the actual object movement.

상술한 본 발명에 따르면, 통계적 확률분포와 시공간 변경에 따른 객체 이동 정보를 CNN-LSTM 방식을 사용하여 학습하고, MSE 와 옵티컬 플로우를 통한 손실을 계산하여 학습함으로써 비디오 예측 모델의 학습 효율성을 증진시킬 수 있다. According to the present invention described above, object movement information according to statistical probability distribution and space-time changes is learned using the CNN-LSTM method, and the loss is calculated and learned through MSE and optical flow to improve the learning efficiency of the video prediction model. You can.

이상에서 설명한 실시예들에 따른 동영상 예측 방법에 의한 동작은 적어도 부분적으로 컴퓨터 프로그램으로 구현되고 컴퓨터로 읽을 수 있는 기록매체에 기록될 수 있다. 실시예들에 따른 동영상 예측 방법에 의한 동작을 구현하기 위한 프로그램이 기록되고 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광 데이터 저장장치 등이 있다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산 방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수도 있다. 또한, 본 실시예를 구현하기 위한 기능적인 프로그램, 코드 및 코드 세그먼트(segment)들은 본 실시예가 속하는 기술 분야의 통상의 기술자에 의해 용이하게 이해될 수 있을 것이다.The operation of the video prediction method according to the embodiments described above may be at least partially implemented as a computer program and recorded on a computer-readable recording medium. Computer-readable recording media on which programs for implementing operations by the video prediction method according to embodiments are recorded include all types of recording devices that store data that can be read by a computer. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices. Additionally, computer-readable recording media may be distributed across computer systems connected to a network, and computer-readable codes may be stored and executed in a distributed manner. Additionally, functional programs, codes, and code segments for implementing this embodiment can be easily understood by those skilled in the art to which this embodiment belongs.

이상에서는 실시예들을 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although the above has been described with reference to embodiments, those skilled in the art will understand that various modifications and changes can be made to the present invention without departing from the spirit and scope of the present invention as set forth in the following patent claims. You will be able to.

110: 객체 움직임 분석부
120: 객체 움직임 예측부
121: 제 1 망각 게이트
121: 제 2 망각 게이트
130: 손실함수 적용부
110: Object movement analysis unit
120: Object motion prediction unit
121: First Oblivion Gate
121: Second Oblivion Gate
130: Loss function application unit

Claims (11)

동영상 프레임 내 적어도 하나 이상의 객체의 움직임을 예측하여 예측 동영상 프레임을 생성하는 동영상 예측 장치로서,
상기 객체의 시간에 따른 움직임을 분석하여 상기 객체의 움직임의 유형을 판단하는 객체 움직임 분석부;
상기 판단된 움직임의 유형에 따라 시간에 따른 움직임을 학습하고 객체 움직임을 예측하는 객체 움직임 예측부; 및
기설정된 손실함수를 적용하여 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 손실함수 적용부를 포함하고,
상기 손실함수 적용부는,
예측된 동영상 프레임과 실제 동영상 프레임 간의 옵티컬 플로우(Optical Flow) 차이를 계산하고 이를 스칼라 형태의 손실로 변환한 옵티컬 플로우 손실과,
MSE(Mean Square Error) 손실함수를 적용하여 계산한 MSE 손실을 가중치를 두고 합산하여 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하고,
상기 손실함수 적용부는,
상기 예측된 동영상 프레임 상에서 시간의 흐름에 따라 발생한 옵티컬 플로우와 상기 실제 동영상 프레임 상에서 시간의 흐름에 따라 발생한 옵티컬 플로우를 상호 비교하여 이들 간의 차이를 스칼라 형태로 변환함으로써 최종적인 옵티컬 플로우 손실을 얻는 것인, 동영상 예측 장치.
A video prediction device that generates a predicted video frame by predicting the movement of at least one object within a video frame,
an object motion analysis unit that determines the type of movement of the object by analyzing the movement of the object over time;
an object motion prediction unit that learns motion over time and predicts object motion according to the determined type of motion; and
A loss function application unit that determines the difference between the predicted object movement and the actual object movement by applying a preset loss function,
The loss function application part is,
An optical flow loss obtained by calculating the difference in optical flow between the predicted video frame and the actual video frame and converting it into a scalar loss,
The MSE loss calculated by applying the MSE (Mean Square Error) loss function is weighted and summed to determine the difference between the predicted object movement and the actual object movement,
The loss function application part is,
The final optical flow loss is obtained by comparing the optical flow that occurred over time on the predicted video frame and the optical flow that occurred over time on the actual video frame and converting the difference between them into a scalar form. , video prediction device.
제 1 항에 있어서,
상기 객체 움직임 분석부는,
시간에 따른 움직임의 통계적 확률분포가 일정한 통계적 정상성을 갖는 제 1 유형 또는
시간에 따른 움직임의 통계적 확률분포가 불규칙한 통계적 비정상성을 갖는 제 2 유형으로 상기 객체의 움직임의 유형을 판단하는, 동영상 예측 장치.
According to claim 1,
The object movement analysis unit,
A first type in which the statistical probability distribution of movement over time has a certain statistical normality, or
A video prediction device for determining the type of movement of the object as a second type having statistical abnormality in which the statistical probability distribution of movement over time is irregular.
제 2 항에 있어서,
상기 객체 움직임 예측부는,
상기 제 1 유형의 객체에 대해서는, 이전 시간의 움직임의 통계적 확률분포와 현재 시간의 통계적 확률분포에 기초하여 다음 시간의 확률분포를 예측함으로써 상기 제 1 유형의 객체의 움직임을 예측하고,
상기 제 2 유형의 객체에 대해서는, 이전 시간에 다음 프레임을 예측한 값과 현재 시간에 다음 프레임을 예측한 값 간의 차분 값을 기초로 상기 제 2 유형의 객체의 움직임의 통계적 확률분포의 특징값을 산출하고, 상기 산출된 특징값을 학습하여 다음 시간의 통계적 확률분포를 예측함으로써 상기 제 2 유형의 객체의 움직임을 예측하는, 동영상 예측 장치.
According to claim 2,
The object motion prediction unit,
For the first type of object, predict the movement of the first type of object by predicting the probability distribution of the next time based on the statistical probability distribution of the movement of the previous time and the statistical probability distribution of the current time,
For the second type of object, the characteristic value of the statistical probability distribution of the movement of the second type of object is based on the difference value between the value predicting the next frame at the previous time and the value predicting the next frame at the current time. A video prediction device that predicts the movement of the second type of object by calculating and learning the calculated feature values to predict the statistical probability distribution of the next time.
제 3 항에 있어서,
상기 객체 움직임 분석부는 복수의 ST-LSTM(Spatio-Temporal LSTM) 셀들을 포함하는 단일의 ST-LSTM 계층으로 구성되며,
상기 각각의 ST-LSTM 셀은 시간에 따른 동영상 프레임의 변화를 통계적 정상성과 통계적 비정상성으로 해석한 값을 나타내는 셀 상태 값과, 동영상에 대한 시공간적 정보를 분석한 값을 저장하는 이중 메모리 구조로 구성되는, 동영상 예측 장치.
According to claim 3,
The object motion analysis unit consists of a single ST-LSTM layer including a plurality of ST-LSTM (Spatio-Temporal LSTM) cells,
Each ST-LSTM cell is composed of a dual memory structure that stores a cell state value representing a value that interprets changes in video frames over time as statistical normality and statistical abnormality, and a value that analyzes spatiotemporal information about the video. A video prediction device.
제 4 항에 있어서,
상기 객체 움직임 예측부는,
복수의 MIM(Memory In Memory) 블록들을 포함하는 복수의 MIM 블록 계층으로 구성되며,
상기 각각의 MIM 블록은 ST-LSTM 셀로 구성되되, 상기 ST-LSTM 셀의 망각 게이트를 상기 제 1 유형의 객체의 움직임을 예측하기 위한 제 1 망각 게이트와 상기 제 2 유형의 객체의 움직임을 예측하기 위한 제 2 망각 게이트로 분리하여 구성하고, 상기 제 2 망각 게이트의 출력값이 상기 제 1 망각 게이트로 입력되도록 계단식 연산으로 구성하는, 동영상 예측 장치.
According to claim 4,
The object motion prediction unit,
It consists of a plurality of MIM block layers including a plurality of MIM (Memory In Memory) blocks,
Each MIM block is composed of an ST-LSTM cell, and a forgetting gate of the ST-LSTM cell is used to predict the movement of the first type of object and a first forgetting gate to predict the movement of the second type of object. A video prediction device that is divided into a second forgetting gate and configured by a cascade operation so that the output value of the second forgetting gate is input to the first forgetting gate.
삭제delete 동영상 프레임 내 적어도 하나 이상의 객체의 움직임을 예측하여 예측 동영상 프레임을 생성하는 동영상 예측 장치에서의 동영상 예측 방법으로서,
객체 움직임 분석부에서 상기 객체의 시간에 따른 움직임을 분석하여 상기 객체의 움직임의 유형을 판단하는 단계;
객체 움직임 예측부에서 상기 판단된 움직임의 유형에 따라 시간에 따른 움직임을 학습하고 객체 움직임을 예측하는 단계; 및
손실함수 적용부에서 기설정된 손실함수를 적용하여 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 단계를 포함하고,
상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하는 단계는,
예측된 동영상 프레임과 실제 동영상 프레임 간의 옵티컬 플로우(Optical Flow) 차이를 계산하고 이를 스칼라 형태의 손실로 변환한 옵티컬 플로우 손실과,
MSE(Mean Square Error) 손실함수를 적용하여 계산한 MSE 손실을 가중치를 두고 합산하여 상기 예측된 객체 움직임과 실제 객체 움직임 사이의 차이를 판단하고,
상기 손실함수 적용부는,
상기 예측된 동영상 프레임 상에서 시간의 흐름에 따라 발생한 옵티컬 플로우와 상기 실제 동영상 프레임 상에서 시간의 흐름에 따라 발생한 옵티컬 플로우를 상호 비교하여 이들 간의 차이를 스칼라 형태로 변환함으로써 최종적인 옵티컬 플로우 손실을 얻는 것인, 동영상 예측 방법.
A video prediction method in a video prediction device that generates a predicted video frame by predicting the movement of at least one object within a video frame, comprising:
Analyzing the movement of the object over time in an object motion analysis unit to determine the type of movement of the object;
Learning movement over time and predicting object movement according to the determined type of movement in an object motion prediction unit; and
Applying a preset loss function in a loss function application unit to determine the difference between the predicted object movement and the actual object movement,
The step of determining the difference between the predicted object movement and the actual object movement is,
An optical flow loss obtained by calculating the difference in optical flow between the predicted video frame and the actual video frame and converting it into a scalar loss,
The MSE loss calculated by applying the MSE (Mean Square Error) loss function is weighted and summed to determine the difference between the predicted object movement and the actual object movement,
The loss function application part is,
The final optical flow loss is obtained by comparing the optical flow that occurred over time on the predicted video frame and the optical flow that occurred over time on the actual video frame and converting the difference between them into a scalar form. ,Video prediction method.
제 7 항에 있어서,
상기 객체의 움직임의 유형은,
시간에 따른 움직임의 통계적 확률분포가 일정한 통계적 정상성을 갖는 제 1 유형 또는
시간에 따른 움직임의 통계적 확률분포가 불규칙한 통계적 비정상성을 갖는 제 2 유형을 포함하는, 동영상 예측 방법.
According to claim 7,
The type of movement of the object is,
A first type in which the statistical probability distribution of movement over time has a certain statistical normality, or
A video prediction method comprising a second type having statistical non-stationarity in which the statistical probability distribution of motion over time is irregular.
제 8 항에 있어서,
상기 객체 움직임을 예측하는 단계는,
상기 제 1 유형의 객체에 대해서는, 이전 시간의 움직임의 통계적 확률분포와 현재 시간의 통계적 확률분포에 기초하여 다음 시간의 확률분포를 예측함으로써 상기 제 1 유형의 객체의 움직임을 예측하고,
상기 제 2 유형의 객체에 대해서는, 이전 시간에 다음 프레임을 예측한 값과 현재 시간에 다음 프레임을 예측한 값 간의 차분 값을 기초로 제 2 유형의 객체의 움직임의 통계적 확률분포의 특징값을 산출하고, 상기 산출된 특징값을 학습하여 다음 시간의 통계적 확률분포를 예측함으로써 상기 제 2 유형의 객체의 움직임을 예측하는 것인, 동영상 예측 방법.
According to claim 8,
The step of predicting the object movement is,
For the first type of object, predict the movement of the first type of object by predicting the probability distribution of the next time based on the statistical probability distribution of the movement of the previous time and the statistical probability distribution of the current time,
For the second type of object, calculating the characteristic value of the statistical probability distribution of the movement of the second type of object based on the difference value between the value predicting the next frame at the previous time and the value predicting the next frame at the current time. and predicting the movement of the second type of object by learning the calculated feature values and predicting the statistical probability distribution of the next time.
삭제delete 제 7 항에 기재된, 동영상 예측 방법을 실행하도록 구성된, 컴퓨터로 판독가능한 기록매체에 저장된 프로그램.
A program stored on a computer-readable recording medium, configured to execute the video prediction method according to claim 7.
KR1020220043017A 2021-11-24 2022-04-06 Device and method for predicting video and computer readable program for the same KR102609572B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020210163478 2021-11-24
KR20210163478 2021-11-24

Publications (3)

Publication Number Publication Date
KR20230076721A KR20230076721A (en) 2023-05-31
KR102609572B1 true KR102609572B1 (en) 2023-12-05
KR102609572B9 KR102609572B9 (en) 2024-02-08

Family

ID=86543314

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220043017A KR102609572B1 (en) 2021-11-24 2022-04-06 Device and method for predicting video and computer readable program for the same

Country Status (1)

Country Link
KR (1) KR102609572B1 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100802207B1 (en) 2006-07-18 2008-02-11 연세대학교 산학협력단 Prediction method and encoder for motion estimation of video
MX2021011367A (en) * 2019-03-19 2021-11-12 Huawei Tech Co Ltd Optical flow based video inter prediction.

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Yunbo Wang ET AL, Memory In Memory: A Predictive Neural Network for Learning Higher-Order Non-Stationarity from Spatiotemporal Dynamics, CVPR, 21 April 2019(2019.04.21.) 1부.*
Yunbo Wang ET AL, PredRNN: A Recurrent Neural Network for Spatiotemporal Predictive Learning, <URL : https://arxiv.org/abs/2103.09504v3>, 26 Aug. 2021(2021.08.26.) 1부.*

Also Published As

Publication number Publication date
KR20230076721A (en) 2023-05-31
KR102609572B9 (en) 2024-02-08

Similar Documents

Publication Publication Date Title
US11816585B2 (en) Machine learning models operating at different frequencies for autonomous vehicles
Mozaffari et al. Early lane change prediction for automated driving systems using multi-task attention-based convolutional neural networks
Khakzar et al. A dual learning model for vehicle trajectory prediction
KR102212217B1 (en) Autonomous vehicle for preventing collisions effectively, apparatus and method for controlling the autonomous vehicle
Baydoun et al. Learning switching models for abnormality detection for autonomous driving
KR20190098106A (en) Batch normalization layer training method
Hu et al. A framework for probabilistic generic traffic scene prediction
KR101720781B1 (en) Apparatus and method for prediction of abnormal behavior of object
KR20190095200A (en) Apparatus and method for recognizing object in image
Neitz et al. Adaptive skip intervals: Temporal abstraction for recurrent dynamical models
CN110737968A (en) Crowd trajectory prediction method and system based on deep convolutional long and short memory network
US20110044492A1 (en) Adaptive voting experts for incremental segmentation of sequences with prediction in a video surveillance system
Wiederer et al. Anomaly detection in multi-agent trajectories for automated driving
KR20210078256A (en) Fault diagnosis device and method for optimizing fault diagnosis model
KR102609572B1 (en) Device and method for predicting video and computer readable program for the same
Hua et al. Freeway traffic speed prediction under the intelligent driving environment: a deep learning approach
Dan Spatial-temporal block and LSTM network for pedestrian trajectories prediction
Kumar et al. C-FAR: A compositional framework for anomaly resolution in intelligent transportation systems
CN115908593A (en) Encoding and decoding method, device and related equipment
CN115222769A (en) Trajectory prediction method, device and agent
Chen et al. Romanus: Robust task offloading in modular multi-sensor autonomous driving systems
US20220058313A1 (en) Information processing apparatus, and control method
Singh et al. A Directed Graph and GRUs Based Trajectory Forecasting of Intelligent and Automated Transportation System for Consumer Electronics
CN117273225B (en) Pedestrian path prediction method based on space-time characteristics
JP7092312B2 (en) Plane data processing device, plane data processing method and plane data processing program

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
G170 Re-publication after modification of scope of protection [patent]