KR102161690B1 - Electric apparatus and method for control thereof - Google Patents

Electric apparatus and method for control thereof Download PDF

Info

Publication number
KR102161690B1
KR102161690B1 KR1020180013954A KR20180013954A KR102161690B1 KR 102161690 B1 KR102161690 B1 KR 102161690B1 KR 1020180013954 A KR1020180013954 A KR 1020180013954A KR 20180013954 A KR20180013954 A KR 20180013954A KR 102161690 B1 KR102161690 B1 KR 102161690B1
Authority
KR
South Korea
Prior art keywords
matrix
image
filtering
processor
convolution
Prior art date
Application number
KR1020180013954A
Other languages
Korean (ko)
Other versions
KR20190100487A (en
Inventor
임태규
송의현
한승훈
문보석
Original Assignee
삼성전자주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사 filed Critical 삼성전자주식회사
Priority to KR1020180013954A priority Critical patent/KR102161690B1/en
Priority to PCT/KR2019/001510 priority patent/WO2019151841A1/en
Publication of KR20190100487A publication Critical patent/KR20190100487A/en
Application granted granted Critical
Publication of KR102161690B1 publication Critical patent/KR102161690B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/40Scaling of whole images or parts thereof, e.g. expanding or contracting
    • G06T3/4046Scaling of whole images or parts thereof, e.g. expanding or contracting using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Computation (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

전자 장치가 개시된다. 전자 장치는, CNN(Convolution Neural Network) 학습(training)된 가중치(weight) 매트릭스가 저장된 메모리, 이미지가 수신되면, 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 매트릭스들을 하나의 통합 매트릭스로 변환하는 프로세서, 프로세서에서 변환된 통합 매트릭스를 이용하여 이미지에 대한 필터링을 수행하는 이미지 프로세서 및 프로세서의 제어에 따라, 이미지 프로세서의 필터링 결과를 출력하는 디스플레이를 포함한다.An electronic device is disclosed. The electronic device includes a memory in which a weight matrix trained by a convolution neural network (CNN) is stored, a processor that converts matrices representing color components constituting each pixel of the image into a single integrated matrix when an image is received, An image processor that performs filtering on an image by using the integrated matrix converted by the processor, and a display that outputs a filtering result of the image processor under control of the processor.

Description

전자 장치 및 그 제어 방법{ ELECTRIC APPARATUS AND METHOD FOR CONTROL THEREOF }Electronic device and its control method {ELECTRIC APPARATUS AND METHOD FOR CONTROL THEREOF}

본 발명은 딥러닝 등의 기계 학습 알고리즘을 활용하여 인간 두뇌의 인지, 판단 등의 기능을 모사하는 인공지능(Artificial Intelligence, AI) 시스템 및 그 응용 중 이미지 처리 모델을 제공하는 전자 장치 및 제어 방법들에 대한 것으로, 더욱 상세하게는 CNN(Convolution Neural Network) 학습(training)된 이미지 처리 모델을 이용하는 전자 장치 및 그 제어 방법에 대한 것이다.The present invention is an artificial intelligence (AI) system that simulates functions such as cognition and judgment of the human brain using machine learning algorithms such as deep learning, and electronic devices and control methods that provide an image processing model among its applications. In more detail, the present invention relates to an electronic device using a CNN (Convolution Neural Network) trained image processing model and a control method thereof.

인공지능(Artificial Intelligence, AI) 시스템은 인간 수준의 지능을 구현하는 컴퓨터 시스템이며, 기존 Rule 기반 스마트 시스템과 달리 기계가 스스로 학습하고 판단하며 똑똑해지는 시스템이다. 인공지능 시스템은 사용할수록 인식률이 향상되고 사용자 취향을 보다 정확하게 이해할 수 있게 되어, 기존 Rule 기반 스마트 시스템은 점차 딥러닝 기반 인공지능 시스템으로 대체되고 있다.The artificial intelligence (AI) system is a computer system that implements human-level intelligence, and unlike the existing rule-based smart system, the machine learns, judges, and becomes smarter. As artificial intelligence systems are used, their recognition rate improves and users' tastes can be understood more accurately, and existing rule-based smart systems are gradually being replaced by deep learning-based artificial intelligence systems.

인공지능 기술은 기계학습(딥러닝) 및 기계학습을 활용한 요소 기술들로 구성된다.Artificial intelligence technology consists of machine learning (deep learning) and component technologies using machine learning.

기계학습은 입력 데이터들의 특징을 스스로 분류/학습하는 알고리즘 기술이며, 요소기술은 딥러닝 등의 기계학습 알고리즘을 활용하여 인간 두뇌의 인지, 판단 등의 기능을 모사하는 기술로서, 언어적 이해, 시각적 이해, 추론/예측, 지식 표현, 동작 제어 등의 기술 분야로 구성된다.Machine learning is an algorithm technology that classifies/learns the features of input data by itself, and element technology is a technology that simulates functions such as cognition and judgment of the human brain using machine learning algorithms such as deep learning. It consists of technical fields such as understanding, reasoning/prediction, knowledge expression, and motion control.

인공지능 기술이 응용되는 다양한 분야는 다음과 같다. 언어적 이해는 인간의 언어/문자를 인식하고 응용/처리하는 기술로서, 자연어 처리, 기계 번역, 대화시스템, 질의 응답, 음성 인식/합성 등을 포함한다. 시각적 이해는 사물을 인간의 시각처럼 인식하여 처리하는 기술로서, 객체 인식, 객체 추적, 영상 검색, 사람 인식, 장면 이해, 공간 이해, 영상 개선 등을 포함한다. 추론 예측은 정보를 판단하여 논리적으로 추론하고 예측하는 기술로서, 지식/확률 기반 추론, 최적화 예측, 선호 기반 계획, 추천 등을 포함한다. 지식 표현은 인간의 경험정보를 지식데이터로 자동화 처리하는 기술로서, 지식 구축(데이터 생성/분류), 지식 관리(데이터 활용) 등을 포함한다. 동작 제어는 차량의 자율 주행, 로봇의 움직임을 제어하는 기술로서, 움직임 제어(항법, 충돌, 주행), 조작 제어(행동 제어) 등을 포함한다.The various fields where artificial intelligence technology is applied are as follows. Linguistic understanding is a technology that recognizes and applies/processes human language/text, and includes natural language processing, machine translation, dialogue systems, question and answer, and speech recognition/synthesis. Visual understanding is a technology that recognizes and processes objects like human vision, and includes object recognition, object tracking, image search, human recognition, scene understanding, spatial understanding, and image improvement. Inference prediction is a technique that logically infers and predicts information by judging information, and includes knowledge/probability-based reasoning, optimization prediction, preference-based planning, and recommendation. Knowledge expression is a technology that automatically processes human experience information into knowledge data, and includes knowledge construction (data creation/classification), knowledge management (data utilization), and the like. Motion control is a technology that controls autonomous driving of a vehicle and movement of a robot, and includes movement control (navigation, collision, driving), operation control (behavior control), and the like.

예를 들어, 인공지능 시스템은 다양한 이미지를 학습하고, 학습 결과에 따른 이미지 처리 모델의 생성에 적용될 수 있다. 또한, 생성된 이미지 모델에 기초하여 학습과 유사한 과정을 통해 새로운 이미지가 수신되면 이미지를 필터링 및 분류하여 제공할 수 있다.For example, the artificial intelligence system can learn various images and be applied to the generation of an image processing model according to the learning result. Also, when a new image is received through a process similar to learning based on the generated image model, the image may be filtered and classified and provided.

다만, 이미지 처리 모델의 차원이 높아질수록 처리가 요구되는 데이터량이 기하급수적으로 증가하게 되며, 프로세서와 이미지 프로세서 간의 데이터 송수신에 따른 딜레이 시간이 발생하는 문제가 있었다.However, as the dimension of the image processing model increases, the amount of data required for processing increases exponentially, and there is a problem that a delay time occurs due to data transmission and reception between the processor and the image processor.

본 발명은 상술한 필요성에 따른 것으로, 본 발명의 목적은 CNN(Convolution Neural Network) 학습(training)된 가중치 매트릭스 및 바이어스 매트릭스를 이용하여 성능 저하 없이 필터링 결과를 제공하는 전자 장치 및 그 제어 방법들을 제공함에 있다.The present invention is in accordance with the above-described necessity, and an object of the present invention is to provide an electronic device and control methods thereof that provide filtering results without performance degradation using a weight matrix and a bias matrix trained by a convolution neural network (CNN). Is in.

상술한 목적을 달성하기 위한 본 발명의 일 실시 예에 따른 전자 장치는 CNN(Convolution Neural Network) 학습(training)된 가중치(weight) 매트릭스가 저장된 메모리, 이미지가 수신되면, 상기 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 매트릭스들을 하나의 통합 매트릭스로 변환하는 프로세서, 상기 프로세서에서 변환된 상기 통합 매트릭스를 이용하여 상기 이미지에 대한 필터링을 수행하는 이미지 프로세서 및 상기 프로세서의 제어에 따라, 상기 이미지 프로세서의 필터링 결과를 출력하는 디스플레이를 포함하며, 상기 이미지 프로세서는, 상기 통합 매트릭스와 상기 가중치 매트릭스에 대한 행렬 곱을 수행하여 컨벌루션 매트릭스를 획득하고, 컨벌루션 매트릭스를 이용하여 상기 이미지의 각 픽셀 영역들의 특성을 필터링하고, 상기 가중치 매트릭스는, CNN 학습된 복수의 매트릭스를 인터리브드(interleaved) 형태로 통합한 매트릭스이고, 상기 통합 매트릭스는 상기 가중치 매트릭스와 연산이 가능한 개수의 행 및 열을 가지는 매트릭스이다.In order to achieve the above object, the electronic device according to an embodiment of the present invention configures each pixel of the image when a CNN (Convolution Neural Network) trained weight matrix is stored and an image is received. A processor that converts matrices representing color components to one unified matrix, an image processor that performs filtering on the image using the unified matrix converted by the processor, and a filtering result of the image processor under control of the processor And a display that outputs, wherein the image processor obtains a convolution matrix by performing matrix multiplication of the unified matrix and the weight matrix, and filters characteristics of each pixel region of the image using the convolution matrix, and the The weight matrix is a matrix obtained by integrating a plurality of CNN-trained matrices in an interleaved form, and the integrated matrix is a matrix having the weight matrix and the number of rows and columns that can be calculated.

또한, 상기 이미지 프로세서는, 상기 통합 매트릭스를 구성하는 각 행과, 상기 가중치 매트릭스의 대응되는 열 간의 행렬 곱을 각각 병렬적으로 수행하는 복수의 코어를 포함할 수 있다.In addition, the image processor may include a plurality of cores for performing matrix multiplication between each row constituting the unified matrix and a corresponding column of the weight matrix in parallel.

여기서, 상기 메모리는, 바이어스 매트릭스를 더 포함하며, 상기 이미지 프로세서는, 상기 컨벌루션 매트릭스에 상기 바이어스 매트릭스를 상기 컨벌루션 매트릭스에 합산할 수 있다.Here, the memory further includes a bias matrix, and the image processor may add the bias matrix to the convolution matrix and the convolution matrix.

또한, 상기 메모리는, 제1 바이어스 매트릭스 및 제2 바이어스 매트릭스를 더 포함하며, 상기 이미지 프로세서는, 상기 제1 및 상기 제2 바이어스 매트릭스 중 하나를 선택적으로 상기 컨벌루션 매트릭스에 합산할 수 있다.Also, the memory further includes a first bias matrix and a second bias matrix, and the image processor may selectively add one of the first and second bias matrices to the convolution matrix.

여기서, 상기 이미지 프로세서는, 상기 제1 및 제2 바이어스 매트릭스 중 하나가 합산된 컨벌루션 매트릭스에 활성화 함수를 적용하여, 복수의 출력 레이어를 획득하고, 상기 복수의 출력 레이어에 기초하여 FC(fully-connected) 레이어를 획득하며, 상기 FC 레이어에 포함된 각 영역들의 클래스 점수에 따라, 각 영역들의 특성을 식별할 수 있다.Here, the image processor, by applying an activation function to a convolution matrix in which one of the first and second bias matrices is summed, obtains a plurality of output layers, and is fully-connected (FC) based on the plurality of output layers. ) A layer is obtained, and characteristics of each region can be identified according to the class score of each region included in the FC layer.

여기서, 상기 이미지 프로세서는, 상기 복수의 출력 레이어에서 서로 대응되는 위치의 값을 합산하여, 상기 FC 레이어를 획득할 수 있다.Here, the image processor may obtain the FC layer by summing values of positions corresponding to each other in the plurality of output layers.

또한, 상기 이미지 프로세서는, 상기 복수의 출력 레이어에서 서로 대응되는 위치의 값을 비교하고, 가장 큰 값을 가지는 값들을 집산하여, 상기 FC 레이어를 획득할 수 있다.Also, the image processor may obtain the FC layer by comparing values of positions corresponding to each other in the plurality of output layers and collecting values having the largest values.

또한, 상기 프로세서는, 상기 필터링에 사용되는 파라미터값들 및 명령어를 상기 통합 매트릭스와 함께 상기 이미지 프로세서로 일괄 전송하여 상기 필터링을 수행하도록 상기 이미지 프로세서를 제어할 수 있다.Also, the processor may control the image processor to perform the filtering by collectively transmitting parameter values and a command used for the filtering to the image processor together with the integrated matrix.

또한, 상기 프로세서는, 상기 필터링을 복수 회 반복하여 수행하도록 상기 이미지 프로세서를 제어할 수 있다.In addition, the processor may control the image processor to repeatedly perform the filtering a plurality of times.

한편, 본 개시의 일 실시 예에 따른 전자 장치의 제어 방법에 있어서, 이미지가 수신되면, 상기 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 매트릭스들을 하나의 통합 매트릭스로 변환하는 단계, CNN(Convolution Neural Network) 학습(training)된 가중치(weight) 매트릭스 및 상기 통합 매트릭스를 이용하여 상기 이미지에 대한 필터링을 수행하는 단계 및 상기 필터링 결과를 출력하는 단계를 포함하며, 상기 필터링을 수행하는 단계는, 상기 통합 매트릭스와 상기 가중치 매트릭스에 대한 행렬 곱을 수행하여 컨벌루션 매트릭스를 획득하는 단계, 상기 컨벌루션 매트릭스를 이용하여 상기 이미지의 각 픽셀 영역들의 특성을 필터링하는 단계를 포함하며, 상기 가중치 매트릭스는, CNN 학습된 복수의 매트릭스를 인터리브드(interleaved) 형태로 통합한 매트릭스이고, 상기 통합 매트릭스는, 상기 가중치 매트릭스와 연산이 가능한 개수의 행 및 열을 가지는 매트릭스이다.Meanwhile, in a method for controlling an electronic device according to an embodiment of the present disclosure, when an image is received, converting matrices representing color components constituting each pixel of the image into one unified matrix, a convolution neural network (CNN) ) Filtering the image using the trained weight matrix and the integrated matrix, and outputting the filtering result, wherein the filtering comprises: the integrated matrix And obtaining a convolutional matrix by performing matrix multiplication on the weighting matrix and filtering characteristics of each pixel region of the image using the convolutional matrix, wherein the weighting matrix is a plurality of CNN-trained matrices Is an interleaved matrix, and the integrated matrix is a matrix having the weight matrix and the number of rows and columns that can be calculated.

