KR102011402B1 - Intelligent Face Recognition and Tracking System and Method to Distribute GPU Resource using CUDA - Google Patents

Intelligent Face Recognition and Tracking System and Method to Distribute GPU Resource using CUDA Download PDF

Info

Publication number
KR102011402B1
KR102011402B1 KR1020180109613A KR20180109613A KR102011402B1 KR 102011402 B1 KR102011402 B1 KR 102011402B1 KR 1020180109613 A KR1020180109613 A KR 1020180109613A KR 20180109613 A KR20180109613 A KR 20180109613A KR 102011402 B1 KR102011402 B1 KR 102011402B1
Authority
KR
South Korea
Prior art keywords
gpu
tracking
image
cuda
face
Prior art date
Application number
KR1020180109613A
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 한밭대학교 산학협력단
Priority to PCT/KR2018/011773 priority Critical patent/WO2020040348A1/en
Application granted granted Critical
Publication of KR102011402B1 publication Critical patent/KR102011402B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/10Human or animal bodies, e.g. vehicle occupants or pedestrians; Body parts, e.g. hands
    • G06V40/16Human faces, e.g. facial parts, sketches or expressions
    • G06K9/00221
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • G06K2017/0045
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/28Indexing scheme for image data processing or generation, in general involving image processing hardware
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30196Human being; Person
    • G06T2207/30201Face

Abstract

The present invention relates to an intelligent type facial recognition and tracking system to distribute a GPU resource using CUBA, which comprises: an image processing unit configured with a GPU and performing detection and tracking of a face object in a grid manner from an image inputted through a camera; and a control unit selecting a GPU based on an index based on memory usage and the number of activated cores of each GPU through CUDA, and allocating the selected GPU to a thread. According to the present invention, the conventional face detection algorithm is replaced with a method using deep learning, and face detection and recognition is possible in real time through efficient resource distribution by eliminating the increasing amount of operation with the GPU resource distribution. Accordingly, the waste of human resources and the time controlling a CCTV or the like may be reduced, and services such as identification and tracking of an airport blacklist, early resolution of disappearance accidents, and the like are possible.

Description

쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템{Intelligent Face Recognition and Tracking System and Method to Distribute GPU Resource using CUDA}Intelligent Face Recognition and Tracking System and Method to Distribute GPU Resource using CUDA}

본 발명은 쿠다(Compute Unified Device Architecture, CUDA)를 사용하여 GPU(Graphics Processing Unit) 리소스를 분배하는 지능형 얼굴 인식/트래킹 시스템 및 그 방법에 관한 것으로 더욱 상세하게는, 종래의 얼굴 인식 및 트래킹 시스템의 단점을 극복하고 시스템의 안정성과 성능 향상을 위해 다중 GPU를 구성하고, GPU 리소스를 효율적으로 분배하여 실시간 영상에 찾고자 하는 대상을 빠르게 찾고 트래킹이 가능한 기술에 관한 것이다.The present invention relates to an intelligent face recognition / tracking system and method for distributing graphics processing unit (GPU) resources using Compute Unified Device Architecture (CUDA), and more particularly, to a conventional face recognition and tracking system. To overcome the shortcomings and to configure the multiple GPUs to improve the stability and performance of the system, and to efficiently distribute the GPU resources to find the target to find in the real-time video, the technology that can be tracked.

얼굴 인식 및 트래킹 시스템은 첫 번째로 얼굴 검출용 알고리즘 사용방식, 두 번째는 색상 기반의 트래킹 방식, 세 번째는 샘플링 된 영상에서의 얼굴 인식 방식, 네 번째는 GPU 리소스를 분배하지 않는 방식으로 4가지 방식이 존재하고 있으나, 이러한 종래의 얼굴 인식 및 트래킹 시스템에는 아래와 같은 문제점이 있다.First, the face recognition and tracking system uses four algorithms for face detection, the second is color-based tracking, the third is face recognition in sampled images, and the fourth is no allocation of GPU resources. However, the conventional face recognition and tracking system has the following problems.

먼저, 얼굴 검출용 알고리즘을 사용하는 방식은, 얼굴의 각도에 따라 특징이 달라지기 때문에 얼굴의 각도에 따라 다른 알고리즘으로 얼굴을 검출해야 하는 번거로움이 있다.First, the method of using the face detection algorithm has a problem in that the face is detected by a different algorithm according to the angle of the face because the characteristics vary according to the angle of the face.

또한, 색상 기반의 트래킹 방식은 현재 RoI 영역의 색상 정보를 활용하는 방식으로, 트래킹 대상이 기둥 등의 장애물에 가려졌다 나타나거나 카메라 화각 밖으로 나갔다 들어오는 등의 상황에서 트래킹 실패 확률이 매우 높다는 문제점이 있다.In addition, the color-based tracking method utilizes the color information of the current RoI region, and there is a problem that the tracking failure probability is very high when the tracking target appears covered by an obstacle such as a pillar or goes out of the camera field of view. .

또한, 샘플링 된 영상에서의 얼굴 인식 방식은, 실시간 인식을 할 수 없고 샘플링 된 영상에서 영상이 떨리거나 초점이 흐트러질 경우, 검출 및 인식률이 확연하게 떨어지는 문제점이 있다.In addition, the face recognition method in the sampled image, there is a problem that the detection and recognition rate is significantly reduced when the image is shaken or out of focus in the sampled image is not real-time recognition.

그리고, GPU 리소스 분배를 하지 않는 방식에서는, 연산량이 적은 시점에서는 문제가 발생하지 않으나 많은 연산량이 발생할 경우 속도가 느려지거나 GPU에 과부하가 걸려 시스템의 안정성에 문제가 발생하는 단점이 있다.In addition, in a method of not distributing GPU resources, a problem does not occur at a time when the amount of computation is small, but a problem occurs in the stability of the system due to a slow speed or an overload of the GPU when a large amount of computation occurs.

한국등록특허 제10-1850286호Korea Patent Registration No. 10-1850286

본 발명의 목적은, 종래의 얼굴 인식 및 트래킹 시스템에서 사용하는 얼굴 검출용 알고리즘을 딥러닝을 사용한 방식으로 대체하고, 이에 따라 증가하는 연산량을 효율적으로 분배하는 GPU 리소스 분배 알고리즘으로 해소함으로써, 효율적인 리소스 분배를 통해 실시간으로 얼굴 검출 및 인식이 가능하고, 이에 따라 검출 및 인식을 반복해 실시간 트래킹 시스템을 구현하는데 있다.An object of the present invention is to replace an algorithm for face detection used in a conventional face recognition and tracking system with a deep learning method, and to solve the problem by using a GPU resource distribution algorithm that efficiently distributes an increasing amount of computation. The distribution enables face detection and recognition in real time, and accordingly, the detection and recognition is repeated to implement a real time tracking system.

본 발명의 목적은, GPU 리소스 분배 알고리즘을 적용하여 실시간 트래킹 시스템을 제공함으로써, CCTV 등을 관제하는 인력 낭비, 시간 낭비를 줄이고, 공항 블랙리스트 식별 및 트래킹, 실종사고 조기 해결 등의 서비스를 가능하게 하는데 있다.An object of the present invention is to provide a real-time tracking system by applying the GPU resource distribution algorithm, to reduce the waste of manpower, time waste to control CCTV, etc., to enable services such as airport blacklist identification and tracking, early resolution of missing accidents It is.

이러한 기술적 과제를 달성하기 위한 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템은, GPU로 구성되어 카메라를 통해 입력된 영상으로부터 그리드 방식으로 얼굴 객체를 검출 및 트래킹을 수행하는 영상처리부; 및 쿠다를 통해 GPU 각각의 메모리 사용량과 활성화된 코어의 수를 지표를 토대로 최적의 GPU를 선별하고, 선별한 GPU를 스레드에 할당하는 제어부를 포함한다.An intelligent face recognition and tracking system for distributing GPU resources using a CUDA according to an embodiment of the present invention for achieving the technical problem, is configured with a GPU to detect the face object in a grid method from the image input through the camera And an image processor which performs tracking. And a controller configured to select an optimal GPU based on an index based on memory usage and the number of activated cores of each GPU through CUDA, and allocate the selected GPU to a thread.

