WO2020101062A1 - Ptz 카메라 자동제어를 위한 강화학습 모델 생성 방법 및 강화학습 모델 - Google Patents
Ptz 카메라 자동제어를 위한 강화학습 모델 생성 방법 및 강화학습 모델 Download PDFInfo
- Publication number
- WO2020101062A1 WO2020101062A1 PCT/KR2018/013913 KR2018013913W WO2020101062A1 WO 2020101062 A1 WO2020101062 A1 WO 2020101062A1 KR 2018013913 W KR2018013913 W KR 2018013913W WO 2020101062 A1 WO2020101062 A1 WO 2020101062A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- ptz camera
- camera
- reinforcement learning
- learning model
- control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/695—Control of camera direction for changing a field of view, e.g. pan, tilt or based on tracking of objects
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/0499—Feedforward networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/092—Reinforcement learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N99/00—Subject matter not provided for in other groups of this subclass
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/58—Means for changing the camera field of view without moving the camera body, e.g. nutating or panning of optics or image sensors
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
Definitions
- the present invention relates to a method for generating a reinforcement learning model for automatic control of a PTZ camera to improve image control efficiency in an environment such as a general situation room or CCTV integrated control center to which an intelligent security control system is applied, and a reinforcement learning model generated thereby. It is about.
- PTZ camera control technology controls the camera based on the difference between the object and the center point of the camera in order to position the object in the center of the camera screen.
- this method is a simple camera movement method that does not consider the object size, and has a disadvantage that can be applied only to the object tracking field.
- the PTZ control method using homography considers the object size, but the zoom control is not accurate because the zoom is controlled in consideration of the physical distance between the object and the camera.
- the present invention proposes a method for generating a reinforced learning model that improves the image control efficiency of the intelligent security control system by generating an efficient reinforcement learning model for automatic control of the PTZ camera used in the intelligent security control system. .
- Reinforcement learning is a new methodology for machine learning that solves probabilistic decision-making problems. Unlike supervised learning, the reward or reward function is given to maximize the average of the reward values to be obtained in the future. It is a machine learning technique to find the policy function of. That is, unlike supervised learning, the target value is a reward and the predicted value is a policy or an action.
- a method for generating a reinforcement learning model for automatic control of a PTZ camera includes: 1) acquiring and analyzing learning image data for acquiring learning image data including object information, and analyzing location and size information of objects in the image to perform reinforcement learning; 2) selecting an action value of the PTZ camera to control the PTZ camera; 3) Calculate the Reward by estimating the control direction of the PTZ camera including Pan Left, Pan Right, Tilt Up, Tilt Down, and Zoom, and use the selected action value to move the PTZ camera to the estimated camera control direction.
- a reinforcement learning model including an artificial neural network including an input layer, an output layer, and a hidden layer.
- This reinforcement learning model includes means for setting a current learning target for PTZ camera control by calculating a deep Q-learning function using the weight of the artificial neural network; Means for setting a next step learning target for PTZ camera control by performing an actual PTZ camera action according to the set current learning target for PTZ camera control; And means for performing reinforcement learning on the PTZ camera control by updating weights to reduce errors in the current learning target and the next learning target for the PTZ camera control.
- the present invention it is possible to control the PTZ camera optimized for the position and size of the object by using reinforcement learning, and the automatic control of the PTZ camera based on the reinforcement learning improves the video control efficiency of the intelligent security control system and increases the workload. Can be reduced.
- 1 is an artificial neural network structure of the reinforcement learning model of the present invention
- Figure 2 is a parameter applied to the artificial neural network of Figure 1
- FIG. 3 is a flowchart of a method for generating a reinforcement learning model for automatic control of a PTZ camera of an intelligent video control system proposed in the present invention.
- FIG. 1 shows an artificial neural network structure used in the reinforcement learning model of the present invention.
- the artificial neural network shown in FIG. 1 has four hidden layers 30-1, 30-2, 30-3, and 30-4 between the input layer 10 and the output layer 20. ).
- FIG. 2 shows parameters applied to the artificial neural network of FIG. 1. Each parameter is schematically described in FIG. 2.
- the optimization is to find the value of the hyperparameter in the direction of minimizing the value of the loss function according to the training of the neural network model and the result, and the Adam technique, one of various techniques for this optimization, was used.
- the loss function (Loss functionoin) is a function that calculates the difference between the result value generated through the model and the value that actually wanted to occur, and there can be various types of functions depending on the purpose. square error) was also used in the present invention. mse measures the mean of the squares of errors or deviations to measure the difference between the estimated and expected values. Since the squared value is used, there is an advantage in that the accuracy of the guess is increased because the value change due to the error is large.
- -Activation function is a function that receives a signal and outputs it through appropriate processing. It determines whether the outputted signal is activated in the next step.
- a ReLU Rectified Linear Unit
- linear function was used for the output layer.
- -Learning rate means the amount of learning how much to learn when learning once, and the weighting parameter is updated after learning with one learning amount.
- the learning rate value should be determined in advance, such as 0.01 or 0.001. In general, if this value is too large or too small, it is difficult to find a suitable point. In neural network learning, we usually check if we are learning correctly by changing this learning rate value. If the learning rate is too large, a large value is output. If it is too small, the learning is ended without being updated. In the present invention, 0.001 was set as the learning rate.
- -Batch size means the number of data used in one learning, was set to 128 here.
- the number of households (Epochs) means one learning number (including forward and backward) for the entire data, and was set to 35 in the present invention.
- the reinforcement learning model including such an artificial neural network calculates a deep Q-learning function using the weight of the artificial neural network, sets a current learning target for PTZ camera control, and then sets an actual PTZ camera. Perform control actions to set next-level learning goals for PTZ camera control. Reinforcement learning is performed on the PTZ camera control by updating the weights to reduce errors in the current learning target for the PTZ camera control and the next learning target.
- the reinforcement learning model will be described again later.
- FIG. 3 is a flowchart of a method for generating a reinforced learning model for automatic control of a PTZ camera of an intelligent video control system proposed in the present invention.
- a method of generating a reinforcement learning model for automatic control of a PTZ camera according to the present invention will be described with reference to FIG. 3.
- the action value of the camera is defined as (0.02, 0.06, 0.1, 0.14, 0.18, 0.22, 0.26, 0.3), and the defined action value is selected through Equation 1.
- the action value a t of the PTZ camera is randomly selected by the ⁇ value in Equation 1, or the action value is selected as an untrained reinforcement learning model.
- ⁇ is 1, and as the number of repetitions t increases, the value of ⁇ decreases according to the constraints of Equation 2. That is, the action value a t is randomly selected only when the reduced ⁇ value is equal to or greater than the threshold rande, otherwise, the action value is selected using the current state s t and an untrained reinforcement learning model.
- Equation 2 is a constraint
- ⁇ decay is a value that decreases ⁇
- ⁇ min is a positive value that prevents ⁇ from falling negatively.
- Equation 3 analyzes the center coordinates of the screen and the current coordinates of the object to estimate the control direction of the PTZ camera (ie, Pan Left, Pan Right, Tilt Up, Tilt Down, Zoom).
- pBrr denotes the difference between the horizontal position of the current object and the horizontal center distance of the acquired image
- tBrr denotes the difference between the vertical position of the current object and the vertical center distance of the acquired image.
- ⁇ is a threshold constant, and when tBrr and pBrr are less than ⁇ , Zoom In is estimated in the camera control direction. Otherwise, Pan and Tilt are performed. If pBrr is positive, Pan Right is estimated, and if negative, Pan Left is estimated as the moving direction. If tBrr is positive, Tilt Down is estimated, and if negative, camera control direction is estimated.
- the PTZ camera is moved in the estimated camera control direction using the action value selected in step 120 above.
- Reward is given adaptively to the change of the position of the object in the image after moving the PTZ camera.
- Reward r t corresponding to the movement direction and action value is calculated using Equations 4, 5, and 6.
- errC is the difference between the position of the object and the center of the screen in the state before the camera movement
- errN is the difference between the position of the object changed after the camera moves and the center of the screen.
- a 1 is the normalization constant
- ⁇ 1 is the target size of Pan and Tilt.
- Equations 7 and 8 Reward r t for Zoom is calculated using Equations 7 and 8.
- errCZ and errNZ are object size information for before and after camera movement
- a 1 and a 2 in Equations 5 and 6 are normalization constants, for example, 100 and 10, respectively.
- ⁇ is a constant reflecting errNZ, for example, it can be set to 1.2
- ⁇ 2 can be set to, for example, 70 as the target size of Zoom.
- Pan, Tilt, and Zoom movements have + Reward when they are close to the horizontal and vertical centers and target sizes, and -Reward in the opposite direction, so they are adaptive to the movement value and direction. Rewards can be granted.
- the data set including the state before and after the action to be saved and the reward is composed of 11 detailed data, and each detailed data item is as follows.
- Equation 9 is used to create the reinforcement learning model.
- Equation 9 above is a formula for setting learning goals in reinforcement learning, and the definition of each variable is as follows.
- s t Status of the current stage
- a t Action value of the current step
- a ' Action value of the next step
- the action value is a value selected from (0.02, 0.06, 0.1, 0.14, 0.18, 0.22, 0.26, 0.3))
- Paragraph 1 in Equation 9 is an artificial neural network. Calculate the Q value (deep Q-learning function value) with the current state s t of the PTZ camera and the current action value a t (setting the current learning target for the PTZ camera).
- Paragraph 2 is an artificial neural network copied using the PTZ camera status s t + 1 and the newly selected action value a 'of the next step after performing the actual PTZ camera action with the a t value selected in item 1. Calculate the maximum Q value. The calculated Q value is adjusted by the weight ⁇ , and the rewards acquired after the execution of item 1 are combined (setting the next step learning target for the PTZ camera). Artificial neural network that can reduce the errors in terms 1 and 2 Reinforcement learning for the PTZ camera is performed by learning.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Medical Informatics (AREA)
- Image Analysis (AREA)
- Studio Devices (AREA)
Abstract
본 발명은 지능형 보안관제 시스템에서 사용되는 PTZ 카메라의 자동제어를 위해 효율적인 강화학습 모델을 생성함으로써, 지능형 보안관제 시스템의 영상 관제 효율성을 향상시키는 강화학습 모델 생성 방법을 제안한다. 본 발명의 방법은 1) 강화학습을 수행하기 위해 객체 정보가 포함된 학습용 영상 데이터를 취득하고, 영상 내 객체의 위치 및 크기 정보를 분석하는 학습용 영상데이터 취득 및 분석 단계; 2) PTZ 카메라 제어를 위해 PTZ 카메라의 액션값을 선택하는 단계; 3) PTZ 카메라의 제어 방향을 추정해 리워드(Reward)를 계산하는 단계; 4) 카메라의 액션 전,후 상태와 Reward가 포함된 데이터셋을 저장하는 단계; 5) 저장 데이터셋의 개수가 사전 결정된 개수 이상인지 판단하는 단계; 6) 저장된 데이터셋을 기반으로 강화학습 모델을 생성하는 단계를 포함한다.
Description
본 발명은 지능형 보안 관제 시스템이 적용된 종합상황실 또는 CCTV 통합관제센터와 같은 환경에서의 영상관제 효율 향상을 위하여 PTZ 카메라 자동제어를 위한 강화학습 모델을 생성하는 방법, 그리고 이에 의해 생성된 강화학습 모델에 관한 것이다.
현재 많은 CCTV 통합관제센터가 구축되어 운영 중이며 여기에 많은 카메라가 연계되어 있다(2018년 현재 대한민국내에 약 190개소 이상의 CCTV 통합관제센터가 운영중이며 약 40만 9000여대의 카메라가 사용되고 있음).
지속적인 CCTV 수요의 증가로 인해 지방정부 및 산업현장에서 CCTV 통합관제센터 구축 후 관제인력 부족으로 어려움을 호소하고 있다. 이로 인해, 관제요원 1인당 수십 내지 수백 대의 카메라를 관제해야 하는 문제가 발생하고 있고, 이는 관제 효율 하락의 주요 원인이 되고 있다. 또한 관제요원을 추가 배치시에는 많은 예산을 확보해야 하는 문제가 발생한다.
최근 이러한 문제점을 완화하고 CCTV 통합관제센터의 관제 시스템 효율성을 높이기 위해 스마트 관제가 도입되고 있다. 스마트 관제에는 영상 분석 서비스, 관제 요원의 관제 채널의 수 감소, 카메라의 우선순위 판단 등 여러 기술이 적용된다. 그러나 위험상황 발생과 같은 이벤트 감지시에 카메라의 PTZ(pan, tilt, zoom)를 수동으로 제어해야 한다.
종래의 PTZ 카메라 제어 기술은 카메라 화면 중심에 객체를 위치시키기 위해 객체와 카메라 중심점의 거리의 차이를 기반으로 카메라를 제어하고 있다. 그러나 이 방법은 객체 크기를 고려하지 않은 단순한 카메라 이동 방법으로, 객체 추적 분야에만 적용할 수 있는 단점이 있다. 또한, 호모그래피를 이용한 PTZ 제어 방법은 객체 크기를 고려하지만 객체와 카메라의 물리적 거리를 고려해 Zoom을 제어하기 때문에 Zoom 제어가 정확하지 않다.
본 발명은 상기 문제를 극복하기 위하여 지능형 보안관제 시스템에서 사용되는 PTZ 카메라의 자동제어를 위해 효율적인 강화학습 모델을 생성함으로써, 지능형 보안관제 시스템의 영상 관제 효율성을 향상시키는 강화학습 모델 생성 방법을 제안한다.
본 발명에 따르면, 강화학습을 이용한 PTZ 카메라 자동제어를 위해 카메라 이동을 예측하고 상황에 적응적으로 Reward를 부여하는 강화학습 모델을 생성함으로써 지능형 보안 관제 시스템의 영상 관제를 효율적으로 수행할 수 있게 된다.
강화학습(reinforcement learning: RL)은 확률적 의사결정 문제를 푸는 기계학습의 새로운 방법론으로, 지도학습(supervised learning)과 달리 보상 또는 리워드(reward) 함수가 주어져서 미래에 얻어질 리워드값들의 평균을 최대로 하는 정책 함수를 찾는 기계학습 기법이다. 즉, 지도학습과 달리 목표값(target)은 리워드(reward)이고 예측값은 정책(policy) 또는 액션(action)이다.
상기 과제를 해결하기 위한 한 측면에 따르면, PTZ 카메라 자동제어를 위한 강화학습 모델을 생성하는 방법이 제공된다. 이 방법은 1) 강화학습을 수행하기 위해 객체 정보가 포함된 학습용 영상 데이터를 취득하고, 영상 내 객체의 위치 및 크기 정보를 분석하는 학습용 영상데이터 취득 및 분석 단계; 2) PTZ 카메라 제어를 위해 PTZ 카메라의 액션값을 선택하는 단계; 3) Pan Left, Pan Right, Tilt Up, Tilt Down, Zoom이 포함된 PTZ 카메라의 제어 방향을 추정해 리워드(Reward)를 계산하여, 상기 선택된 액션값을 이용하여 추정된 카메라 제어 방향으로 PTZ 카메라를 이동시키고, PTZ 카메라 이동 후 영상 내 객체의 위치 변화에 적응적으로 Reward를 부여하는 단계; 4) 카메라의 액션 전,후 상태와 Reward가 포함된 데이터셋을 저장하는 단계; 5) 저장 데이터셋의 개수가 사전 결정된 개수 이상인지 판단하는 단계; 6) 저장된 데이터셋을 기반으로 강화학습 모델을 생성하는 단계를 포함한다.
또한, 상기 과제를 해결하기 위한 다른 측면에 따르면, 입력층, 출력층, 및 은닉층을 포함하는 인공신경망을 포함하는 강화학습 모델이 제공된다. 이 강화학습 모델은, 상기 인공신경망의 가중치(weight)를 이용해 딥 Q-러닝(deep Q-learning) 함수를 계산하여 PTZ 카메라 제어에 대한 현재 학습 목표를 설정하는 수단; 상기 설정된 PTZ 카메라 제어에 대한 현재 학습 목표에 따라 실제의 PTZ 카메라 액션을 수행하여 PTZ 카메라 제어에 대한 다음 단계 학습 목표를 설정하는 수단; PTZ 카메라 제어에 대한 상기 현재 학습 목표와 다음 단계 학습 목표의 에러를 줄이도록 가중치를 갱신하여서 PTZ 카메라 제어에 대해 강화학습을 수행하는 수단을 포함한다.
이상에서 소개한 본 발명의 구성 및 작용은 차후에 도면과 함께 설명하는 구체적인 실시예를 통하여 더욱 명확해질 것이다.
본 발명에 따르면, 강화학습을 이용함으로써 객체의 위치와 크기에 최적화 된 PTZ 카메라 제어가 가능하며, 이러한 강화학습 기반 PTZ 카메라 자동 제어에 의해 지능형 보안관제 시스템의 영상관제 효율성이 향상되고, 업무 부담이 감소될 수 있다.
도 1은 본 발명의 강화학습 모델의 인공신경망 구조
도 2는 도 1의 인공신경망에 적용된 파라미터
도 3은 본 발명에서 제안하는 지능형 영상 관제 시스템의 PTZ 카메라 자동제어를 위한 강화학습 모델 생성 방법의 흐름도
본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 기술되어 있는 실시예를 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있는 것이며, 단지 본 실시예는 본 발명의 개시가 완전하도록 하여 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이다. 본 발명의 기술적 범위는 청구항의 기재에 의해 정의된다.
한편, 본 명세서에서 사용된 용어는 실시예를 설명하기 위한 것이며 본 발명을 제한하고자 하는 것이 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 또는 "포함하는(comprising)"은 언급된 구성요소, 단계, 동작 및/또는 소자 이외의 하나 이상의 다른 구성요소, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다.
이하, 본 발명의 바람직한 실시예를 첨부 도면을 참조하여 상세히 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가급적 동일한 부호를 부여하고 또한 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있는 경우에는 그 상세한 설명을 생략한다.
도 1은 본 발명의 강화학습 모델에 사용된 인공신경망 구조를 나타낸다. 도 1에 나타낸 인공신경망은 입력층(Innput layer)(10)과 출력층(Output layer)(20) 사이에 4개의 은닉층(Hidden layer)(30-1, 30-2, 30-3, 30-4)을 갖고 있다.
도 2는 도 1의 인공신경망에 적용된 파라미터를 나타낸다. 도 2에서 각 파라미터에 대해 개략적으로 설명한다.
- 최적화 기법(Optimizer)으로는 Adam을 사용하였다. 최적화는 신경망 모델의 학습과 그 결과에 따른 손실함수의 값을 최소화하는 방향으로 하이퍼파라미터의 값을 찾는 것이며, 이러한 최적화를 위한 다양한 기법 중 하나인 Adam 기법을 사용하였다.
- 손실함수(Loss functioin)는 모델을 통해 생성된 결과값과 실제로 발생하기를 원했던 값 간의 차이를 계산하는 함수로, 목적에 따라 여러 종류의 함수가 존재할 수 있는데, 이를 위해 많이 사용되는 mse(mean square error)를 본 발명에서도 사용하였다. mse는 추정한 값과 기대했던 값간의 차이를 측정하기 위해 에러 또는 편차의 제곱의 평균을 측정한다. 제곱값을 이용하므로 에러에 따른 값 변화가 커서 추측의 정확성이 높아지는 장점이 있다.
- 활성화 함수(Activation function)는 신호를 입력받아 이를 적절한 처리를 하여 출력해주는 함수로서, 이를 통해 출력된 신호가 다음 단계에서 활성화되는지를 결정한다. 활성화 함수로, 은닉층에는 ReLU(Rectified Linear Unit) 함수를, 출력층에는 Linear 함수를 사용하였다.
- 학습률(Learning Rate)은 한 번 학습할 때 얼마만큼 학습해야 하는지의 학습의 양을 의미하며 한 번의 학습량으로 학습한 이후에 가중치 파라미터가 갱신된다. 학습률 값은 미리 0.01, 0.001과 같이 특정 값을 정해두어야 하며 일반적으로 이 값이 너무 크거나 작으면 적합한 지점으로 찾아가기가 어렵다. 신경망 학습에서는 보통 이 학습률 값을 변경하면서 올바르게 학습하고 있는지를 확인한다. 학습률이 너무 크면 큰 값을 출력하고, 너무 작으면 거의 갱신되지 않고 학습이 끝나버린다. 본 발명에서는 0.001을 학습률로 설정하였다.
- 뱃치사이즈(Batch size)는 한 번의 학습시 사용되는 데이터의 수를 의미하는 것으로 여기서는 128개로 설정하였다.
- 세대수(Epochs)는 전체 데이터에 대한 한 번의 학습수(forward 와 backward 포함)를 의미하는데, 본 발명에서는 35로 설정하였다.
- 리워드가 리턴(return)되는 단위 구간인 에피소드(Episode)는 1000으로 설정하였다.
이러한 인공신경망을 포함하는 강화학습 모델은, 이 인공신경망의 가중치(weight)를 이용해 딥 Q-러닝(deep Q-learning) 함수를 계산하여 PTZ 카메라 제어에 대한 현재 학습 목표를 설정한 후에 실제 PTZ 카메라 제어 액션을 수행하여 PTZ 카메라 제어에 대한 다음 단계 학습 목표를 설정한다. PTZ 카메라 제어에 대한 현재 학습 목표와 다음 단계 학습 목표의 에러를 줄이도록 가중치를 갱신하여서 PTZ 카메라 제어에 대해서 강화학습을 수행한다. 강화학습 모델에 대해서는 추후에 다시 설명한다.
도 3은 본 발명에서 제안하는 지능형 영상 관제 시스템의 PTZ 카메라 자동제어를 위한 강화학습 모델 생성 방법의 흐름도이다. 도 3을 참조하여 본 발명에 따른 PTZ 카메라 자동제어를 위한 강화학습 모델을 생성하는 방법에 대해 설명한다.
110: 강화학습을 수행하기 위해 객체 정보가 포함된 학습용 영상 데이터를 취득하고, 영상 내 객체의 위치 및 크기 [x, y, w(width), h(height)] 정보를 분석하는 학습용 영상데이터 취득 및 분석 단계.
120: 110의 단계를 수행한 후, PTZ 카메라 제어를 위해 PTZ 카메라의 액션값을 선택하는 단계.
여기서 카메라의 액션값은 (0.02, 0.06, 0.1, 0.14, 0.18, 0.22, 0.26, 0.3)으로 정의하며, 정의된 액션값은 수식 1을 통해 선택된다. PTZ 카메라의 액션값 at는 수식 1에서 ε 값에 의해 무작위로 선택되거나, 학습되지 않은 강화학습 모델로 액션값을 선택한다. 여기에서 ε는 1이며, 반복횟수 t가 증가할수록 수식 2의 제약 조건에 따라 ε 값이 감소한다. 즉, 감소된 ε 값이 임계값인 rande와 같거나 이보다 클 경우에만 액션값 at를 무작위로 선택하며, 그렇지 않은 경우에는 현재 상태 st와 학습되지 않은 강화학습 모델로 액션값을 선택한다.
수식 2는 제약조건으로, εdecay는 ε를 감소시키는 값이고, εmin은 ε 값이 마이너스로 떨어지지 않게 하는 양수 값이다.
130: 이전 120 단계를 수행한 후, PTZ 카메라의 자동제어 방향을 추정해 리워드(Reward)를 계산하는 단계
화면의 중심 좌표와 객체의 현재 좌표를 수식 3을 통해 분석하여 PTZ 카메라의 제어 방향(즉, Pan Left, Pan Right, Tilt Up, Tilt Down, Zoom)을 추정한다.
여기서 pBrr은 현재 객체의 가로 위치와 취득한 영상의 가로 중심 거리의 차이를 나타내고, tBrr은 현재 객체의 세로 위치와 취득한 영상의 세로 중심 거리의 차이를 말한다. 또한 τ는 임계값 상수이고, tBrr과 pBrr이 τ보다 작을 때 Zoom In을 카메라 제어 방향으로 추정한다. 그 외에는 Pan, Tilt를 수행하는데 pBrr이 양수일 경우 Pan Right, 음수일 경우 Pan Left를 이동 방향으로 추정하고, tBrr이 양수일 경우 Tilt Down, 음수일 경우 Tilt UP으로 카메라 제어 방향을 추정한다.
이 단계에서는 앞의 단계 120에서 선택된 액션값을 이용하여 추정된 카메라 제어 방향으로 PTZ 카메라를 이동시킨다. PTZ 카메라 이동 후 영상 내 객체의 위치 변화에 적응적으로 Reward를 부여한다.
이를 위해 먼저 Pan과 Tilt에 관한 PTZ 카메라 움직임 발생시 수식 4, 5, 6을 이용하여 이동 방향 및 액션값에 대응되는 Reward rt를 계산한다. 여기서 errC는 카메라 움직임 이전 상태에서 객체의 위치와 화면 중심의 거리 차이고, errN은 카메라 이동 후 변한 객체의 위치와 화면 중심의 거리 차이다. a1은 정규화 상수이고, τ1은 Pan과 Tilt의 목표 크기이다.
다음으로 수식 7, 8을 이용하여 Zoom에 관한 Reward rt를 계산한다. 여기서 errCZ와 errNZ는 각각 카메라 이동 전,후에 대한 객체 크기 정보이고, 앞의 a1과 수식 5, 6의 a2는 정규화 상수로 예컨대 각각 100, 10으로 설정가능하다. 그리고 β는 errNZ를 반영하는 상수로 예컨대 1.2로 설정가능하며, τ2는 Zoom의 목표 크기로 예컨대 70으로 설정할 수 있다.
이와 같이 수식 4~8을 이용하여 Pan, Tilt, Zoom 이동이 각각 가로, 세로의 중심과 목표 크기에 가까워질 경우 +Reward를 갖고 반대의 경우 -Reward를 갖기 때문에 이동값 및 방향에 대해 적응적으로 Reward를 부여할 수 있다.
140: 이전 130 단계를 수행한 후, 액션 전,후 상태와 Reward를 저장하는 단계.
저장할 액션 전,후 상태 및 Reward가 포함된 데이터셋은 11개의 세부 데이터로 구성되어 있으며 각 세부 데이터 항목은 다음과 같다.
- 카메라 이동 전 객체 상태정보(x, y, width, height)
- 액션값 추정 정보(0~7)
- Reward
- 카메라 이동 후 객체 상태정보(x, y, width, height)
- 종료 Flag
150: 이전 140 단계를 수행한 후, 저장 데이터셋의 개수가 일정 개수 이상인지 판단하는 단계.
일 실시예에서는 강화학습에 사용할 목적으로 액션 전,후 상태와 Reward로 구성된 데이터셋 개수가 3000개 이상인지 확인한다.
160: 이전 150 단계를 수행한 후, 저장된 데이터셋을 기반으로 강화학습 모델을 생성하는 단계.
강화학습 모델을 생성하기 위해 수식 9를 사용한다.
위 수식 9는 강화학습시의 학습 목표 설정에 관한 수식으로서, 각 변수의 정의는 다음과 같다.
t: 반복 횟수, T: 총 반복 횟수
st: 현재 단계의 상태, st+1: 다음 단계의 상태. 좀 더 구체적으로, st는 객체의 현재 좌표 및 크기이고, st+1은 120과 130 단계에서 추정된 액션값과 방향으로 PTZ 카메라를 이동시켰을 때의 객체의 좌표 및 크기이다(객체의 좌표 및 크기 s={x,y,w,h}임).
at: 현재 단계의 액션값, a': 다음 단계의 액션값 (본 발명에서 액션값은 (0.02, 0.06, 0.1, 0.14, 0.18, 0.22, 0.26, 0.3) 중 선택된 값)
γ: 무작위성을 조절하는 가중치(Weight)(E-greedy 방법 사용)
rt: 현재 단계의 Reward
수식 9에서 ①번 항은 인공신경망 를 이용해 PTZ 카메라의 현재 상태 st와 현재 액션값 at로 Q값(딥 Q-러닝 함수값)을 계산한다(PTZ 카메라에 대한 현재 학습 목표 설정). ②번 항은 ①번 항에서 선택한 at값으로 실제 PTZ 카메라 액션을 수행한 후 변경된 다음 단계의 PTZ 카메라 상태 st+1와 새롭게 선택된 액션값 a'를 이용하여 복사된 인공신경망 을 통해 최대가 되는 Q값을 계산한다. 산출된 Q값은 가중치 γ로 조절하며, ①번 항 수행 후에 습득한 Reward를 결합한다(PTZ 카메라에 대한 다음 단계 학습 목표 설정). ① 항과 ② 항의 에러를 줄일 수 있는 인공신경망 를 학습함으로써 PTZ 카메라에 대한 강화학습이 수행된다.
이상에서, 본 발명의 바람직한 실시예를 통하여 본 발명의 구성을 상세히 설명하였으나, 본 발명이 속하는 기술분야의 통상의 지식을 가진 자는 본 발명이 그 기술적 사상이나 필수적인 특징을 변경하지 않고서 본 명세서에 개시된 내용과는 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 이상에서 기술한 실시예들은 모든 면에서 예시적인 것이며 한정적이 아닌 것으로 이해해야만 한다. 본 발명의 보호범위는 상기 상세한 설명보다는 후술한 특허청구범위에 의하여 정해지며, 특허청구의 범위 그리고 그 균등 개념으로부터 도출되는 모든 변경 또는 변형된 형태는 본 발명의 기술적 범위에 포함되는 것으로 해석되어야 한다.
Claims (11)
- PTZ 카메라 자동제어를 위한 강화학습 모델을 생성하는 방법으로서,1) 강화학습을 수행하기 위해 객체 정보가 포함된 학습용 영상 데이터를 취득하고, 영상 내 객체의 위치 및 크기 정보를 분석하는 학습용 영상데이터 취득 및 분석 단계;2) PTZ 카메라 제어를 위해 PTZ 카메라의 액션값을 선택하는 단계;3) Pan Left, Pan Right, Tilt Up, Tilt Down, Zoom이 포함된 PTZ 카메라의 제어 방향을 추정해 리워드(Reward)를 계산하여, 상기 선택된 액션값을 이용하여 추정된 카메라 제어 방향으로 PTZ 카메라를 이동시키고, PTZ 카메라 이동 후 영상 내 객체의 위치 변화에 적응적으로 Reward를 부여하는 단계;4) 카메라의 액션 전,후 상태와 Reward가 포함된 데이터셋을 저장하는 단계;5) 저장 데이터셋의 개수가 사전 결정된 개수 이상인지 판단하는 단계;6) 저장된 데이터셋을 기반으로 강화학습 모델을 생성하는 단계를 포함하는 PTZ 카메라 자동제어를 위한 강화학습 모델 생성 방법.
- 제1항에서, 상기 3) PTZ 카메라의 제어 방향을 추정해 리워드(Reward)를 계산하는 단계에서, PTZ 카메라의 제어 방향은 의 수식으로 추정하여, tBrr와 pBrr이 τ보다 작을 때는 Zoom In을 카메라 제어 방향으로 추정하고, 그 외의 경우에는 Pan과 Tilt를 카메라 제어 방향으로 추정하되,여기서 pBrr은 현재 객체의 가로 위치와 취득한 영상의 가로 중심 거리의 차이를, tBrr은 현재 객체의 세로 위치와 취득한 영상의 세로 중심 거리의 차이를, τ는 사전에 정해진 임계값 상수를 의미하는 PTZ 카메라 자동제어를 위한 강화학습 모델 생성 방법.
- 제3항에서, 상기 pBrr이 양수일 경우 Pan Right, 음수일 경우 Pan Left를 카메라 제어 방향으로 추정하고, tBrr이 양수일 경우 Tilt Down을, 음수일 경우 Tilt UP을 카메라 제어 방향으로 추정하는 PTZ 카메라 자동제어를 위한 강화학습 모델 생성 방법.
- 제1항에서, 4) 카메라의 액션 전,후 상태와 Reward가 포함된 데이터셋을 저장하는 단계에서, 저장되는 데이터셋은 카메라 이동 전 객체 상태정보, 액션값 추정 정보, Reward, 카메라 이동 후 객체 상태정보를 포함하는 PTZ 카메라 자동제어를 위한 강화학습 모델 생성 방법.
- 제1항에서, 5) 저장 데이터셋의 개수가 사전 결정된 개수 이상인지 판단하는 단계에서, 사전 결정된 데이터셋 개수는 3000개인 PTZ 카메라 자동제어를 위한 강화학습 모델 생성 방법.
- 제1항에서, 6) 저장된 데이터셋을 기반으로 강화학습 모델을 생성하는 단계는,인공신경망을 이용해 현재 상태와 현재 액션값으로 딥 Q-러닝(deep Q-learning) 함수를 계산하여 PTZ 카메라 제어에 대한 현재 학습 목표를 설정하는 수단;상기 현재 학습 목표 설정 단계의 수행 후에 Reward를 습득하는 단계와,상기 현재 액션값으로 실제 액션을 수행한 후 변경된 다음 단계의 상태와 새롭게 선택된 액션값을 이용하여 복사된 인공신경망을 통해 최대가 되는 딥 Q-러닝 함수값을 계산하고, 산출된 딥 Q-러닝 함수값을 가중치로 조절하고 상기 현재 학습 목표 설정 단계의 수행 후에 습득한 Reward를 결합하여 다음 단계 학습 목표를 설정하는 단계를 포함하는 PTZ 카메라 자동제어를 위한 강화학습 모델 생성 방법.
- 제1항 내지 제9항 중 어느 한 항에 기재된 PTZ 카메라 자동제어에 사용되는 강화학습 모델로서,입력층, 출력층, 및 은닉층을 포함하는 인공신경망;이 인공신경망의 가중치(weight)를 이용해 딥 Q-러닝(deep Q-learning) 함수를 계산하여 PTZ 카메라 제어에 대한 현재 학습 목표를 설정하는 수단;상기 설정된 PTZ 카메라 제어에 대한 현재 학습 목표에 따라 실제의 PTZ 카메라 액션을 수행하여 PTZ 카메라 제어에 대한 다음 단계 학습 목표를 설정하는 수단;PTZ 카메라 제어에 대한 상기 현재 학습 목표와 다음 단계 학습 목표의 에러를 줄이도록 가중치를 갱신하여서 PTZ 카메라 제어에 대해 강화학습을 수행하는 수단을 포함하는, PTZ 카메라 자동제어를 위한 강화학습 모델.
- 제10항에서, 상기 인공신경망에서손실함수(Loss functioin)에는 mse(mean square error)가 사용되고,활성화 함수(Activation function)는 은닉층에 대해서는 ReLU(Rectified Linear Unit) 함수가, 출력층에 대해서는 Linear 함수가 사용되고,학습률(Learning Rate)은 0.001로 설정되고,뱃치사이즈(Batch size)는 128로 설정된 PTZ 카메라 자동제어를 위한 강화학습 모델.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2018-0139202 | 2018-11-13 | ||
| KR1020180139202A KR102142651B1 (ko) | 2018-11-13 | 2018-11-13 | Ptz 카메라 자동제어를 위한 강화학습 모델 생성 방법 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020101062A1 true WO2020101062A1 (ko) | 2020-05-22 |
Family
ID=70730493
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2018/013913 Ceased WO2020101062A1 (ko) | 2018-11-13 | 2018-11-14 | Ptz 카메라 자동제어를 위한 강화학습 모델 생성 방법 및 강화학습 모델 |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR102142651B1 (ko) |
| WO (1) | WO2020101062A1 (ko) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP4539490A1 (en) * | 2023-10-10 | 2025-04-16 | Sea.AI GmbH | Target tracking in a water area |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2007049229A (ja) * | 2005-08-05 | 2007-02-22 | Canon Inc | 撮像装置及び撮像方法 |
| JP2008538474A (ja) * | 2005-04-19 | 2008-10-23 | ダブリュキューエス リミテッド | 自動化監視システム |
| US20140078300A1 (en) * | 2012-09-14 | 2014-03-20 | Motorola Solutions, Inc. | Adjusting surveillance camera ptz tours based on historical incident data |
| KR20180029898A (ko) * | 2016-09-12 | 2018-03-21 | 엑시스 에이비 | 개선된 모니터링 카메라 방향 제어 |
| KR20180117419A (ko) * | 2017-04-19 | 2018-10-29 | 한화테크윈 주식회사 | 감시 시스템 및 그 동작 방법 |
-
2018
- 2018-11-13 KR KR1020180139202A patent/KR102142651B1/ko not_active Expired - Fee Related
- 2018-11-14 WO PCT/KR2018/013913 patent/WO2020101062A1/ko not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2008538474A (ja) * | 2005-04-19 | 2008-10-23 | ダブリュキューエス リミテッド | 自動化監視システム |
| JP2007049229A (ja) * | 2005-08-05 | 2007-02-22 | Canon Inc | 撮像装置及び撮像方法 |
| US20140078300A1 (en) * | 2012-09-14 | 2014-03-20 | Motorola Solutions, Inc. | Adjusting surveillance camera ptz tours based on historical incident data |
| KR20180029898A (ko) * | 2016-09-12 | 2018-03-21 | 엑시스 에이비 | 개선된 모니터링 카메라 방향 제어 |
| KR20180117419A (ko) * | 2017-04-19 | 2018-10-29 | 한화테크윈 주식회사 | 감시 시스템 및 그 동작 방법 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP4539490A1 (en) * | 2023-10-10 | 2025-04-16 | Sea.AI GmbH | Target tracking in a water area |
| WO2025078510A1 (en) * | 2023-10-10 | 2025-04-17 | Sea.Ai Gmbh | Target tracking in a water area |
Also Published As
| Publication number | Publication date |
|---|---|
| KR102142651B1 (ko) | 2020-08-07 |
| KR20200055495A (ko) | 2020-05-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112203809B (zh) | 信息处理装置和方法、机器人控制装置和方法及存储介质 | |
| CN115147488B (zh) | 一种基于密集预测的工件位姿估计方法与抓取系统 | |
| WO2021118041A1 (ko) | 작업 난이도에 따라 레이블링 작업을 분배하는 방법 및 그를 이용한 장치 | |
| CN111027413A (zh) | 远距离多工位物体检测方法、系统及存储介质 | |
| CN113343851B (zh) | 一种训练人脸衰老检测模型的方法及相关装置 | |
| CN116994313B (zh) | 基于边缘计算的电梯场景下口罩检测系统和方法 | |
| WO2019225912A1 (ko) | 인공지능에 기반하여 영역을 인식하여 공기조화기를 제어하는 방법, 서버 및 공기조화기 | |
| CN117237879A (zh) | 一种轨迹追踪方法和系统 | |
| WO2022045519A1 (ko) | 최적화 모델 선택 장치 및 방법 | |
| US12222725B2 (en) | Moving range setting system and moving range setting method | |
| WO2021075701A1 (ko) | 인터랙션 검출 방법 및 그 장치 | |
| WO2026049425A1 (ko) | 단일 소실점 인식 기반의 카메라 칼리브레이션 방법 | |
| WO2021095961A1 (ko) | Ptz 카메라 제어 장치 및 그 방법 | |
| WO2022149811A1 (ko) | 골프 스윙에 관한 정보를 추정하기 위한 방법, 디바이스 및 비일시성의 컴퓨터 판독 가능한 기록 매체 | |
| KR102142651B1 (ko) | Ptz 카메라 자동제어를 위한 강화학습 모델 생성 방법 | |
| WO2022092672A1 (ko) | Ai 예측 모델을 이용한 예측 결과의 학습 데이터 추가 방법 | |
| WO2025116519A1 (ko) | 디지털 트윈 모델 기반 태양광 발전소 발전량 예측 시스템 및 방법 | |
| WO2023128026A1 (ko) | 영상 데이터의 라벨링 가이드 방법 및 자동 라벨링 장치 | |
| WO2024019336A1 (ko) | 디자인 이미지 클러스터링 방법 및 장치 | |
| WO2019124602A1 (ko) | 객체 추적 방법 및 이를 수행하는 장치들 | |
| CN116543039A (zh) | 基于深度学习的机械臂目标检测感知定位方法、设备、存储介质和产品 | |
| WO2023224251A1 (en) | Systems and methods for recognizing non-line-of-sight human actions | |
| WO2020101063A1 (ko) | 강화학습 기반 ptz 카메라 제어 시스템 및 방법 | |
| WO2022107943A1 (ko) | 지능형 스마트 물류 자동화 정보처리장치 | |
| WO2023277219A1 (ko) | 환경 변화 적응형 특징 생성기를 적용한 차량용 경량 딥러닝 처리 장치 및 방법 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18940428 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18940428 Country of ref document: EP Kind code of ref document: A1 |