또한, 상기 통합 매트릭스를 구성하는 각 행과, 상기 가중치 매트릭스의 대응되는 열 간의 행렬 곱을 각각 병렬적으로 수행하는 복수의 코어를 포함할 수 있다.In addition, it may include a plurality of cores for performing matrix multiplication between each row constituting the unified matrix and a corresponding column of the weight matrix in parallel.

여기서, 상기 필터링을 수행하는 단계는, 바이어스 매트릭스를 상기 컨벌루션 매트릭스에 합산하는 단계를 포함할 수 있다.Here, performing the filtering may include adding a bias matrix to the convolution matrix.

또한, 상기 필터링을 수행하는 단계는, 제1 및 제2 바이어스 매트릭스 중 하나를 선택적으로 상기 컨벌루션 매트릭스에 합산하는 단계를 포함하고, 상기 제1 바이어스 매트릭스는 1로 구성된 매트릭스이고, 상기 제2 바이어스 매트릭스는 0으로 구성된 매트릭스일 수 있다.Further, the performing of the filtering includes the step of selectively summing one of the first and second bias matrices to the convolution matrix, wherein the first bias matrix is a matrix composed of 1, and the second bias matrix May be a matrix composed of zeros.

여기서, 상기 필터링을 수행하는 단계는, 상기 제1 및 제2 바이어스 매트릭스 중 하나가 합산된 컨벌루션 매트릭스에 활성화 함수를 적용하여, 복수의 출력 레이어를 획득하는 단계, 상기 복수의 출력 레이어에 기초하여 FC(fully-connected) 레이어를 획득하는 단계 및 상기 FC 레이어에 포함된 각 영역들의 클래스 점수에 따라, 각 영역들의 특성을 식별하는 단계를 포함할 수 있다.Here, the performing of the filtering may include obtaining a plurality of output layers by applying an activation function to a convolution matrix in which one of the first and second bias matrices is summed, and FC based on the plurality of output layers. It may include obtaining a (fully-connected) layer and identifying characteristics of each region according to the class score of each region included in the FC layer.

또한, 상기 FC 레이어를 획득하는 단계는, 상기 복수의 출력 레이어에서 서로 대응되는 위치의 값을 합산하여, 상기 FC 레이어를 획득할 수 있다.In addition, in the obtaining of the FC layer, the FC layer may be obtained by summing values of positions corresponding to each other in the plurality of output layers.

또한, 상기 FC 레이어를 획득하는 단계는, 상기 복수의 출력 레이어에서 서로 대응되는 위치의 값을 비교하고, 가장 큰 값을 가지는 값들을 집산하여, 상기 FC 레이어를 획득할 수 있다.Further, in the obtaining of the FC layer, the FC layer may be obtained by comparing values of positions corresponding to each other in the plurality of output layers and collecting values having the largest values.

또한, 상기 필터링에 사용되는 파라미터값들 및 명령어를 상기 통합 매트릭스와 함께 이미지 프로세서로 일괄 전송하는 단계를 포함하고, 상기 필터링은 상기 이미지 프로세서에 의해 수행될 수 있다.Further, it includes the step of collectively transmitting parameter values and commands used for the filtering to an image processor together with the integrated matrix, and the filtering may be performed by the image processor.

또한, 상기 필터링을 수행하는 단계는, 상기 필터링을 복수 회 반복하여 수행할 수 있다.In addition, the step of performing the filtering may be performed by repeating the filtering a plurality of times.

한편, 본 개시의 일 실시 예에 따른 전자 장치의 프로세서에 의해 실행되는 경우 상기 전자 장치가 동작을 수행하도록 컴퓨터 명령을 저장하는 비일시적 컴퓨터 판독 가능 매체에 있어서, 상기 동작은, 이미지가 수신되면, 상기 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 매트릭스들을 하나의 통합 매트릭스로 변환하는 단계, CNN(Convolution Neural Network) 학습(training)된 가중치(weight) 매트릭스 및 상기 통합 매트릭스를 이용하여 상기 이미지에 대한 필터링을 수행하는 단계 및 상기 필터링 결과를 출력하는 단계를 포함하며, 상기 필터링을 수행하는 단계는, 상기 통합 매트릭스와 상기 가중치 매트릭스에 대한 행렬 곱을 수행하여 컨벌루션 매트릭스를 획득하는 단계, 상기 컨벌루션 매트릭스를 이용하여 상기 이미지의 각 픽셀 영역들의 특성을 필터링하는 단계를 포함하며, 상기 가중치 매트릭스는, CNN 학습된 복수의 매트릭스를 인터리브드(interleaved) 형태로 통합한 매트릭스이고, 상기 통합 매트릭스는, 상기 가중치 매트릭스와 연산이 가능한 개수의 행 및 열을 가지는 매트릭스일 수 있다.Meanwhile, in a non-transitory computer-readable medium storing a computer command so that the electronic device performs an operation when executed by a processor of the electronic device according to an embodiment of the present disclosure, the operation is, when an image is received, Converting matrices representing color components constituting each pixel of the image into one unified matrix, filtering the image using a CNN (Convolution Neural Network) trained weight matrix and the unified matrix And outputting the filtering result, wherein the filtering comprises: obtaining a convolutional matrix by performing matrix multiplication of the unified matrix and the weighting matrix, and using the convolutional matrix Filtering the characteristics of each pixel region of the image, wherein the weight matrix is a matrix obtained by integrating a plurality of CNN-trained matrices in an interleaved form, and the integrated matrix is calculated with the weight matrix It may be a matrix having this possible number of rows and columns.

이상과 같은 본 발명의 다양한 실시 예에 따르면, 전자 장치는 CNN(Convolution Neural Network) 학습(training)된 가중치 매트릭스 및 바이어스 매트릭스를 이용하여 프로세서와 이미지 프로세서 간 데이터 송수신에 따른 딜레이 시간을 최소화하면서 제공할 수 있다.According to the various embodiments of the present invention as described above, the electronic device provides while minimizing the delay time due to data transmission/reception between the processor and the image processor using a weight matrix and a bias matrix trained by a convolution neural network (CNN). I can.

도 1은 본 개시의 일 실시 예에 따른 전자 장치를 설명하기 위한 블록도이다.
도 2는 본 개시의 일 실시 예에 따른 전자 장치의 세부 구성을 나타내는 블록도이다.
도 3은 본 개시의 일 실시 예에 따른 행렬 곱을 설명하기 위한 도면이다.
도 4는 본 개시의 일 실시 예에 따른 활성화 함수를 설명하기 위한 도면이다.
도 5는 본 개시의 일 실시 예에 따른 필터링 결과를 획득하기 위한 동작 방법을 설명하기 위한 흐름도이다.
도 6은 본 개시의 일 실시 예에 따른 필터링 결과를 획득하기 위한 명령어를 설명하기 위한 도면이다.
도 7은 본 개시의 일 실시 예에 따른 필터링 결과를 획득하기 위한 명령어를 설명하기 위한 도면이다.
도 8는 본 발명의 일 실시 예에 따른 전자 장치의 제어 방법을 설명하기 위한 흐름도이다.
1 is a block diagram illustrating an electronic device according to an embodiment of the present disclosure.
2 is a block diagram illustrating a detailed configuration of an electronic device according to an embodiment of the present disclosure.
3 is a diagram for describing matrix multiplication according to an embodiment of the present disclosure.
4 is a diagram for describing an activation function according to an embodiment of the present disclosure.
5 is a flowchart illustrating an operation method for obtaining a filtering result according to an embodiment of the present disclosure.
6 is a diagram illustrating a command for obtaining a filtering result according to an embodiment of the present disclosure.
7 is a diagram illustrating a command for obtaining a filtering result according to an embodiment of the present disclosure.
8 is a flowchart illustrating a method of controlling an electronic device according to an embodiment of the present invention.

본 명세서에서 사용되는 용어에 대해 간략히 설명하고, 본 개시에 대해 구체적으로 설명하기로 한다. The terms used in the present specification will be briefly described, and the present disclosure will be described in detail.

본 개시의 실시 예에서 사용되는 용어는 본 개시에서의 기능을 고려하면서 가능한 현재 널리 사용되는 일반적인 용어들을 선택하였으나, 이는 당 분야에 종사하는 기술자의 의도 또는 판례, 새로운 기술의 출현 등에 따라 달라질 수 있다. 또한, 특정한 경우는 출원인이 임의로 선정한 용어도 있으며, 이 경우 해당되는 개시의 설명 부분에서 상세히 그 의미를 기재할 것이다. 따라서 본 개시에서 사용되는 용어는 단순한 용어의 명칭이 아닌, 그 용어가 가지는 의미와 본 개시의 전반에 걸친 내용을 토대로 정의되어야 한다. Terms used in the embodiments of the present disclosure have selected general terms that are currently widely used as possible while taking functions of the present disclosure into consideration, but this may vary according to the intention or precedent of a technician working in the field, the emergence of new technologies, etc. . In addition, in certain cases, there are terms arbitrarily selected by the applicant, and in this case, the meaning of the terms will be described in detail in the description of the corresponding disclosure. Therefore, the terms used in the present disclosure should be defined based on the meaning of the term and the contents of the present disclosure, not the name of a simple term.

본 개시의 실시 예들은 다양한 변환을 가할 수 있고 여러 가지 실시 예를 가질 수 있는바, 특정 실시 예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나 이는 특정한 실시 형태에 대해 범위를 한정하려는 것이 아니며, 개시된 사상 및 기술 범위에 포함되는 모든 변환, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 실시 예들을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.Since the embodiments of the present disclosure may apply various transformations and may have various embodiments, specific embodiments will be illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the scope of the specific embodiment, it is to be understood to include all conversions, equivalents, or substitutes included in the disclosed spirit and technical scope. In describing the embodiments, if it is determined that a detailed description of a related known technology may obscure the subject matter, the detailed description thereof will be omitted.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 구성요소들은 용어들에 의해 한정되어서는 안 된다. 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Terms such as first and second may be used to describe various components, but the components should not be limited by terms. The terms are only used for the purpose of distinguishing one component from another component.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "구성되다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. Singular expressions include plural expressions unless the context clearly indicates otherwise. In the present application, terms such as "comprise" or "comprise" are intended to designate the existence of features, numbers, steps, actions, components, parts, or a combination thereof described in the specification, but one or more other It is to be understood that the presence or addition of features, numbers, steps, actions, components, parts, or combinations thereof, does not preclude in advance the possibility of being excluded.

본 개시에서 "모듈" 혹은 "부"는 적어도 하나의 기능이나 동작을 수행하며, 하드웨어 또는 소프트웨어로 구현되거나 하드웨어와 소프트웨어의 결합으로 구현될 수 있다. 또한, 복수의 "모듈" 혹은 복수의 "부"는 특정한 하드웨어로 구현될 필요가 있는 "모듈" 혹은 "부"를 제외하고는 적어도 하나의 모듈로 일체화되어 적어도 하나의 프로세서(미도시)로 구현될 수 있다.In the present disclosure, a "module" or "unit" performs at least one function or operation, and may be implemented as hardware or software, or a combination of hardware and software. In addition, a plurality of "modules" or a plurality of "units" are integrated into at least one module except for the "module" or "unit" that needs to be implemented with specific hardware and implemented as at least one processor (not shown). Can be.