바람직하게는, 영상처리부는 카메라를 통해 입력된 영상으로부터 그리드 방식으로 객체를 검출하고, 검출한 객체가 찾고자 하는 타겟과 일치하는지 여부를 판단하되, 검출한 얼굴 객체가 찾고자 하는 타겟과 일치하는 경우, 일치하는 영상에 박스 형태로 RoI(Region of Interest)를 지정하는 것을 특징으로 한다.Preferably, the image processor detects the object from the image input through the camera in a grid manner, and determines whether the detected object matches the target to be found, but if the detected face object matches the target to be found, The RoI (Region of Interest) may be designated in the form of a box in the matching image.

영상처리부는, 입력된 영상으로부터 얼굴 객체 검출, 및 검출한 얼굴 객체가 타겟과 일치하는지 여부를 판단하는 절차를 기 설정된 기준에 부합하도록 반복 수행하여 상기 RoI에 대한 트래킹을 수행하는 것을 특징으로 한다.The image processor may perform tracking on the RoI by repeatedly performing a procedure of detecting a face object from the input image and determining whether the detected face object matches the target to meet a predetermined criterion.

영상처리부는, RoI에 대한 트래킹 중에 카메라 화각의 중앙 지점에서 일정 범위 이상 벗어나는 경우, PTZ 제어를 통해 RoI가 화각의 중심부에 위치하도록 카메라의 화각을 조정하는 것을 특징으로 한다.The image processor may adjust the angle of view of the camera such that the RoI is positioned at the center of the angle of view through PTZ control when the image is out of a predetermined range from the center point of the camera angle of view during tracking for the RoI.

제어부는, GPU 각각의 메모리 사용량과 활성화된 코어의 수를 토대로 각 GPU의 현재 사용량을 도출하여 가장 점유율이 낮은 GPU를 스레드에 할당하되, 스레드가 할당된 GPU의 점유율이 기 설정된 수준 이상으로 높아질 경우, 각 GPU의 현재 사용량을 도출하여 가장 점유율이 낮은 GPU를 스레드에 재할당하는 것을 특징으로 한다.The controller derives the current usage of each GPU based on the memory usage of each GPU and the number of activated cores, and allocates the GPU with the lowest share to the thread, but the share of the GPU to which the thread is allocated becomes higher than the preset level. In addition, the current usage of each GPU is derived to reallocate the GPU with the lowest share to the thread.

전술한 시스템을 기반으로 하는 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 방법은, 제어부가 다수의 GPU 리소스를 분배하는 (a) 단계; 및 디스플레이부가 영상처리부가 입력받은 영상과, 영상으로부터 검출한 얼굴 객체 및 트래킹을 출력하는 (b) 단계를 포함하는 것을 특징으로 한다.An intelligent face recognition and tracking method for distributing GPU resources using a CUDA according to an embodiment of the present invention based on the above-described system includes: (a) distributing a plurality of GPU resources by a controller; And (b) outputting, by the display unit, an image received by the image processor, a face object detected from the image, and tracking.

바람직하게는 (a) 단계는, 제어부가 GPU 각각의 메모리 사용량과 활성화된 코어의 수를 검출하여 각 GPU가 현재 어느 정도 사용되고 있는지를 파악하는 (a-1) 단계; 제어부가 각 GPU의 현재 리소스 사용 상태에 따라 가장 점유율이 낮은 GPU를 스레드에 할당하는 (a-2) 단계; 제어부가 GPU 점유율이 기 설정된 수준 이상으로 높아지는지 여부를 판단하는 (a-3) 단계; 및 (a-3) 단계의 판단결과, GPU 점유율이 기 설정된 수준 이상으로 높아지는 경우, 제어부가 (a-1) 단계로 절차를 이행하는 (a-4) 단계를 포함하는 것을 특징으로 한다.Preferably, the step (a) includes the step (a-1) of determining, by the control unit, how much each GPU is currently used by detecting the memory usage of each GPU and the number of activated cores; (A-2) by the controller, allocating a GPU having the lowest occupancy rate to a thread according to a current resource usage state of each GPU; (A-3) determining, by the controller, whether the GPU occupancy is higher than a predetermined level; And (a-4) when the controller occupies the GPU occupancy level higher than or equal to a predetermined level as a result of step (a-3).

(b) 단계는, 영상처리부가 입력된 영상으로부터 그리드 방식으로 얼굴 객체를 검출하는 (b-1) 단계; 영상처리부가 검출한 얼굴 객체가 찾고자 하는 타겟과 일치하는지 여부를 판단하는 (b-2) 단계; (b-2) 단계의 판단결과, 검출한 얼굴 객체가 찾고자 하는 타겟과 일치하는 경우, 영상처리부가 일치하는 영상에 빨간색 박스 형태로 RoI(Region of Interest)를 지정하는 (b-3) 단계; 영상처리부가 지정한 RoI에 대한 트래킹을 수행하는 (b-4) 단계; 영상처리부가 지정한 RoI에 대한 트래킹 중에 카메라 화각의 중앙 지점에서 일정 범위 이상 벗어나는지 여부를 판단하는 (b-5) 단계; (b-6) 단계의 판단결과, 카메라 화각의 중앙 지점에서 일정 범위 이상 벗어나는 경우, 영상처리부가 PTZ(Pan Tilt Zoom) 제어를 통해 해당 RoI가 화각의 중심부에 위치하도록 카메라 화각을 조정하는 단계를 포함하는 것을 특징으로 한다.Step (b-1) may include detecting a face object in a grid manner from an input image by the image processor; (B-2) determining whether the face object detected by the image processor matches the target to be searched for; (b-3) designating a region of interest (RoI) in the form of a red box on the matched image when the detected face object matches the target to be found as a result of the determination of step (b-2); (B-4) performing the tracking on the RoI designated by the image processor; (B-5) determining whether the image processor deviates by a predetermined range or more from a center point of the camera angle of view during tracking for a specified RoI; As a result of determining in step (b-6), if the camera is out of a predetermined range from the center point of view, the image processing unit adjusts the camera angle of view so that the corresponding RoI is located at the center of the field of view through PTZ (Pan Tilt Zoom) control. It is characterized by including.

상기와 같은 본 발명에 따르면, 종래의 얼굴 인식 및 트래킹 시스템에서 사용하는 얼굴 검출용 알고리즘을 딥러닝을 사용한 방식으로 대체하고, 이에 따라 증가하는 연산량을 효율적으로 분배하는 GPU 리소스 분배 알고리즘으로 해소함으로써, 효율적인 리소스 분배를 통해 실시간으로 얼굴 검출 및 인식이 가능하고, 이에 따라 검출 및 인식을 반복해 실시간 트래킹 시스템 구현이 가능한 효과가 있다.According to the present invention as described above, by replacing the face detection algorithm used in the conventional face recognition and tracking system with the method using deep learning, by solving the GPU resource distribution algorithm that effectively distributes the increased amount of computation, Efficient resource distribution enables face detection and recognition in real time, and thus it is possible to implement a real-time tracking system by repeating detection and recognition.

본 발명에 따르면, GPU 리소스 분배 알고리즘을 적용하여 실시간 트래킹 시스템을 제공함으로써, CCTV 등을 관제하는 인력 낭비, 시간 낭비를 줄이고, 공항 블랙리스트 식별 및 트래킹, 실종사고 조기 해결 등의 서비스가 가능한 효과가 있다.According to the present invention, by applying the GPU resource distribution algorithm to provide a real-time tracking system, it is possible to reduce the labor waste, time waste, CCTV blacklist identification and tracking, early resolution of missing accidents, such as controlling CCTV have.

도 1은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템을 도시한 구성도.
도 2는 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 GPU 리소스 분배 알고리즘의 흐름도.
도 3은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 카메라 화각 조정을 도시한 예시도.
도 4는 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 순서도.
도 5는 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 GPU 리소스 사용 상태의 예시도.
도 6은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 스레드 #1에 최적의 GPU 할당을 도시한 예시도.
도 7은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 모든 스레드에 최적의 GPU 할당 순서도.
도 8은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 스레드 #1에 대하여 GPU #2를 재할당하는 과정을 도시한 예시도.
도 9는 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 내부 Network 설명도.
도 10은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 딥러닝을 이용한 얼굴영역 검출 과정을 도시한 예시도.
도 11은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 딥러닝을 이용한 얼굴 인식 과정을 도시한 예시도.
도 12는 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 학습과정에 사용되는 Network 설명도.
도 13은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 인식과정에서 사용되는 Network 설명도.
도 14는 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 딥러닝을 이용한 실시간 얼굴 추적 결과 이미지를 도시한 예시도.
도 15는 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 일반 카메라와 PTZ 카메라의 화각을 비교한 예시도.
도 16은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 PTZ 제어를 통한 트래킹 대상 추적을 도시한 예시도.
도 17은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 GPU 리소스 분배 차이에 따른 결과 그래프.
도 18은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템의 GPU 리소스 분배 전/후의 GPU 점유율 확인 결과 그래프.
도 19는 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 방법을 도시한 순서도.
도 20은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 방법의 제S100단계를 도시한 순서도.
도 21은 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 방법의 제S200단계를 도시한 순서도.
1 is a block diagram illustrating an intelligent face recognition and tracking system for distributing GPU resources using CUDA in accordance with one embodiment of the present invention.
2 is a flowchart of a GPU resource distribution algorithm of an intelligent face recognition and tracking system for distributing GPU resources using CUDA in accordance with one embodiment of the present invention.
3 is an exemplary diagram illustrating camera angle adjustment of an intelligent face recognition and tracking system for distributing GPU resources using a CUDA according to an embodiment of the present invention.
4 is a flow diagram of an intelligent face recognition and tracking system for distributing GPU resources using CUDA in accordance with one embodiment of the present invention.
5 is an exemplary diagram of GPU resource usage of an intelligent face recognition and tracking system for distributing GPU resources using CUDA in accordance with one embodiment of the present invention.
6 is an exemplary diagram illustrating optimal GPU allocation to thread # 1 of an intelligent face recognition and tracking system using CUDA to distribute GPU resources, in accordance with an embodiment of the present invention.
7 is a flowchart of optimal GPU allocation for all threads of an intelligent face recognition and tracking system using CUDA to distribute GPU resources, in accordance with an embodiment of the present invention.
8 is an exemplary diagram illustrating a process of reallocating GPU # 2 to thread # 1 of an intelligent face recognition and tracking system using CUDA according to an embodiment of the present invention.
9 is a diagram illustrating an internal network of an intelligent face recognition and tracking system for distributing GPU resources using a CUDA according to an embodiment of the present invention.
10 is an exemplary diagram illustrating a face region detection process using deep learning of a tracking system and intelligent face recognition for distributing GPU resources using a CUDA according to an embodiment of the present invention.
FIG. 11 is an exemplary diagram illustrating a face recognition process using intelligent face recognition and deep learning of a tracking system for distributing GPU resources using a CUDA according to an embodiment of the present invention. FIG.
12 is a network explanatory diagram used in a learning process of an intelligent face recognition and tracking system for distributing GPU resources using a CUDA according to an embodiment of the present invention.
FIG. 13 is an explanatory diagram of a network used in an intelligent face recognition and tracking system for distributing GPU resources using a CUDA according to an embodiment of the present invention. FIG.
FIG. 14 is an exemplary diagram illustrating real-time face tracking result image using deep learning of a tracking system and intelligent face recognition for distributing GPU resources using CUDA according to an embodiment of the present invention. FIG.
15 is an exemplary view comparing an angle of view of a general camera and a PTZ camera of an intelligent face recognition and tracking system using GPU to distribute GPU resources according to an embodiment of the present invention.
FIG. 16 is a diagram illustrating tracking target tracking through PTZ control of a tracking system and intelligent face recognition using GPU to distribute GPU resources according to an embodiment of the present invention. FIG.
FIG. 17 is a result graph according to the GPU resource distribution difference of the intelligent face recognition and tracking system for distributing GPU resources using CUDA according to an embodiment of the present invention. FIG.
18 is a graph showing GPU occupancy check results before and after GPU resource allocation in a tracking system and intelligent face recognition using GPU to distribute GPU resources according to an embodiment of the present invention.
19 is a flow chart illustrating an intelligent face recognition and tracking method for distributing GPU resources using CUDA in accordance with one embodiment of the present invention.
20 is a flowchart illustrating step S100 of an intelligent face recognition and tracking method for distributing GPU resources using a CUDA according to an embodiment of the present invention.
21 is a flowchart illustrating step S200 of an intelligent face recognition and tracking method for distributing GPU resources using a CUDA according to an embodiment of the present invention.

본 발명의 구체적인 특징 및 이점들은 첨부 도면에 의거한 다음의 상세한 설명으로 더욱 명백해질 것이다. 이에 앞서, 본 명세서 및 청구범위에 사용된 용어나 단어는 발명자가 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야 할 것이다. 또한, 본 발명에 관련된 공지 기능 및 그 구성에 대한 구체적인 설명이 본 발명의 요지를 불필요하게 흐릴 수 있다고 판단되는 경우에는, 그 구체적인 설명을 생략하였음에 유의해야 할 것이다.Specific features and advantages of the present invention will become more apparent from the following detailed description based on the accompanying drawings. Prior to this, the terms or words used in the present specification and claims are defined in the technical spirit of the present invention on the basis of the principle that the inventor can appropriately define the concept of the term in order to explain his invention in the best way. It should be interpreted to mean meanings and concepts. In addition, when it is determined that the detailed description of the known function and its configuration related to the present invention may unnecessarily obscure the subject matter of the present invention, it should be noted that the detailed description is omitted.

도 1에 도시된 바와 같이, 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템(S)은, 다수의 GPU로 구성되어 카메라(1)를 통해 입력된 영상으로부터 그리드 방식으로 얼굴 객체를 검출 및 트래킹을 수행하는 영상처리부(100) 및 쿠다(CUDA)를 통해 GPU 각각의 메모리 사용량과 활성화된 코어의 수를 지표를 토대로 최적의 GPU를 선별하고, 선별한 GPU를 스레드(thread)에 할당하는 제어부(200), 및 영상처리부(100)가 입력받은 영상과, 영상으로부터 검출한 얼굴 객체 및 트래킹을 출력하는 디스플레이부(300)를 포함한다.As shown in FIG. 1, an intelligent face recognition and tracking system S for distributing GPU resources using a CUDA according to an embodiment of the present invention is composed of a plurality of GPUs and inputted through a camera 1. Through the image processing unit 100 and CUDA, which detects and tracks face objects in a grid method from images, the optimal GPU is selected and selected based on the memory usage and the number of activated cores of each GPU. The controller 200 may be configured to allocate the GPU to a thread, and the display 300 may output an image received by the image processor 100, a face object detected from the image, and tracking.

이때, 쿠다를 이용해 다수의 GPU들 중에서 최적의 GPU 리소스 분배하는 알고리즘에 대한 일련의 과정은 도 2에 도시된 바와 같다.In this case, a series of processes for an algorithm for optimal GPU resource distribution among a plurality of GPUs using CUDA is illustrated in FIG. 2.

또한, GPU를 사용하기 위한 API(Application Programming Interface)로 쿠다를 사용하며, 쿠다를 사용하는 이유는 많은 양의 연상을 동시에 처리하기에 적합한 하드웨어가 GPU이기 때문이다. 하나의 코어만을 놓고 비교했을 때 CPU의 연산속도가 월등하지만, 일반적으로 쓰이는 CPU는 4코어 내지 8코어인데 비해 GPU는 1500개 이상의 코어를 가지고 있다.In addition, CUDA is used as an API (Application Programming Interface) for using the GPU, and the reason for using CUDA is that the GPU is suitable for processing a large amount of associations at the same time. Compared to just one core, the CPU's computational speed is superior, but the commonly used CPU is 4 to 8 cores, whereas the GPU has more than 1500 cores.

따라서, GPU를 이용해 많은 양의 연산을 동시에 처리할 수 있으며, 본 발명의 일 실시예에서는 GPU를 프로그래밍하기 쉽게 만들어주는 API로 쿠다를 적용하였고, 영상처리부(100)는 적어도 3개 이상의 GPU를 구비하도록 구성된다.Therefore, a large amount of operations can be simultaneously processed using the GPU, and in one embodiment of the present invention, a CUDA is applied as an API that makes the GPU easy to program, and the image processor 100 includes at least three GPUs. It is configured to.

도 3을 참조하면, 영상처리부(100)는 다수의 GPU를 포함하는 멀티 GPU로 구성되어 제어부(200)의 GPU 리소스 분배에 따라 작업을 수행하되, 카메라(1)를 통해 입력된 영상으로부터 그리드 방식으로 얼굴 객체를 검출하고, 검출한 얼굴 객체가 찾고자 하는 타겟과 일치하는지 여부를 판단한다.Referring to FIG. 3, the image processing unit 100 is configured of a multi-GPU including a plurality of GPUs to perform a task according to the GPU resource distribution of the control unit 200. However, the image processing unit 100 performs a grid method from an image input through the camera 1. The facial object is detected, and it is determined whether the detected facial object matches the target to be found.

이때, 영상처리부(100)가 검출한 객체는 얼굴 영역 또는 특정 사물 중에 어느 하나로 설정될 수 있고, 검출한 객체가 찾고자 하는 타겟과 일치하는지 여부의 판단은 딥러닝 학습을 통해 도출한다.In this case, the object detected by the image processor 100 may be set to either a face region or a specific object, and the determination of whether the detected object matches the target to be searched is derived through deep learning.

영상처리부(100)는 검출한 얼굴 객체가 찾고자 하는 타겟과 일치하는 경우, 일치하는 영상에 빨간색 박스 형태로 RoI(Region of Interest)를 지정하고, 박스 위에 해당 얼굴 객체의 이름 정보를 표시한다. 이때, RoI 지정 박스의 색상은 사용자 설정에 의해 변경될 수 있다.If the detected face object matches the target to be searched for, the image processor 100 designates a region of interest (RoI) in the form of a red box on the matched image, and displays name information of the face object on the box. At this time, the color of the RoI designation box may be changed by user setting.

영상처리부(100)는 전술한 최적의 GPU에 스레드 할당, 카메라(1)를 통해 입력된 영상으로부터 얼굴 객체 검출, 및 검출한 얼굴 객체가 타겟과 일치하는지 여부를 판단하는 절차를 기 설정된 기준에 부합하도록 반복 수행하여 지정한 RoI에 대한 트래킹을 수행한다.The image processor 100 conforms to a predetermined criterion for assigning a thread to the optimal GPU described above, detecting a face object from an image input through the camera 1, and determining whether the detected face object matches the target. Repeatedly executes tracking for the specified RoI.

영상처리부(100)는 지정한 RoI에 대한 트래킹 중에 카메라(1) 화각의 중앙 지점에서 일정 범위 이상 벗어나는 경우, 도 4에 도시된 바와 같이 PTZ(Pan Tilt Zoom) 제어를 통해 해당 RoI가 화각의 중심부에 위치하도록 카메라(1) 화각을 조정한다.If the image processing unit 100 deviates from the center point of the camera 1 angle of view more than a predetermined range during tracking for the designated RoI, the RoI is moved to the center of the field of view through PTZ (Pan Tilt Zoom) control as shown in FIG. 4. Adjust the angle of view of the camera 1 to position it.

이때, 카메라(1)는 영상처리부(100)에 구비된 GPU와 대응하는 개수로 구성될 수 있다.In this case, the camera 1 may be configured in a number corresponding to the GPU provided in the image processing unit 100.

이하, 제어부(200)가 영상처리부(100)의 GPU 디바이스 제어를 위한 세부절차에 대해 살피면 아래와 같다.Hereinafter, the controller 200 looks at the detailed procedure for controlling the GPU device of the image processor 100 as follows.

첫 번째로, 제어부(200)는 도 5에 도시된 바와 같이, GPU 각각의 메모리 사용량과 활성화된 코어의 수를 검출하여 각 GPU가 현재 어느 정도 사용되고 있는지를 파악한다.First, as shown in FIG. 5, the controller 200 detects how much each GPU is currently used by detecting memory usage and number of activated cores of each GPU.

두 번째로, 제어부(200)는 각 GPU의 현재 리소스 사용 상태에 따라 가장 점유율이 낮은 GPU를 스레드에 할당한다.Secondly, the controller 200 allocates a GPU having the lowest occupancy rate to a thread according to the current resource usage state of each GPU.

이때, 메모리 사용량과 활성화된 코어의 개수를 모두 고려하여 최적의 GPU를 할당하며, 도 6에 도시된 예와 같이, 제어부(200)가 리소스 점유율이 가장 낮은 GPU #2를 스레드 #1에 할당하게 된다.At this time, the optimal GPU is allocated in consideration of both the memory usage and the number of activated cores, and as shown in FIG. 6, the control unit 200 allocates GPU # 2 having the lowest resource occupancy to thread # 1. do.

아울러, 제어부(200)는 스레드 #2와 스레드 #3 들에 대해서도 첫 번째와 두 번째 과정을 수행하여 그림 7에 도시된 바와 같이 모든 스레드에 대하여 최적의 GPU를 할당하게 된다.In addition, the controller 200 performs the first and second processes on the threads # 2 and the threads # 3 to allocate the optimal GPU to all the threads as shown in FIG.

이때, 제어부(200)는 모든 스레드에 대하여 최적의 GPU를 할당한 후에는 첫 번째와 두 번째 과정을 매 프레임 반복시 오히려 GPU에 과부하가 발생될 우려가 있다.In this case, after allocating an optimal GPU to all threads, the controller 200 may cause an overload of the GPU when the first and second processes are repeated every frame.

따라서, 세 번째로, 제어부(200)는 GPU 점유율이 기 설정된 수준 이상으로 높아질 경우에만 다시 첫 번째와 두 번째 과정을 수행한다.Therefore, thirdly, the controller 200 performs the first and second processes again only when the GPU occupancy becomes higher than a predetermined level.

이때, 기준치를 높여 알고리즘을 실행할 경우에는 예상보다 빠르게 GPU 점유율이 높아져 GPU를 스위칭하기 전에 과부하가 걸릴 우려가 있다. 반대로 기준치를 낮추는 경우에는 GPU 스위칭이 너무 빈번하게 발생해 오히려 성능이 저하되는 현상이 발생하는 문제가 있다.In this case, when the algorithm is executed by increasing the reference value, the GPU occupancy may increase faster than expected, and there may be an overload before switching the GPU. On the contrary, when the reference value is lowered, GPU switching occurs too frequently, causing performance degradation.

따라서, 전술한 첫 번째와 두 번째 과정을 다시 수행하는 기준은 GPU 점유율 80%인 경우로 상정할 수 있고, 이 기준은 실험에 의해 도출되었으나 GPU의 성능에 따라 변경될 수 있다.Therefore, the criteria for performing the above-described first and second processes again may be assumed to be 80% of the GPU occupancy, and this criterion may be changed according to the performance of the GPU although it is derived by experiment.

도 8에 도시된 바와 같이, 제어부(200)가 리소스 점유율이 가장 낮은 GPU #2를 스레드 #1에 할당하였으나, GPU #2의 점유율이 다시 수행하는 기준인 GPU 점유율 80%를 오버하였으므로 리소스 점유율이 가장 낮은 GPU #1을 스레드 #1에 재할당하도록 구성된다.As illustrated in FIG. 8, the controller 200 allocates GPU # 2 having the lowest resource occupancy to thread # 1, but the resource occupancy ratio is over 80% of the GPU occupancy, which is the criterion for performing GPU # 2 again. Configured to reassign the lowest GPU # 1 to thread # 1.

이하, 도 9 내지 도 13을 참조하여 본 발명의 일 실시예에 따라 영상처리부가 딥러닝을 이용해 얼굴영역 검출 및 인식하는 절차에 대해 살피면 아래와 같다.9 to 13, an image processing unit according to an embodiment of the present invention will be described below with reference to a procedure of detecting and recognizing a face region using deep learning.

