KR20230095845A - Video anomaly detection method and apparatus therefor - Google Patents

Video anomaly detection method and apparatus therefor Download PDF

Info

Publication number
KR20230095845A
KR20230095845A KR1020220179366A KR20220179366A KR20230095845A KR 20230095845 A KR20230095845 A KR 20230095845A KR 1020220179366 A KR1020220179366 A KR 1020220179366A KR 20220179366 A KR20220179366 A KR 20220179366A KR 20230095845 A KR20230095845 A KR 20230095845A
Authority
KR
South Korea
Prior art keywords
feature map
frame
module
attention
applying
Prior art date
Application number
KR1020220179366A
Other languages
Korean (ko)
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 KR20230095845A publication Critical patent/KR20230095845A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/52Surveillance or monitoring of activities, e.g. for recognising suspicious objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4092Image resolution transcoding, e.g. by using client-server architectures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local 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
    • G06V10/443Local 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 by matching or filtering
    • G06V10/449Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters
    • G06V10/451Biologically inspired filters, e.g. difference of Gaussians [DoG] or Gabor filters with interaction between the filter responses, e.g. cortical complex cells
    • G06V10/454Integrating the filters into a hierarchical structure, e.g. convolutional neural networks [CNN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/62Extraction of image or video features relating to a temporal dimension, e.g. time-based feature extraction; Pattern tracking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/7715Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/80Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level
    • G06V10/806Fusion, i.e. combining data from various sources at the sensor level, preprocessing level, feature extraction level or classification level of extracted features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/46Extracting features or characteristics from the video content, e.g. video fingerprints, representative shots or key frames
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/49Segmenting video sequences, i.e. computational techniques such as parsing or cutting the sequence, low-level clustering or determining units such as shots or scenes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Image Analysis (AREA)

Abstract

비디오 이상 감지 방법 및 그 장치가 개시된다. 비디오 이상 감지 장치는 각 비디오 프레임들을 기학습된 주의 기반 오토 인코더 모델에 적용하여 이전 프레임들의 공간 관련 특징과 시간 관련 특징이 반영된 예측 프레임을 생성하는 예측 프레임 생성부; 및 상기 예측 프레임에 대한 이상 점수(anomaly score)를 계산하여 이상 이벤트를 검출하는 이상 상황 검출부를 포함한다. A video anomaly detection method and apparatus are disclosed. The apparatus for detecting an anomaly in video includes a predictive frame generating unit for generating a prediction frame in which spatial and temporal characteristics of previous frames are reflected by applying a pre-learned attention-based autoencoder model to each video frame; and an anomaly situation detector detecting an anomaly event by calculating an anomaly score for the prediction frame.

Description

비디오 이상 감지 방법 및 그 장치{Video anomaly detection method and apparatus therefor}Video anomaly detection method and apparatus therefor}

본 발명은 비디오 이상 감지 방법 및 그 장치에 관한 것이다. The present invention relates to a video anomaly detection method and apparatus therefor.

비디오 감시의 이상 감지는 교통 사고 감지, 범죄 활동 감지 또는 불법 활동 감지와 같은 다양한 응용 프로그램으로 인해 컴퓨터 비전에서 널리 사용되는 연구 영역이다. 그러나 방대한 정상 상황에서 비정상적인 활동을 감지하는 것은 어려운 일이다. Anomaly detection in video surveillance is a popular research area in computer vision due to its diverse applications such as traffic accident detection, criminal activity detection or illegal activity detection. However, it is difficult to detect abnormal activity in the vast majority of normal situations.

이러한 방대한 양의 감시 영상을 사람이 직접 보고 분석하는 것은 매우 많은 시간을 필요로 하며, 비효율적이기 때문에 감시 영상의 이상 이벤트를 분석하고 탐지하기 위한 자동 이상 탐지 시스템은 필수적이다. Since it takes a lot of time and is inefficient for a person to directly view and analyze such a large amount of surveillance images, an automatic anomaly detection system for analyzing and detecting abnormal events in surveillance images is essential.

비디오에서 프레임 수진 이상 감지의 목표는 다른 공간 및 움직임 정보를 포함하는 프레임을 식별하는 것으로, 일반적인 이벤트의 일반적인 분포만을 학습하도록 훈련된 이상 감지 모델의 경우 이상으로 보이지 않는 이벤트나 활동을 구별할 수 없는 단점이 있다. The goal of detecting frame anomalies in video is to identify frames that contain other spatial and motion information, and for anomaly detection models trained to learn only the normal distribution of typical events, cannot distinguish events or activities that do not appear to be anomalies. There are downsides.

종래 기술은 공간 스트림과 시간 스트림을 포함하는 2-스트림 네트워크를 사용하나, 이는 광학 흐름 추출을 위하 추가적인 계산을 필요로 하는 단점이 있다. The prior art uses a two-stream network comprising a spatial stream and a temporal stream, but it has the disadvantage of requiring additional calculations for optical flow extraction.

다른 종래 기술로는 Variational LSTM과 같은 순환 신경망을 사용하나, 이는 스택 레이어의 수가 증가할수록 모델이 복잡해지는 단점이 있다. Another conventional technique uses a recurrent neural network such as Variational LSTM, but this has a disadvantage in that the model becomes more complicated as the number of stack layers increases.

본 발명은 비디오 이상 감지 방법 및 그 장치를 제공하기 위한 것이다. An object of the present invention is to provide a video anomaly detection method and apparatus therefor.

또한, 본 발명은 주의 기반 오토 인코더를 이용하여 공간 관련 특징과 시간 관련 특징을 활용함으로써 실시간 비디오 이상 감지가 가능한 비디오 이상 감지 방법 및 그 장치를 제공하기 위한 것이다. In addition, the present invention is to provide a video anomaly detection method and apparatus capable of real-time video anomaly detection by utilizing spatial-related features and time-related features using an attention-based auto-encoder.

본 발명의 일 측면에 따르면 비디오 이상 감지 장치가 제공된다.According to one aspect of the present invention, a video anomaly detection device is provided.

본 발명의 일 실시예에 따르면, 각 비디오 프레임들을 기학습된 주의 기반 오토 인코더 모델에 적용하여 이전 프레임들의 공간 관련 특징과 시간 관련 특징이 반영된 예측 프레임을 생성하는 예측 프레임 생성부; 및 상기 예측 프레임에 대한 이상 점수(anomaly score)를 계산하여 이상 이벤트를 검출하는 이상 상황 검출부를 포함하는 비디오 이상 감지 장치가 제공될 수 있다. According to an embodiment of the present invention, a predictive frame generating unit generating prediction frames in which spatial and temporal characteristics of previous frames are reflected by applying a pre-learned attention-based auto-encoder model to each video frame; and an anomaly detection unit configured to detect an anomaly event by calculating an anomaly score for the prediction frame.

상기 주의 기반 오토 인코더 모델은, 상기 각 비디오 프레임들에서 다중 해상도를 가지는 특징맵을 각각 추출하는 심층 합성곱 신경망 모듈; 상기 심층 합성곱 신경망 모듈을 통해 복수의 입력 프레임들에 상응하여 각각 추출된 특징맵들을 집계하여 공간 관련 특징맵을 생성하는 공간 분기 모듈; 상기 심층 합성곱 신경망 모듈에서 출력된 현재 프레임의 특징맵 일부를 시프트(shift)연산하여 이전 프레임과 결합하여 시간 관련 특징맵을 생성하는 시간 분기 모듈; 및 상기 공간 관련 특징맵과 상기 시간 관련 특징맵을 결합(combine)하여 결합 특징맵을 생성하는 결합 모듈을 포함하는 인코더 모듈을 포함할 수 있다.The attention-based autoencoder model includes a deep convolutional neural network module for extracting feature maps having multiple resolutions from each of the video frames; a spatial branching module generating a spatially related feature map by aggregating feature maps extracted respectively corresponding to a plurality of input frames through the deep convolutional neural network module; a time branching module generating a time-related feature map by performing a shift operation on a part of the feature map of the current frame output from the deep convolutional neural network module and combining it with a previous frame; and an encoder module including a combining module generating a combined feature map by combining the spatial feature map and the temporal feature map.

상기 주의 기반 오토 인코더 모델은, 상기 결합 특징맵 또는 이전 디코딩 블록의 특징맵을 디컨볼루션하여 복원하는 복수의 디코딩 블록; 및 상기 각 디코딩 블록 후단에 배치되며, 각 디코딩 블록의 출력값에 채널 어텐션 연산을 적용하는 복수의 채널 어텐션 모듈을 포함하는 디코더 모듈을 더 포함하되, 상기 디코더 모듈은 상기 각 채널 어텐션 모듈의 출력값과 동일 공간 해상도를 가지는 추출하는 심층 합성곱 신경망 모듈의 특징맵의 특징맵과 결합된 후 업샘플링되어 다음 디코딩 블록으로 전달할 수 있다.The attention-based auto-encoder model may include a plurality of decoding blocks for restoring the combined feature map or a feature map of a previous decoding block by deconvolution; and a decoder module including a plurality of channel attention modules disposed after each decoding block and applying a channel attention operation to an output value of each decoding block, wherein the decoder module has the same output value as the output value of each channel attention module. After being combined with the feature map of the deep convolutional neural network module that extracts with spatial resolution, it can be upsampled and transmitted to the next decoding block.

상기 주의 기반 오토 인코더 모델은 정상 상황 프레임들로 기학습될 수 있다. The attention-based autoencoder model may be pre-learned with normal situation frames.

상기 이상 점수는 하기 수학식을 이용하여 계산되되,The ideal score is calculated using the following equation,

Figure pat00001
Figure pat00001

여기서,

Figure pat00002
이며, I는 실제 프레임을 나타내고,
Figure pat00003
는 예측 프레임을 나타내며, N는 프레임의 행과 열의 픽셀 개수를 나타내며,
Figure pat00004
Figure pat00005
의 최대값을 나타내고,
Figure pat00006
Figure pat00007
는 비디오 시퀀스에서 PSNR의 최소값과 최대값을 각각 나타낸다. here,
Figure pat00002
, I denotes a real frame,
Figure pat00003
denotes the prediction frame, N denotes the number of pixels in the row and column of the frame,
Figure pat00004
Is
Figure pat00005
represents the maximum value of
Figure pat00006
class
Figure pat00007
Represents the minimum and maximum values of PSNR in a video sequence, respectively.

본 발명의 다른 측면에 따르면, 비디오 이상 감지 방법이 제공될 수 있다.According to another aspect of the present invention, a video anomaly detection method may be provided.

본 발명의 일 실시예에 따르면, (a) 각 비디오 프레임들을 기학습된 주의 기반 오토 인코더 모델에 적용하여 이전 프레임들의 공간 관련 특징과 시간 관련 특징이 반영된 예측 프레임을 생성하는 단계; 및 (b) 상기 예측 프레임에 대한 이상 점수(anomaly score)를 계산하여 이상 이벤트를 검출하는 단계를 포함하는 비디오 이상 감지 방법이 제공될 수 있다. According to an embodiment of the present invention, (a) applying each video frame to a pre-learned attention-based auto-encoder model to generate a prediction frame in which spatial and temporal characteristics of previous frames are reflected; and (b) detecting an anomaly event by calculating an anomaly score for the prediction frame.

상기 (a) 단계는 인코딩 단계를 포함하되, 상기 인코딩 단계는, 상기 각 비디오 프레임들을 심층 합성곱 신경망 모듈에 적용하여 다중 공간 해상도를 가지는 복수의 특징맵을 각각 추출하는 단계; 상기 심층 합성곱 신경망 모듈에서 최종 출력된 특징맵을 두개의 브랜치로 전달함으로써, 제1 브랜치를 통해 상기 심층 합성곱 신경망 모듈을 통해 복수의 입력 프레임들에 상응하여 각각 추출된 특징맵들을 집계하여 공간 관련 특징맵을 생성하고, 제2 브랜치를 통해 상기 심층 합성곱 신경망 모듈에서 출력된 현재 프레임의 특징맵 일부를 시프트(shift)연산하여 이전 프레임과 결합하여 시간 관련 특징맵을 생성하는 단계; 및 상기 공간 관련 특징맵과 상기 시간 관련 특징맵을 결합(combine)하여 결합 특징맵을 생성하는 단계를 포함할 수 있다.The step (a) includes an encoding step, wherein the encoding step includes extracting a plurality of feature maps having multi-spatial resolutions by applying each of the video frames to a deep convolutional neural network module; By passing the feature maps finally output from the deep convolutional neural network module to two branches, feature maps extracted respectively corresponding to a plurality of input frames through the deep convolutional neural network module through the first branch are aggregated and space generating a related feature map, shifting a part of the feature map of the current frame output from the deep convolutional neural network module through a second branch, and combining it with a previous frame to generate a temporal feature map; and generating a combined feature map by combining the spatial feature map and the temporal feature map.

상기 (a) 단계는, 디코딩 단계를 더 포함하되, 하향식 계층 구조를 가지는 복수의 디코더 사이에 위치되며, 전단에 위치된 디코더의 출력값에 1 x 1 컨볼루션 연산을 적용하여 차원을 축소한 후 ReLU 활성화 함수를 적용하고 1 x 1 컨볼루션 연산을 적용하여 제1 중간 결과값을 생성하고, 상기 제1 중간 결과값에 전역 풀링 연산을 적용한 후 1 x 1 컨볼루션 연산을 적용하여 차원을 축소한 후 ReLU 활성화 함수를 적용하고 1 x 1 컨볼루션 연산을 적용한 후 시그모이드 함수를 적용한 제2 중간 결과값을 생성하고, 상기 제1 중간 결과값과 상기 제2 중간 결과값을 요소별 곱셈한 후 상기 전단에 위치된 디코더의 출력값과 합산하여 잔여 채널 어텐션 맵을 생성하는 단계; 및 상기 심층 합성곱 신경망 모듈에서 출력되는 동일 공간 해상도를 가지는 특징맵과 상기 잔여 채널 어텐션맵을 요소합 연산한 결과를 디코더에 적용하여 디컨볼루션 연산 결과를 출력하는 단계를 포함하되, 상기 디코더 중 최상위 계층 디코더는 상기 결합 특징맵을 디컨볼루션 연산할 수 있다. The step (a) further includes a decoding step, which is located between a plurality of decoders having a top-down hierarchical structure, and reduces the dimension by applying a 1 x 1 convolution operation to the output value of the decoder located at the previous stage, and then ReLU. An activation function is applied, a 1 x 1 convolution operation is applied to generate a first intermediate result value, a global pooling operation is applied to the first intermediate result value, and a dimension is reduced by a 1 x 1 convolution operation applied. After applying the ReLU activation function, applying the 1 x 1 convolution operation, and then applying the sigmoid function, a second intermediate result value is generated, the first intermediate result value and the second intermediate result value are multiplied element by element, and then the generating a residual channel attention map by summing the output values of the decoders located at the previous stage; and outputting a deconvolution operation result by applying a result of element sum operation of the feature map having the same spatial resolution output from the deep convolutional neural network module and the residual channel attention map to a decoder, The highest layer decoder may perform deconvolution on the combined feature map.

상기 (a) 단계 이전에, 정상 상황 프레임들을 이용하여 상기 주의 기반 오토 인코더 모델을 사전 학습하는 단계를 더 포함할 수 있다. Prior to step (a), the method may further include pre-learning the attention-based autoencoder model using normal situation frames.

본 발명의 일 실시예에 따른 비디오 이상 감지 방법 및 그 장치를 제공함으로써, 주의 기반 오토 인코더 모델을 이용하여 공간 관련 특징과 시간 관련 특징을 활용함으로써 실시간 비디오 이상 감지가 가능케 할 수 있다. By providing a video anomaly detection method and apparatus according to an embodiment of the present invention, it is possible to detect video anomalies in real time by utilizing spatial-related features and temporal-related features using an attention-based autoencoder model.

도 1은 본 발명의 일 실시예에 따른 비디오 이상 감지 장치를 개략적으로 도시한 블록도.
도 2는 본 발명의 일 실시예에 따른 주의 기반 오토 인코더 모델을 도시한 도면.
도 3은 본 발명의 일 실시예에 따른 시간 분기 모듈을 설명하기 위해 도시한 도면.
도 4는 본 발명의 일 실시예에 따른 잔여 채널 어텐션 모듈을 설명하기 위해 도시한 도면.
도 5는 본 발명의 일 실시예에 따른 대표적인 이상 검출 데이터 세트에 대한 공간, 시간 및 어텐션 컴포넌트 구성에 따른 성능을 비교한 결과.
도 6은 인코더 설계시 주축이 되는 RESNET 에서 가장 성능이 우수한 네트워크를 비교한 결과.
도 7은 종래와 본 발명의 일 실시예에 따른 비디오 이상 이벤트 검출 성능을 비교한 결과.
도 8은 본 발명의 일 실시예에 따른 비디오 이상 감지 방법을 나타낸 순서도.
1 is a block diagram schematically illustrating an apparatus for detecting an anomaly in video according to an embodiment of the present invention;
2 is a diagram illustrating an attention-based autoencoder model according to an embodiment of the present invention;
3 is a diagram illustrating a time branching module according to an embodiment of the present invention;
4 is a diagram for explaining a residual channel attention module according to an embodiment of the present invention;
5 is a result of comparing performance according to spatial, temporal, and attention component configurations for a representative anomaly detection data set according to an embodiment of the present invention.
6 is a result of comparing the networks with the best performance in RESNET, which is the main axis in encoder design.
7 is a comparison result of abnormal video event detection performance according to an embodiment of the present invention and the conventional one.
8 is a flowchart illustrating a video anomaly detection method according to an embodiment of the present invention.

본 명세서에서 사용되는 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "구성된다" 또는 "포함한다" 등의 용어는 명세서상에 기재된 여러 구성 요소들, 또는 여러 단계들을 반드시 모두 포함하는 것으로 해석되지 않아야 하며, 그 중 일부 구성 요소들 또는 일부 단계들은 포함되지 않을 수도 있고, 또는 추가적인 구성 요소 또는 단계들을 더 포함할 수 있는 것으로 해석되어야 한다. 또한, 명세서에 기재된 "...부", "모듈" 등의 용어는 적어도 하나의 기능이나 행동을 처리하는 단위를 의미하며, 이는 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다.Singular expressions used herein include plural expressions unless the context clearly dictates otherwise. In this specification, terms such as "consisting of" or "comprising" should not be construed as necessarily including all of the various components or steps described in the specification, and some of the components or some of the steps It should be construed that it may not be included, or may further include additional components or steps. In addition, terms such as "...unit" and "module" described in the specification mean a unit that processes at least one function or action, which may be implemented as hardware or software or a combination of hardware and software. .

이하, 첨부된 도면들을 참조하여 본 발명의 실시예를 상세히 설명한다. Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예에 따른 비디오 이상 감지 장치를 개략적으로 도시한 블록도이고, 도 2는 본 발명의 일 실시예에 따른 주의 기반 오토 인코더 모델을 도시한 도면이고, 도 3은 본 발명의 일 실시예에 따른 시간 분기 모듈을 설명하기 위해 도시한 도면이며, 도 4는 본 발명의 일 실시예에 따른 잔여 채널 어텐션 모듈을 설명하기 위해 도시한 도면이고, 도 5는 본 발명의 일 실시예에 따른 대표적인 이상 검출 데이터 세트에 대한 공간, 시간 및 어텐션 컴포넌트 구성에 따른 성능을 비교한 결과이며, 도 6은 인코더 설계시 주축이 되는 RESNET 에서 가장 성능이 우수한 네트워크를 비교한 결과이고, 도 7은 종래와 본 발명의 일 실시예에 따른 비디오 이상 이벤트 검출 성능을 비교한 결과이다. 1 is a block diagram schematically showing an apparatus for detecting an anomaly in video according to an embodiment of the present invention, FIG. 2 is a diagram showing an attention-based auto-encoder model according to an embodiment of the present invention, and FIG. It is a diagram shown to explain a time branching module according to an embodiment of the present invention, FIG. 4 is a diagram shown to explain a residual channel attention module according to an embodiment of the present invention, and FIG. This is a result of comparing the performance according to spatial, temporal and attention component configurations for a representative anomaly detection data set according to the embodiment. FIG. 7 is a result of comparing video anomaly event detection performance according to an embodiment of the present invention and the conventional one.

도 1을 참조하면, 본 발명의 일 실시예에 따른 비디오 이상 감지 장치(100)는 학습부(110), 예측 프레임 생성부(120), 이상 감지부(130), 메모리(140) 및 프로세서(150)를 포함하여 구성된다. Referring to FIG. 1 , an apparatus 100 for detecting an anomaly in video according to an embodiment of the present invention includes a learning unit 110, a predicted frame generation unit 120, an anomaly detection unit 130, a memory 140, and a processor ( 150).

학습부(110)는 테스트 데이터 세트를 이용하여 주의 기반 오토 인코더 모델을 학습하기 위한 수단이다. 주의 기반 오토 인코더 모듈의 동작에 대해서는 예측 프레임 생성부(120)에서 보다 상세히 설명하기로 한다. The learning unit 110 is a means for learning an attention-based auto-encoder model using a test data set. The operation of the attention-based auto-encoder module will be described in more detail in the prediction frame generator 120.

예측 프레임 생성부(120)는 주의 기반 오토 인코더 모델을 가지되, 기학습된 주의 기반 오토 인코더 모델에 비디오 시퀀스(프레임들)을 입력한 후 예측된 프레임을 생성하기 위한 수단이다. The predictive frame generating unit 120 has an attention-based auto-encoder model, and is a means for generating a predicted frame after inputting a video sequence (frames) to the pre-learned attention-based auto-encoder model.

이러한, 주의 기반 오토 인코더 모델의 상세 구조는 도 2에 도시된 바와 같다. 주의 기반 오토 인코더 모델은 인코더 모듈(210)과 디코더 모듈(250)을 포함하여 구성된다. The detailed structure of this attention-based autoencoder model is as shown in FIG. 2 . The attention-based autoencoder model includes an encoder module 210 and a decoder module 250.

이러한 인코더 모듈(210)은 입력 프레임들을 분석하여 특징맵을 추출한다. The encoder module 210 extracts a feature map by analyzing input frames.

인코더 모듈(210)은 도 2에 도시된 바와 같이, 심층 합성곱 신경망 모듈(212), 공간 분기 모듈(214), 시간 분기 모듈(216) 및 결합 모듈(218)을 포함하여 구성된다. As shown in FIG. 2 , the encoder module 210 includes a deep convolutional neural network module 212 , a spatial divergence module 214 , a temporal divergence module 216 and a combination module 218 .

심층 합성곱 신경망 모듈(212)은 t개의 프레임 시퀀스에서 서로 다른 해상도를 가지는 복수의 특징맵을 각각 추출할 수 있다. 편의상 제1 특징맵, 제2 특징맵 및 제3 특징맵이라 칭하기로 한다. 즉, 심층 합성곱 신경망 모듈(212)은 계층 구조를 가지는 서로 다른 해상도를 가지는 복수의 특징맵을 추출할 수 있다. The deep convolutional neural network module 212 may extract a plurality of feature maps having different resolutions from t frame sequences, respectively. For convenience, they will be referred to as a first feature map, a second feature map, and a third feature map. That is, the deep convolutional neural network module 212 may extract a plurality of feature maps having a hierarchical structure and different resolutions.

심층 합성곱 신경망 모듈(212)에서 추출된 최종 특징맵은 공간 분기 모듈(214)과 시간 분기 모듈(216)로 각각 입력될 수 있다. 나머지 특징맵은 디코더 모듈(250)의 동일 해상도 레벨의 디코더 블록으로 각각 전달될 수 있다. The final feature map extracted from the deep convolutional neural network module 212 may be input to the spatial branching module 214 and the temporal branching module 216, respectively. The remaining feature maps may be transferred to decoder blocks of the same resolution level of the decoder module 250, respectively.

공간 분기 모듈(214)은 심층 합성곱 신경망 모듈(212)에서 출력된 특징맵을 분석하여 공간상에 존재하는 객체의 공간적 특징을 추출할 수 있다. 즉, 공간 분기 모듈(214)은 여러 입력 프레임에 걸쳐 입력 프레임의 추출된 특징맵을 연결하여 공간 관련 특징맵을 추출할 수도 있다. 즉, 공간 분기 모듈(214)은 심층 합성곱 신경망 모델(212)에서 추출한 특징맵을 여러 프레임에 걸쳐 집계할 수 있다. 계산 복잡성을 줄이기 위해 결합된 특징맵에 1 x 1 컨볼루션을 적용하여 집계된 특징맵에 많은 수의 채널이 포함되어 있으므로 채널 수를 줄일 수 있다. The spatial divergence module 214 may analyze the feature map output from the deep convolutional neural network module 212 to extract spatial features of objects existing in space. That is, the spatial branching module 214 may extract a spatially related feature map by concatenating extracted feature maps of input frames over several input frames. That is, the spatial branching module 214 may aggregate the feature maps extracted from the deep convolutional neural network model 212 over several frames. In order to reduce the computational complexity, the number of channels can be reduced since the aggregated feature map contains a large number of channels by applying a 1 x 1 convolution to the combined feature maps.

시간 분기 모듈(216)은 비디오 이상 탐지 프로세스에서 시간 정보를 활용하기 위해 시간 시프팅(temporal shifting)을 적용한다. 즉, 시간 분기 모듈(216)은 심층 합성곱 신경망 모듈(212)에서 출력된 특징맵에 시프트(shift) 연산을 적용하여 시간 관련 특징맵을 추출한다. The temporal branching module 216 applies temporal shifting to utilize temporal information in the video anomaly detection process. That is, the time branching module 216 extracts a time-related feature map by applying a shift operation to the feature map output from the deep convolutional neural network module 212 .

도 3을 참조하여 이에 대해 보다 상세히 설명하기로 한다. This will be described in more detail with reference to FIG. 3 .

도 3에 도시된 바와 같이, 시간 분기 모듈(216)은 채널의 일부를 다음 프레임으로 이동시킨다. 이때, 채널의 나머지 부분은 그대로 유지될 수 있다. 이로 인해, 현재 프레임의 특징맵이 이전 프레임의 특징맵과 결합될 수 있다. As shown in Figure 3, time branching module 216 moves a portion of the channel to the next frame. At this time, the remaining part of the channel may be maintained as it is. Accordingly, the feature map of the current frame may be combined with the feature map of the previous frame.

따라서, 입력 특징맵

Figure pat00008
의 시간 관련 특징맵은 수학식 1과 같이 계산될 수 있다. Thus, the input feature map
Figure pat00008
The time-related feature map of can be calculated as in Equation 1.

Figure pat00009
Figure pat00009

여기서,

Figure pat00010
는 시프트 연산을 나타낸다. here,
Figure pat00010
represents a shift operation.

도 3을 참조하여 설명하면, 입력 특징맵이 4개의 특징맵(

Figure pat00011
)으로 구성되는 것을 가정하기로 한다. 현재 프레임의 채널 일부는 다음 프레임으로 시프트될 수 있다. 즉, 프레임
Figure pat00012
의 채널 일부는 프레임
Figure pat00013
의 일부로 대체될 수 있다. Referring to FIG. 3, the input feature map is composed of four feature maps (
Figure pat00011
) is assumed to be composed of. Some of the channels in the current frame may be shifted to the next frame. i.e. the frame
Figure pat00012
Some of the channels in the frame
Figure pat00013
may be replaced by a part of

결합 모듈(218)은 공간 분기 모듈(214)과 시간 분기 모듈(216)의 공간 관련 특징맵과 시간 관련 특징맵을 결합하여 결합 특징맵을 디코더 모듈(250)로 전달한다. The combining module 218 combines the spatial-related feature maps and temporal-related feature maps of the spatial branching module 214 and the temporal branching module 216 and transmits the combined feature map to the decoder module 250 .

이를 수학식으로 나타내면, 수학식 2와 같다. If this is expressed as an equation, it is the same as equation (2).

Figure pat00014
Figure pat00014

여기서,

Figure pat00015
는 시간 관련 특징맵을 나타내고,
Figure pat00016
는 공간 관련 특징맵을 나타낸다. here,
Figure pat00015
Represents a time-related feature map,
Figure pat00016
denotes a spatially related feature map.

결합 모듈(218)에서 출력된 최종 특징맵은 디코더 모듈(250)로 전달된다. The final feature map output from the combining module 218 is transferred to the decoder module 250.

디코더 모듈(250)은 인코더 모듈(210)에서 전달된 최종 특징맵에 대해 디컨볼루션을 적용하여 예측 프레임을 생성하기 위한 수단이다. 디코더 모듈(250)는 하향식 계층 구조를 가지는 복수의 디코더 블록(252a ~ 252c)을 가지되, 각 디코더 블록은 동일 공간 해상도를 가지는 인코더 모듈에서 추출된 특징맵과 이전 디코더 블록의 결과를 결합하고, 이를 디컨볼루션할 수 있다. 이에 대해서는 하기에서 보다 상세히 설명하기로 한다. The decoder module 250 is a means for generating a prediction frame by applying deconvolution to the final feature map transmitted from the encoder module 210. The decoder module 250 has a plurality of decoder blocks 252a to 252c having a top-down hierarchical structure, and each decoder block combines the feature map extracted from the encoder module having the same spatial resolution with the result of the previous decoder block, You can deconvolve it. This will be described in more detail below.

인코더 모듈(210)의 출력은 디코더 모듈(250)의 입력으로 사용된다. The output of the encoder module 210 is used as the input of the decoder module 250.

결합된 특징맵은 예측 프레임의 세부 정보와 공간 해상도를 복원하기 위해 디코더 모듈(250)로 전달될 수 있다. The combined feature map may be passed to the decoder module 250 to reconstruct detailed information and spatial resolution of the prediction frame.

디코더 모듈(250)은 서로 다른 해상도를 가지는 복수의 디코더 블록(252a ~ 252c)과 복수의 채널 어텐션 모듈(254a ~ 254c)로 구성된다. The decoder module 250 includes a plurality of decoder blocks 252a to 252c having different resolutions and a plurality of channel attention modules 254a to 254c.

각 디코더 블록(252a ~ 252c)은 디컨볼루션 레이어, 배치 정규화 레이어 및 ReLU 활성화 함수를 포함하는 일련의 블록으로 구성될 수 있다. Each decoder block 252a to 252c may be composed of a series of blocks including a deconvolution layer, a batch normalization layer, and a ReLU activation function.

특징맵의 채널 관계를 활용하기 위해 각 디컨볼루션 레이어 후단에 채널 어텐션 모듈(254a ~ 254c)이 배치될 수 있다. 채널 어텐션 모듈의 출력 특징맵은 동일한 공간 해상도를 갖는 심층 컨볼루션 신경망 모델에 의해 추출된 해당 하위 수준 특징맵과 결합된다. 결합된 특징맵은 다음 디코딩 블록에서 이용될 수 있다. In order to utilize the channel relationship of the feature map, channel attention modules 254a to 254c may be disposed after each deconvolution layer. The output feature map of the channel attention module is combined with the corresponding low-level feature map extracted by the deep convolutional neural network model with the same spatial resolution. The combined feature map can be used in the next decoding block.

즉, 심층 합성곱 신경망 모델을 통해 추출된 특징맵은 서로 다른 해상도를 가지는 복수의 특징맵으로 구성될 수 있다. 편의상 제1 특징맵, 제2 특징맵, 제3 특징맵이라 칭하기로 한다. 최종적으로 출력되는 제3 특징맵이 공간 분기 모듈(214)과 시간 분기 모듈(216)로 전달되어 각각 공간 관련 특징맵과 시간 관련 특징맵이 추가된 후 결합되어 최상단 디코더 블록으로 전달될 수 있다. 이후, 디코더 블록은 결합 특징맵을 디컨볼루션한 후 제1 채널 주의 모듈로 전달하고, 해당 제1 채널 주의 모듈을 통해 채널 어텐션이 적용될 수 있다. That is, the feature map extracted through the deep convolutional neural network model may be composed of a plurality of feature maps having different resolutions. For convenience, they will be referred to as a first feature map, a second feature map, and a third feature map. The finally output third feature map is delivered to the spatial branching module 214 and the temporal branching module 216, and after adding the spatial feature map and the temporal feature map, respectively, they can be combined and delivered to the uppermost decoder block. Thereafter, the decoder block deconvolves the combined feature map and transmits the deconvolution to the first channel attention module, and channel attention may be applied through the first channel attention module.

제1 채널 주의 모듈을 통해 채널 어텐션이 적용된 후 심층 합성곱 신경망 모델을 통해 전달된 제2 특징맵과 결합되어 제2 디코더 블록으로 전달될 수 있다. After channel attention is applied through the first channel attention module, it may be combined with the second feature map transmitted through the deep convolutional neural network model and transmitted to the second decoder block.

이와 같이, 채널 어텐션 모듈에서 출력된 특징맵은 동일한 공간 해상도를 갖는 심층 합성곱 신경망 모델에서 추출된 하위 수준 특징맵과 결합된 후 다음 디코더 블록으로 전달되며, 해당 디코더 블록은 업샘플링하기 위해 이를 디컨볼루션할 수 있다. 특징맵의 채널 종속성을 위해 채널 어텐션 모듈이 사용된다. 예를 들어, 'Squeeze-and-Exciation'은 전역 평균 풀링을 적용하는 반면, CBAM은 채널별 통계를 얻기 위해 평균 풀링 및 최대 풀링을 사용한다. 채널 어텐션 모듈은 두개의 완전 연결 레이어 대신 두개의 컨볼루션 레이어를 포함한다. 각 디컨볼루션 레이어 이후, 채널 어텐션 모듈(254a ~ 254c)을 통해 특징맵(

Figure pat00017
)에 채널 어텐션을 적용한다. In this way, the feature map output from the channel attention module is combined with the low-level feature map extracted from the deep convolutional neural network model having the same spatial resolution, and then passed to the next decoder block, which deconverts it for upsampling. You can volute. For the channel dependency of the feature map, the channel attention module is used. For example, 'Squeeze-and-Exciation' applies global average pooling, whereas CBAM uses average pooling and maximum pooling to obtain per-channel statistics. The Channel Attention module contains two convolutional layers instead of two fully connected layers. After each deconvolution layer, the feature map (through the channel attention modules 254a to 254c)
Figure pat00017
) to apply channel attention.

출력 특징맵(

Figure pat00018
)은 수학식 3과 같이 계산될 수 있다. Output feature map (
Figure pat00018
) can be calculated as in Equation 3.

Figure pat00019
Figure pat00019

여기서,

Figure pat00020
는 채널 어텐션을 나타내고,
Figure pat00021
는 요소별 곱셈(element-wise product)를 나타낸다. here,
Figure pat00020
represents the channel attention,
Figure pat00021
represents an element-wise product.

각 디컨볼루션 레이어의 출력은 채널 어텐션 모듈의 입력 특징맵(

Figure pat00022
)으로 전달된다. 채널 종속성을 이용하기 위해 전역 평균 풀링이 특징맵(F)에 적용된다. 전역 평균 풀링의 출력은 C값을 갖는 벡터 v이다. 그런 다음 1 x 1 컨볼루션 연산을 적용하여 축소 비율 r로 차원을 줄인 다음 ReLU 활성화 함수(
Figure pat00023
)를 적용하고, 채널 차원을 포함하는 두번째 1 x 1 컨볼루션을 복구한다. The output of each deconvolution layer is the input feature map of the channel attention module (
Figure pat00022
) is transmitted to Global average pooling is applied to the feature map (F) to exploit channel dependencies. The output of global average pooling is a vector v with C values. A 1 x 1 convolution operation is then applied to reduce the dimensionality by a reduction factor r, followed by a ReLU activation function (
Figure pat00023
) and recovers a second 1 x 1 convolution containing the channel dimension.

이를 수학식으로 나타내면, 수학식 4와 같다. If this is expressed as an equation, it is equivalent to Equation 4.

Figure pat00024
Figure pat00024

여기서,

Figure pat00025
,
Figure pat00026
,
Figure pat00027
는 각각 두 컨볼루션 레이어의 가중치와 시그모이드 함수를 나타낸다. here,
Figure pat00025
,
Figure pat00026
,
Figure pat00027
denotes the weight and sigmoid function of the two convolutional layers, respectively.

본 발명의 다른 실시예에 따르면 채널 어텐션 모듈(254a ~ 254c)은 잔여 채널 어텐션 모듈일 수도 있다. 예를 들어, 일부 대규모 테스트 데이터 세트의 경우 주의 기반 오토 인코더 모델을 학습시키는 과정에서 잔여 채널 어텐션 모듈이 더 나은 결과를 제공하는 것을 확인했다. According to another embodiment of the present invention, the channel attention modules 254a to 254c may be residual channel attention modules. For example, we found that the residual channel attention module provided better results in training attention-based autoencoder models for some large-scale test datasets.

잔여 채널 어텐션 모듈에서 채널 어텐션은 잔여 연결 직전에 두개의 3 x 3 턴볼루션 레이어 뒤에 위치된다. ReLU 활성화는 도 4에 도시된 바와 같이, 두 컨볼루션 레이어 사이에 위치된다. 입력 특징맵이

Figure pat00028
과 같이 주어지는 경우, 잔여 채널 어텐션 블록은 수학식 5와 같이 계산될 수 있다. In the Residual Channel Attention module, the channel attention is placed after the two 3 x 3 turnvolution layers just before the residual concatenation. The ReLU activation is placed between two convolutional layers, as shown in FIG. 4 . If the input feature map is
Figure pat00028
When given as , the residual channel attention block can be calculated as in Equation 5.

Figure pat00029
Figure pat00029

여기서,

Figure pat00030
Figure pat00031
는 각각 입력 특징맵과 출력 특징맵을 나타내고,
Figure pat00032
는 채널 어텐션을 나타내며, X는 수학식 6과 같이 획득될 수 있다. here,
Figure pat00030
and
Figure pat00031
denotes an input feature map and an output feature map, respectively,
Figure pat00032
Represents channel attention, and X can be obtained as in Equation 6.

Figure pat00033
Figure pat00033

여기서,

Figure pat00034
는 ReLU 활성화 함수를 나타낸다. here,
Figure pat00034
represents the ReLU activation function.

이러한 주의 기반 오토 인코더 모델은 일련의 입력 프레임

Figure pat00035
들로부터 예측 프레임(
Figure pat00036
)을 예측하는 것을 목표로 한다. 각 프레임은 많은 픽셀로 구성되고, 각 픽셀에는 강도가 있기 때문에, 강도와 기울기에 대한 제약 조건은 예측 오류를 최소화하는데 중요한 요소가 될 수 있다. 따라서, RGB 공간의 모든 픽셀의 유사성은 수학식 7과 같이 실제 프레임과 예측된 프레임 사이의 픽셀 값의 차이를 비교하는 강조 제약 조건에 의해 보장될 수 있다. This attention-based autoencoder model is a sequence of input frames.
Figure pat00035
Predicted frames from (
Figure pat00036
) is aimed at predicting Since each frame consists of many pixels and each pixel has an intensity, constraints on intensity and gradient can be important factors in minimizing prediction errors. Therefore, the similarity of all pixels in RGB space can be guaranteed by the emphasis constraint condition comparing the pixel value difference between the actual frame and the predicted frame as shown in Equation 7.

Figure pat00037
Figure pat00037

여기서, I는 실제 프레임을 나타내고,

Figure pat00038
는 예측된 프레임을 나타내며,
Figure pat00039
는 norm 연산을 나타낸다.
Figure pat00040
거리 채택에 의해 발생되는 잠재적인 흐림(blur)를 처리하고, 더 선명한 비디오 프레임을 획득하기 위히 기울기 제약 조건이 추가된다. where I denotes a real frame,
Figure pat00038
denotes a predicted frame,
Figure pat00039
represents the norm operation.
Figure pat00040
A gradient constraint is added to account for potential blur caused by distance adoption and to obtain a sharper video frame.

손실 함수는 수학식 8과 같이 두 공간 차원을 따라 기울기들 사이의 차이에 의해 계산될 수 있다. The loss function can be calculated by the difference between the gradients along two spatial dimensions, as shown in Equation 8.

Figure pat00041
Figure pat00041

여기서, i,j는 각각 픽셀 좌표를 나타낸다. Here, i and j respectively represent pixel coordinates.

SSIM(구조적 유사성)을 측정하기 위해 MS-SSIM(Multi-Scale Structural Similarity)을 이용할 수 있다. MS-SSIM은 다른 해상도에서 이미지 품질 평가를 ㅜ이해 제안되었다. Multi-Scale Structural Similarity (MS-SSIM) may be used to measure structural similarity (SSIM). MS-SSIM has been proposed to evaluate image quality at different resolutions.

강도, 기울기 및 MS-SSIM 제약 조건을 포함하는 손실 함수는 수학식 9와 같다. The loss function including strength, slope and MS-SSIM constraints is shown in Equation 9.

Figure pat00042
Figure pat00042

여기서,

Figure pat00043
Figure pat00044
는 각각 손실들 사이의 가중치 발란스를 위한 계수이다. here,
Figure pat00043
Figure pat00044
is a coefficient for weight balance between each loss.

이상 감지부(130)는 주의 기반 오토 인코더 모델에서 생성된 예측 프레임들의 이상 점수(anomaly score)

Figure pat00045
)를 도출하여 이상 이벤트를 감지한다.The anomaly detection unit 130 calculates anomaly scores of predicted frames generated by the attention-based autoencoder model.
Figure pat00045
) to detect abnormal events.

이상 점수는 이상 점수는 실제 프레임(I)와 예측된 프레임(

Figure pat00046
) 사이의 차이를 측정하는 것으로, PSNR(Peak Signal to Noise Ratio)를 이용하여 계산될 수 있다. The anomaly score is the difference between the actual frame (I) and the predicted frame (
Figure pat00046
), which can be calculated using PSNR (Peak Signal to Noise Ratio).

PSNR은 수학식 10과 같이 계산된다. PSNR is calculated as in Equation 10.

Figure pat00047
Figure pat00047

여기서, N은 프레임의 행과 열의 개수(즉 행과 열의 픽셀의 개수)를 나타내고,

Figure pat00048
Figure pat00049
의 최대값을 나타낸다. PSNR 값이 높을수록 프레임의 품질이 좋다는 것을 의미한다. 즉, 실측 프레임과 예측 프레임의 차이가 작다. Here, N represents the number of rows and columns of the frame (i.e., the number of pixels in rows and columns),
Figure pat00048
Is
Figure pat00049
represents the maximum value of The higher the PSNR value, the better the frame quality. That is, the difference between the measured frame and the predicted frame is small.

모든 프레임의 PSNR은 범위 [0,1]로 정규화된 이후 수학식 11을 사용하여 각 프레임에 대한 이상 점수 S(t)를 계산할 수 있다. PSNR 값을 이용하여 이상 점수는 수학식 11과 같이 계산될 수 있다. After the PSNRs of all frames are normalized to the range [0,1], an anomaly score S(t) for each frame can be calculated using Equation 11. An ideal score can be calculated as shown in Equation 11 using the PSNR value.

Figure pat00050
Figure pat00050

여기서,

Figure pat00051
Figure pat00052
은 각각 주어진 비디어 시퀀스에서 PSNR값의 최소값과 최대값을 나타낸다. 예측 프레임의 이상 점수는 임계값에서 프레임이 정상인지 비정상인지를 나타낸다. here,
Figure pat00051
class
Figure pat00052
denotes the minimum and maximum values of PSNR values in a given video sequence, respectively. The abnormality score of the predicted frame indicates whether the frame is normal or abnormal at the threshold.

메모리(140)는 본 발명의 일 실시예에 따른 채널 주의 기반 오토 인코더 모델을 이용한 비디오 이상 감지 방법을 수행하기 위한 프로그램 코드를 저장하기 위한 수단이다. The memory 140 is a means for storing program codes for performing a video anomaly detection method using an auto-encoder model based on channel attention according to an embodiment of the present invention.

프로세서(150)는 본 발명의 일 실시예에 따른 비디오 이상 감지 장치(100)의 내부 구성 요소들(예를 들어, 학습부(110), 예측 프레임 생성부(120), 이상 감지부(130), 메모리(140) 등)을 제어하기 위한 수단이다. The processor 150 includes internal components (eg, the learning unit 110, the prediction frame generation unit 120, and the anomaly detection unit 130) of the video anomaly detection apparatus 100 according to an embodiment of the present invention. , the memory 140, etc.).

도 5는 본 발명의 일 실시예에 따른 대표적인 이상 검출 데이터 세트에 대한 공간, 시간 및 어텐션 컴포넌트 구성에 따른 성능을 비교한 결과이다. 도 5에 도시된 바와 같이, 세가지 컴포넌트를 포함하는 경우 97.4%, 86.7%, 73.6%로 최대 성능을 보이는 것을 알 수 있다. 5 is a result of comparing performance according to configurations of spatial, temporal, and attention components for a representative anomaly detection data set according to an embodiment of the present invention. As shown in FIG. 5 , it can be seen that the maximum performance is 97.4%, 86.7%, and 73.6% when the three components are included.

도 6은 인코더 설계시 주축이 되는 RESNET 에서 가장 성능이 우수한 네트워크를 비교한 결과이다. 도 6에서 보여지는 바와 같이, WiderResNet38을 백본 네트워크로 구성하는 경우 가장 성능이 우수한 것을 알 수 있다. 6 is a result of comparing networks with the best performance in RESNET, which is the main axis in designing an encoder. As shown in Figure 6, it can be seen that the performance is the best when WiderResNet38 is configured as a backbone network.

도 7은 종래와 본 발명의 일 실시예에 따른 비디오 이상 감지 결과를 비교한 도면이다. 7 is a diagram comparing video anomaly detection results according to the prior art and an embodiment of the present invention.

도 7에 도시된 바와 같이, 본 발명의 일 실시예에 따른 비디오 이상 감지 방법이 97.4%, 86.7% 및 73.6%의 AUC 성능을 보이며, 종래 기술보다 우수한 것을 알 수 있다. As shown in FIG. 7 , it can be seen that the video anomaly detection method according to an embodiment of the present invention shows AUC performance of 97.4%, 86.7%, and 73.6%, and is superior to the prior art.

도 8은 본 발명의 일 실시예에 따른 비디오 이상 감지 방법을 나타낸 순서도이다. 8 is a flowchart illustrating a video anomaly detection method according to an embodiment of the present invention.

단계 810에서 비디오 이상 감지 장치(100)는 각 비디오 프레임들을 기학습된 주의 기반 오토 인코더 모델에 적용하여 이전 프레임들의 공간 관련 특징과 시간 관련 특징이 반영된 예측 프레임을 생성한다. 여기서, 주의 기반 오토 인코더 모델은 정상 이벤트를 포함하는 프레임들로 사전 학습되어 있는 것을 가정하기로 한다. In step 810, the apparatus 100 for detecting an anomaly in video applies each video frame to the pre-learned attention-based autoencoder model to generate a prediction frame in which spatial and temporal characteristics of previous frames are reflected. Here, it is assumed that the attention-based autoencoder model is pretrained with frames including normal events.

주의 기반 오토 인코더 모델은 각 비디오 프레임들을 심층 합성곱 신경망 모듈에 적용하여 다중 공간 해상도를 가지는 복수의 특징맵을 각각 추출하고, 상기 심층 합성곱 신경망 모듈에서 최종 출력된 특징맵을 두개의 브랜치로 전달함으로써, 제1 브랜치를 통해 상기 심층 합성곱 신경망 모듈을 통해 복수의 입력 프레임들에 상응하여 각각 추출된 특징맵들을 집계하여 공간 관련 특징맵을 생성하고, 제2 브랜치를 통해 상기 심층 합성곱 신경망 모듈에서 출력된 현재 프레임의 특징맵 일부를 시프트(shift)연산하여 이전 프레임과 결합하여 시간 관련 특징맵을 생성하며, 상기 공간 관련 특징맵과 상기 시간 관련 특징맵을 결합(combine)하여 결합 특징맵을 생성할 수 있다. The attention-based autoencoder model extracts a plurality of feature maps having multi-spatial resolution by applying each video frame to the deep convolutional neural network module, and delivers the feature maps finally output from the deep convolutional neural network module to two branches. By doing so, a spatially related feature map is generated by aggregating feature maps extracted respectively corresponding to a plurality of input frames through the deep convolutional neural network module through a first branch, and the deep convolutional neural network module through a second branch. A part of the feature map of the current frame output from is shifted and combined with the previous frame to generate a time-related feature map, and a combined feature map is obtained by combining the space-related feature map and the time-related feature map. can create

또한, 주의 기반 오토 인코더 모델은 하향식 계층 구조를 가지는 복수의 디코더 사이에 위치되며, 전단에 위치된 디코더의 출력값에 1 x 1 컨볼루션 연산을 적용하여 차원을 축소한 후 ReLU 활성화 함수를 적용하고 1 x 1 컨볼루션 연산을 적용하여 제1 중간 결과값을 생성하고, 상기 제1 중간 결과값에 전역 풀링 연산을 적용한 후 1 x 1 컨볼루션 연산을 적용하여 차원을 축소한 후 ReLU 활성화 함수를 적용하고 1 x 1 컨볼루션 연산을 적용한 후 시그모이드 함수를 적용한 제2 중간 결과값을 생성하고, 상기 제1 중간 결과값과 상기 제2 중간 결과값을 요소별 곱셈한 후 상기 전단에 위치된 디코더의 출력값과 합산하여 잔여 채널 어텐션 맵을 생성하고, 상기 심층 합성곱 신경망 모듈에서 출력되는 동일 공간 해상도를 가지는 특징맵과 상기 잔여 채널 어텐션맵을 요소합 연산한 결과를 디코더에 적용하여 디컨볼루션 연산 결과를 출력하는 단계를 수행할 수 있다. 이때, 디코더 중 최상위 계층 디코더는 상기 결합 특징맵을 디컨볼루션 연산할 수 있다. In addition, the attention-based autoencoder model is located between a plurality of decoders having a top-down hierarchical structure, reduces the dimensionality by applying a 1 x 1 convolution operation to the output value of the decoder located in the previous stage, and then applies the ReLU activation function and A x 1 convolution operation is applied to generate a first intermediate result value, a global pooling operation is applied to the first intermediate result value, a 1 x 1 convolution operation is applied to reduce the dimensionality, and a ReLU activation function is applied; After applying the 1 x 1 convolution operation, a second intermediate result value is generated by applying the sigmoid function, and after element-by-element multiplication of the first intermediate result value and the second intermediate result value, the decoder located at the previous stage A residual channel attention map is generated by summing the output value, and the deconvolution operation result is applied to the decoder by element summing the feature map having the same spatial resolution output from the deep convolutional neural network module and the residual channel attention map. You can perform the step of outputting. At this time, the highest layer decoder among the decoders may perform a deconvolution operation on the combined feature map.

주의 기반 오토 인코더 모델에 대해서는 도 1 내지 도 4를 참조하여 설명한 바와 동일하므로 상세한 설명은 생략하기로 한다. Since the attention-based auto-encoder model is the same as that described with reference to FIGS. 1 to 4, a detailed description thereof will be omitted.

단계 815에서 비디오 이상 감지 장치(100)는 예측 프레임에 대한 이상 점수(anomaly score)를 계산하여 이상 이벤트를 검출한다. In step 815, the video anomaly detection apparatus 100 detects an anomaly event by calculating an anomaly score for the predicted frame.

본 발명의 실시 예에 따른 장치 및 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능 매체에 기록되는 프로그램 명령은 본 발명을 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 분야 통상의 기술자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media) 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다.Devices and methods according to embodiments of the present invention may be implemented in the form of program instructions that can be executed through various computer means and recorded in computer readable media. Computer readable media may include program instructions, data files, data structures, etc. alone or in combination. Program instructions recorded on a computer readable medium may be specially designed and configured for the present invention, or may be known and usable to those skilled in the art in the field of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. - Includes hardware devices specially configured to store and execute program instructions, such as magneto-optical media and ROM, RAM, flash memory, etc. Examples of program instructions include high-level language codes that can be executed by a computer using an interpreter, as well as machine language codes such as those produced by a compiler.

상술한 하드웨어 장치는 본 발명의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The hardware device described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

이제까지 본 발명에 대하여 그 실시 예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시 예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.So far, the present invention has been looked at mainly by its embodiments. Those skilled in the art to which the present invention pertains will be able to understand that the present invention can be implemented in a modified form without departing from the essential characteristics of the present invention. Therefore, the disclosed embodiments should be considered from a descriptive point of view rather than a limiting point of view. The scope of the present invention is shown in the claims rather than the foregoing description, and all differences within the equivalent scope will be construed as being included in the present invention.

Claims (10)

각 비디오 프레임들을 기학습된 주의 기반 오토 인코더 모델에 적용하여 이전 프레임들의 공간 관련 특징과 시간 관련 특징이 반영된 예측 프레임을 생성하는 예측 프레임 생성부; 및
상기 예측 프레임에 대한 이상 점수(anomaly score)를 계산하여 이상 이벤트를 검출하는 이상 상황 검출부를 포함하는 비디오 이상 감지 장치.
a predictive frame generating unit that applies each video frame to a pre-learned attention-based auto-encoder model to generate a predicted frame in which spatial and temporal characteristics of previous frames are reflected; and
and an abnormal situation detector configured to detect an abnormal event by calculating an anomaly score for the predicted frame.
제1 항에 있어서,
상기 주의 기반 오토 인코더 모델은,
상기 각 비디오 프레임들에서 다중 해상도를 가지는 특징맵을 각각 추출하는 심층 합성곱 신경망 모듈;
상기 심층 합성곱 신경망 모듈을 통해 복수의 입력 프레임들에 상응하여 각각 추출된 특징맵들을 집계하여 공간 관련 특징맵을 생성하는 공간 분기 모듈;
상기 심층 합성곱 신경망 모듈에서 출력된 현재 프레임의 특징맵 일부를 시프트(shift)연산하여 이전 프레임과 결합하여 시간 관련 특징맵을 생성하는 시간 분기 모듈; 및
상기 공간 관련 특징맵과 상기 시간 관련 특징맵을 결합(combine)하여 결합 특징맵을 생성하는 결합 모듈을 포함하는 인코더 모듈을 포함하는 것을 특징으로 하는 비디오 이상 감지 장치.
According to claim 1,
The attention-based autoencoder model,
a deep convolutional neural network module extracting feature maps having multiple resolutions from each of the video frames;
a spatial branching module generating a spatially related feature map by aggregating feature maps extracted respectively corresponding to a plurality of input frames through the deep convolutional neural network module;
a time branching module generating a time-related feature map by performing a shift operation on a part of the feature map of the current frame output from the deep convolutional neural network module and combining it with a previous frame; and
and an encoder module including a combining module generating a combined feature map by combining the spatial feature map and the temporal feature map.
제2 항에 있어서,
상기 주의 기반 오토 인코더 모델은,
상기 결합 특징맵 또는 이전 디코딩 블록의 특징맵을 디컨볼루션하여 복원하는 복수의 디코딩 블록; 및
상기 각 디코딩 블록 후단에 배치되며, 각 디코딩 블록의 출력값에 채널 어텐션 연산을 적용하는 복수의 채널 어텐션 모듈을 포함하는 디코더 모듈을 더 포함하되,
상기 디코더 모듈은
상기 각 채널 어텐션 모듈의 출력값과 동일 공간 해상도를 가지는 추출하는 심층 합성곱 신경망 모듈의 특징맵의 특징맵과 결합된 후 업샘플링되어 다음 디코딩 블록으로 전달하는 것을 특징으로 하는 비디오 이상 감지 장치.
According to claim 2,
The attention-based autoencoder model,
a plurality of decoding blocks for restoring the combined feature map or the feature map of a previous decoding block by deconvolution; and
Further comprising a decoder module disposed after each decoding block and including a plurality of channel attention modules for applying a channel attention operation to an output value of each decoding block,
The decoder module
Video anomaly detection device characterized in that the feature map of the deep convolutional neural network module extracted having the same spatial resolution as the output value of each channel attention module is combined with the feature map, and then upsampled and transmitted to the next decoding block.
제1 항에 있어서,
상기 주의 기반 오토 인코더 모델은 정상 상황 프레임들로 기학습되는 것을 특징으로 하는 비디오 이상 감지 장치.
According to claim 1,
The video anomaly detection device, characterized in that the attention-based autoencoder model is pre-learned with normal situation frames.
제1 항에 있어서,
상기 이상 점수는 하기 수학식을 이용하여 계산되는 것을 특징으로 하는 비디오 이상 감지 장치.
Figure pat00053

여기서,
Figure pat00054
이며, I는 실제 프레임을 나타내고,
Figure pat00055
는 예측 프레임을 나타내며, N는 프레임의 행과 열의 픽셀 개수를 나타내며,
Figure pat00056
Figure pat00057
의 최대값을 나타내고,
Figure pat00058
Figure pat00059
는 비디오 시퀀스에서 PSNR의 최소값과 최대값을 각각 나타냄.
According to claim 1,
The video anomaly detection device, characterized in that the anomaly score is calculated using the following equation.
Figure pat00053

here,
Figure pat00054
, I denotes a real frame,
Figure pat00055
denotes the prediction frame, N denotes the number of pixels in the row and column of the frame,
Figure pat00056
Is
Figure pat00057
represents the maximum value of
Figure pat00058
class
Figure pat00059
Represents the minimum and maximum values of PSNR in a video sequence, respectively.
(a) 각 비디오 프레임들을 기학습된 주의 기반 오토 인코더 모델에 적용하여 이전 프레임들의 공간 관련 특징과 시간 관련 특징이 반영된 예측 프레임을 생성하는 단계; 및
(b) 상기 예측 프레임에 대한 이상 점수(anomaly score)를 계산하여 이상 이벤트를 검출하는 단계를 포함하는 비디오 이상 감지 방법.
(a) generating prediction frames in which spatial and temporal features of previous frames are reflected by applying each video frame to a pre-learned attention-based auto-encoder model; and
(b) detecting an anomaly event by calculating an anomaly score for the predicted frame.
제1 항에 있어서,
상기 (a) 단계는 인코딩 단계를 포함하되,
상기 인코딩 단계는,
상기 각 비디오 프레임들을 심층 합성곱 신경망 모듈에 적용하여 다중 공간 해상도를 가지는 복수의 특징맵을 각각 추출하는 단계;
상기 심층 합성곱 신경망 모듈에서 최종 출력된 특징맵을 두개의 브랜치로 전달함으로써, 제1 브랜치를 통해 상기 심층 합성곱 신경망 모듈을 통해 복수의 입력 프레임들에 상응하여 각각 추출된 특징맵들을 집계하여 공간 관련 특징맵을 생성하고, 제2 브랜치를 통해 상기 심층 합성곱 신경망 모듈에서 출력된 현재 프레임의 특징맵 일부를 시프트(shift)연산하여 이전 프레임과 결합하여 시간 관련 특징맵을 생성하는 단계; 및
상기 공간 관련 특징맵과 상기 시간 관련 특징맵을 결합(combine)하여 결합 특징맵을 생성하는 단계를 포함하는 것을 특징으로 하는 비디오 이상 감지 방법.
According to claim 1,
Step (a) includes an encoding step,
The encoding step is
extracting a plurality of feature maps having multi-spatial resolution by applying each of the video frames to a deep convolutional neural network module;
By passing the feature maps finally output from the deep convolutional neural network module to two branches, feature maps extracted respectively corresponding to a plurality of input frames through the deep convolutional neural network module through the first branch are aggregated and space generating a related feature map, shifting a part of the feature map of the current frame output from the deep convolutional neural network module through a second branch, and combining it with a previous frame to generate a temporal feature map; and
and generating a combined feature map by combining the spatial feature map and the temporal feature map.
제7 항에 있어서,
상기 (a) 단계는, 디코딩 단계를 더 포함하되,
하향식 계층 구조를 가지는 복수의 디코더 사이에 위치되며, 전단에 위치된 디코더의 출력값에 1 x 1 컨볼루션 연산을 적용하여 차원을 축소한 후 ReLU 활성화 함수를 적용하고 1 x 1 컨볼루션 연산을 적용하여 제1 중간 결과값을 생성하고, 상기 제1 중간 결과값에 전역 풀링 연산을 적용한 후 1 x 1 컨볼루션 연산을 적용하여 차원을 축소한 후 ReLU 활성화 함수를 적용하고 1 x 1 컨볼루션 연산을 적용한 후 시그모이드 함수를 적용한 제2 중간 결과값을 생성하고, 상기 제1 중간 결과값과 상기 제2 중간 결과값을 요소별 곱셈한 후 상기 전단에 위치된 디코더의 출력값과 합산하여 잔여 채널 어텐션 맵을 생성하는 단계; 및
상기 심층 합성곱 신경망 모듈에서 출력되는 동일 공간 해상도를 가지는 특징맵과 상기 잔여 채널 어텐션맵을 요소합 연산한 결과를 디코더에 적용하여 디컨볼루션 연산 결과를 출력하는 단계를 포함하되,
상기 디코더 중 최상위 계층 디코더는 상기 결합 특징맵을 디컨볼루션 연산하는 것을 특징으로 하는 비디오 이상 감지 방법.
According to claim 7,
The step (a) further includes a decoding step,
It is located between a plurality of decoders having a top-down hierarchical structure, and after reducing the dimension by applying a 1 x 1 convolution operation to the output value of the decoder located in the previous stage, applying a ReLU activation function and applying a 1 x 1 convolution operation, After generating a first intermediate result value, applying a global pooling operation to the first intermediate result value, applying a 1 x 1 convolution operation to reduce the dimension, applying a ReLU activation function, and applying a 1 x 1 convolution operation Afterwards, a second intermediate result value is generated by applying the sigmoid function, the first intermediate result value and the second intermediate result value are multiplied element by element, and then summed with the output value of the decoder located at the previous stage to generate a residual channel attention map. generating; and
Applying an element sum operation result of a feature map having the same spatial resolution output from the deep convolutional neural network module and the residual channel attention map to a decoder and outputting a deconvolution operation result,
A top layer decoder among the decoders performs a deconvolution operation on the combined feature map.
제1 항에 있어서,
상기 (a) 단계 이전에,
정상 상황 프레임들을 이용하여 상기 주의 기반 오토 인코더 모델을 사전 학습하는 단계를 더 포함하는 비디오 이상 감지 방법.
According to claim 1,
Before step (a),
The video anomaly detection method further comprising pretraining the attention-based autoencoder model using normal situation frames.
제6 항 내지 제9 항 중 어느 하나의 항에 따른 방법을 수행하기 위한 프로그램 코드를 기록한 컴퓨터로 판독 가능한 기록매체.

A computer-readable recording medium recording program codes for performing the method according to any one of claims 6 to 9.

KR1020220179366A 2021-12-22 2022-12-20 Video anomaly detection method and apparatus therefor KR20230095845A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20210184427 2021-12-22
KR1020210184427 2021-12-22

Publications (1)

Publication Number Publication Date
KR20230095845A true KR20230095845A (en) 2023-06-29

Family

ID=86946454

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220179366A KR20230095845A (en) 2021-12-22 2022-12-20 Video anomaly detection method and apparatus therefor

Country Status (1)

Country Link
KR (1) KR20230095845A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116579616A (en) * 2023-07-10 2023-08-11 武汉纺织大学 Risk identification method based on deep learning
CN117253177A (en) * 2023-11-20 2023-12-19 之江实验室 Action video classification method, device and medium
CN117409354A (en) * 2023-12-11 2024-01-16 山东建筑大学 Video anomaly detection method and system based on three paths of video streams and context awareness

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116579616A (en) * 2023-07-10 2023-08-11 武汉纺织大学 Risk identification method based on deep learning
CN117253177A (en) * 2023-11-20 2023-12-19 之江实验室 Action video classification method, device and medium
CN117253177B (en) * 2023-11-20 2024-04-05 之江实验室 Action video classification method, device and medium
CN117409354A (en) * 2023-12-11 2024-01-16 山东建筑大学 Video anomaly detection method and system based on three paths of video streams and context awareness
CN117409354B (en) * 2023-12-11 2024-03-22 山东建筑大学 Video anomaly detection method and system based on three paths of video streams and context awareness

Similar Documents

Publication Publication Date Title
KR20230095845A (en) Video anomaly detection method and apparatus therefor
CN108805015B (en) Crowd abnormity detection method for weighted convolution self-coding long-short term memory network
CN112347859B (en) Method for detecting significance target of optical remote sensing image
CN112052763B (en) Video abnormal event detection method based on two-way review generation countermeasure network
Celik Multiscale change detection in multitemporal satellite images
CN109522828B (en) Abnormal event detection method and system, storage medium and terminal
Huang et al. Channelized axial attention–considering channel relation within spatial attention for semantic segmentation
CN111696038A (en) Image super-resolution method, device, equipment and computer-readable storage medium
CN114022506B (en) Image restoration method for edge prior fusion multi-head attention mechanism
CN116342894B (en) GIS infrared feature recognition system and method based on improved YOLOv5
CN111382759A (en) Pixel level classification method, device, equipment and storage medium
CN114821432B (en) Video target segmentation anti-attack method based on discrete cosine transform
CN112529862A (en) Significance image detection method for interactive cycle characteristic remodeling
CN114332053A (en) Multimode two-stage unsupervised video anomaly detection method
Gao et al. Adaptive spatial tokenization transformer for salient object detection in optical remote sensing images
CN116665148A (en) Marine ship detection method based on synthetic aperture radar data
US11580741B2 (en) Method and apparatus for detecting abnormal objects in video
Qiu et al. A neurally-inspired hierarchical prediction network for spatiotemporal sequence learning and prediction
US20240062347A1 (en) Multi-scale fusion defogging method based on stacked hourglass network
KR20210147673A (en) Progressive multi-task learning method and apparatus for salient object detection
CN116665099A (en) Video anomaly detection method based on double generators and channel attention mechanism
US20230090941A1 (en) Processing video content using gated transformer neural networks
CN116863379A (en) Video prediction defense method based on space-time self-attention single-step disturbance
Xie et al. Global semantic-guided network for saliency prediction
CN111275751A (en) Unsupervised absolute scale calculation method and system