아래에서는 첨부한 도면을 참고하여 본 개시의 실시 예에 대하여 본 개시가 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 개시는 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시 예에 한정되지 않는다. 그리고 도면에서 본 개시를 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 유사한 부분에 대해서는 유사한 도면 부호를 붙였다.Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings so that those of ordinary skill in the art may easily implement the present disclosure. However, the present disclosure may be implemented in various different forms and is not limited to the exemplary embodiments described herein. In addition, in the drawings, parts not related to the description are omitted in order to clearly describe the present disclosure, and similar reference numerals are attached to similar parts throughout the specification.

도 1은 본 개시의 일 실시 예에 따른 전자 장치(100)를 설명하기 위한 블록도이다.1 is a block diagram illustrating an electronic device 100 according to an embodiment of the present disclosure.

도 1에 도시된 바와 같이 전자 장치(100)는 메모리(110), 프로세서(120), 이미지 프로세서(130), 디스플레이(140)를 포함한다. As illustrated in FIG. 1, the electronic device 100 includes a memory 110, a processor 120, an image processor 130, and a display 140.

본 개시의 일 실시 예에 따른 전자 장치(100)는 인공 지능 학습이 가능한 장치일 수 있다. 예를 들어, 사용자 단말 장치, 디스플레이 장치, 셋톱 박스(set-top box), 태블릿 PC(tablet personal computer), 스마트 폰(smart phone), 전자책 리더기(e-book reader), 데스크탑 PC (desktop PC), 랩탑 PC(laptop PC), 워크스테이션(workstation), 서버, PDA(personal digital assistant), PMP(portable multimedia player), MP3 플레이어 등일 수 있다. 또는, 전자 장치(100)는 클라우딩 컴퓨팅 환경이 구축된 시스템 자체를 의미할 수도 있다. 다만, 이에 한정되는 것은 아니며, 전자 장치(100)는 인공 지능 학습이 가능한 장치라면 어떤 장치라도 무방하다.The electronic device 100 according to an embodiment of the present disclosure may be a device capable of artificial intelligence learning. For example, a user terminal device, a display device, a set-top box, a tablet PC (tablet personal computer), a smart phone (smart phone), an e-book reader, a desktop PC (desktop PC) ), a laptop PC, a workstation, a server, a personal digital assistant (PDA), a portable multimedia player (PMP), an MP3 player, and the like. Alternatively, the electronic device 100 may refer to a system in which a cloud computing environment is built. However, the present disclosure is not limited thereto, and the electronic device 100 may be any device capable of artificial intelligence learning.

메모리(110)는 CNN(Convolution Neural Network, 컨볼루션 신경망) 학습(training)된 가중치(Weight) 매트릭스를 저장할 수 있다. 여기서, CNN은 음성처리, 이미지 처리 등을 위해 고안된 특수한 연결구조를 가진 다층신경망이다. 특히, CNN은 픽셀에 전처리를 통하여 이미지를 다양하게 필터링하고, 이미지의 특성을 인식할 수 있다. The memory 110 may store a weight matrix trained by a convolution neural network (CNN). Here, CNN is a multilayer neural network with a special connection structure designed for voice processing and image processing. In particular, the CNN can variously filter images through preprocessing on pixels and recognize the characteristics of the image.

메모리(110)는 복수의 이미지를 포함하는 기본 데이터로 CNN 학습된 매트릭스를 포함하는 이미지 처리 모델을 저장할 수 있다. 기본 데이터로부터 학습된 매트릭스는 필터, 커널, 가중치 매트릭스 등 다양하게 불릴 수 있으나, 이하에서는 설명의 편의를 위해 가중치 매트릭스로 통칭하도록 한다.The memory 110 may store an image processing model including a matrix trained by CNN as basic data including a plurality of images. The matrix learned from the basic data may be variously called a filter, a kernel, a weight matrix, etc., but hereinafter, it will be collectively referred to as a weight matrix for convenience of description.

본 개시의 일 실시 예에 따른 메모리(110)는 바이어스(bias) 매트릭스를 더 포함할 수 있다. 여기서, 바이어스 매트릭스는 상수로 구성된 매트릭스를 의미한다. 일 실시 예에 따른 전자 장치(100)는 이미지에 대한 필터링 과정에서 바이어스 매트릭스를 이용하여 필터링 결과를 획득할 수 있다. 여기서, 바이어스 매트릭스는 CNN 학습된 가중치 매트릭스를 포함하는 이미지 처리 모델이 과적합(overfitting)되는 것을 방지하기 위한 구성이다. 여기서, 과적합은 전자 장치(100)가 기본 데이터에 포함된 이미지에 가중치 매트릭스를 적용하여 이미지의 특성을 획득한 경우에는, 획득된 이미지의 특성과 이미지의 실제 특성이 일치하는데 반하여, 다른 이미지(예를 들어, 실시간으로 수신된 이미지)에 가중치 매트릭스를 적용하여 획득한 이미지의 특성은 이미지의 실제 특성과 일치하지 않는 경우가 빈번하게 발행하는 것을 의미한다.The memory 110 according to an embodiment of the present disclosure may further include a bias matrix. Here, the bias matrix means a matrix composed of constants. The electronic device 100 according to an embodiment may obtain a filtering result using a bias matrix in a process of filtering an image. Here, the bias matrix is a configuration for preventing overfitting of an image processing model including a CNN-trained weight matrix. Here, overfitting means that when the electronic device 100 obtains the characteristics of the image by applying a weight matrix to the image included in the basic data, the characteristics of the acquired image and the actual characteristics of the image coincide, whereas the other image ( For example, the characteristics of an image obtained by applying a weighting matrix to an image received in real time) means that a case is frequently issued that does not match the actual characteristics of the image.

프로세서(120)는 전자 장치(100)의 동작을 전반적으로 제어한다.The processor 120 overall controls the operation of the electronic device 100.

일 실시 예에 따라 프로세서(120)는 디지털 시그널 프로세서(digital signal processor(DSP), 마이크로 프로세서(microprocessor), TCON(Time controller)으로 구현될 수 있다. 다만, 이에 한정되는 것은 아니며, 중앙처리장치(central processing unit(CPU)), MCU(Micro Controller Unit), MPU(micro processing unit), 컨트롤러(controller), 어플리케이션 프로세서(application processor(AP)), 또는 커뮤니케이션 프로세서(communication processor(CP)), ARM 프로세서 중 하나 또는 그 이상을 포함하거나, 해당 용어로 정의될 수 있다. 또한, 프로세서(140)는 프로세싱 알고리즘이 내장된 SoC(System on Chip), LSI(large scale integration)로 구현될 수도 있고, FPGA(Field Programmable gate array) 형태로 구현될 수도 있다.According to an embodiment, the processor 120 may be implemented as a digital signal processor (DSP), a microprocessor, or a time controller (TCON), but is not limited thereto, and the central processing unit ( central processing unit (CPU)), microcontroller unit (MCU), micro processing unit (MPU), controller, application processor (AP), or communication processor (CP), ARM processor In addition, the processor 140 may include one or more of, or may be defined by a corresponding term. In addition, the processor 140 may be implemented as a system on chip (SoC) or a large scale integration (LSI) with a built-in processing algorithm, or an FPGA ( Field Programmable gate array) can also be implemented.

프로세서(120)는 이미지가 수신되면, 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 매트릭스들을 하나의 통합 매트릭스로 변환할 수 있다. 여기서, 이미지는 전자 장치(100)가 실시간으로 수신하는 영상, 컨텐츠 등 다양한 유형의 이미지를 의미한다. 색성분은 이미지의 각 픽셀에 대응되는 픽셀값을 의미할 수 있다. 예를 들어, 수신된 이미지의 각 픽셀이 8bit를 통해 표현되는 경우, 하나의 픽셀은 0~255의 총 256개의 색성분 중 하나를 갖는다. 이에 따라, 프로세서(120)는 수신된 이미지를 각 픽셀값을 이용하여 매트릭스로 변환할 수 있다.When an image is received, the processor 120 may convert matrices representing color components constituting each pixel of the image into a single integrated matrix. Here, the image refers to various types of images such as images and contents that the electronic device 100 receives in real time. The color component may mean a pixel value corresponding to each pixel of an image. For example, when each pixel of the received image is expressed through 8 bits, one pixel has one of a total of 256 color components ranging from 0 to 255. Accordingly, the processor 120 may convert the received image into a matrix using each pixel value.

본 개시의 일 실시 예에 따른 프로세서(120)는 수신된 이미지가 다 채널의 데이터이면, 각 채널 별 매트릭스를 획득하고, 획득된 복수의 매트릭스를 하나의 통합 매트릭스로 변환할 수 있다. 일 예로, 수신된 이미지는 R, G, B의 3 채널 데이터이고, 프로세서(120)는 R, G, B 각각에 대응되는 매트릭스를 획득할 수 있다. 이에 대한 구체적인 설명은 도 3에서 하도록 한다.If the received image is multi-channel data, the processor 120 according to an embodiment of the present disclosure may obtain a matrix for each channel and convert the obtained plurality of matrices into one integrated matrix. As an example, the received image is 3-channel data of R, G, and B, and the processor 120 may obtain a matrix corresponding to each of R, G, and B. A detailed description of this will be given in FIG. 3.

본 개시의 일 실시 예에 따른 프로세서(120)는 이미지 프로세서(130)가 수신된 이미지에 대한 필터링을 수행하도록 제어할 수 있다. 또한, 필터링 결과를 출력하도록 디스플레이(140)를 제어할 수 있다.The processor 120 according to an embodiment of the present disclosure may control the image processor 130 to perform filtering on a received image. In addition, the display 140 may be controlled to output the filtering result.

이미지 프로세서(130)는 그래픽 데이터의 처리를 위한 특수 목적 프로세서일 수 있다. 특히, 이미지 프로세서(130)는 변환된 통합 매트릭스를 이용하여 이미지에 대한 필터링을 수행할 수 있다.The image processor 130 may be a special purpose processor for processing graphic data. In particular, the image processor 130 may perform filtering on an image using the converted integrated matrix.

이미지 프로세서(130)는 GPU(Graphic Processing Unit)로서, 프로세서(120)와 구별되는 구성 요소로 구현될 수 있으나, 이에 한정되는 것은 아니다. 본 개시의 다양한 실시 예는 프로세서(120)에 의해 수행될 수도 있다. 일 예로, 프로세서(120)의 그래픽 처리부가 본 개시의 다양한 실시 예에 따른 수신된 이미지에 대한 필터링을 수행할 수도 있음은 물론이다.The image processor 130 is a GPU (Graphic Processing Unit) and may be implemented as a component different from the processor 120, but is not limited thereto. Various embodiments of the present disclosure may be performed by the processor 120. As an example, it goes without saying that the graphic processing unit of the processor 120 may perform filtering on a received image according to various embodiments of the present disclosure.

이미지 프로세서(130)는 연산부(미도시) 및 렌더링부(미도시)를 이용하여 다양한 객체를 포함하는 화면을 생성한다. 연산부는 수신된 제어 명령에 기초하여 화면의 레이아웃에 따라 각 객체들이 표시될 좌표값, 형태, 크기, 컬러 등과 같은 속성값을 연산한다. 렌더링부는 연산부에서 연산한 속성값에 기초하여 객체를 포함하는 다양한 레이아웃의 화면을 생성한다. 렌더링부에서 생성된 화면은 디스플레이(140)의 디스플레이 영역 내에 표시된다.The image processor 130 generates a screen including various objects using an operation unit (not shown) and a rendering unit (not shown). Based on the received control command, the operation unit calculates attribute values such as coordinate values, shape, size, color, etc. in which each object is to be displayed according to the layout of the screen. The rendering unit generates screens of various layouts including objects based on the attribute values calculated by the calculation unit. The screen generated by the rendering unit is displayed in the display area of the display 140.

또한, 이미지 프로세서(130)는 이미지 데이터에 대한 처리를 수행하는 구성요소이다. 이미지 프로세서(130)에서는 이미지 데이터에 대한 디코딩, 스케일링, 노이즈 필터링, 프레임 레이트 변환, 해상도 변환 등과 같은 다양한 이미지 처리를 수행할 수 있다.Also, the image processor 130 is a component that processes image data. The image processor 130 may perform various image processing such as decoding, scaling, noise filtering, frame rate conversion, and resolution conversion on image data.

특히, 이미지 프로세서(130)는 통합 매트릭스와 가중치 매트릭스에 대한 컨벌루션을 수행하여 컨벌루션 매트릭스를 획득할 수 있다. 여기서, 컨벌루션은 가중치 매트릭스가 이미지에 대한 매트릭스를 영역 별로 시프트하면서 행렬 곱을 수행하고, 행렬 곱에 따른 결과값을 산출하는 것을 의미한다. 일 예로, 수신된 이미지에 대한 매트릭스가 7 × 7 이고, 가중치 매트릭스가 3 × 3이면, 가중치 매트릭스는 이미지에 대한 매트릭스 내에서 영역 별로 시프트하면서 행렬 곱을 수행하고, 3 × 3의 출력 매트릭스를 획득할 수 있다. 이하에서는 컨벌루션에 따라 획득된 출력 매트릭스를 컨벌루션 매트릭스로 통칭하도록 한다.In particular, the image processor 130 may obtain a convolution matrix by performing convolution on the unified matrix and the weight matrix. Here, convolution means that the weight matrix performs matrix multiplication while shifting the matrix for the image for each region, and calculates a result value according to the matrix multiplication. For example, if the matrix for the received image is 7 × 7 and the weight matrix is 3 × 3, the weight matrix performs matrix multiplication while shifting for each area in the matrix for the image, and obtains a 3 × 3 output matrix. I can. Hereinafter, the output matrix obtained according to convolution will be collectively referred to as a convolution matrix.

매트릭스의 사이즈는 일 실시 예이며, 이에 한정되는 것은 아니다. 예를 들어, 수신된 이미지에 따라 매트릭스는 다양한 사이즈를 가질 수 있다. 또한, 컨벌루션을 수행하는 과정에서 패딩(padding), 스트라이드(stride)가 수행되어 사이즈가 다양하게 조절될 수도 있음은 물론이다. 여기서, 패딩은 수신된 이미지의 사방에 기설정된 사이즈만큼 특정한 픽셀 값을 채우는 것을 의미한다. 패딩이 수행되면, 이미지에 대한 매트릭스와 컨벌루션 매트릭스가 동일한 사이즈를 가질 수도 있다. 스트라이드는 가중치 매트릭스의 시프트 간격을 의미한다. 예를 들어, 스타라이드(stride=3)이면, 이미지 프로세서(130)는 매트릭스 내에서 세 칸씩 시프트하면서 컨벌루션을 수행할 수 있다.The size of the matrix is an example and is not limited thereto. For example, the matrix may have various sizes according to the received image. In addition, it goes without saying that the size may be variously adjusted as padding and stride are performed in the process of performing convolution. Here, padding means filling a specific pixel value by a preset size on all sides of the received image. When padding is performed, the matrix for the image and the convolution matrix may have the same size. Stride refers to the shift interval of the weight matrix. For example, if starride (stride=3), the image processor 130 may perform convolution while shifting by three spaces in the matrix.

다만, 본 개시의 일 실시 예에 따른 이미지 프로세서(130)는 컨벌루션을 수행하기 위해 가중치 매트릭스를 이미지에 대한 매트릭스를 영역 별로 시프트하지 않을 수 있다. 변환된 통합 매트릭스는 가중치 매트릭스와 행렬 곱이 가능한 행 및 열을 가지는 매트릭스일 수 있다. 메모리(110)에 저장된 가중치 매트릭스는 인터리브드(interleaved) 형태로 통합된 매트릭스일 수 있다. 여기서, 인터리브드 형태의 매트릭스는 변환된 통합 매트릭스와 행렬 곱이 가능한 행 및 열을 가지는 매트릭스일 수 있다.However, in order to perform convolution, the image processor 130 according to an embodiment of the present disclosure may not shift the weight matrix and the image matrix for each area. The transformed integrated matrix may be a matrix having rows and columns capable of multiplying the weight matrix and the matrix. The weight matrix stored in the memory 110 may be an integrated matrix in an interleaved form. Here, the interleaved matrix may be a matrix having rows and columns capable of multiplying the transformed integrated matrix and the matrix.

일 예로, 프로세서(110)는 수신된 이미지가 2차원의 3×3 매트릭스이면, 4×8의 통합 매트릭스로 변환할 수 있다. 이미지 프로세서(130)는 4×8의 통합 매트릭스와 메모리(110)에 저장된 가중치 매트릭스와 행렬 곱을 수행하여 컨벌루션 매트릭스를 획득할 수 있다. 여기서, 가중치 매트릭스는 4×8의 통합 매트릭스와 행렬 곱을 수행할 수 있는 인터리브드 형태 즉, 8×2의 매트릭스 일 수 있다. 이미지 프로세서(130)는 통합 매트릭스와 가중치 매트릭스 간의 행렬 곱을 수행하여 4×2의 컨벌루션 매트릭스를 획득할 수 있다. 이에 대한 구체적인 설명은 도 3에서 하도록 한다.For example, if the received image is a 2D 3x3 matrix, the processor 110 may convert it into a 4x8 integrated matrix. The image processor 130 may obtain a convolution matrix by multiplying a 4×8 integrated matrix with a weight matrix stored in the memory 110 and a matrix. Here, the weight matrix may be an interleaved form capable of performing matrix multiplication with a 4×8 integrated matrix, that is, an 8×2 matrix. The image processor 130 may obtain a 4×2 convolution matrix by performing matrix multiplication between the unified matrix and the weight matrix. A detailed description of this will be given in FIG. 3.

본 개시의 일 실시 예에 따른 이미지 프로세서(130)는 복수의 코어를 포함할 수 있다. 이미지 프로세서(130)는 복수의 코어를 이용하여 통합 매트릭스를 구성하는 각 행과 가중치 매트릭스의 대응되는 열 간의 행렬 곱을 각각 병렬적으로 수행할 수 있다. 통합 매트릭스와 가중치 매트릭스 간의 컨벌루션은 통합 매트릭스와 가중치 매트릭스 간의 행렬 곱을 수행하거나, 이미지에 필터 또는 커널을 적용한 것을 의미할 수 있다. The image processor 130 according to an embodiment of the present disclosure may include a plurality of cores. The image processor 130 may perform matrix multiplication between each row constituting the unified matrix and a corresponding column of the weight matrix in parallel using a plurality of cores. Convolution between the unified matrix and the weight matrix may mean performing matrix multiplication between the unified matrix and the weight matrix, or applying a filter or kernel to an image.

일 예로, 이미지 프로세서(130)가 4×8의 통합 매트릭스와 8×2의 가중치 매트릭스간의 행렬 곱을 수행하는 경우을 상정할 수 있다. 통합 매트릭스의 1행과 가중치 매트릭스의 1열 간의 행렬 곱은 제1 코어에 의해 수행되고, 통합 매트릭스의 1행과 가중치 매트릭스의 2열 간의 행렬 곱은 제2 코어에 의해 수행될 수 있다. 이와 같이, 총 8번의 행렬 곱이 제1 내지 제8 코어 각각에 의해 병렬적으로 수행될 수 있다. 이에 따라, 컨벌루션 매트릭스를 획득하는데 요구되는 시간이 감소할 수 있다. 일 예로, NVIDIA® 社의 GPU는 3,584개의 CUDA® 코어를 포함할 수 있으며, 산술적으로 3,584개의 연산이 병렬적으로 수행할 수 있다.For example, it may be assumed that the image processor 130 performs matrix multiplication between a 4x8 integrated matrix and an 8x2 weight matrix. A matrix multiplication between one row of the unified matrix and one column of the weight matrix may be performed by a first core, and a matrix multiplication between one row of the unified matrix and two columns of the weight matrix may be performed by a second core. In this way, a total of eight matrix multiplications may be performed in parallel by each of the first to eighth cores. Accordingly, the time required to obtain the convolution matrix can be reduced. As an example, NVIDIA®'s GPU may contain 3,584 CUDA® cores, and 3,584 arithmetic operations can be performed in parallel.

본 개시의 일 실시 예에 따른 이미지 프로세서(130)는 컨벌루션 매트릭스에 바이어스 매트릭스를 합산할 수 있다. 일 예로, 바이어스 매트릭스는 1×1의 기설정된 값을 가지는 매트릭스일 수 있다. 이미지 프로세서(130)는 컨벌루션 매트릭스에 포함된 모든 원소에 바이어스 매트릭스에 포함된 기설정된 값을 합산할 수 있다.The image processor 130 according to an embodiment of the present disclosure may add a bias matrix to a convolution matrix. As an example, the bias matrix may be a matrix having a preset value of 1×1. The image processor 130 may add a preset value included in the bias matrix to all elements included in the convolution matrix.

다른 예로, 이미지 프로세서(130)는 제1 및 제2 바이어스 매트릭스 중 어느 하나를 선택적으로 컨벌루션 매트릭스에 적용할 수 있다. 일 예로, 제1 바이어스 매트릭스는 1로 구성된 1×1의 매트릭스이고, 제2 바이어스는 0으로 구성된 1×1의 매트릭스일 수 있다. 이미지 프로세서(130)는 다양한 목적에 기초하여 제1 및 제2 바이어스 매트릭스 중 어느 하나를 선택적으로 컨벌루션 매트릭스에 합산할 수 있다.As another example, the image processor 130 may selectively apply any one of the first and second bias matrices to the convolution matrix. As an example, the first bias matrix may be a 1×1 matrix composed of 1s, and the second bias may be a 1×1 matrix composed of 0s. The image processor 130 may selectively add one of the first and second bias matrices to the convolution matrix based on various purposes.

본 개시의 일 실시 예에 따른 이미지 프로세서(140)는 바이어스 매트릭스가 합산된 컨벌루션 매트릭스에 활성화 함수를 적용할 수 있다. 여기서, 활성화 함수(Activation function) Identity Function, Logistic Sigmoid Function, Hyperbolic Tangent(tanh) Function, ReLU Function, Leaky ReLU Function 등 다양한 유형의 함수가 적용될 수 있다. 일 예로, 이미지 프로세서(130)는 RELU 함수 max(0,x)를 모든 요소에 적용할 수 있다. The image processor 140 according to an embodiment of the present disclosure may apply an activation function to a convolution matrix in which a bias matrix is added. Here, various types of functions such as an Activation Function Identity Function, Logistic Sigmoid Function, Hyperbolic Tangent (tanh) Function, ReLU Function, and Leaky ReLU Function may be applied. For example, the image processor 130 may apply the RELU function max(0,x) to all elements.

이미지 프로세서(140)는 활성화 함수를 적용하여 복수의 출력 레이어를 획득하고, 출력 레이어에 기초하여 FC(fully-connected, 완전 연결) 레이어를 획득할 수 있다. 여기서, FC 레이어는 출력 층으로서, FC 레이어에 포함된 각 영역들의 클래스 점수에 따라 각 영역들의 특성을 식별할 수 있다. 일 예로, 클래스 점수는 활성화 함수가 적용된 후 활성화된 양을 의미하고, 이미지 프로세서(130)는 각 활성화 양에 대응되는 카테고리를 식별할 수 있다. 여기서, 식별된 카테고리는 각 영역의 특성을 의미할 수 있다. 예를 들어, FC 레이어에 포함된 각 영역의 클래스 점수에 따라, 각 영역에 포함된 오브젝트(예를 들어, 자동차, 배, 고양이 등)를 식별할 수 있다.The image processor 140 may obtain a plurality of output layers by applying an activation function, and obtain a fully-connected (FC) layer based on the output layer. Here, the FC layer is an output layer, and characteristics of each region can be identified according to the class score of each region included in the FC layer. As an example, the class score means an amount activated after an activation function is applied, and the image processor 130 may identify a category corresponding to each activation amount. Here, the identified category may mean a characteristic of each area. For example, according to the class score of each region included in the FC layer, objects (eg, a car, a ship, a cat, etc.) included in each region may be identified.

본 개시의 일 실시 예에 따른 이미지 프로세서(130)는 복수의 출력 레이어에서 서로 대응되는 위치의 값을 합산하여, FC 레이어를 획득할 수 있다.The image processor 130 according to an embodiment of the present disclosure may obtain an FC layer by summing values of positions corresponding to each other in a plurality of output layers.

다른 예로, 이미지 프로세서(130)는, 복수의 출력 레이어에서 서로 대응되는 위치의 값을 비교하고, 가장 큰 값을 가지는 값들을 집산하여, FC 레이어를 획득할 수 있다.As another example, the image processor 130 may obtain the FC layer by comparing values of positions corresponding to each other in a plurality of output layers and collecting values having the largest values.

디스플레이(140)는 액정 표시 장치(Liquid Crystal Display, LCD), 유기 전기 발광 다이오드(Organic Light Emiiting Display, OLED), LCoS(Liquid Crystal on Silicon) 또는 DLP(Digital Light Processing) 등과 같은 다양한 형태의 디스플레이로 구현될 수 있다. 다만, 이에 한정되는 것은 아니며 이미지를 디스플레이 할 수 있는 다양한 유형의 디스플레이로 구현될 수 있음은 물론이다.The display 140 is a display of various types, such as a liquid crystal display (LCD), an organic light emitting diode (OLED), a liquid crystal on silicon (LCoS), or digital light processing (DLP). Can be implemented. However, the present invention is not limited thereto, and of course, it may be implemented as various types of displays capable of displaying images.

특히, 디스플레이(140)는 프로세서(120)의 제어에 따라 이미지 프로세서(130)의 필터링 결과를 출력할 수 있다.In particular, the display 140 may output the filtering result of the image processor 130 under the control of the processor 120.

도 2는 본 개시의 일 실시 예에 따른 전자 장치(100)의 세부 구성을 나타내는 블록도이다.2 is a block diagram illustrating a detailed configuration of an electronic device 100 according to an embodiment of the present disclosure.

도 2에 따르면, 전자 장치(100)는 메모리(110), 프로세서(120), 이미지 프로세서(130), 디스플레이(140), 통신부(150), 사용자 인터페이스부(160), 오디오 처리부(170)를 포함한다. 도 2에 도시된 구성요소들 중 도 1에 도시된 구성요소와 중복되는 부분에 대해서는 자세한 설명을 생략하도록 한다.According to FIG. 2, the electronic device 100 includes a memory 110, a processor 120, an image processor 130, a display 140, a communication unit 150, a user interface unit 160, and an audio processing unit 170. Include. Among the components shown in FIG. 2, detailed descriptions of parts that overlap with the components shown in FIG. 1 will be omitted.

프로세서(120)는 메모리(110)에 저장된 각종 프로그램을 이용하여 전자 장치(100)의 동작을 전반적으로 제어한다.The processor 120 overall controls the operation of the electronic device 100 by using various programs stored in the memory 110.

구체적으로, 프로세서(120)는 RAM(121), ROM(122), 메인 CPU(123), 그래픽 처리부(124), 제1 내지 n 인터페이스(125-1 ~ 125-n), 버스(126)를 포함한다.Specifically, the processor 120 includes the RAM 121, the ROM 122, the main CPU 123, the graphic processing unit 124, the first to n interfaces 125-1 to 125-n, and the bus 126. Include.

RAM(121), ROM(122), 메인 CPU(123), 그래픽 처리부(124), 제1 내지 n 인터페이스(125-1 ~ 125-n) 등은 버스(126)를 통해 서로 연결될 수 있다. The RAM 121, the ROM 122, the main CPU 123, the graphic processing unit 124, the first to n interfaces 125-1 to 125-n, and the like may be connected to each other through the bus 126.

제1 내지 n 인터페이스(125-1 내지 125-n)는 상술한 각종 구성요소들과 연결된다. 인터페이스들 중 하나는 네트워크를 통해 외부 장치와 연결되는 네트워크 인터페이스가 될 수도 있다.The first to nth interfaces 125-1 to 125-n are connected to the various components described above. One of the interfaces may be a network interface that is connected to an external device through a network.

메인 CPU(123)는 메모리(110)에 액세스하여, 메모리(110)에 저장된 O/S를 이용하여 부팅을 수행한다. 그리고, 메모리(110)에 저장된 각종 프로그램 등을 이용하여 다양한 동작을 수행한다.The main CPU 123 accesses the memory 110 and performs booting using the O/S stored in the memory 110. Then, various operations are performed using various programs stored in the memory 110.

ROM(122)에는 시스템 부팅을 위한 명령어 세트 등이 저장된다. 턴온 명령이 입력되어 전원이 공급되면, 메인 CPU(123)는 ROM(122)에 저장된 명령어에 따라 메모리(110)에 저장된 O/S를 RAM(121)에 복사하고, O/S를 실행시켜 시스템을 부팅시킨다. 부팅이 완료되면, 메인 CPU(123)는 메모리(110)에 저장된 각종 어플리케이션 프로그램을 RAM(121)에 복사하고, RAM(121)에 복사된 어플리케이션 프로그램을 실행시켜 각종 동작을 수행한다.The ROM 122 stores an instruction set for booting the system, and the like. When the turn-on command is input and power is supplied, the main CPU 123 copies the O/S stored in the memory 110 to the RAM 121 according to the instruction stored in the ROM 122, and executes the O/S. Boot. When booting is completed, the main CPU 123 copies various application programs stored in the memory 110 to the RAM 121 and executes the application programs copied to the RAM 121 to perform various operations.

본 개시의 일 실시 예에 따른 프로세서(120)는 이미지 프로세서(130)가 필터링을 수행하는데 사용되는 파라미터값들 및 명령어를 통합 매트릭스와 함께 이미지 프로세서(130)로 일괄 전송할 수 있다. 이에 따라, 프로세서(120)와 이미지 프로세서(130) 간의 데이터 송수신으로 인한 딜레이 시간을 최소화시킬 수 있다. 이에 대한 구체적인 설명은 도 5 내지 7에서 하도록 한다.The processor 120 according to an embodiment of the present disclosure may collectively transmit parameter values and a command used for the image processor 130 to perform filtering to the image processor 130 together with an integrated matrix. Accordingly, a delay time due to data transmission/reception between the processor 120 and the image processor 130 may be minimized. A detailed description of this will be given in FIGS. 5 to 7.

본 개시의 일 실시 예에 따른 프로세서(120)는, 필터링을 복수 회 반복하여 수행하도록 이미지 프로세서를 제어할 수 있다.The processor 120 according to an embodiment of the present disclosure may control the image processor to repeatedly perform filtering a plurality of times.

한편, 상술한 프로세서(120)의 동작은 메모리(110)에 저장된 프로그램에 의해 이루어질 수 있다.Meanwhile, the operation of the processor 120 described above may be performed by a program stored in the memory 110.

메모리(110)는 전자 장치(100)를 구동시키기 위한 O/S(Operating System) 소프트웨어 모듈, 가중치 매트릭스 및 바이어스 매트릭스를 포함하는 이미지 처리 모델, CNN 학습 모듈 등과 같이 다양한 데이터를 저장한다.The memory 110 stores various data such as an O/S (Operating System) software module for driving the electronic device 100, an image processing model including a weight matrix and a bias matrix, a CNN learning module, and the like.

메모리(110)는 프로세서(120)에 포함된 롬(ROM), 램(RAM) 등의 내부 메모리로 구현되거나, 프로세서(120)와 별도의 메모리로 구현될 수도 있다. 이 경우, 메모리(110)는 데이터 저장 용도에 따라 전자 장치(100)에 임베디드된 메모리 형태로 구현되거나, 전자 장치(100)에 탈부착이 가능한 메모리 형태로 구현될 수도 있다. 예를 들어, 전자 장치(100)의 구동을 위한 데이터의 경우 전자 장치(100)에 임베디드된 메모리에 저장되고, 전자 장치(100)의 확장 기능을 위한 데이터의 경우 전자 장치(100)에 탈부착이 가능한 메모리에 저장될 수 있다. 한편, 전자 장치(100)에 임베디드된 메모리의 경우 비휘발성 메모리, 휘발성 메모리, 하드 디스크 드라이브(HDD) 또는 솔리드 스테이트 드라이브(SSD) 등과 같은 형태로 구현되고, 전자 장치(100)에 탈부착이 가능한 메모리의 경우 메모리 카드(예를 들어, micro SD 카드, USB 메모리 등), USB 포트에 연결가능한 외부 메모리(예를 들어, USB 메모리) 등과 같은 형태로 구현될 수 있다.The memory 110 may be implemented as an internal memory such as ROM or RAM included in the processor 120, or may be implemented as a memory separate from the processor 120. In this case, the memory 110 may be implemented in the form of a memory embedded in the electronic device 100 according to the purpose of data storage, or may be implemented in a form of a memory that is detachable to the electronic device 100. For example, in the case of data for driving the electronic device 100, it is stored in a memory embedded in the electronic device 100, and in the case of data for an extended function of the electronic device 100, the electronic device 100 is detachable. It can be stored in memory whenever possible. Meanwhile, in the case of a memory embedded in the electronic device 100, a memory that is implemented in a form such as a nonvolatile memory, a volatile memory, a hard disk drive (HDD), or a solid state drive (SSD), and can be attached to the electronic device 100 In the case of, it may be implemented in a form such as a memory card (eg, micro SD card, USB memory, etc.), an external memory (eg, USB memory) connectable to a USB port.

통신부(150)는 다양한 유형의 통신방식에 따라 다양한 유형의 외부 장치와 통신을 수행하는 구성이다. 통신부(150)는 와이파이 칩(151), 블루투스 칩(152), 무선 통신 칩(153), NFC 칩(154) 등을 포함한다. 프로세서(120)는 통신부(150)를 이용하여 각종 외부 장치와 통신을 수행한다.The communication unit 150 is a component that communicates with various types of external devices according to various types of communication methods. The communication unit 150 includes a Wi-Fi chip 151, a Bluetooth chip 152, a wireless communication chip 153, an NFC chip 154, and the like. The processor 120 communicates with various external devices using the communication unit 150.

와이파이 칩(151), 블루투스 칩(152)은 각각 WiFi 방식, 블루투스 방식으로 통신을 수행한다. 와이파이 칩(151)이나 블루투스 칩(152)을 이용하는 경우에는 SSID 및 세션 키 등과 같은 각종 연결 정보를 먼저 송수신하여, 이를 이용하여 통신 연결한 후 각종 정보들을 송수신할 수 있다. 무선 통신 칩(153)은 IEEE, 지그비(zigbee), 3G(3rd Generation), 3GPP(3rd Generation Partnership Project), LTE(Long Term Evoloution) 등과 같은 다양한 통신 규격에 따라 통신을 수행하는 칩을 의미한다. NFC 칩(154)은 135kHz, 13.56MHz, 433MHz, 860~960MHz, 2.45GHz 등과 같은 다양한 RF-ID 주파수 대역들 중에서 13.56MHz 대역을 사용하는 NFC(Near Field Communication) 방식으로 동작하는 칩을 의미한다.The WiFi chip 151 and the Bluetooth chip 152 perform communication in a WiFi method and a Bluetooth method, respectively. In the case of using the Wi-Fi chip 151 or the Bluetooth chip 152, various types of connection information such as SSID and session key may be first transmitted and received, and then various types of information may be transmitted and received after a communication connection using the same. The wireless communication chip 153 refers to a chip that performs communication according to various communication standards such as IEEE, zigbee, 3rd Generation (3G), 3rd Generation Partnership Project (3GPP), and Long Term Evoloution (LTE). The NFC chip 154 refers to a chip operating in a Near Field Communication (NFC) method using a 13.56 MHz band among various RF-ID frequency bands such as 135 kHz, 13.56 MHz, 433 MHz, 860 to 960 MHz, and 2.45 GHz.

프로세서(120)는 통신부(150)를 통해 외부 장치로부터 이미지, 가중치 매트릭스, 바이어스 매트릭스 및 활성화 함수를 포함하는 이미지 처리 모델을 수신할 수도 있다.The processor 120 may receive an image processing model including an image, a weight matrix, a bias matrix, and an activation function from an external device through the communication unit 150.

사용자 인터페이스부(160)는 다양한 사용자 인터랙션(interaction)을 수신한다. 여기서, 사용자 인터페이스부(160)는 전자 장치(100)의 구현 예에 따라 다양한 형태로 구현 가능하다. 예를 들어, 사용자 인터페이스부(160)는 전자 장치(100)에 구비된 버튼, 사용자 음성을 수신하는 마이크, 사용자 모션을 감지하는 카메라 등일 수 있다. 또는, 전자 장치(100)가 터치 기반의 전자 장치로 구현되는 경우 사용자 인터페이스부(160)는 터치패드와 상호 레이어 구조를 이루는 터치 스크린 형태로 구현될 수도 있다. 이 경우, 사용자 인터페이스부(160)는 상술한 디스플레이(140)로 사용될 수 있게 된다.The user interface unit 160 receives various user interactions. Here, the user interface unit 160 may be implemented in various forms according to an implementation example of the electronic device 100. For example, the user interface unit 160 may be a button provided in the electronic device 100, a microphone receiving a user's voice, a camera detecting a user's motion, or the like. Alternatively, when the electronic device 100 is implemented as a touch-based electronic device, the user interface unit 160 may be implemented in the form of a touch screen forming a layer structure with a touch pad. In this case, the user interface unit 160 can be used as the display 140 described above.

오디오 처리부(160)는 오디오 데이터에 대한 처리를 수행하는 구성요소이다. 오디오 처리부(160)에서는 오디오 데이터에 대한 디코딩이나 증폭, 노이즈 필터링 등과 같은 다양한 처리가 수행될 수 있다.The audio processing unit 160 is a component that processes audio data. The audio processing unit 160 may perform various processing such as decoding, amplification, noise filtering, and the like for audio data.

도 3은 본 개시의 일 실시 예에 따른 행렬 곱을 설명하기 위한 도면이다.3 is a diagram for describing matrix multiplication according to an embodiment of the present disclosure.

도 3에 따르면, 수신된 이미지가 다 차원이면, 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 이미지에 대한 복수의 매트릭스(10)를 획득할 수 있다. 예를 들어, 수신된 이미지가 2차원이면 이미지에 대한 매트릭스를 2개 획득할 수 있다. 프로세서(120)는 이미지에 대한 복수의 매트릭스(10)를 하나의 통합 매트릭스(10-1)로 변환할 수 있다.Referring to FIG. 3, if the received image is multidimensional, a plurality of matrices 10 for an image representing color components constituting each pixel of the image may be obtained. For example, if the received image is two-dimensional, two matrices for the image may be obtained. The processor 120 may convert a plurality of matrices 10 for an image into one integrated matrix 10-1.

이미지 프로세서(130)는 통합 매트릭스(10-1)와 가중치 매트릭스(20) 간에 행렬 곱을 수행하기 위해 가중치 매트릭스(20)를 인터리브드(interleaved) 형태의 매트릭스(20-1)로 변환할 수 있다. 다만, 본 발명의 일 실시 예에 따른 전자 장치(100)는 가중치 매트릭스(20)를 인터리브드 형태의 매트릭스(20-1)로 기저장하고 있을 수 있다. 이에 따라, 이미지 프로세서(130)는 가중치 매트릭스(20)를 인터리브드 형태의 매트릭스(20-1)로 변환할 필요 없이, 기저장된 인터리브드 형태의 매트릭스(20-1)를 이용하여 행렬 곱을 수행할 수 있다.The image processor 130 may convert the weight matrix 20 into an interleaved matrix 20-1 in order to perform matrix multiplication between the integrated matrix 10-1 and the weight matrix 20. However, the electronic device 100 according to an embodiment of the present invention may pre-store the weight matrix 20 as an interleaved matrix 20-1. Accordingly, the image processor 130 does not need to convert the weight matrix 20 to the interleaved matrix 20-1, and performs matrix multiplication using the previously stored interleaved matrix 20-1. I can.

예를 들어, 프로세서(120)는 3 ×3 ×2의 매트릭스(10)를 4 ×8 ×1의 통합 매트릭스(10-1)로 변환할 수 있다. 인터리브드 형태의 매트릭스(20-1)는 8×4 ×1의 사이즈를 가진다. 이미지 프로세서(130)는 가중치 매트릭스(20)의 사이즈를 2 ×2 ×2에서 8×2 ×1로 변형하는 과정 없이 기저장된 인터리브드 형태의 매트릭스(20-1)를 이용하여 행렬 곱을 수행할 수 있다.For example, the processor 120 may convert a 3×3×2 matrix 10 into a 4×8×1 integrated matrix 10-1. The interleaved matrix 20-1 has a size of 8×4×1. The image processor 130 can perform matrix multiplication by using the previously stored interleaved matrix 20-1 without changing the size of the weight matrix 20 from 2 × 2 × 2 to 8 × 2 × 1. have.

한편, 이미지에 대한 매트릭스(10)와 가중치 매트릭스(20) 간의 컨벌루션은 가중치 매트릭스(20)의 시프트가 요구되며 연산 과정이 복잡한 단점이 있다. 출력 레이어(30)를 획득하기 위해 요구되는 연산 시간 및 리소스가 높다.Meanwhile, convolution between the matrix 10 and the weight matrix 20 for an image requires a shift of the weight matrix 20 and has a disadvantage in that the computation process is complicated. The computation time and resources required to obtain the output layer 30 are high.

통합 매트릭스(10-1)와 인터리브드 형태의 매트릭스(20-1) 간의 행렬 곱은 통합 매트릭스(10-1)의 행과 인터리브드 형태의 매트릭스(20-1)의 열의 행렬 곱만 수행하므로, 컨벌루션 매트릭스(30-1)를 획득하기 위해 요구되는 연산 시간 및 리소스가 적다. The matrix multiplication between the integrated matrix 10-1 and the interleaved matrix 20-1 is performed only by matrix multiplication of the rows of the integrated matrix 10-1 and the columns of the interleaved matrix 20-1, so the convolution matrix The computation time and resources required to obtain (30-1) are small.

본 개시의 일 실시 예에 따른 이미지 프로세서(130)는 복수의 코어를 포함하고 있을 수 있다. 복수의 코어 각각이 통합 매트리스(10-1)의 행과 인터리브드 형태의 매트릭스(20-1)의 열의 행렬 곱을 병렬적으로 수행할 수 있다.The image processor 130 according to an embodiment of the present disclosure may include a plurality of cores. Each of the plurality of cores may perform a matrix multiplication of the rows of the integrated mattress 10-1 and the columns of the interleaved matrix 20-1 in parallel.

본 개시의 일 실시 예에 따른 이미지 프로세서(130)는 컨벌루션 매트릭스(30-1)에 기초하여 출력 레이어(30)를 획득할 수 있다.The image processor 130 according to an embodiment of the present disclosure may obtain the output layer 30 based on the convolution matrix 30-1.

이하에서는, 컨벌루션 매트릭스(30-1)에 바이어스 매트릭스 및 활성화 함수를 적용하는 실시 예에 대해 설명하도록 한다.Hereinafter, an embodiment in which a bias matrix and an activation function are applied to the convolution matrix 30-1 will be described.

도 4는 본 개시의 일 실시 예에 따른 활성화 함수를 설명하기 위한 도면이다.4 is a diagram for describing an activation function according to an embodiment of the present disclosure.

컨벌루션 매트릭스(30-1)에 바이어스 매트릭스를 합산할 수 있다. 일 예로, 바이어스 매트릭스는 1×1의 기설정된 값을 가지는 매트릭스일 수 있다. 이미지 프로세서(130)는 컨벌루션 매트릭스(30-1)에 포함된 모든 원소에 바이어스 매트릭스에 포함된 기설정된 값을 합산할 수 있다.A bias matrix may be added to the convolution matrix 30-1. As an example, the bias matrix may be a matrix having a preset value of 1×1. The image processor 130 may add a preset value included in the bias matrix to all elements included in the convolution matrix 30-1.

이미지 프로세서(130)는 컨벌루션 매트릭스(30-1)에 활성화 함수를 적용할 수 있다. 행렬 곱(또는, 컨벌루션, 필터, 커널)을 통해 획득한 컨벌루션 매트릭스(또는, 특성 맵, Feature map)에 활성화 함수를 적용함에 따라 이미지에 특정한 오브젝트가 포함되어 있는지 유무를 식별할 수 있다. 일 예로, CNN 모델에서 ReLu 함수를 적용할 수 있다. RELU 함수는 도 4에 도시된 바와 같이 max(0,x), 음수들을 모두 0으로 처리할 수 있다. 다만, 이에 한정되는 것은 아니며 Sigmoid(또는 tanh) 활성화 함수를 적용할 수도 있음은 물론이다.The image processor 130 may apply an activation function to the convolution matrix 30-1. By applying the activation function to the convolution matrix (or feature map, feature map) obtained through matrix multiplication (or convolution, filter, kernel), it is possible to identify whether or not a specific object is included in the image. As an example, the ReLu function can be applied in the CNN model. As shown in FIG. 4, the RELU function can process max(0,x) and negative numbers as 0. However, it is not limited thereto, and of course, a Sigmoid (or tanh) activation function may be applied.

도 5는 본 개시의 일 실시 예에 따른 필터링 결과를 획득하기 위한 동작 방법을 설명하기 위한 흐름도이다.5 is a flowchart illustrating an operation method for obtaining a filtering result according to an embodiment of the present disclosure.

도 5에 따르면, 이미지가 수신되면(S510), 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 매트릭스들을 하나의 통합 매트릭스로 변환할 수 있다(S520). 일 예로, 프로세서(120)는 im2col 명령어를 이용하여 이미지에 대한 매트릭스(10)를 통합 매트릭스(10-1)로 변환할 수 있다.Referring to FIG. 5, when an image is received (S510), matrices representing color components constituting each pixel of the image may be converted into one integrated matrix (S520). For example, the processor 120 may convert the matrix 10 for an image into an integrated matrix 10-1 using the im2col command.

이어서, 이미지 프로세서(130)는 통합 매트릭스(10-1)와 인터리브드 형태의 가중치 매트릭스(20-1)에 대한 행렬 곱을 수행하여 컨벌루션 매트릭스(30-1)를 획득하고, 컨벌루션 매트릭스(30-1)에 바이어스 매트릭스를 합산하고, 활성화 함수를 적용할 수 있다(S530).Subsequently, the image processor 130 obtains the convolution matrix 30-1 by performing matrix multiplication on the integrated matrix 10-1 and the interleaved weight matrix 20-1, and the convolution matrix 30-1 A bias matrix may be added to) and an activation function may be applied (S530).

본 개시의 일 실시 예에 따른 프로세서(120)는 S530 단계에 사용되는 파라미터값들 및 명령어를 통합 매트릭스(10-1)와 함께 이미지 프로세서(130)로 일괄 전송하여 이미지 프로세서(130)가 S530 단계를 수행하도록 이미지 프로세서를 제어할 수 있다. 이에 따라, 프로세서(120)와 이미지 프로세서(130) 간의 데이터 송수신에 따른 딜레이 시간을 최소화할 수 있다.The processor 120 according to an embodiment of the present disclosure collectively transmits parameter values and commands used in step S530 to the image processor 130 together with the integrated matrix 10-1, so that the image processor 130 performs step S530. You can control the image processor to perform Accordingly, a delay time according to data transmission/reception between the processor 120 and the image processor 130 may be minimized.

전자 장치(100)는 S530 단계에서 획득한 이미지 프로세서(130)의 필터링 결과를 출력할 수 있다(S540).The electronic device 100 may output the filtering result of the image processor 130 obtained in step S530 (S540).

도 6 및 도 7은 본 개시의 일 실시 예에 따른 필터링 결과를 획득하기 위한 명령어를 설명하기 위한 도면이다.6 and 7 are diagrams for explaining a command for obtaining a filtering result according to an embodiment of the present disclosure.

도 6에 따르면, S510 단계에서 프로세서(130)는 a = im2con(input) 명령어에 따라 이미지에 대한 복수의 매트릭스(10)를 하나의 통합 매트릭스(10-1)로 변환할 수 있다.According to FIG. 6, in step S510, the processor 130 may convert a plurality of matrices 10 for an image into one integrated matrix 10-1 according to a = im2con(input) command.

도 5 및 도 6에 따르면, transpose 단계에서 프로세서(100)의 제어에 따라 이미지 프로세서(130)는 통합 매트릭스에 대해 aTrans = trans(a)를 수행하고, interleave 단계에서 b = interleave(weights)를 수행하여 가중치 매트릭스(20)를 인터리브드 형태의 매트릭스(20-1)로 변환할 수 있다.5 and 6, under the control of the processor 100 in the transpose step, the image processor 130 performs aTrans = trans(a) for the integrated matrix, and b = interleave (weights) in the interleave step. Thus, the weight matrix 20 can be converted into an interleaved matrix 20-1.

이어서, 프로세서(120)의 제어에 따라 이미지 프로세서(130)는 convolution 단계에서 c=gemm(aTrans, b, 1, 0)에 따라 컨벌루션을 수행하고, 컨벌루션 매트릭스(30-1)를 획득할 수 있다. 이어서, 프로세서(120)의 제어에 따라 이미지 프로세서(130)는 Bias GEMM 단계에서 biasMatrix = gemm(bias, constants, 1, 0)에 따라 컨벌루션 매트릭스(30-1)와 합산 가능한 형태의 바이어스 매트릭스를 획득할 수 있다.Subsequently, under the control of the processor 120, the image processor 130 may perform convolution according to c=gemm(aTrans, b, 1, 0) in the convolution step, and obtain the convolution matrix 30-1. . Subsequently, under the control of the processor 120, the image processor 130 acquires a bias matrix in a form that can be summed with the convolution matrix 30-1 according to biasMatrix = gemm (bias, constants, 1, 0) in the Bias GEMM step. can do.

이어서, 프로세서(120)의 제어에 따라 이미지 프로세서(130)는 바이어스 매트릭스가 합산된 컨벌루션 매트릭스에 ReLu 함수를 적용할 수 있다.Subsequently, under the control of the processor 120, the image processor 130 may apply the ReLu function to the convolution matrix in which the bias matrix is summed.

이와 같이, 각 단계가 이미지 프로세서(130)에 대한 프로세서(120)의 명령어, 파라미터 등의 전송이 요구된다. 프로세서(120)와 이미지 프로세서(130) 간의 명령어, 파라미터 및 데이터 등의 송수신에 따라 딜레이 시간이 발생하게 된다. In this way, each step is required to transmit commands, parameters, etc. of the processor 120 to the image processor 130. A delay time occurs according to transmission and reception of commands, parameters, data, and the like between the processor 120 and the image processor 130.

이하에서는 본 개시의 일 실시 예에 따른 이미지 프로세서(130)의 필터링 수행 방법을 설명하도록 한다.Hereinafter, a method of performing filtering by the image processor 130 according to an embodiment of the present disclosure will be described.

도 7에 따르면, S510 단계에서 프로세서(130)는 a = im2con(input) 명령어에 따라 이미지에 대한 복수의 매트릭스(10)를 하나의 통합 매트릭스(10-1)로 변환할 수 있다.Referring to FIG. 7, in step S510, the processor 130 may convert a plurality of matrices 10 for an image into one integrated matrix 10-1 according to a = im2con(input) command.

도 5 및 도 7에 따르면, S530 단계에서 프로세서(100)의 제어에 따라 이미지 프로세서(130)는 통합 매트릭스에 대해 output = cbr(a, interleaved Weights, bias) 수행하여 출력 레이어(30)를 획득할 수 있다.5 and 7, in step S530, under the control of the processor 100, the image processor 130 performs output = cbr(a, interleaved weights, bias) on the integrated matrix to obtain the output layer 30. I can.

가중치 매트릭스(20) 및 바이어스 매트릭스가 각각 통합 매트릭스와 행렬 곱 및 합산 가능한 형태로 기저장되어 있을 수 있다. 이에 따라, 이미지 프로세서(130)는 도 5의 Transpose, Interleave, Bias GEMM 단계를 수행하기 위한 프로세서(120)의 명령어 및 파라미터 전송이 요구되지 않을 수 있다.The weight matrix 20 and the bias matrix may be pre-stored in a form capable of multiplying and summating an integrated matrix and matrix, respectively. Accordingly, the image processor 130 may not be required to transmit commands and parameters of the processor 120 for performing the Transpose, Interleave, and Bias GEMM steps of FIG. 5.

프로세서(120)는 필터링에 사용되는 파라미터값들 및 명령어(예를 들어, output = cbr(a, interleaved Weights, bias))를 통합 매트릭스와 함께 이미지 프로세서로 일괄 전송하고, 이미지 프로세서(130)는 프로세서(120)의 추가적인 명령어 및 파라미터 전송 없이도 필터링을 수행하여 필터링 결과(예를 들어, 출력 레이어)를 획득할 수 있다. 프로세서(120)와 이미지 프로세서(130) 간의 명령어, 파라미터 및 데이터 등의 송수신에 최소화됨에 따라 딜레이 시간이 줄어들 수 있다.The processor 120 collectively transmits parameter values and instructions used for filtering (e.g., output = cbr(a, interleaved weights, bias)) to the image processor together with the integrated matrix, and the image processor 130 Filtering may be performed without transmitting an additional command and parameter of 120 to obtain a filtering result (eg, an output layer). As commands, parameters, and data are transmitted and received between the processor 120 and the image processor 130, the delay time may be reduced.

도 8는 본 발명의 일 실시 예에 따른 전자 장치의 제어 방법을 설명하기 위한 흐름도이다.8 is a flowchart illustrating a method of controlling an electronic device according to an embodiment of the present invention.

도 8에 도시된 전자 장치의 제어 방법에 따르면, 이미지가 수신되면, 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 매트릭스들을 하나의 통합 매트릭스로 변환한다(S810).According to the control method of the electronic device illustrated in FIG. 8, when an image is received, matrices representing color components constituting each pixel of the image are converted into a single integrated matrix (S810).

이어서, 통합 매트릭스와 CNN(Convolution Neural Network) 학습(training)된 가중치(weight) 매트릭스에 대한 행렬 곱을 수행하여 컨벌루션 매트릭스를 획득한다(S820).Subsequently, a convolution matrix is obtained by performing matrix multiplication on the unified matrix and a weight matrix trained by a convolution neural network (CNN) (S820).

이어서, 컨벌루션 매트릭스를 이용하여 이미지의 각 필셀 영역들의 특성을 필터링을 수행한다(S830).Subsequently, the characteristics of each pixel area of the image are filtered using the convolution matrix (S830).

이어서, 필터링 결과를 출력한다(S840).Subsequently, the filtering result is output (S840).

여기서, 전자 장치는 통합 매트릭스를 구성하는 각 행과, 가중치 매트릭스의 대응되는 열 간의 행렬 곱을 각각 병렬적으로 수행하는 복수의 코어를 포함할 수 있다.Here, the electronic device may include a plurality of cores that perform matrix multiplication between each row constituting the integrated matrix and a corresponding column of the weight matrix in parallel.

또한, 필터링을 수행하는 S830 단계는, 바이어스 매트릭스를 컨벌루션 매트릭스에 합산하는 단계를 포함할 수 있다.In addition, step S830 of performing filtering may include adding the bias matrix to the convolution matrix.

또한, 필터링을 수행하는 S830 단계는, 제1 및 제2 바이어스 매트릭스 중 하나를 선택적으로 컨벌루션 매트릭스에 합산하는 단계를 포함하고, 제1 바이어스 매트릭스는 1로 구성된 매트릭스이고, 제2 바이어스 매트릭스는 0으로 구성된 매트릭스일 수 있다.In addition, the step S830 of performing filtering includes the step of selectively summing one of the first and second bias matrices to the convolution matrix, wherein the first bias matrix is a matrix composed of 1, and the second bias matrix is 0. It may be a composed matrix.

여기서, 필터링을 수행하는 S830 단계는, 제1 및 제2 바이어스 매트릭스 중 하나가 합산된 컨벌루션 매트릭스에 활성화 함수를 적용하여, 복수의 출력 레이어를 획득하는 단계, 복수의 출력 레이어에 기초하여 FC(fully-connected) 레이어를 획득하는 단계 및 FC 레이어에 포함된 각 영역들의 클래스 점수에 따라, 각 영역들의 특성을 식별하는 단계를 포함할 수 있다.Here, in step S830 of performing filtering, applying an activation function to a convolution matrix in which one of the first and second bias matrices is summed to obtain a plurality of output layers, FC (fully) based on the plurality of output layers -connected) may include obtaining a layer and identifying characteristics of each region according to the class score of each region included in the FC layer.

여기서, FC 레이어를 획득하는 단계는, 복수의 출력 레이어에서 서로 대응되는 위치의 값을 합산하여, FC 레이어를 획득할 수 있다.Here, in the step of obtaining the FC layer, the FC layer may be obtained by summing values of positions corresponding to each other in the plurality of output layers.

또한, FC 레이어를 획득하는 단계는, 복수의 출력 레이어에서 서로 대응되는 위치의 값을 비교하고, 가장 큰 값을 가지는 값들을 집산하여, FC 레이어를 획득할 수 있다.In addition, in the obtaining of the FC layer, values of positions corresponding to each other in the plurality of output layers are compared, values having the largest values are collected, and the FC layer may be obtained.

또한, 필터링에 사용되는 파라미터값들 및 명령어를 통합 매트릭스와 함께 이미지 프로세서로 일괄 전송하는 단계를 포함하고, 필터링은 이미지 프로세서에 의해 수행될 수 있다.Further, it includes the step of collectively transmitting parameter values and instructions used for filtering to the image processor together with the integrated matrix, and filtering may be performed by the image processor.

또한, 필터링을 수행하는 S830 단계는, 필터링을 복수 회 반복하여 수행할 수 있다.Further, in step S830 of performing filtering, filtering may be repeatedly performed a plurality of times.

한편, 이상에서 설명된 다양한 실시 예들은 소프트웨어(software), 하드웨어(hardware) 또는 이들의 조합을 이용하여 컴퓨터(computer) 또는 이와 유사한 장치로 읽을 수 있는 기록 매체 내에서 구현될 수 있다. 일부 경우에 있어 본 명세서에서 설명되는 실시 예들이 프로세서 자체로 구현될 수 있다. 소프트웨어적인 구현에 의하면, 본 명세서에서 설명되는 절차 및 기능과 같은 실시 예들은 별도의 소프트웨어 모듈들로 구현될 수 있다. 소프트웨어 모듈들 각각은 본 명세서에서 설명되는 하나 이상의 기능 및 작동을 수행할 수 있다.Meanwhile, the various embodiments described above may be implemented in a recording medium that can be read by a computer or a similar device using software, hardware, or a combination thereof. In some cases, the embodiments described herein may be implemented by the processor itself. According to software implementation, embodiments such as procedures and functions described herein may be implemented as separate software modules. Each of the software modules may perform one or more functions and operations described herein.

한편, 상술한 본 개시의 다양한 실시 예들에 따른 처리 동작을 수행하기 위한 컴퓨터 명령어(computer instructions)는 비일시적 컴퓨터 판독 가능 매체(non-transitory computer-readable medium) 에 저장될 수 있다. 이러한 비일시적 컴퓨터 판독 가능 매체에 저장된 컴퓨터 명령어는 프로세서에 의해 실행되었을 때 상술한 다양한 실시 예에 따른 처리 동작을 특정 기기가 수행하도록 할 수 있다. Meanwhile, computer instructions for performing a processing operation according to various embodiments of the present disclosure described above may be stored in a non-transitory computer-readable medium. When a computer instruction stored in such a non-transitory computer-readable medium is executed by a processor, a specific device may cause the processing operation according to the above-described various embodiments to be performed.

비일시적 컴퓨터 판독 가능 매체란 레지스터, 캐쉬, 메모리 등과 같이 짧은 순간 동안 데이터를 저장하는 매체가 아니라 반영구적으로 데이터를 저장하며, 기기에 의해 판독(reading)이 가능한 매체를 의미한다. 비일시적 컴퓨터 판독 가능 매체의 구체적인 예로는, CD, DVD, 하드 디스크, 블루레이 디스크, USB, 메모리카드, ROM 등이 있을 수 있다.The non-transitory computer-readable medium refers to a medium that stores data semi-permanently and can be read by a device, rather than a medium that stores data for a short moment, such as registers, caches, and memory. Specific examples of non-transitory computer-readable media may include CD, DVD, hard disk, Blu-ray disk, USB, memory card, ROM, and the like.

이상에서는 본 개시의 바람직한 실시 예에 대하여 도시하고 설명하였지만, 본 개시는 상술한 특정의 실시 예에 한정되지 아니하며, 청구범위에서 청구하는 본 개시의 요지를 벗어남이 없이 당해 개시에 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 개시의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.In the above, preferred embodiments of the present disclosure have been illustrated and described, but the present disclosure is not limited to the specific embodiments described above, and is generally in the technical field belonging to the disclosure without departing from the gist of the disclosure claimed in the claims Various modifications are possible by those skilled in the art of course, and these modifications should not be individually understood from the technical idea or perspective of the present disclosure.

100: 전자 장치 110: 메모리
120: 프로세서 130: 이미지 프로세서
140: 디스플레이
100: electronic device 110: memory
120: processor 130: image processor
140: display

Claims (19)

CNN(Convolution Neural Network) 학습(training)된 가중치(weight) 매트릭스가 저장된 메모리;
이미지가 수신되면, 상기 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 매트릭스들을 하나의 통합 매트릭스로 변환하는 프로세서;
상기 프로세서에서 변환된 상기 통합 매트릭스를 이용하여 상기 이미지에 대한 필터링을 수행하는 이미지 프로세서; 및
상기 프로세서의 제어에 따라, 상기 이미지 프로세서의 필터링 결과를 출력하는 디스플레이;를 포함하며,
상기 이미지 프로세서는,
상기 통합 매트릭스와 상기 가중치 매트릭스에 대한 행렬 곱을 수행하여 컨벌루션 매트릭스를 획득하고, 상기 컨벌루션 매트릭스를 이용하여 상기 이미지의 각 픽셀 영역들의 특성을 필터링하고,
상기 가중치 매트릭스는, CNN 학습된 복수의 매트릭스를 인터리브드(interleaved) 형태로 통합한 매트릭스이고,
상기 통합 매트릭스는 상기 가중치 매트릭스와 연산이 가능한 개수의 행 및 열을 가지는 매트릭스이고,
상기 이미지 프로세서는,
복수의 코어를 포함하며,
상기 복수의 코어 각각은,
상기 통합 매트릭스를 구성하는 각 행과, 상기 가중치 매트릭스의 대응되는 열 간의 행렬 곱을 각각 병렬적으로 수행하는, 전자 장치.
A memory storing a weight matrix trained by a convolution neural network (CNN);
A processor for converting matrices representing color components constituting each pixel of the image into one unified matrix when an image is received;
An image processor that performs filtering on the image by using the integrated matrix converted by the processor; And
Including; a display for outputting the filtering result of the image processor under the control of the processor,
The image processor,
A convolutional matrix is obtained by performing matrix multiplication of the unified matrix and the weighting matrix, and characteristics of each pixel region of the image are filtered using the convolutional matrix,
The weight matrix is a matrix in which a plurality of CNN-trained matrices are integrated in an interleaved form,
The integrated matrix is a matrix having the weight matrix and the number of rows and columns that can be calculated,
The image processor,
It includes a plurality of cores,
Each of the plurality of cores,
The electronic device, wherein matrix multiplication between each row constituting the unified matrix and a corresponding column of the weight matrix is performed in parallel.
삭제delete 제1항에 있어서,
상기 메모리는, 바이어스 매트릭스를 더 포함하며,
상기 이미지 프로세서는, 상기 컨벌루션 매트릭스에 상기 바이어스 매트릭스를 상기 컨벌루션 매트릭스에 합산하는, 전자 장치.
The method of claim 1,
The memory further includes a bias matrix,
The image processor summing the bias matrix to the convolution matrix to the convolution matrix.
제1항에 있어서,
상기 메모리는, 제1 바이어스 매트릭스 및 제2 바이어스 매트릭스를 더 포함하며,
상기 이미지 프로세서는, 상기 제1 및 상기 제2 바이어스 매트릭스 중 하나를 선택적으로 상기 컨벌루션 매트릭스에 합산하는, 전자 장치.
The method of claim 1,
The memory further includes a first bias matrix and a second bias matrix,
The image processor to selectively add one of the first and second bias matrices to the convolution matrix.
제4항에 있어서,
상기 이미지 프로세서는,
상기 제1 및 제2 바이어스 매트릭스 중 하나가 합산된 컨벌루션 매트릭스에 활성화 함수를 적용하여, 복수의 출력 레이어를 획득하고,
상기 복수의 출력 레이어에 기초하여 FC(fully-connected) 레이어를 획득하며,
상기 FC 레이어에 포함된 각 영역들의 클래스 점수에 따라, 각 영역들의 특성을 식별하는, 전자 장치.
The method of claim 4,
The image processor,
Applying an activation function to a convolution matrix in which one of the first and second bias matrices is summed, to obtain a plurality of output layers,
Obtaining a fully-connected (FC) layer based on the plurality of output layers,
The electronic device that identifies characteristics of each region according to the class score of each region included in the FC layer.
제5항에 있어서,
상기 이미지 프로세서는,
상기 복수의 출력 레이어에서 서로 대응되는 위치의 값을 합산하여, 상기 FC 레이어를 획득하는, 전자 장치.
The method of claim 5,
The image processor,
The electronic device that obtains the FC layer by summing values of positions corresponding to each other in the plurality of output layers.
제5항에 있어서,
상기 이미지 프로세서는,
상기 복수의 출력 레이어에서 서로 대응되는 위치의 값을 비교하고, 가장 큰 값을 가지는 값들을 집산하여, 상기 FC 레이어를 획득하는, 전자 장치.
The method of claim 5,
The image processor,
The electronic device comprising: comparing values of positions corresponding to each other in the plurality of output layers, collecting values having the largest values, and obtaining the FC layer.
제1항에 있어서,
상기 프로세서는,
상기 필터링에 사용되는 파라미터값들 및 명령어를 상기 통합 매트릭스와 함께 상기 이미지 프로세서로 일괄 전송하여 상기 필터링을 수행하도록 상기 이미지 프로세서를 제어하는, 전자 장치.
The method of claim 1,
The processor,
And controlling the image processor to perform the filtering by collectively transmitting parameter values and commands used for the filtering to the image processor together with the integrated matrix.
제1항에 있어서,
상기 프로세서는,
상기 필터링을 복수 회 반복하여 수행하도록 상기 이미지 프로세서를 제어하는, 전자 장치.
The method of claim 1,
The processor,
Controlling the image processor to repeatedly perform the filtering a plurality of times.
이미지를 처리하기 위한 전자 장치의 제어 방법에 있어서,
이미지가 수신되면, 상기 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 매트릭스들을 하나의 통합 매트릭스로 변환하는 단계;
CNN(Convolution Neural Network) 학습(training)된 가중치(weight) 매트릭스 및 상기 통합 매트릭스를 이용하여 상기 이미지에 대한 필터링을 수행하는 단계; 및
상기 필터링 결과를 출력하는 단계;를 포함하며,
상기 필터링을 수행하는 단계는,
상기 통합 매트릭스와 상기 가중치 매트릭스에 대한 행렬 곱을 수행하여 컨벌루션 매트릭스를 획득하는 단계;
상기 컨벌루션 매트릭스를 이용하여 상기 이미지의 각 픽셀 영역들의 특성을 필터링하는 단계;를 포함하며,
상기 가중치 매트릭스는, CNN 학습된 복수의 매트릭스를 인터리브드(interleaved) 형태로 통합한 매트릭스이고,
상기 통합 매트릭스는, 상기 가중치 매트릭스와 연산이 가능한 개수의 행 및 열을 가지는 매트릭스이고,
상기 컨벌루션 매트릭스를 획득하는 단계는,
상기 전자 장치에 포함된 복수의 코어를 이용하여 상기 통합 매트릭스를 구성하는 각 행과, 상기 가중치 매트릭스의 대응되는 열 간의 행렬 곱을 병렬적으로 수행하여 상기 컨벌루션 매트릭스를 획득하는, 제어 방법.
In the control method of an electronic device for processing an image,
When an image is received, converting matrices representing color components constituting each pixel of the image into one unified matrix;
Filtering the image using a convolution neural network (CNN) trained weight matrix and the unified matrix; And
Including; outputting the filtering result;
The step of performing the filtering,
Obtaining a convolution matrix by performing matrix multiplication on the unified matrix and the weight matrix;
Filtering the characteristics of each pixel area of the image using the convolution matrix; and
The weight matrix is a matrix in which a plurality of CNN-trained matrices are integrated in an interleaved form,
The integrated matrix is a matrix having the weight matrix and the number of rows and columns that can be calculated,
Obtaining the convolution matrix,
A control method for obtaining the convolution matrix by performing a matrix multiplication between each row constituting the unified matrix and a corresponding column of the weight matrix in parallel using a plurality of cores included in the electronic device.
삭제delete 제10항에 있어서,
상기 필터링을 수행하는 단계는,
바이어스 매트릭스를 상기 컨벌루션 매트릭스에 합산하는 단계를 포함하는, 제어 방법.
The method of claim 10,
The step of performing the filtering,
Summing a bias matrix to the convolution matrix.
제10항에 있어서,
상기 필터링을 수행하는 단계는,
제1 및 제2 바이어스 매트릭스 중 하나를 선택적으로 상기 컨벌루션 매트릭스에 합산하는 단계를 포함하고,
상기 제1 바이어스 매트릭스는 1로 구성된 매트릭스이고,
상기 제2 바이어스 매트릭스는 0으로 구성된 매트릭스인, 제어 방법.
The method of claim 10,
The step of performing the filtering,
Optionally summing one of the first and second bias matrices to the convolutional matrix,
The first bias matrix is a matrix composed of 1,
Wherein the second bias matrix is a matrix composed of zeros.
제13항에 있어서,
상기 필터링을 수행하는 단계는,
상기 제1 및 제2 바이어스 매트릭스 중 하나가 합산된 컨벌루션 매트릭스에 활성화 함수를 적용하여, 복수의 출력 레이어를 획득하는 단계;
상기 복수의 출력 레이어에 기초하여 FC(fully-connected) 레이어를 획득하는 단계; 및
상기 FC 레이어에 포함된 각 영역들의 클래스 점수에 따라, 각 영역들의 특성을 식별하는 단계;를 포함하는, 제어 방법
The method of claim 13,
The step of performing the filtering,
Obtaining a plurality of output layers by applying an activation function to a convolution matrix in which one of the first and second bias matrices is summed;
Obtaining a fully-connected (FC) layer based on the plurality of output layers; And
Identifying characteristics of each region according to the class score of each region included in the FC layer; including, control method
제14항에 있어서,
상기 FC 레이어를 획득하는 단계는,
상기 복수의 출력 레이어에서 서로 대응되는 위치의 값을 합산하여, 상기 FC 레이어를 획득하는, 제어 방법.
The method of claim 14,
The step of obtaining the FC layer,
The control method, wherein the FC layer is obtained by summing values of positions corresponding to each other in the plurality of output layers.
제14항에 있어서,
상기 FC 레이어를 획득하는 단계는,
상기 복수의 출력 레이어에서 서로 대응되는 위치의 값을 비교하고, 가장 큰 값을 가지는 값들을 집산하여, 상기 FC 레이어를 획득하는, 제어 방법.
The method of claim 14,
The step of obtaining the FC layer,
Comparing values of positions corresponding to each other in the plurality of output layers, collecting values having the largest values, and obtaining the FC layer.
제10항에 있어서,
상기 필터링에 사용되는 파라미터값들 및 명령어를 상기 통합 매트릭스와 함께 이미지 프로세서로 일괄 전송하는 단계;를 포함하고,
상기 필터링은 상기 이미지 프로세서에 의해 수행되는, 제어 방법.
The method of claim 10,
Transmitting parameter values and commands used for the filtering together with the integrated matrix to an image processor; Including,
The filtering is performed by the image processor.
제10항에 있어서,
상기 필터링을 수행하는 단계는,
상기 필터링을 복수 회 반복하여 수행하는, 제어 방법.
The method of claim 10,
The step of performing the filtering,
A control method for repeatedly performing the filtering a plurality of times.
전자 장치의 프로세서에 의해 실행되는 경우 상기 전자 장치가 동작을 수행하도록 컴퓨터 명령을 저장하는 비일시적 컴퓨터 판독 가능 매체에 있어서, 상기 동작은,
이미지가 수신되면, 상기 이미지의 각 픽셀을 구성하는 색성분들을 나타내는 매트릭스들을 하나의 통합 매트릭스로 변환하는 단계;
CNN(Convolution Neural Network) 학습(training)된 가중치(weight) 매트릭스 및 상기 통합 매트릭스를 이용하여 상기 이미지에 대한 필터링을 수행하는 단계; 및
상기 필터링 결과를 출력하는 단계;를 포함하며,
상기 필터링을 수행하는 단계는,
상기 통합 매트릭스와 상기 가중치 매트릭스에 대한 행렬 곱을 수행하여 컨벌루션 매트릭스를 획득하는 단계;
상기 컨벌루션 매트릭스를 이용하여 상기 이미지의 각 픽셀 영역들의 특성을 필터링하는 단계;를 포함하며,
상기 가중치 매트릭스는, CNN 학습된 복수의 매트릭스를 인터리브드(interleaved) 형태로 통합한 매트릭스이고,
상기 통합 매트릭스는, 상기 가중치 매트릭스와 연산이 가능한 개수의 행 및 열을 가지는 매트릭스이고,
상기 컨벌루션 매트릭스를 획득하는 단계는,
상기 전자 장치에 포함된 복수의 코어를 이용하여 상기 통합 매트릭스를 구성하는 각 행과, 상기 가중치 매트릭스의 대응되는 열 간의 행렬 곱을 병렬적으로 수행하여 상기 컨벌루션 매트릭스를 획득하는, 비일시적 컴퓨터 판독 가능 매체.
A non-transitory computer-readable medium storing computer instructions to cause the electronic device to perform an operation when executed by a processor of the electronic device, the operation comprising:
When an image is received, converting matrices representing color components constituting each pixel of the image into one unified matrix;
Filtering the image using a convolution neural network (CNN) trained weight matrix and the unified matrix; And
Including; outputting the filtering result;
The step of performing the filtering,
Obtaining a convolution matrix by performing matrix multiplication on the unified matrix and the weight matrix;
Filtering the characteristics of each pixel area of the image using the convolution matrix; and
The weight matrix is a matrix in which a plurality of CNN-trained matrices are integrated in an interleaved form,
The integrated matrix is a matrix having the weight matrix and the number of rows and columns that can be calculated,
Obtaining the convolution matrix,
A non-transitory computer-readable medium for obtaining the convolution matrix by performing a matrix multiplication between each row constituting the integrated matrix and a corresponding column of the weight matrix using a plurality of cores included in the electronic device .
KR1020180013954A 2018-02-05 2018-02-05 Electric apparatus and method for control thereof KR102161690B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020180013954A KR102161690B1 (en) 2018-02-05 2018-02-05 Electric apparatus and method for control thereof
PCT/KR2019/001510 WO2019151841A1 (en) 2018-02-05 2019-02-07 Electronic device and method for controlling same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180013954A KR102161690B1 (en) 2018-02-05 2018-02-05 Electric apparatus and method for control thereof

Publications (2)

Publication Number Publication Date
KR20190100487A KR20190100487A (en) 2019-08-29
KR102161690B1 true KR102161690B1 (en) 2020-10-05

Family

ID=67478873

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180013954A KR102161690B1 (en) 2018-02-05 2018-02-05 Electric apparatus and method for control thereof

Country Status (2)

Country Link
KR (1) KR102161690B1 (en)
WO (1) WO2019151841A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012208597A (en) 2011-03-29 2012-10-25 Canon Inc Pattern identification device, pattern identification method and program
US20170103309A1 (en) * 2015-10-08 2017-04-13 International Business Machines Corporation Acceleration of convolutional neural network training using stochastic perforation
WO2017129325A1 (en) * 2016-01-29 2017-08-03 Fotonation Limited A convolutional neural network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106156807B (en) * 2015-04-02 2020-06-02 华中科技大学 Training method and device of convolutional neural network model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012208597A (en) 2011-03-29 2012-10-25 Canon Inc Pattern identification device, pattern identification method and program
US20170103309A1 (en) * 2015-10-08 2017-04-13 International Business Machines Corporation Acceleration of convolutional neural network training using stochastic perforation
WO2017129325A1 (en) * 2016-01-29 2017-08-03 Fotonation Limited A convolutional neural network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
AAFTAB MUNSHI ET AL,‘OpenGL®ES 2.0Programming Guide’, July 2008(2008.07.31.) 1부.*

Also Published As

Publication number Publication date
KR20190100487A (en) 2019-08-29
WO2019151841A1 (en) 2019-08-08

Similar Documents

Publication Publication Date Title
JP7466289B2 (en) Image processing device and method of operating the same
US11908483B2 (en) Inter-channel feature extraction method, audio separation method and apparatus, and computing device
US11379955B2 (en) Electronic device, image processing method thereof, and computer-readable recording medium
US11651214B2 (en) Multimodal data learning method and device
US11586903B2 (en) Method and system of controlling computing operations based on early-stop in deep neural network
KR101882704B1 (en) Electronic apparatus and control method thereof
JP2019102084A (en) Method and apparatus for processing convolution operation in neural network
US11347962B2 (en) Electronic apparatus, method for processing image and computer-readable recording medium
US20200057937A1 (en) Electronic apparatus and controlling method thereof
CN109848985A (en) A kind of the graphical programming method, apparatus and intelligent terminal of robot
US20220198836A1 (en) Gesture recognition method, electronic device, computer-readable storage medium, and chip
US11385526B2 (en) Method of processing image based on artificial intelligence and image processing device performing the same
US20220108545A1 (en) Method and device for high-speed image recognition using 3d cnn
KR20210061146A (en) Electronic apparatus and control method thereof
CN113191479A (en) Method, system, node and storage medium for joint learning
US20230004816A1 (en) Method of optimizing neural network model and neural network model processing system performing the same
US20200349426A1 (en) Convolution streaming engine for deep neural networks
KR20200027080A (en) Electronic apparatus and control method thereof
KR20190136891A (en) Electronic apparatus and control method thereof
KR102161690B1 (en) Electric apparatus and method for control thereof
CN116739071A (en) Model training method and related device
US20220164923A1 (en) Electronic apparatus and controlling method thereof
US20220335293A1 (en) Method of optimizing neural network model that is pre-trained, method of providing a graphical user interface related to optimizing neural network model, and neural network model processing system performing the same
KR20230013989A (en) Image processing device, method of operation thereof, and image processing system comprising the same
CN114902243A (en) Electronic device and control method thereof

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant