

본 발명은 온디바이스 AI 기기(예: CCTV 카메라)에서 이종의 딥러닝 모델을 실시간으로 갱신하고 그 즉시 딥러닝 추론을 실행하기 위한 기술에 관한 것이다.The present invention relates to a technology for updating heterogeneous deep learning models in real time in an on-device AI device (e.g., CCTV camera) and executing deep learning inference immediately thereafter.
특히, 본 발명은 온디바이스 AI 기기를 현장에 설치 및 운영 중인 상태에서 딥러닝 모델과 메타정보를 온디바이스 AI 기기에 다운로드한 후에, 메타정보를 이용하여 해당 디바이스에 맞게 딥러닝 그래프 구성과 딥러닝 모델 로딩 및 초기화를 수행하고, 메타정보를 이용하여 딥러닝 모델 추론을 위한 텐서 변환과 추론결과 변환을 수행함으로써 온라인(online)으로 온디바이스 AI 기기의 기능을 실시간 변경하는 온디바이스 AI를 위한 메타정보 기반의 이종의 딥러닝 모델 갱신 및 추론 기술에 관한 것이다.In particular, the present invention relates to a heterogeneous deep learning model update and inference technology based on metadata for on-device AI that changes the function of the on-device AI device in real time online by downloading a deep learning model and metadata to the on-device AI device while the on-device AI device is installed and operated in the field, using the metadata to configure a deep learning graph and load and initialize a deep learning model suitable for the device, and using the metadata to perform tensor transformation and inference result transformation for deep learning model inference.
온디바이스 AI(On-Device AI)는 클라우드에 연결되지 않고 디바이스 자체의 컴퓨팅 자원을 활용하여 인공지능(AI) 기능을 구현하는 기술이다. 기존의 AI 기술은 대부분 클라우드 서버에서 수행되었으나, 온디바이스 AI는 기기에 내장된 컴퓨팅 성능과 센서를 이용하여 AI 기능을 구현한다. 온디바이스 AI 기술은 데이터 보안 강화, 응답성 향상, 에너지 효율 향상의 장점이 있다.On-Device AI is a technology that implements AI functions by utilizing the computing resources of the device itself without being connected to the cloud. Most existing AI technologies were performed on cloud servers, but on-device AI implements AI functions by utilizing the computing power and sensors built into the device. On-device AI technology has the advantages of strengthening data security, improving responsiveness, and improving energy efficiency.
현재 다양한 분야에서 온디바이스 AI 기술의 적용을 시도하고 있다. 예를 들어, 영상관제 시스템에서 CCTV 카메라에 온디바이스 AI 기술을 적용하면 짧은 지연시간, 로컬자율작업, 백엔드 트래픽(Back-End traffic) 감소, 보안성과 신뢰성 개선 등의 장점을 나타낸다.Currently, on-device AI technology is being applied in various fields. For example, in a video surveillance system, applying on-device AI technology to CCTV cameras shows advantages such as short delay time, local autonomous operation, reduced back-end traffic, and improved security and reliability.
그에 따라, 온디바이스 AI 방식의 디바이스(이하, '온디바이스 AI 기기')에 대한 수요가 증가하고 있다. 현재는 수요에 비해서 공급이 부족한 상황인데, 온디바이스 AI 기기의 공급 확대가 어려운 이유는 온디바이스에서 동작하는 딥러닝 모델의 개발과 경량 하드웨어에서 동작하는 소프트웨어 개발의 어려움 때문이다.Accordingly, demand for on-device AI devices (hereinafter referred to as “on-device AI devices”) is increasing. Currently, supply is insufficient compared to demand, and the reason why it is difficult to expand the supply of on-device AI devices is due to the difficulty in developing deep learning models that operate on-device and developing software that operates on lightweight hardware.
일반적인 온디바이스 AI 기기에서는 저전력 및 성능 최적화를 위하여 특정한 딥러닝 모델만 지원 가능하거나 제한 범위의 몇몇 딥러닝 모델만 실행할 수 있다. 시스템온칩(System On Chip, SoC) 제조사 별로 특유의 딥러닝 실행 구조를 가지고 있으며, 온디바이스에서 딥러닝 모델을 구동하려면 SoC 제조사에서 요구하는 형태로 각종 데이터와 딥러닝 모델 구조를 맞춰주어야 한다. 또한, 딥러닝 모델마다 온디바이스 AI 기기의 하드웨어를 고려한 딥러닝 실행 소프트웨어를 개별적으로 개발해야 하는 불편함이 있다.In general, on-device AI devices, only certain deep learning models can be supported or only a few deep learning models with a limited scope can be executed for low power and performance optimization. Each System on Chip (SoC) manufacturer has its own unique deep learning execution structure, and to run a deep learning model on-device, various data and deep learning model structures must be aligned to the format required by the SoC manufacturer. In addition, there is the inconvenience of having to individually develop deep learning execution software that takes into account the hardware of the on-device AI device for each deep learning model.
또한, 일반적인 온디바이스 AI 기기에서는 딥러닝 모델의 실시간 갱신은 지원되지 않는다. 높은 성능의 딥러닝 모델이 출시되거나 딥러닝 모델에 새로운 기능을 추가하려는 경우와 같이 온디바이스 AI 기기의 딥러닝 모델을 갱신하는 것이 바람직한 상황이 있다. 종래에는 이러한 경우에는 온디바이스 AI 기기를 분해해서 소프트웨어를 업그레이드한 후에 재조립하는 과정을 거쳤다. 영상관제 시스템에서 운용하는 1000대의 CCTV 카메라를 이러한 방식으로 업그레이드하는 것은 현실적으로 상당히 곤란하다.In addition, real-time updates of deep learning models are not supported in general on-device AI devices. There are situations where it is desirable to update the deep learning model of an on-device AI device, such as when a high-performance deep learning model is released or when new functions are to be added to the deep learning model. In the past, in such cases, the on-device AI device was disassembled, the software was upgraded, and then reassembled. It is realistically quite difficult to upgrade 1,000 CCTV cameras operated in a video surveillance system in this way.
본 발명의 목적은 온디바이스 AI 기기(예: CCTV 카메라)에서 이종의 딥러닝 모델을 실시간으로 갱신하고 그 즉시 딥러닝 추론을 실행하기 위한 기술을 제공하는 것이다.An object of the present invention is to provide a technology for updating heterogeneous deep learning models in real time in an on-device AI device (e.g., CCTV camera) and executing deep learning inference immediately.
특히, 본 발명의 목적은 온디바이스 AI 기기를 현장에 설치 및 운영 중인 상태에서 딥러닝 모델과 메타정보를 온디바이스 AI 기기에 다운로드한 후에, 메타정보를 이용하여 해당 디바이스에 맞게 딥러닝 그래프 구성과 딥러닝 모델 로딩 및 초기화를 수행하고, 메타정보를 이용하여 딥러닝 모델 추론을 위한 텐서 변환과 추론결과 변환을 수행함으로써 온라인(online)으로 온디바이스 AI 기기의 기능을 실시간 변경하는 온디바이스 AI를 위한 메타정보 기반의 이종의 딥러닝 모델 갱신 및 추론 기술을 제공하는 것이다.In particular, the purpose of the present invention is to provide a heterogeneous deep learning model update and inference technology based on metadata for on-device AI that changes the function of the on-device AI device in real time online by downloading a deep learning model and metadata to the on-device AI device while the on-device AI device is installed and operated in the field, using the metadata to configure a deep learning graph and load and initialize a deep learning model suitable for the device, and using the metadata to perform tensor transformation and inference result transformation for deep learning model inference.
본 발명의 해결 과제는 이 사항에 제한되지 않으며 본 명세서의 기재로부터 다른 해결 과제가 이해될 수 있다.The problem to be solved by the present invention is not limited to this matter, and other problems to be solved can be understood from the description of this specification.
상기의 목적을 달성하기 위하여 본 발명은 온디바이스 AI 기기(1000)가 메타정보 기반으로 자신의 딥러닝 모델을 실시간으로 갱신하고 딥러닝 추론을 실행하기 위한 방법을 제시한다.To achieve the above purpose, the present invention proposes a method for an on-device AI device (1000) to update its deep learning model in real time and execute deep learning inference based on meta information.
본 발명에 따른 온디바이스 AI를 위한 메타정보 기반의 이종의 딥러닝 모델 갱신 및 추론 방법은, 딥러닝 모델 매니저부(1110)가 네트워크를 통해 업그레이드 장치(100)로부터 딥러닝 모델 데이터와 메타정보를 다운로드 수신하는 제 1 단계; 딥러닝 모델 매니저부(1110)가 그 다운로드한 메타정보를 분석하는 제 2 단계; 딥러닝 모델 매니저부(1110)가 딥러닝 모델 데이터와 메타정보 분석 결과를 딥러닝 추론 엔진부(1120)에 전달하는 제 3 단계; 딥러닝 추론 엔진부(1120)가 딥러닝 엔진부(1150)를 초기화하는 제 4 단계; 딥러닝 추론 엔진부(1120)가 메타정보의 딥러닝 모델 정보를 이용하여 온디바이스 AI 기기(1000)의 시스템온칩(1100)에서 실행 가능한 딥러닝 그래프를 생성하는 제 5 단계; 딥러닝 추론 엔진부(1120)가 그 생성된 딥러닝 그래프를 온디바이스 AI 기기(1000)의 공유 메모리부(1160)에 로딩하는 제 6 단계; 딥러닝 추론 엔진부(1120)가 데이터 입력부(1300)에 의해 입력 데이터를 획득하는 제 7 단계; 딥러닝 추론 엔진부(1120)가 메타정보를 이용하여 입력 데이터를 다차원 딥러닝 텐서로 포맷 변환하는 제 8 단계; 딥러닝 추론 엔진부(1120)가 다차원 딥러닝 텐서를 딥러닝 엔진부(1150)로 제공하고 딥러닝 추론을 실행하는 제 9 단계; 딥러닝 추론 엔진부(1120)가 딥러닝 엔진부(1150)로부터 다차원 추론결과 텐서를 획득하는 제 10 단계; 딥러닝 추론 엔진부(1120)가 메타정보를 이용하여 다차원 추론결과 텐서를 딥러닝 모델 매니저부(1110)에 맞게 미리 설정된 데이터 구조체로 변환하는 제 11 단계; 딥러닝 모델 매니저부(1110)가 데이터 구조체를 이용하여 응용 어플리케이션을 처리하는 제 12 단계;를 포함하여 구성될 수 있다.The heterogeneous deep learning model update and inference method for on-device AI based on metadata according to the present invention comprises: a first step in which a deep learning model manager unit (1110) downloads and receives deep learning model data and metadata from an upgrade device (100) through a network; a second step in which the deep learning model manager unit (1110) analyzes the downloaded metadata; a third step in which the deep learning model manager unit (1110) transmits the deep learning model data and metadata analysis results to a deep learning inference engine unit (1120); a fourth step in which the deep learning inference engine unit (1120) initializes the deep learning engine unit (1150); a fifth step in which the deep learning inference engine unit (1120) generates a deep learning graph executable in a system-on-chip (1100) of an on-device AI device (1000) using the deep learning model information of the metadata; A sixth step in which the deep learning inference engine unit (1120) loads the generated deep learning graph into the shared memory unit (1160) of the on-device AI device (1000); A seventh step in which the deep learning inference engine unit (1120) obtains input data by the data input unit (1300); An eighth step in which the deep learning inference engine unit (1120) converts the input data into a multidimensional deep learning tensor using meta information; A ninth step in which the deep learning inference engine unit (1120) provides the multidimensional deep learning tensor to the deep learning engine unit (1150) and executes deep learning inference; A tenth step in which the deep learning inference engine unit (1120) obtains a multidimensional inference result tensor from the deep learning engine unit (1150); It can be configured to include an 11th step in which the deep learning inference engine unit (1120) converts a multidimensional inference result tensor into a data structure preset for the deep learning model manager unit (1110) using meta information; and a 12th step in which the deep learning model manager unit (1110) processes an application using the data structure.
이때, 제 5 단계에서 딥러닝 추론 엔진부(1120)는 메타정보에 포함된 딥러닝 모델 정보를 이용하여 온디바이스 AI 기기(1000)의 시스템온칩(1100)에 대해 미리 설정된 딥러닝 연산자와 딥러닝 모델 구조에 대응하여 딥러닝 모델 데이터를 변환하여 딥러닝 그래프를 생성하도록 구성될 수 있다.At this time, in the fifth step, the deep learning inference engine unit (1120) may be configured to convert deep learning model data corresponding to a deep learning operator and deep learning model structure preset for the system-on-chip (1100) of the on-device AI device (1000) using deep learning model information included in the meta information to generate a deep learning graph.
본 발명에서 딥러닝 모델 정보는 모델 네임(Model Name), 모델 경로(Model Path), 입력 노드 네임(Input Node Name), 출력 노드 네임(Output Node Name), 클래스 정보(Class Information), 레이블 정보(Label Information), 신뢰도 임계치(Confidence Threshold), 디버깅 정보(Debugging Information)를 포함하여 구성될 수 있다.In the present invention, deep learning model information may be configured to include a model name, a model path, an input node name, an output node name, class information, label information, a confidence threshold, and debugging information.
한편, 본 발명에 따른 컴퓨터프로그램은 컴퓨터에 이상과 같은 온디바이스 AI를 위한 메타정보 기반의 이종의 딥러닝 모델 갱신 및 추론 방법을 실행시키기 위하여 컴퓨터 판독가능한 비휘발성 저장매체에 저장된 것이다.Meanwhile, a computer program according to the present invention is stored in a computer-readable non-volatile storage medium to execute a heterogeneous deep learning model update and inference method based on meta information for an on-device AI such as the above.
본 발명에 따르면 온라인(online)으로 온디바이스 AI 기기의 기능을 실시간 변경하여 사용할 수 있는 장점이 있다. 예컨대 CCTV 카메라의 경우, 동일한 CCTV를 때와 장소에 따라 객체 검출용, 군중 계수용, 번호판 인식용, 얼굴 인식용, 행위 인식용 등으로 딥러닝 모델 및 메타정보만 다운로드함으로써 실시간으로 그 기능을 변경하여 사용할 수 있다.According to the present invention, there is an advantage in that the functions of an on-device AI device can be changed in real time online. For example, in the case of a CCTV camera, the same CCTV can be used for object detection, crowd counting, license plate recognition, face recognition, behavior recognition, etc., depending on the time and place, by downloading only the deep learning model and meta information, and its functions can be changed in real time.
또한, 본 발명에 따르면 딥러닝 모델과 온디바이스 프로그램(시스템 및 응용 프로그램) 개발을 분리하여 진행할 수 있어서 개발 기간을 단축하고 온디바이스 제품의 안정화에도 기여할 수 있는 장점이 있다.In addition, according to the present invention, the development of a deep learning model and an on-device program (system and application program) can be carried out separately, which has the advantage of shortening the development period and contributing to the stabilization of the on-device product.
[도 1]은 본 발명에 따른 온디바이스 딥러닝 모델 갱신 및 추론을 수행하기 위한 전체 시스템 구성도.
[도 2]는 본 발명에 따른 온디바이스 AI를 위한 메타정보 기반의 이종의 딥러닝 모델 갱신 및 추론 과정의 순서도.
[도 3]은 본 발명에서 갱신 이전의 딥러닝 모델 메타정보의 예시도.
[도 4]는 본 발명에서 갱신 이후의 딥러닝 모델 메타정보의 예시도.
[도 5]는 본 발명에서 갱신 이전의 딥러닝 모델에 의한 CCTV 영상 추론 결과 예시도.
[도 6]은 본 발명에서 갱신 이후의 딥러닝 모델에 의한 CCTV 영상 추론 결과 예시도.[Figure 1] is a diagram of the overall system configuration for performing on-device deep learning model update and inference according to the present invention.
[Figure 2] is a flowchart of a heterogeneous deep learning model update and inference process based on meta information for on-device AI according to the present invention.
[Figure 3] is an example of deep learning model metadata before update in the present invention.
[Figure 4] is an example of deep learning model metadata after update in the present invention.
[Figure 5] is an example of CCTV video inference results by a deep learning model before update in the present invention.
[Figure 6] is an example of CCTV video inference results by a deep learning model after update in the present invention.
이하에서는 도면을 참조하여 본 발명을 상세하게 설명한다.Hereinafter, the present invention will be described in detail with reference to the drawings.
본 발명을 설명함에 있어서 종래기술과 중복되는 부분에 대해서는 자세한 설명을 생략할 수 있다.In explaining the present invention, detailed descriptions of parts that overlap with prior art may be omitted.
[도 1]은 본 발명에 따른 온디바이스 딥러닝 모델 갱신 및 추론을 수행하기 위한 전체 시스템 구성도이다.[Figure 1] is a diagram of the overall system configuration for performing on-device deep learning model update and inference according to the present invention.
[도 1]을 참조하면, 온디바이스 AI 기기(1000)(예: 온디바이스 AI 적용된 CCTV 카메라)가 인터넷을 통해 외부의 업그레이트 서버(100)에 연결되어 있다. 업그레이드 장치(100)는 업그레이드 데이터베이스(110)와 연동하는데, 업그레이드 데이터베이스(110)에는 하나이상의 딥러닝 모델 데이터와 메타정보가 저장되어 있다. 업그레이드 장치(100)는 개인용 컴퓨터(PC)나 클라우드 서버 등으로 구현될 수 있는데, 모델 갱신의 대상인 딥러닝 모델 데이터와 메타정보를 온디바이스 AI 기기(1000)로 다운로드 제공한다.Referring to [Figure 1], an on-device AI device (1000) (e.g., a CCTV camera to which on-device AI is applied) is connected to an external upgrade server (100) via the Internet. The upgrade device (100) is linked to an upgrade database (110), and the upgrade database (110) stores one or more deep learning model data and metadata. The upgrade device (100) may be implemented as a personal computer (PC) or a cloud server, and downloads and provides deep learning model data and metadata, which are targets of model update, to the on-device AI device (1000).
본 발명에서 온디바이스 AI 기기(1000)는 시스템온칩(SoC)(1100), 딥러닝 모델 저장부(1210), 메타정보 저장부(1220), 데이터 입력부(1300)(예: 카메라 모듈)를 구비한다.In the present invention, the on-device AI device (1000) comprises a system on chip (SoC) (1100), a deep learning model storage unit (1210), a meta information storage unit (1220), and a data input unit (1300) (e.g., a camera module).
시스템온칩(1100)은 소프트웨어로 구현될 수 있는 구성과 하드웨어로 구현될 수 있는 구성을 구비한다. [도 1]에서 딥러닝 모델 매니저부(1110), 딥러닝 추론 엔진부(Deep Learning Inference Engine)(1120), 운영 시스템부(Operation System)(1130)(예: Linux Kernel)는 소프트웨어로 구현될 수 있다. [도 1]에서 데이터 프로세서부(1140)(예: Image Processor), 딥러닝 엔진부(Neural Processor Unit)(1150), 공유 메모리부(Shared Memory)(1160)는 일반적으로 하드웨어로 구현된다.The system-on-chip (1100) has a configuration that can be implemented as software and a configuration that can be implemented as hardware. In [Fig. 1], the deep learning model manager unit (1110), the deep learning inference engine unit (1120), and the operating system unit (1130) (e.g., Linux Kernel) can be implemented as software. In [Fig. 1], the data processor unit (1140) (e.g., Image Processor), the deep learning engine unit (Neural Processor Unit) (1150), and the shared memory unit (Shared Memory) (1160) are generally implemented as hardware.
온디바이스 AI 적용된 CCTV 카메라로 본 발명을 구현하는 경우, 데이터 입력부(1300)는 카메라 모듈에 대응하고 데이터 프로세서부(1140)는 이미지 프로세서(Image Processor)와 비디오 인코더(Video Encoder)에 대응할 수 있다.When implementing the present invention with a CCTV camera to which on-device AI is applied, the data input unit (1300) may correspond to a camera module, and the data processor unit (1140) may correspond to an image processor and a video encoder.
딥러닝 모델 저장부(1210)와 메타정보 저장부(1220)는 온디바이스 AI 기기(1000)의 딥러닝 모델 갱신 및 추론을 수행하기 위한 데이터를 저장 관리한다. 딥러닝 모델 저장부(1210)는 여러가지 SoC 사양에 따른 복수의 딥러닝 모델 데이터를 저장한다. 메타정보 저장부(1220)는 딥러닝 모델에 대한 메타정보(예: Model Name & Path, Model Input Node Name, Model Output Node Name, Class Information 등)를 저장한다.The deep learning model storage unit (1210) and the meta information storage unit (1220) store and manage data for performing deep learning model update and inference of the on-device AI device (1000). The deep learning model storage unit (1210) stores multiple deep learning model data according to various SoC specifications. The meta information storage unit (1220) stores meta information about the deep learning model (e.g., Model Name & Path, Model Input Node Name, Model Output Node Name, Class Information, etc.).
[도 1]에서 딥러닝 엔진부(1150)는 딥러닝 신경망 연산을 수행하는 구성요소로서, 구체적으로는 SoC(1100) 내부의 신경망 프로세서(Neural Processor Unit, NPU)와 해당 디바이스 드라이버로 구현된다. 한편, 딥러닝 추론 엔진부(1120)는 딥러닝 엔진부(1150)를 활용하여 딥러닝 추론을 수행하는 구성요소이다.[Figure 1] The deep learning engine unit (1150) is a component that performs deep learning neural network operations, and is specifically implemented with a neural network processor (Neural Processor Unit, NPU) and a corresponding device driver within the SoC (1100). Meanwhile, the deep learning inference engine unit (1120) is a component that performs deep learning inference using the deep learning engine unit (1150).
이상과 같은 구성을 통해, 본 발명은 종래의 문제점을 해결할 수 있다.Through the above configuration, the present invention can solve the conventional problems.
먼저, 본 발명은 딥러닝 모델 데이터와 메타정보를 온디바이스 AI 기기(1000)에 다운로드하고 딥러닝 모델을 실행할 수 있어 온디바이스 AI 기능을 실시간으로 갱신 및 실행하는 것이 가능하다. 종래에는 서비스 중인 온디바이스 AI 기기(1000)에 새로운 딥러닝 모델을 적용하려면 장치를 분해해서 소프트웨어를 업그레이드한 후에 재조립하는 번거로움이 있었다.First, the present invention can download deep learning model data and metadata to an on-device AI device (1000) and execute a deep learning model, thereby enabling real-time updating and execution of on-device AI functions. In the past, in order to apply a new deep learning model to an on-device AI device (1000) in service, there was the inconvenience of having to disassemble the device, upgrade the software, and then reassemble it.
또한, 본 발명은 SoC 제조사가 지정하는 규격에 따라 데이터와 딥러닝 모델 구조로의 변경을 수행하는 기능을 독립적인 구성요소로 구비하였다. 종래에는 온디바이스 AI의 딥러닝 모델 갱신 및 실행을 위해서는 SoC 제조사에서 요구하는 형태로 딥러닝 모델 구조와 각종 딥러닝 관련 데이터를 변경해주는 작업이 필요하였다.In addition, the present invention has a function for performing changes to data and deep learning model structures according to the specifications specified by the SoC manufacturer as an independent component. In the past, in order to update and execute the deep learning model of the on-device AI, it was necessary to change the deep learning model structure and various deep learning-related data to the form required by the SoC manufacturer.
[도 2]는 본 발명에 따른 온디바이스 AI를 위한 메타정보 기반의 이종의 딥러닝 모델 갱신 및 추론 과정의 순서도이다.[Figure 2] is a flowchart of a heterogeneous deep learning model update and inference process based on meta information for on-device AI according to the present invention.
본 발명은 온디바이스 제품의 저전력 및 최적화 기능을 유지하면서 실시간 딥러닝 모델갱신 및 추론이 가능하도록 딥러닝 추론 소프트웨어를 각 기능에 따라 모듈화하고, 각각의 딥러닝 모델 정보를 별도의 메타정보로 저장하도록 하였다. 딥러닝 추론 엔진부(1120)가 딥러닝 엔진부(1150)를 초기화할 때 위의 정보들을 이용하여 온디바이스용 딥러닝 그래프(딥러닝 모델 구조)를 구성하고 딥러닝 모델을 로딩하도록 하였다. 그리고 나서, 입력 데이터를 딥러닝 모델 추론에 필요한 텐서 형태로 변환하고, 딥러닝 추론 결과를 딥러닝 모델 매니저부(1110)를 위한 구조체로 변환하는 기능을 수행한다.The present invention modularizes deep learning inference software according to each function to enable real-time deep learning model update and inference while maintaining the low power and optimization functions of an on-device product, and stores each deep learning model information as separate meta information. When the deep learning inference engine unit (1120) initializes the deep learning engine unit (1150), it configures a deep learning graph (deep learning model structure) for the on-device using the above information and loads the deep learning model. Then, it performs a function of converting input data into a tensor form required for deep learning model inference and converting the deep learning inference result into a structure for the deep learning model manager unit (1110).
이러한 구성을 채택함으로써 딥러닝 모델과 메타정보만으로 온디바이스 AI 기기(1000)(예: CCTV 카메라)의 기능을 온라인으로 실시간 업데이트할 수 있게 되었다.By adopting this configuration, it has become possible to update the functions of an on-device AI device (1000) (e.g., CCTV camera) online and in real time using only a deep learning model and meta information.
단계 (S100) : 먼저, 딥러닝 모델 매니저부(1110)가 네트워크를 통해 업그레이드 장치(100)로부터 딥러닝 모델 데이터와 메타정보를 다운로드 수신한다.Step (S100): First, the deep learning model manager (1110) downloads and receives deep learning model data and metadata from the upgrade device (100) through a network.
단계 (S110) : 딥러닝 모델 매니저부(1110)는 그 다운로드한 메타정보를 분석(파싱)한 후에, 딥러닝 모델 데이터와 메타정보 분석 결과를 딥러닝 추론 엔진부(1120)에 전달한다.Step (S110): The deep learning model manager unit (1110) analyzes (parses) the downloaded meta information and then transmits the deep learning model data and the meta information analysis results to the deep learning inference engine unit (1120).
단계 (S120) : 딥러닝 추론 엔진부(1120)는 딥러닝 엔진부(1150)를 초기화하여 딥러닝 모델 갱신 과정을 시작한다.Step (S120): The deep learning inference engine unit (1120) initializes the deep learning engine unit (1150) and starts the deep learning model update process.
단계 (S130) : 딥러닝 추론 엔진부(1120)는 메타정보에 포함된 딥러닝 모델 정보를 이용하여 온디바이스 AI 기기(1000)의 시스템온칩(1100)에서 실행 가능한 딥러닝 그래프를 생성한다. 이때, 딥러닝 모델 정보로는 모델 네임(Model Name), 모델 경로(Model Path), 입력 노드 네임(Input Node Name), 출력 노드 네임(Output Node Name), 클래스 정보(Class Information), 레이블 정보(Label Information), 신뢰도 임계치(Confidence Threshold), 디버깅 정보(Debugging Information) 등을 들 수 있다.Step (S130): The deep learning inference engine unit (1120) generates a deep learning graph executable in the system-on-chip (1100) of the on-device AI device (1000) using the deep learning model information included in the meta information. At this time, the deep learning model information may include a model name, a model path, an input node name, an output node name, class information, label information, a confidence threshold, debugging information, etc.
딥러닝 추론 엔진부(1120)는 메타정보에 포함된 딥러닝 모델 정보를 이용하여 온디바이스 AI 기기(1000)의 시스템온칩(1100) 제조사의 지원 사양으로 미리 설정되어 있는 딥러닝 연산자와 딥러닝 모델 구조에 대응하여 딥러닝 모델 데이터를 변환하여 딥러닝 그래프를 생성하는 것이다.The deep learning inference engine unit (1120) converts deep learning model data corresponding to the deep learning operator and deep learning model structure preset as the support specifications of the system-on-chip (1100) manufacturer of the on-device AI device (1000) using the deep learning model information included in the meta information to generate a deep learning graph.
단계 (S140) : 다음으로, 딥러닝 추론 엔진부(1120)는 그 생성된 딥러닝 그래프를 온디바이스 AI 기기(1000)의 공유 메모리부(1160)에 로딩하여 딥러닝 신경망 모델이 작동 가능한 상태로 만든다. 이때, 딥러닝 추론 엔진부(1120)가 딥러닝 그래프(딥러닝 모델 구조) 로딩에 성공하였는지 여부를 확인하고, 만일 로딩에 실패할 경우에는 단계 (S130)으로 되돌아가 딥러닝 그래프(딥러닝 모델 구조) 생성 과정부터 다시 시작하도록 구성하는 것이 바람직하다.Step (S140): Next, the deep learning inference engine unit (1120) loads the generated deep learning graph into the shared memory unit (1160) of the on-device AI device (1000) to make the deep learning neural network model operable. At this time, it is preferable to configure the deep learning inference engine unit (1120) to check whether the deep learning graph (deep learning model structure) loading is successful, and if the loading fails, to return to step (S130) and start again from the deep learning graph (deep learning model structure) generation process.
온디바이스 환경은 일반 컴퓨터 환경보다 훨씬 민감하기 때문에 딥러닝 그래프 생성 및 그래프 로딩 과정에서 개입되는 아주 약간의 오류, 예컨대 1 ns 정도의 타이밍 차이로도 오동작을 하는 경우가 발생한다. 온디바이스 환경에서는 딥러닝 그래프의 로딩에 실패한 경우에는 처음부터 되돌아가 다시 시작하는 구성을 채택하는 것이 바람직하다.Since the on-device environment is much more sensitive than the general computer environment, even a very small error, such as a timing difference of about 1 ns, that occurs during the deep learning graph generation and graph loading process can cause malfunctions. In the on-device environment, it is desirable to adopt a configuration that rolls back and starts over when the deep learning graph loading fails.
단계 (S150) : 다음으로, 딥러닝 추론 엔진부(1120)는 데이터 입력부(1300)에 의해 입력 데이터를 획득한다. 예를 들어, CCTV 카메라의 경우에는 카메라 모듈로부터 CCTV 영상을 획득하는 것이다. 이때, 유효한 입력 데이터인지를 검증한 후에 유효하지 않은 입력 데이터인 경우에는 입력 데이터 획득을 다시 실행하도록 구성하는 것이 바람직하다.Step (S150): Next, the deep learning inference engine unit (1120) obtains input data by the data input unit (1300). For example, in the case of a CCTV camera, CCTV images are obtained from the camera module. At this time, it is desirable to configure the system to verify whether the input data is valid and then re-execute the input data acquisition if the input data is invalid.
온디바이스 AI 동작은 하드웨어와 밀접하게 연관되어 있고 하드웨어의 예기치 못한 오류 등으로 인해서 입력 데이터가 비정상적으로 입력될 수 있다. 예를 들면 CCTV 영상의 크기가 1920x1080이어야 하는데 하드웨어 오류로 인해 1920x1070 크기의 CCTV 영상이 입력될 수도 있고, 이미지 크기는 정상이지만 픽셀 데이터가 비정상적인 값일 수도 있다. 온디바이스 환경에서는 비정상적인 데이터로 인해서 시스템이 불안정한 상태에 빠질 수도 있기에 그러한 경우를 방지할 목적으로 채택될 수 있다.On-device AI operations are closely related to hardware, and input data may be abnormally input due to unexpected hardware errors. For example, the size of the CCTV image should be 1920x1080, but a hardware error may result in a CCTV image of 1920x1070 being input, or the image size may be normal, but the pixel data may be abnormal. In an on-device environment, the system may become unstable due to abnormal data, so this can be adopted to prevent such cases.
단계 (S160 ~ S180) : 딥러닝 추론 엔진부(1120)는 메타정보를 이용하여 현재의 딥러닝 엔진부(1150)에서 요구하는 다차원 딥러닝 텐서(multi-dimensional deep-learning tensor)로 입력 데이터를 포맷 변환한다. 딥러닝 모델마다 요구되는 텐서 형태가 상이하기 때문에 메타정보를 이용하여 현재의 딥러닝 모델에서 요구하는 다차원 텐서의 형식으로 데이터 포맷을 변경하는 것이다.Step (S160 to S180): The deep learning inference engine unit (1120) converts the input data into a multi-dimensional deep learning tensor required by the current deep learning engine unit (1150) using the meta information. Since the tensor type required for each deep learning model is different, the data format is changed into the multi-dimensional tensor type required by the current deep learning model using the meta information.
그리고, 딥러닝 추론 엔진부(1120)는 다차원 딥러닝 텐서를 딥러닝 엔진부(1150)로 제공하고 딥러닝 추론을 실행하고, 딥러닝 엔진부(1150)로부터 다차원 추론결과 텐서를 획득한다.And, the deep learning inference engine unit (1120) provides a multidimensional deep learning tensor to the deep learning engine unit (1150), executes deep learning inference, and obtains a multidimensional inference result tensor from the deep learning engine unit (1150).
단계 (S190, S200) : 딥러닝 추론 엔진부(1120)는 딥러닝 엔진부(1150)에서 얻은 다차원 추론결과 텐서를 메타정보를 이용하여 딥러닝 모델 매니저부(1110)에 맞게 미리 설정된 데이터 구조체로 변환한다. 각각의 딥러닝 모델마다 출력 텐서 포맷이 상이하기 때문에 메타정보를 이용하여 출력 텐서를 분석하고 그 분석 결과를 각각의 딥러닝 모델 매니저부(1110)에 맞추어 구조체로 변환하는 것이다.Step (S190, S200): The deep learning inference engine unit (1120) converts the multidimensional inference result tensor obtained from the deep learning engine unit (1150) into a data structure preset for the deep learning model manager unit (1110) using meta information. Since the output tensor format is different for each deep learning model, the output tensor is analyzed using meta information, and the analysis result is converted into a structure for each deep learning model manager unit (1110).
딥러닝 추론 엔진부(1120)는 다차원 텐서 포맷의 추론 결과를 딥러닝 모델 매니저부(1110)로 전달하며, 딥러닝 모델 매니저부(1110)는 그 전달받은 딥러닝 추론 결과의 데이터 구조체를 이용하여 응용 어플리케이션을 처리한다.The deep learning inference engine unit (1120) transfers the inference result in a multidimensional tensor format to the deep learning model manager unit (1110), and the deep learning model manager unit (1110) processes the application using the data structure of the received deep learning inference result.
한편, [도 2]에서 단계 (S150) 내지 (S190)은 반복 수행된다. 예를 들어 CCTV 카메라의 경우에는 카메라 모듈로부터 지속적으로 CCTV 영상이 제공되며, 그 CCTV 영상을 딥러닝 처리하는 것이다.Meanwhile, steps (S150) to (S190) in [Fig. 2] are repeatedly performed. For example, in the case of a CCTV camera, CCTV images are continuously provided from a camera module, and the CCTV images are deep-learned processed.
[도 3]과 [도 4]는 본 발명에서 갱신 이전과 갱신 이후의 딥러닝 모델 메타정보의 예시도이다.[Figure 3] and [Figure 4] are examples of deep learning model metadata before and after update in the present invention.
[도 3]은 갱신 이전에 온디바이스 AI 기기(1000)에 이미 탑재되어 있던 Yolov5 딥러닝 모델의 메타정보를 예시한 것이고, [도 4]는 본 발명에 의해 온디바이스 AI 기기(1000)에 갱신 완료한 Yolov7 딥러닝 모델의 메타정보를 나타낸 것이다. [도 3]과 [도 4]에서와 같이 메타정보는 딥러닝 신경망 모델에 대한 구체적인 정보를 담고 있다.[Figure 3] illustrates meta information of the Yolov5 deep learning model that was already installed in the on-device AI device (1000) before update, and [Figure 4] illustrates meta information of the Yolov7 deep learning model that has been updated in the on-device AI device (1000) according to the present invention. As shown in [Figure 3] and [Figure 4], the meta information contains specific information about the deep learning neural network model.
[도 5]와 [도 6]은 본 발명에서 갱신 이전과 갱신 이후의 딥러닝 모델에 의한 CCTV 영상 추론 결과 예시도이다.[Figure 5] and [Figure 6] are examples of CCTV video inference results by a deep learning model before and after update in the present invention.
[도 5]는 갱신 이전에 온디바이스 AI 기기(1000)에 이미 탑재되어 있던 Yolov5 딥러닝 모델을 이용하여 CCTV 영상을 인식 및 분류한 결과 예시도이고, [도 6]은 본 발명에 의해 온디바이스 AI 기기(1000)에 갱신 완료한 Yolov7 딥러닝 모델을 이용하여 CCTV 영상을 인식 및 분류한 결과 예시도이다. [도 5]와 [도 6]을 비교하면, Yolov5 딥러닝 모델에 의하면 다수의 미검출 객체가 나타나는 반면, Yolov7 딥러닝 모델에서는 차량 검출 성능이 크게 개선되었다.[Fig. 5] is an example diagram showing the results of recognizing and classifying CCTV images using the Yolov5 deep learning model that was already installed in the on-device AI device (1000) before update, and [Fig. 6] is an example diagram showing the results of recognizing and classifying CCTV images using the Yolov7 deep learning model that has been updated in the on-device AI device (1000) according to the present invention. Comparing [Fig. 5] and [Fig. 6], a large number of undetected objects appear according to the Yolov5 deep learning model, whereas the vehicle detection performance is greatly improved with the Yolov7 deep learning model.
한편, 본 발명은 컴퓨터가 읽을 수 있는 비휘발성 기록매체에 컴퓨터가 읽을 수 있는 코드의 형태로 구현되는 것이 가능하다. 이러한 비휘발성 기록매체로는 다양한 형태의 스토리지 장치가 존재하는데 예컨대 하드디스크, SSD, CD-ROM, NAS, 자기테이프, 웹디스크, 클라우드 디스크 등이 있다. 또한, 본 발명은 하드웨어와 결합되어 특정의 절차를 실행시키기 위하여 매체에 저장된 컴퓨터프로그램의 형태로 구현될 수도 있다.Meanwhile, the present invention can be implemented in the form of a computer-readable code on a nonvolatile recording medium that can be read by a computer. There are various types of storage devices as such nonvolatile recording media, such as hard disks, SSDs, CD-ROMs, NAS, magnetic tapes, web disks, cloud disks, etc. In addition, the present invention can be implemented in the form of a computer program stored on a medium in order to execute a specific procedure by being combined with hardware.
100 : 업그레이드 장치
110 : 업그레이드 데이터베이스
1000 : 온디바이스 AI 기기
1100 : 시스템온칩(SoC)
1110 : 딥러닝 모델 매니저부
1120 : 딥러닝 추론 엔진부
1130 : 운영 시스템부
1140 : 데이터 프로세서부
1150 : 딥러닝 엔진부
1160 : 공유 메모리부
1210 : 딥러닝 모델 저장부
1220 : 메타정보 저장부
1300 : 데이터 입력부100 : Upgrade Device
110 : Upgrade database
1000: On-Device AI Devices
1100: System on Chip (SoC)
1110: Deep Learning Model Manager Department
1120: Deep Learning Inference Engine
1130 : Operating System Department
1140: Data Processor Section
1150: Deep Learning Engine
1160 : Shared memory section
1210: Deep Learning Model Storage
1220: Meta information storage
1300 : Data Entry Section
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020230173560AKR20250084663A (en) | 2023-12-04 | 2023-12-04 | Heterogeneous deep-learning model update and inference method by use of meta-information for On-Device AI |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR1020230173560AKR20250084663A (en) | 2023-12-04 | 2023-12-04 | Heterogeneous deep-learning model update and inference method by use of meta-information for On-Device AI |
| Publication Number | Publication Date |
|---|---|
| KR20250084663Atrue KR20250084663A (en) | 2025-06-11 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR1020230173560APendingKR20250084663A (en) | 2023-12-04 | 2023-12-04 | Heterogeneous deep-learning model update and inference method by use of meta-information for On-Device AI |
| Country | Link |
|---|---|
| KR (1) | KR20250084663A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR102301786B1 (en) | 2019-12-19 | 2021-09-15 | 주식회사 노타 | Method and appauatus for face verification using deep learning based real-time on-device |
| KR20220119219A (en) | 2021-02-19 | 2022-08-29 | 삼성전자주식회사 | Electronic Device and Method for Providing On-device Artificial Intelligence Service |
| KR102481995B1 (en) | 2020-10-26 | 2022-12-27 | 주식회사 인피닉스 | On-device AI apparatus for detecting abnormal behavior automatically based on deep learning and operating method thereof |
| KR102567024B1 (en) | 2022-12-26 | 2023-08-16 | 한국단자공업 주식회사 | Neural architecture search method for On-Device learning of sensor data in embeded device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR102301786B1 (en) | 2019-12-19 | 2021-09-15 | 주식회사 노타 | Method and appauatus for face verification using deep learning based real-time on-device |
| KR102481995B1 (en) | 2020-10-26 | 2022-12-27 | 주식회사 인피닉스 | On-device AI apparatus for detecting abnormal behavior automatically based on deep learning and operating method thereof |
| KR20220119219A (en) | 2021-02-19 | 2022-08-29 | 삼성전자주식회사 | Electronic Device and Method for Providing On-device Artificial Intelligence Service |
| KR102567024B1 (en) | 2022-12-26 | 2023-08-16 | 한국단자공업 주식회사 | Neural architecture search method for On-Device learning of sensor data in embeded device |
| Publication | Publication Date | Title |
|---|---|---|
| US10740078B2 (en) | Dynamic plugin(s) for cloud application(s) | |
| US6938250B2 (en) | Image-based software installation | |
| US9286182B2 (en) | Virtual machine snapshotting and analysis | |
| US10078577B2 (en) | Policy compliance of container images | |
| US7886035B2 (en) | Profile service based deployment configuration | |
| US20200409680A1 (en) | Updating of container-based applications | |
| US20130179868A1 (en) | System And Method For Extracting Instrumentation Relevant Inheritance Relationships For A Distributed, Inheritance Rule Based Instrumentation System | |
| US20110078672A1 (en) | Classloading Technique for an Application Server that Provides Dependency Enforcement | |
| US20080301629A1 (en) | Integrating aspect oriented programming into the application server | |
| WO2009108943A2 (en) | Automation for virtualized it environments | |
| US11550553B2 (en) | Usage-based software library decomposition | |
| US12265812B2 (en) | Immutable image for deployment to edge devices | |
| US20240354079A1 (en) | Techniques for performing static analysis on deployed application code | |
| CN118051367A (en) | Equipment log storage method and device and electronic equipment | |
| US12367102B2 (en) | Platform-independent architecture for secure system reset | |
| WO2022038461A1 (en) | Method and system for identifying and extracting independent services from a computer program | |
| CN112416394B (en) | Service upgrading method and device, storage medium and electronic equipment | |
| Timperley et al. | ROBUST: 221 bugs in the Robot Operating System | |
| KR20250084663A (en) | Heterogeneous deep-learning model update and inference method by use of meta-information for On-Device AI | |
| CN114443287A (en) | An image analysis method, device, equipment and storage medium | |
| US8996564B2 (en) | System and method for deploying logic in data files | |
| US12067387B2 (en) | Software modification error resolution and management | |
| WO2022184264A1 (en) | Platform and method for building and deploying software applications | |
| CN111142869A (en) | A method and system for dynamic assembly of aerospace measurement, launch and control components | |
| Linne | Streamlined Development Pipeline for MAVericks, ARL's Unmanned Autonomous Vehicle (UAV) Software |
| Date | Code | Title | Description |
|---|---|---|---|
| PA0109 | Patent application | Patent event code:PA01091R01D Comment text:Patent Application Patent event date:20231204 | |
| PA0201 | Request for examination | Patent event code:PA02011R01I Patent event date:20231204 Comment text:Patent Application | |
| PG1501 | Laying open of application |