기존 얼굴 검출 알고리즘으로 널리 쓰이는 Haar-like feature 알고리즘은 눈썹, 눈동자 등의 영역간의 특징적인 밝기 차이를 이용하여 얼굴 영역을 검출하며, 기본적으로 물체의 기하학적 정보를 유지하며 사용되기 때문에 영역 내부에서의 변화나 약간의 위치 변화 등에서는 강점을 나타낸다. 그러나 영상의 밝기가 크게 변화하는 상황, 대상 영역이 회전하는 경우, 얼굴 각 영역의 색상 대비가 뚜렷하지 않은 경우 등에서 매우 취약한 단점을 가지고 있다. The Haar-like feature algorithm, widely used as a conventional face detection algorithm, detects facial areas by using characteristic brightness differences between areas such as eyebrows and pupils, and is basically used to maintain the geometric information of an object. Or a slight change in position, indicating strength. However, it has a weak point in a situation in which the brightness of the image changes drastically, when the target area is rotated, or when the color contrast of each area of the face is not clear.

따라서, 본 발명의 일 실시예에는 이러한 단점을 극복하고자 얼굴 영역을 다양한 각도의 회전까지 딥러닝으로 학습시킨다. Therefore, in an embodiment of the present invention, to overcome this disadvantage, the face region is trained by deep learning up to various angles of rotation.

얼굴 영역의 위치를 검출하기 위한 학습정보는 총 5가지의 채널이다. 첫 번째는 어떤 객체인지 인식하는 채널, 두 번째는 위치 정보 중의 중심좌표 x값, 세 번째는 위치 정보 중의 중심좌표 y값, 네 번째는 비율인 객체의 너비 w값, 다섯 번째는 비율인 객체의 높이 h값이다.Learning information for detecting the position of the face region is a total of five channels. The first is a channel that recognizes which object, the second is the x value of the center coordinates in the location information, the third is the y value of the center coordinates in the location information, the fourth is the width w of the object as a ratio, and the fifth is the The height h value.

즉, 본 발명의 일 실시예는 기존의 딥 러닝과 학습과정은 같지만 객체를 검출하는 방식에서 차이점이 있다. 객체를 검출하는 방식은 신경망으로 검출하는 딥 러닝과 달리 그리드로 객체 검출을 한다.That is, one embodiment of the present invention is the same as the existing deep learning process, but there is a difference in the way of detecting the object. Object detection is based on grid detection, unlike deep learning with neural networks.

본 발명의 일 실시예는 입력된 영상을 그리드로 분할하므로 처리속도가 빠르다는 장점이 있다.One embodiment of the present invention has an advantage that the processing speed is high because the input image is divided into grids.

도 9에 도시된 바와 같이 얼굴 영역 검출에 사용되는 딥러닝 Network는 총 26개의 layer로 이루어지며, 학습된 데이터들은 실시간 영상에서 얼굴 검출을 위해 사용된다.As shown in FIG. 9, the deep learning network used for face region detection is composed of 26 layers, and the learned data are used for face detection in a real-time image.

영상처리부는 카메라로부터 실시간으로 입력되는 영상 내에서 얼굴이라고 판단되는 부분은 흰색 박스 형태로 표시한 후에, 다음 단계인 얼굴 인식을 위해 잘라내어 임시로 저장한다.The image processor displays a portion determined to be a face in the image input in real time from the camera in the form of a white box, and cuts it out temporarily for the next step, face recognition.

영상처리부의 얼굴영역 검출은 2가지로 나누어 객체 검출을 수행하게 되는데, 먼저 입력 이미지의 전체 크기를 '1'로 계산한다. 이에 따라 중심좌표 값과 너비, 높이는 소수점으로 도출된다.The face region detection of the image processor is divided into two types and object detection is performed. First, the total size of the input image is calculated as '1'. Accordingly, the center coordinate value, width, and height are derived from the decimal point.

이때, 입력 이미지는 x, y, w, h 및 class 다섯 가지로 값이 저장되는데, 이것은 학습한 클래스의 개수만큼 생성되며, 생성된 데이터에서 인식률을 가지고 최종 객체가 검출된다.At this time, the input image is stored in five types of x, y, w, h and class, which are generated as many as the number of learned classes, and the final object is detected with the recognition rate in the generated data.

즉, 도 10에 도시된 객체검출 과정의 예와 같이, 딥러닝을 이용한 얼굴 영역 검출의 전체 흐름과 20개의 클래스로 구성될 수 있다.That is, as in the example of the object detection process illustrated in FIG. 10, the entire flow of face region detection using deep learning and 20 classes may be included.

또한, 딥러닝을 이용한 얼굴 인식은 도 11에 도시된 바와 같이, 영상처리부가 전술한 얼굴 검출 알고리즘을 이용해 사진이나 영상 등에 담긴 찾고자 하는 대상의 얼굴 영역을 검출하고 클래스를 분류해 저장 및 학습을 수행한다.In addition, face recognition using deep learning, as shown in FIG. 11, the image processing unit detects a face region of a target to be found in a photograph or an image using a face detection algorithm described above, classifies classes, and stores and learns them. do.

이어서, 영상처리부가 학습이 끝난 후에는 실시간으로 입력되는 영상에서 얼굴 검출 단계를 거쳐 임시로 저장된 얼굴 영역의 이미지를 받아와 사용자가 찾고자 하는 클래스와 일치하는 대상인지를 인식한다.Subsequently, after the image processing unit finishes the learning, the image processing unit receives the image of the temporarily stored face region from the image input in real time and recognizes whether the object matches the class to be searched for.

그리고, 영상처리부가 세 번째로 찾고자 하는 대상을 찾게 되면 빨간 박스 형태로 영상에 표시하고 박스 위에 대상의 이름을 표시한다.When the image processor finds the third object to be searched for, the image processor displays the image in the form of a red box and displays the name of the object on the box.

본 발명의 일 실시예에서는 Convolution Filter와 Fully Conncected Layer를 fine-tuning 하여 인식 결과의 향상을 도모하였으며, Overfitting을 방지하기 위해 Maxpooling Layer를 추가하고, Train set와 Test set을 나누어 학습한다.In an embodiment of the present invention, the convolution filter and the fully continued layer are fine-tuned to improve the recognition result. To prevent overfitting, the Maxpooling layer is added, and the train set and the test set are divided and learned.

Train set은 학습 과정 중 역전파 알고리즘을 이용해 가중치를 수정하고, Test set은 일정 횟수 이상 학습 시 Train set와 다른 DB를 이용해 가중치가 Overfitting 되었는지 판단한다. Train set과 Test set은 마지막 레이어에 Softmax를 사용해 학습한다.The train set modifies the weights using the backpropagation algorithm during the learning process, and the test set determines whether the weights are overfitting using the DB different from the train set when learning a certain number of times. Train sets and test sets are trained using Softmax on the last layer.

최종적으로 학습이 완료된 후에 역전파 알고리즘 없이 순방향으로만 레이어를 통과해 특징 벡터를 추출하고 그를 이용해 인식을 실시한다.Finally, after the learning is completed, the feature vector is extracted through the layer only in the forward direction without the backpropagation algorithm, and the recognition is performed using the feature vector.

이때, 얼굴 인식에 사용된 Network의 각 Layer의 크기, Layer의 역할은 도 12에 도시된 바와 같고, 도 13에 도시된 바와 같이 얼굴 인식에 사용되는 딥 러닝 Network는 총 16개의 Layer로 이루어진다.In this case, the size and role of each layer of the network used for face recognition are as shown in FIG. 12, and as shown in FIG. 13, the deep learning network used for face recognition consists of 16 layers.

이하, 도 14를 참조하여 본 발명의 일 실시예에 따른 얼굴을 트래킹하는 절차에 대해 살피면 아래와 같다.Hereinafter, a procedure for tracking a face according to an exemplary embodiment of the present invention will be described with reference to FIG. 14.

기존의 템플릿 매칭은 대상의 형태가 바뀔 경우 매칭이 잘 되지 않아 얼굴의 각도가 틀어질 경우 매칭에 실패할 확률이 높은 단점이 있고, HOG 알고리즘의 경우에는 전 프레임의 RoI 영역을 특성값을 추출해 사용하기 때문에 RoI 영역이 장애물에 가려져 영상 내에서 사라졌다 나타나는 경우에 취약하다는 단점이 있다. Existing template matching has a disadvantage that the matching fails when the shape of the object is changed and the face angle is changed.In the HOG algorithm, the RoI region of the entire frame is extracted and used. As a result, the RoI area is vulnerable to being obscured by an obscured image.

따라서, 본 발명의 일 실시예에는 실시간 얼굴 트래킹을 효과적으로 수행하기 위하여 앞서 서술한 과정(GPU할당, 얼굴 검출, 얼굴 인식)을 반복한다.Therefore, in an embodiment of the present invention, the above-described processes (GPU allocation, face detection, and face recognition) are repeated to effectively perform real-time face tracking.

이에 따라 영상처리부가 GPU 할당, 얼굴 검출, 얼굴 인식 과정을 반복하게 되면, RoI 영역이 사라졌다 나타날 경우나 카메라 화각 밖에서 안으로 들어올 경우에도 효율적으로 트래킹이 가능하며, 도 14에 도시된 바와 같이, 딥러닝을 이용한 실시간 얼굴 추적 결과 이미지로서 찾고자 하는 대상을 찾게 되면 빨간 박스 형태로 영상에 표시하고 그렇지 않은 경우에는 흰색 박스 형태로 표시한다.Accordingly, if the image processing unit repeats the GPU allocation, face detection, and face recognition process, even when the RoI region disappears or appears inside the camera view angle, tracking is efficiently performed. As shown in FIG. As a result of real-time face tracking using running, when an object to be searched is found, the image is displayed in a red box form, otherwise it is displayed in a white box form.

이하, 도 15 및 도 16을 참조하여 본 발명의 일 실시예에 따른 카메라 제어에 대해 살피면 아래와 같다.Hereinafter, the camera control according to an embodiment of the present invention will be described with reference to FIGS. 15 and 16 as follows.

도 15에 도시된 바와 같이, 본 발명의 일 실시예에 따른 카메라는 PTZ(Pan Tilt Zoom) 제어가 가능하도록 구성되어 종래 고정형 카메라에 비해 넓은 화각을 가질 수 있고, 찾고자 하는 대상을 집중적으로 트래킹할 수 있다. 따라서, 단일 카메라의 구성으로도 여러대의 카메라가 지켜봐야할 범위에서 인식 및 트래킹이 가능하다.As shown in FIG. 15, the camera according to an embodiment of the present invention is configured to enable Pan Tilt Zoom (PTZ) control to have a wider angle of view than a conventional fixed camera, and to intensively track an object to be searched for. Can be. Thus, even with a single camera configuration, it is possible to recognize and track in a range that multiple cameras should watch.

또한, 도 16에 도시된 바와 같이, 트래킹 대상이 화각의 중앙에서 일정 거리 이상 벗어날 경우, PTZ 제어를 통해 트래킹 대상이 다시 화각의 중앙에 위치할 수 있도록 제어할 수 있다.In addition, as shown in FIG. 16, when the tracking target deviates by a predetermined distance or more from the center of the angle of view, the tracking target may be controlled to be positioned at the center of the angle of view again through PTZ control.

이하, 도 17 및 도 18을 참조하여 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템(S)의 GPU 리소스 분배, 얼굴 검출, 얼굴 인식 및 트래킹에 대한 실험결과에 대해 살피면 아래와 같다.Hereinafter, with reference to FIGS. 17 and 18, an intelligent face recognition and tracking system (S) for distributing GPU resources using CUDA according to an embodiment of the present invention for GPU resource distribution, face detection, face recognition, and tracking The results of the experiment are as follows.

먼저, 쿠다를 사용하여 리소스를 분배하는 지능형 얼굴 인식 및 트래킹 시스템의 효율성을 측정하기 위하여, 성별, 나이, 체형이 각기 다른 150여 명의 데이터베이스를 구축하여 딥러닝을 사용하여 학습시켰다.First, to measure the effectiveness of intelligent face recognition and tracking system that distributes resources using CUDA, we built a database of about 150 people with different genders, ages, and body types and trained them using deep learning.

학습이 완료 된 후에 GPU 리소스를 분배했을 때와 분배하지 않았을 경우로 나누고 각각의 경우에 입력되는 영상에 나타나는 사람의 수를 1명에서 5명까지 바꾸어 가면서 얼굴 검출율과 인식률, 인식 결과를 표시하는 동영상의 fps수를 측정하고 GPU의 활성화 정도를 체크하였다.After the training is completed, the GPU resource is divided into and when it is not distributed, and in each case, the number of people appearing in the input image is changed from 1 to 5, displaying the face detection rate, recognition rate, and recognition result. The fps of the video was measured and the degree of activation of the GPU was checked.

카메라 원본 영상은 30fps으로 입력되었다. [표 1]에서 나타난 바와 같이 GPU 리소스를 분배하지 않을 경우에 영상에 등장하는 사람의 수가 많아질수록 검출 및 인식률이 급격히 저하되며, 4명이 넘는 사람이 등장 할 경우 아예 영상이 로드되지 않는 결과를 산출하였다.Original camera video was input at 30fps. As shown in [Table 1], when the GPU resources are not distributed, the detection and recognition rate decreases rapidly as the number of people appearing in the image increases.If more than four people appear, the image does not load at all. Calculated.

Figure 112018091221525-pat00001
Figure 112018091221525-pat00001

[표 2]에서 GPU 리소스를 분배했을 때의 실험 결과는 얼굴 검출율과 인식율의 결과가 영상에 등장하는 인원수에 관계없이 일정했으며, 결과 동영상의 fps 역시 꾸준히 25 fps 정도를 유지했다.In Table 2, the experimental results when the GPU resources were distributed were constant regardless of the number of faces in the image and the recognition rate, and the fps of the resultant video was also maintained at about 25 fps.

이러한 GPU 리소스 분배 차이에 따른 결과는 도 17의 그래프로 보면 더욱 확실한 차이를 보인다.The result according to the GPU resource distribution difference shows a more obvious difference in the graph of FIG.

Figure 112018091221525-pat00002
Figure 112018091221525-pat00002

[표 3]은 GPU 리소스 분배 전의 GPU 점유율을, [표 4]는 GPU 리소스 분배 후의 GPU 점유율을 나타내고 있다. 도 18은 GPU 리소스 분배 차이에 따른 GPU 점유율 상태를 그래프로 도시하였다.Table 3 shows the GPU occupancy before GPU resource distribution, and Table 4 shows the GPU occupancy after GPU resource distribution. 18 is a graph illustrating GPU occupancy states according to GPU resource distribution differences.

Figure 112018091221525-pat00003
Figure 112018091221525-pat00003

Figure 112018091221525-pat00004
Figure 112018091221525-pat00004

GPU 리소스를 분배하지 않은 경우, 1번 GPU의 사용량이 순식간에 100%까지 올라가면서 영상이 출력되지 않는 상황이 발생하였고, 그로 인하여 더 이상의 실험이 불가능했다. 실험 도중 GPU 2, 3번은 아예 로드조차 되지 않은 것 역시 확인 할 수 있다.When the GPU resources were not distributed, the situation in which the video was not output as the usage of the first GPU went up to 100% in an instant, caused no further experiments. You can also see that GPUs 2 and 3 weren't even loaded at all during the experiment.

GPU 리소스를 분배한 경우는, 1, 2, 3번의 GPU 리소스가 고르게 사용되는 것을 확인 할 수 있다. 등장 인원수가 많아질수록 연산량이 증가하며, 연산량이 증가할수록 GPU 리소스 분배 여부에 따라 점유율 및 실험 결과의 차이가 크게 벌어지는 것을 볼 수 있다. 따라서 본 발명에서 제안한 쿠다를 사용하여 리소스를 분배하는 지능형 얼굴 인식 및 트래킹 시스템의 효율성이 입증되었다.In the case of distributing GPU resources, it can be seen that the GPU resources 1, 2, and 3 are evenly used. As the number of appearances increases, the amount of computation increases, and as the amount of computation increases, the difference in occupancy and experimental results widens depending on whether the GPU resources are distributed. Therefore, the effectiveness of intelligent face recognition and tracking system for distributing resources using the proposed CUDA has been proved.

Figure 112018091221525-pat00005
Figure 112018091221525-pat00005

아울러, [표 5]에서 나타난 바와 같이 정지상태에서는 정면인 경우 약 98.2%, 측면인 경우 약 97.3%, 늦은 걸음 속도(1.0m/sec)에는 정면인 경우 약 94.6%, 측면인 경우 약 91.7%, 보통 걸음 속도(1.3m/sec)에는 정면인 경우 약93.4%, 측면인 경우 약 89.1%, 빠른 걸음 속도(1.6m/sec)에는 정면인 경우 약 93.1%, 측면인 경우 약 89%의 평균 인식률을 확인하였다. 측면은 1ㅀ 내지 45ㅀ 회전 범위 내에서 측정하였다.In addition, as shown in Table 5, in the stationary state, about 98.2% in the front, about 97.3% in the side, about 94.6% in the front and 91.7% in the side at the slow pace (1.0m / sec). , Average of about 93.4% for the front side, about 89.1% for the side, and about 93.1% for the front side, and about 89% for the side at normal walking speed (1.3m / sec) The recognition rate was confirmed. The sides were measured within the range of 1 kPa to 45 kPa rotation.

이하, 도 19를 참조하여 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 방법에 대해 살피면 아래와 같다.Hereinafter, an intelligent face recognition and tracking method for distributing GPU resources using a CUDA according to an embodiment of the present invention will be described with reference to FIG. 19.

먼저, 제어부(200)가 다수의 GPU 리소스를 분배한다(S100).First, the controller 200 distributes a plurality of GPU resources (S100).

그리고, 디스플레이부(300)가 영상치리부(100)가 입력받은 영상과, 영상으로부터 검출한 얼굴 객체 및 트래킹을 출력한다(S200).The display unit 300 outputs an image received by the image processing unit 100, a face object detected from the image, and tracking (S200).

이하, 도 20을 참조하여 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 방법의 제S100단계의 세부과정에 대해 살피면 아래와 같다.Hereinafter, referring to FIG. 20, a detailed process of step S100 of the intelligent face recognition and tracking method for distributing GPU resources using a CUDA according to an embodiment of the present invention will be described below.

먼저, 제어부(200)가 GPU 각각의 메모리 사용량과 활성화된 코어의 수를 검출하여 각 GPU가 현재 어느 정도 사용되고 있는지를 파악한다(S102).First, the controller 200 detects the memory usage of each GPU and the number of activated cores to determine how much each GPU is currently used (S102).

이어서, 제어부(200)가 각 GPU의 현재 리소스 사용 상태에 따라 가장 점유율이 낮은 GPU를 스레드에 할당한다(S104).Subsequently, the controller 200 allocates the GPU having the lowest occupancy rate to the thread according to the current resource usage state of each GPU (S104).

뒤이어, 제어부(200)가 GPU 점유율이 기 설정된 수준 이상으로 높아지는지 여부를 판단한다(S106).Subsequently, the controller 200 determines whether the GPU occupancy is higher than a predetermined level (S106).

제S106단계의 판단결과, GPU 점유율이 기 설정된 수준 이상으로 높아지는 경우, 제어부(200)가 상기 제S102 단계로 절차를 이행한다(S108).As a result of the determination in step S106, when the GPU occupancy becomes higher than the predetermined level, the controller 200 performs the procedure to the step S102 (S108).

이하, 도 21을 참조하여 본 발명의 일 실시예에 따른 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 방법의 제S200단계의 세부과정에 대해 살피면 아래와 같다.Hereinafter, referring to FIG. 21, a detailed process of step S200 of the intelligent face recognition and tracking method for distributing GPU resources using a CUDA according to an embodiment of the present invention will be described below.

제S100단계 이후, 영상처리부(100)가 입력된 영상으로부터 그리드 방식으로 얼굴 객체를 검출한다(S202).After operation S100, the image processor 100 detects a face object from the input image in a grid manner (S202).

이어서, 영상처리부(100)가 검출한 얼굴 객체가 찾고자 하는 타겟과 일치하는지 여부를 판단한다(S204).Next, the image processor 100 determines whether the detected face object matches the target to be searched for (S204).

제S204단계의 판단결과, 검출한 얼굴 객체가 찾고자 하는 타겟과 일치하는 경우, 영상처리부(100)가 일치하는 영상에 빨간색 박스 형태로 RoI(Region of Interest)를 지정한다(S206). 이때, 박스 위에 해당 얼굴 객체의 이름 정보를 표시할 수 있다.As a result of the determination in step S204, when the detected face object matches the target to be searched, the image processor 100 designates a region of interest (RoI) in the form of a red box on the matched image (S206). In this case, name information of the face object may be displayed on the box.

뒤이어, 영상처리부(100)가 지정한 RoI에 대한 트래킹을 수행한다(S208).Subsequently, the image processing unit 100 performs tracking on the designated RoI (S208).

이어서, 영상처리부(100)가 지정한 RoI에 대한 트래킹 중에 카메라(1) 화각의 중앙 지점에서 일정 범위 이상 벗어나는지 여부를 판단한다(S210).Subsequently, the image processor 100 determines whether the camera 1 is out of a predetermined range or more by a predetermined range during tracking for the designated RoI (S210).

제S210단계의 판단결과, 카메라(1) 화각의 중앙 지점에서 일정 범위 이상 벗어나는 경우, 영상처리부(100)가 PTZ(Pan Tilt Zoom) 제어를 통해 해당 RoI가 화각의 중심부에 위치하도록 카메라(1) 화각을 조정한다(S212).As a result of the determination in step S210, when the camera 1 is out of a predetermined range from the center point of view, the image processing unit 100 controls the corresponding RoI to the center of the field of view through PTZ (Pan Tilt Zoom) control. Adjust the angle of view (S212).

이상으로 본 발명의 기술적 사상을 예시하기 위한 바람직한 실시예와 관련하여 설명하고 도시하였지만, 본 발명은 이와 같이 도시되고 설명된 그대로의 구성 및 작용에만 국한되는 것이 아니며, 기술적 사상의 범주를 일탈함이 없이 본 발명에 대해 다수의 변경 및 수정이 가능함을 당업자들은 잘 이해할 수 있을 것이다. 따라서 그러한 모든 적절한 변경 및 수정과 균등 물들도 본 발명의 범위에 속하는 것으로 간주되어야 할 것이다.As described above and described with reference to a preferred embodiment for illustrating the technical idea of the present invention, the present invention is not limited to the configuration and operation as shown and described as described above, it is a deviation from the scope of the technical idea It will be understood by those skilled in the art that many modifications and variations can be made to the invention without departing from the scope of the invention. Accordingly, all such suitable changes, modifications, and equivalents should be considered to be within the scope of the present invention.

S: 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템
1: 카메라
100: 영상처리부
200: 제어부
300: 디스플레이부
S: Intelligent face recognition and tracking system using CUDA to distribute GPU resources
1: camera
100: image processing unit
200: control unit
300: display unit

Claims (8)

GPU로 구성되어 카메라를 통해 입력된 영상으로부터 그리드 방식으로 얼굴 객체를 검출 및 트래킹을 수행하는 영상처리부; 및
쿠다를 통해 상기 GPU 각각의 메모리 사용량과 활성화된 코어의 수를 지표를 토대로 GPU를 선별하고, 선별한 GPU를 스레드에 할당하는 제어부를 포함하되,
상기 영상처리부는,
상기 카메라를 통해 입력된 영상으로부터 그리드 방식으로 객체를 검출하고,
딥러닝 학습을 통해 검출한 얼굴 객체가 찾고자 하는 타겟과 일치하는지 여부를 판단하며,
검출한 객체가 찾고자 하는 타겟과 일치하는지 여부를 판단하되,
검출한 얼굴 객체가 찾고자 하는 타겟과 일치하는 경우, 일치하는 영상에 박스 형태로 RoI(Region of Interest)를 지정하고,
상기 제어부는,
상기 GPU 각각의 메모리 사용량과 활성화된 코어의 수를 토대로 각 GPU의 현재 사용량을 도출하여 리소스 점유율이 가장 낮은 GPU를 스레드에 할당하되,
상기 얼굴 객체를 검출 및 트래킹할 때 마다 각 GPU의 현재 사용량을 도출하고, 스레드가 할당된 GPU의 점유율이 기 설정된 수준 이상으로 높아질 경우, 각 GPU의 현재 사용량을 도출하여 리소스 점유율이 가장 낮은 GPU를 스레드에 재할당하는 것을 특징으로 하는 쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템.
An image processor configured to include a GPU and detect and track a face object in a grid manner from an image input through a camera; And
A control unit for selecting a GPU based on an indicator of memory usage and the number of activated cores of each of the GPUs through a CUDA, and allocating the selected GPUs to threads;
The image processor,
Detecting an object in a grid method from the image input through the camera,
Determining whether the face object detected through deep learning matches the target to be searched for,
Determine whether the detected object matches the target you are looking for,
If the detected face object matches the target to be searched for, the RoI (Region of Interest) is assigned to the matched image in the form of a box.
The control unit,
Based on the memory usage of each GPU and the number of active cores, the current usage of each GPU is derived and the GPU having the lowest resource occupancy is allocated to threads.
Each time the face object is detected and tracked, the current usage of each GPU is derived, and when the share of the GPU to which the thread is allocated becomes higher than a predetermined level, the current usage of each GPU is derived to determine the GPU having the lowest resource share. Intelligent face recognition and tracking system that uses CUDA to distribute GPU resources, which is reassigned to threads.
삭제delete 제1항에 있어서,
상기 영상처리부는,
상기 입력된 영상으로부터 얼굴 객체 검출, 및 검출한 얼굴 객체가 타겟과 일치하는지 여부를 판단하는 절차를 기 설정된 기준에 부합하도록 반복 수행하여 상기 RoI에 대한 트래킹을 수행하는 것을 특징으로 하는
쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템.
The method of claim 1,
The image processor,
It is characterized in that the tracking of the RoI is performed by repeatedly performing a procedure of detecting a face object from the input image and determining whether the detected face object matches a target to meet a predetermined criterion.
Intelligent face recognition and tracking system that uses CUDA to distribute GPU resources.
제1항에 있어서,
상기 영상처리부는,
상기 RoI에 대한 트래킹 중에 카메라 화각의 중앙 지점에서 일정 범위 이상 벗어나는 경우, PTZ 제어를 통해 상기 RoI가 화각의 중심부에 위치하도록 상기 카메라의 화각을 조정하는 것을 특징으로 하는
쿠다를 사용하여 GPU 리소스를 분배하는 지능형 얼굴 인식과 트래킹 시스템.
The method of claim 1,
The image processor,
If the deviation from the center point of the camera angle of view more than a predetermined range during tracking for the RoI, the angle of view of the camera is adjusted so that the RoI is located in the center of the field of view through PTZ control
Intelligent face recognition and tracking system that uses CUDA to distribute GPU resources.
삭제delete 삭제delete 삭제delete 삭제delete
KR1020180109613A 2018-08-21 2018-09-13 Intelligent Face Recognition and Tracking System and Method to Distribute GPU Resource using CUDA KR102011402B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/KR2018/011773 WO2020040348A1 (en) 2018-08-21 2018-10-05 System and method for intelligent face recognition and tracking, using cuda to distribute gpu resources

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020180097608 2018-08-21
KR20180097608 2018-08-21

Publications (1)

Publication Number Publication Date
KR102011402B1 true KR102011402B1 (en) 2019-08-16

Family

ID=67806889

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180109613A KR102011402B1 (en) 2018-08-21 2018-09-13 Intelligent Face Recognition and Tracking System and Method to Distribute GPU Resource using CUDA

Country Status (2)

Country Link
KR (1) KR102011402B1 (en)
WO (1) WO2020040348A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220072477A (en) * 2020-11-25 2022-06-02 주식회사 싸인텔레콤 Multithreaded-based imaging analysis system that improves real-time performance by separating the general situation event monitoring module from the specific situation event processing module

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114430500A (en) * 2022-04-02 2022-05-03 深圳酷源数联科技有限公司 Video plug-flow method with real-time target detection, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140058091A (en) * 2012-11-06 2014-05-14 네이버 주식회사 Apparatus, method and computer readable recording medium for assigning trnscording works
KR20140095333A (en) * 2013-01-24 2014-08-01 한남대학교 산학협력단 Method and apparratus of tracing object on image
KR20170084657A (en) * 2016-01-12 2017-07-20 소프트온넷(주) System and method for generating narrative report based on video recognition and event trancking
KR101850286B1 (en) 2017-06-27 2018-04-19 한국기술교육대학교 산학협력단 A deep learning based image recognition method for CCTV

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8233527B2 (en) * 2007-05-11 2012-07-31 Advanced Micro Devices, Inc. Software video transcoder with GPU acceleration
KR101249737B1 (en) * 2008-12-03 2013-04-03 한국전자통신연구원 Apparatus for tracking an object using a moving camera and method thereof
KR20160118989A (en) * 2015-04-03 2016-10-12 주식회사 미디어엑셀코리아 Video Clone Transcoding Apparatus and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140058091A (en) * 2012-11-06 2014-05-14 네이버 주식회사 Apparatus, method and computer readable recording medium for assigning trnscording works
KR20140095333A (en) * 2013-01-24 2014-08-01 한남대학교 산학협력단 Method and apparratus of tracing object on image
KR20170084657A (en) * 2016-01-12 2017-07-20 소프트온넷(주) System and method for generating narrative report based on video recognition and event trancking
KR101850286B1 (en) 2017-06-27 2018-04-19 한국기술교육대학교 산학협력단 A deep learning based image recognition method for CCTV

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20220072477A (en) * 2020-11-25 2022-06-02 주식회사 싸인텔레콤 Multithreaded-based imaging analysis system that improves real-time performance by separating the general situation event monitoring module from the specific situation event processing module
KR102551647B1 (en) 2020-11-25 2023-07-05 주식회사 싸인텔레콤 Multithreaded-based imaging analysis system that improves real-time performance by separating the general situation event monitoring module from the specific situation event processing module

Also Published As

Publication number Publication date
WO2020040348A1 (en) 2020-02-27

Similar Documents

Publication Publication Date Title
CN110688987B (en) Pedestrian position detection and tracking method and system
KR101023733B1 (en) Intra-mode region-of-interest video object segmentation
US7526102B2 (en) System and method for object tracking and activity analysis
US8150155B2 (en) Multi-mode region-of-interest video object segmentation
US8041077B2 (en) Method of motion detection and autonomous motion tracking using dynamic sensitivity masks in a pan-tilt camera
US6885760B2 (en) Method for detecting a human face and an apparatus of the same
US20190130165A1 (en) System and method for selecting a part of a video image for a face detection operation
EP3767520B1 (en) Method, device, equipment and medium for locating center of target object region
CN107491755B (en) Method and device for gesture recognition
WO2019114036A1 (en) Face detection method and device, computer device, and computer readable storage medium
US11700457B2 (en) Flicker mitigation via image signal processing
KR102011402B1 (en) Intelligent Face Recognition and Tracking System and Method to Distribute GPU Resource using CUDA
JP2004348732A (en) Method for adaptively updating background image expressing background of scene
KR102107334B1 (en) Method, device and system for determining whether pixel positions in an image frame belong to a background or a foreground
CN110276764A (en) K-Means underwater picture background segment innovatory algorithm based on the estimation of K value
Haque et al. Perception-inspired background subtraction
JP2006133990A (en) Image processing device
KR102344606B1 (en) CCTV system for tracking and monitoring of object, and tracking and monitoring method therefor
Foedisch et al. Adaptive road detection through continuous environment learning
CN111654747A (en) Bullet screen display method and device
CN116310662A (en) Object recognition method and device
Lin et al. Foreground object detection in highly dynamic scenes using saliency
Delibasis et al. A novel hybrid approach for human silhouette segmentation
Bruni et al. Perceptual object tracking
Khatoon et al. A comparative study on mixture of Gaussians for object segmentation

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant