KR20240073558A - Apparatus and method for image classification through pattern learning - Google Patents

Apparatus and method for image classification through pattern learning Download PDF

Info

Publication number
KR20240073558A
KR20240073558A KR1020220155547A KR20220155547A KR20240073558A KR 20240073558 A KR20240073558 A KR 20240073558A KR 1020220155547 A KR1020220155547 A KR 1020220155547A KR 20220155547 A KR20220155547 A KR 20220155547A KR 20240073558 A KR20240073558 A KR 20240073558A
Authority
KR
South Korea
Prior art keywords
learning
pattern
memory
image
memory unit
Prior art date
Application number
KR1020220155547A
Other languages
Korean (ko)
Inventor
홍상훈
최지훈
김성민
박성배
홍충선
Original Assignee
경희대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 경희대학교 산학협력단 filed Critical 경희대학교 산학협력단
Priority to KR1020220155547A priority Critical patent/KR20240073558A/en
Publication of KR20240073558A publication Critical patent/KR20240073558A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/532Query formulation, e.g. graphical querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/53Querying
    • G06F16/538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/94Hardware or software architectures specially adapted for image or video understanding
    • G06V10/955Hardware or software architectures specially adapted for image or video understanding using specific electronic processors

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

본 개시의 일 실시예에 따른 패턴 학습을 통한 이미지 분류 장치는 학습 이미지에 대한 패턴 검색을 수행하여 학습 이미지에 포함된 서로 다른 복수의 학습 패턴을 저장하는 메모리, 패턴 검색이 수행되는 동안 메모리에 저장된 복수의 학습 패턴 각각이 검색된 횟수를 저장하는 검색 횟수 저장 모듈 및 검색 횟수 저장 모듈에 저장된 검색된 횟수를 기초로 복수의 학습 패턴 각각이 저장되는 메모리 상의 주소를 결정하는 제어 모듈을 포함하고, 메모리는 서로 다른 복수의 학습 패턴 중 하나의 학습 패턴에 대응하는 제1 메모리 유닛 및 제1 메모리 유닛과 적어도 일부 중첩되는 제2 메모리 유닛을 포함하고, 제1 메모리 유닛이 하나의 학습 패턴에 대한 검색을 수행함에 따라, 제2 메모리 유닛이 하나의 학습 패턴에 대한 검색을 수행하도록 구성되고, 대상 패턴을 포함하는 추론 이미지가 입력된 경우, 복수의 학습 패턴 중 대상 패턴과 동일한 학습 패턴이 저장된 메모리 상의 주소를 기초로 추론 이미지의 레이블을 출력하도록 구성될 수 있다. An image classification device through pattern learning according to an embodiment of the present disclosure has a memory that performs a pattern search on a learning image and stores a plurality of different learning patterns included in the learning image, and a memory stored in the memory while the pattern search is performed. It includes a search count storage module that stores the number of times each of the plurality of learning patterns has been searched, and a control module that determines an address on a memory where each of the plurality of learning patterns is stored based on the search count stored in the search count storage module, and the memories are connected to each other. a first memory unit corresponding to one learning pattern among a plurality of other learning patterns and a second memory unit at least partially overlapping with the first memory unit, wherein the first memory unit performs a search for one learning pattern; Accordingly, the second memory unit is configured to perform a search for one learning pattern, and when an inference image including a target pattern is input, the address on the memory where the learning pattern identical to the target pattern among the plurality of learning patterns is stored is based on the address. It can be configured to output the label of the inferred image.

Description

패턴 학습을 통한 이미지 분류 장치 및 방법{APPARATUS AND METHOD FOR IMAGE CLASSIFICATION THROUGH PATTERN LEARNING} Image classification device and method through pattern learning {APPARATUS AND METHOD FOR IMAGE CLASSIFICATION THROUGH PATTERN LEARNING}

본 개시는 이미지에 포함된 패턴들을 학습한 결과를 기초로 이미지의 객체를 식별하기 위한 패턴 학습을 통한 이미지 분류 장치 및 방법에 관한 것이다.The present disclosure relates to an image classification device and method through pattern learning for identifying objects in an image based on the results of learning patterns included in the image.

현대 컴퓨터는 폰 노이만 구조를 기본으로 하고 있기 때문에 메모리와 CPU 사이에 정보 이동이 필요하다. 하지만 CPU가 발전함에 따라 증가하는 연산 속도를 data 이동 속도가 따라잡지 못하는 폰 노이만 병목 현상(Von-Neumann Bottleneck)이 발생한다. Since modern computers are based on the von Neumann architecture, information needs to be transferred between memory and CPU. However, as CPUs develop, a Von-Neumann Bottleneck occurs in which the data transfer speed cannot keep up with the increasing computational speed.

구체적으로, 폰 노이만 병목 현상은 데이터 이동 경로의 병목현상 또는 기억 장소의 지연 현상을 의미하며, 이는 나열된 명령을 순차적으로 수행하고, 그 명령은 일정한 기억 장소의 값을 변경하는 작업으로 구성되는 폰 노이만 구조에서 기인한다.Specifically, the von Neumann bottleneck refers to a bottleneck in the data movement path or a delay in a storage location, which consists of sequentially executing listed commands and changing the value of a certain storage location. It comes from structure.

본 개시에서는 상술한 문제를 해결하기 위하여 특정 패턴에 대한 반복적인 검색을 수행함과 동시에, 메모리 안에 저장된 패턴의 검색 빈도를 출력하는 연산을 수행함으로써 높은 정확도를 갖는 패턴 학습을 통한 이미지 분류 장치 및 방법에 제공된다.In order to solve the above-described problem, the present disclosure provides an image classification device and method through pattern learning with high accuracy by performing a repetitive search for a specific pattern and simultaneously performing an operation to output the search frequency of the pattern stored in the memory. provided.

본 개시의 일 실시예에 따른 패턴 학습을 통한 이미지 분류 장치는 학습 이미지에 대한 패턴 검색을 수행하여 학습 이미지에 포함된 서로 다른 복수의 학습 패턴을 저장하는 메모리, 패턴 검색이 수행되는 동안 메모리에 저장된 복수의 학습 패턴 각각이 검색된 횟수를 저장하는 검색 횟수 저장 모듈 및 검색 횟수 저장 모듈에 저장된 검색된 횟수를 기초로 복수의 학습 패턴 각각이 저장되는 메모리 상의 주소를 결정하는 제어 모듈을 포함하고, 메모리는 서로 다른 복수의 학습 패턴 중 하나의 학습 패턴에 대응하는 제1 메모리 유닛 및 제1 메모리 유닛과 적어도 일부 중첩되는 제2 메모리 유닛을 포함하고, 제1 메모리 유닛이 하나의 학습 패턴에 대한 검색을 수행함에 따라, 제2 메모리 유닛이 하나의 학습 패턴에 대한 검색을 수행하도록 구성되고, 대상 패턴을 포함하는 추론 이미지가 입력된 경우, 복수의 학습 패턴 중 대상 패턴과 동일한 학습 패턴이 저장된 메모리 상의 주소를 기초로 추론 이미지의 레이블을 출력하도록 구성될 수 있다.An image classification device through pattern learning according to an embodiment of the present disclosure has a memory that performs a pattern search on a learning image and stores a plurality of different learning patterns included in the learning image, and a memory stored in the memory while the pattern search is performed. It includes a search count storage module that stores the number of times each of the plurality of learning patterns has been searched, and a control module that determines an address on a memory where each of the plurality of learning patterns is stored based on the search count stored in the search count storage module, and the memories are connected to each other. a first memory unit corresponding to one learning pattern among a plurality of other learning patterns and a second memory unit at least partially overlapping with the first memory unit, wherein the first memory unit performs a search for one learning pattern; Accordingly, the second memory unit is configured to perform a search for one learning pattern, and when an inference image including a target pattern is input, the address on the memory where the learning pattern identical to the target pattern among the plurality of learning patterns is stored is based on the address. It can be configured to output the label of the inferred image.

일 실시예에 따르면, 메모리는 제1 메모리 유닛과 적어도 일부 중첩되는 제3 메모리 유닛, 제4 메모리 유닛 및 제5 메모리 유닛을 더 포함하고, 제2 메모리 유닛, 제3 메모리 유닛, 제4 메모리 유닛 및 제5 메모리 유닛 각각과 제1 메모리 유닛이 중첩된 영역은 서로 상이하게 구성될 수 있다.According to one embodiment, the memory further includes a third memory unit, a fourth memory unit, and a fifth memory unit that at least partially overlaps the first memory unit, and the second memory unit, the third memory unit, and the fourth memory unit And the areas where each of the fifth memory units and the first memory unit overlap may be configured differently.

일 실시예에 따르면, 패턴 학습을 통한 이미지 분류 장치는 학습 이미지로부터 서로 다른 복수의 엣지 정보를 각각 포함하는 복수의 서브 학습 이미지를 추출하는 이미지 전처리 모듈을 더 포함하고, 메모리는 복수의 서브 학습 이미지 각각에 대한 패턴 검색을 수행하여 서로 다른 복수의 학습 패턴을 저장할 수 있다.According to one embodiment, the image classification device through pattern learning further includes an image pre-processing module for extracting a plurality of sub-learning images each containing a plurality of different edge information from the learning image, and the memory includes a plurality of sub-learning images. You can store multiple different learning patterns by performing a pattern search for each.

일 실시예에 따르면, 복수의 엣지 정보는 수평 방향의 엣지 정보, 수직 방향의 엣지 정보 및 대각선 방향의 엣지 정보 중 적어도 하나를 포함할 수 있다.According to one embodiment, the plurality of edge information may include at least one of horizontal edge information, vertical edge information, and diagonal edge information.

일 실시예에 따르면, 추론 이미지가 입력된 경우, 메모리는 대상 패턴과 동일한 학습 패턴이 저장된 주소를 출력하도록 구성될 수 있다.According to one embodiment, when an inferred image is input, the memory may be configured to output an address where a learning pattern identical to the target pattern is stored.

일 실시예에 따르면, 학습 이미지는 서로 상이한 복수의 레이블과 각각 연관된 복수의 학습 이미지를 포함하고, 메모리는 복수의 레이블 각각과 대응되는 복수의 메모리 어레이를 포함할 수 있다.According to one embodiment, the learning image may include a plurality of learning images each associated with a plurality of different labels, and the memory may include a plurality of memory arrays corresponding to each of the plurality of labels.

일 실시예에 따르면, 패턴 학습을 통한 이미지 분류 장치는 추론 이미지가 입력된 경우, 복수의 메모리 어레이 각각이 출력한 대상 패턴과 동일한 학습 패턴이 저장된 복수의 주소를 기초로 추론 이미지의 레이블을 결정할 수 있다.According to one embodiment, when an inferred image is input, an image classification device through pattern learning may determine the label of the inferred image based on a plurality of addresses where learning patterns identical to the target pattern output by each of the plurality of memory arrays are stored. there is.

일 실시예에 따르면, 복수의 메모리 어레이 각각은 미리 결정된 임계치를 기초로 상위 주소 그룹 및 하위 주소 그룹으로 구분되고, 추론 이미지가 입력된 경우, 복수의 메모리 어레이 각각에서 대상 패턴과 동일한 학습 패턴이 저장된 주소를 임계치와 비교한 결과를 기초로 복수의 메모리 어레이 각각에 대한 복수의 히트 값을 획득하고, 복수의 히트 값을 서로 비교한 결과를 기초로 복수의 레이블 중 하나의 레이블을 추론 이미지의 레이블로서 출력할 수 있다.According to one embodiment, each of the plurality of memory arrays is divided into an upper address group and a lower address group based on a predetermined threshold, and when an inference image is input, a learning pattern identical to the target pattern is stored in each of the plurality of memory arrays. Based on the result of comparing the address with the threshold, a plurality of hit values for each of the plurality of memory arrays are obtained, and based on the result of comparing the plurality of hit values, one label among the plurality of labels is used as the label of the inferred image. Can be printed.

일 실시예에 따르면, 하나의 레이블에 대응하는 메모리 어레이로부터 획득된 히트 값은 복수의 히트 값 중 가장 높은 값을 가질 수 있다. According to one embodiment, a hit value obtained from a memory array corresponding to one label may have the highest value among a plurality of hit values.

본 개시의 다른 실시예에 따른 패턴 학습을 통한 이미지 분류 방법은 메모리에 의해 학습 이미지에 대한 패턴 검색을 수행하여 학습 이미지에 포함된 서로 다른 복수의 학습 패턴을 저장하는 단계, 검색 횟수 저장 모듈에 의해 패턴 검색이 수행되는 동안 메모리에 저장된 복수의 학습 패턴 각각이 검색된 횟수를 저장하는 단계, 제어 모듈에 의해 검색 횟수 저장 모듈에 저장된 검색된 횟수를 기초로 복수의 학습 패턴 각각이 저장되는 메모리 상의 주소를 결정하는 단계, 대상 패턴을 포함하는 추론 이미지를 수신하는 단계 및 복수의 학습 패턴 중 대상 패턴과 동일한 학습 패턴이 저장된 메모리 상의 주소를 기초로 추론 이미지의 레이블을 출력하는 단계를 포함하고, 메모리는 서로 다른 복수의 학습 패턴 중 하나의 학습 패턴에 대응하는 제1 메모리 유닛 및 제1 메모리 유닛과 적어도 일부 중첩되는 제2 메모리 유닛을 포함하고, 제1 메모리 유닛이 하나의 학습 패턴에 대한 검색을 수행함에 따라, 제2 메모리 유닛이 하나의 학습 패턴에 대한 검색을 수행하도록 구성될 수 있다.An image classification method through pattern learning according to another embodiment of the present disclosure includes the steps of performing a pattern search for a learning image in a memory and storing a plurality of different learning patterns included in the learning image, using a search count storage module. Storing the number of times each of the plurality of learning patterns stored in the memory is searched while the pattern search is performed, and determining an address on the memory where each of the plurality of learning patterns is stored based on the number of times the search is stored in the search number storage module by the control module. A step of receiving an inference image including a target pattern, and outputting a label of the inference image based on an address in a memory where a learning pattern identical to the target pattern among a plurality of learning patterns is stored, and the memories are different from each other. a first memory unit corresponding to one learning pattern among the plurality of learning patterns, and a second memory unit at least partially overlapping with the first memory unit, as the first memory unit performs a search for the one learning pattern. , the second memory unit may be configured to perform a search for one learning pattern.

본 개시의 또 다른 실시예에 따르면, 패턴 학습을 통한 이미지 분류 방법을 실행시키도록 컴퓨터로 판독 가능한 기록 매체에 기록된 컴퓨터 프로그램이 제공될 수 있다.According to another embodiment of the present disclosure, a computer program recorded on a computer-readable recording medium may be provided to execute an image classification method through pattern learning.

본 개시의 일부 실시예에 따르면, 특정 패턴에 대한 반복적인 검색을 통해 패턴 발생 위치가 미세하게 변경됨에 따라 발생하는 오류를 제거하여 정확도를 개선할 수 있다.According to some embodiments of the present disclosure, accuracy can be improved by eliminating errors that occur as the pattern occurrence location is slightly changed through repeated searches for a specific pattern.

본 개시의 일부 실시예에 따르면, 복잡하고 로드가 많은 학습 연산을 하나의 클락에서 수행하게 함으로써, 학습의 총 소모 클락을 감소시킬 수 있다.According to some embodiments of the present disclosure, the total clock consumption of learning can be reduced by performing complex and high-load learning operations in one clock.

본 개시의 일부 실시예에 따르면, 이미지를 서로 다른 방향성을 갖는 패턴들로 구분한 후 학습을 수행하여 정확도를 개선할 수 있다.According to some embodiments of the present disclosure, accuracy can be improved by dividing an image into patterns with different directions and then performing learning.

본 개시의 일부 실시예에 따르면, 패턴 학습 하드웨어를 edge 디바이스에 사용할 경우 CPU의 연산 효율을 극대화시킬 수 있다.According to some embodiments of the present disclosure, the computational efficiency of the CPU can be maximized when pattern learning hardware is used in an edge device.

본 개시의 일부 실시예에 따르면, 패턴이 검색되는 빈도에 따른 학습을 가능하게 함으로써 특정 기능을 수행하도록 학습을 유도하여 동일한 회로로 여러가지 연산을 구현할 수 있다.According to some embodiments of the present disclosure, various operations can be implemented with the same circuit by inducing learning to perform a specific function by enabling learning according to the frequency with which patterns are searched.

도 1은 본 개시의 일 실시예에 따른 패턴 학습을 통한 이미지 분류 장치의 구성을 나타내는 블록도이다.
도 2는 본 개시의 일 실시예에 따른 메모리의 동작을 나타내는 모식도이다.
도 3은 본 개시의 일 실시예에 따른 패턴(들)의 예시를 나타낸다.
도 4는 본 개시의 일 실시예에 따라 메모리에 학습 패턴(들)이 저장되는 과정을 나타내는 모식도이다.
도 5는 본 개시의 일 실시예에 따른 장치가 입력된 추론 이미지의 레이블을 결정하는 예시를 나타낸다.
도 6은 본 개시의 일 실시예에 따라 이미지에 전처리를 수행하는 과정을 나타내는 모식도이다.
도 7은 본 개시의 일 실시예에 따라 서브 학습 이미지의 학습 패턴을 저장하는 메모리 어레이의 예시를 나타낸다.
도 8은 본 개시의 일 실시예에 따라 특정 패턴을 학습하는 하나의 메모리 어레이의 동작 단계들을 나타낸다.
도 9는 본 개시의 일 실시예에 따른 실험례의 모식도이다.
도 10은 본 개시의 일 실시예에 따른 장치가 추론 이미지의 레이블을 결정하는 과정을 나타내는 모식도이다.
도 11은 본 개시의 일 실시예에 따른 패턴 학습을 통한 이미지 분류 방법의 흐름도이다.

1 is a block diagram showing the configuration of an image classification device through pattern learning according to an embodiment of the present disclosure.
Figure 2 is a schematic diagram showing the operation of a memory according to an embodiment of the present disclosure.
3 shows an example of pattern(s) according to an embodiment of the present disclosure.
Figure 4 is a schematic diagram showing a process in which learning pattern(s) are stored in memory according to an embodiment of the present disclosure.
Figure 5 shows an example in which a device determines the label of an input inferred image according to an embodiment of the present disclosure.
Figure 6 is a schematic diagram showing a process of performing pre-processing on an image according to an embodiment of the present disclosure.
Figure 7 shows an example of a memory array that stores learning patterns of sub-learning images according to an embodiment of the present disclosure.
FIG. 8 illustrates operational steps of one memory array learning a specific pattern according to an embodiment of the present disclosure.
Figure 9 is a schematic diagram of an experimental example according to an embodiment of the present disclosure.
Figure 10 is a schematic diagram showing a process in which a device determines the label of an inferred image according to an embodiment of the present disclosure.
Figure 11 is a flowchart of an image classification method through pattern learning according to an embodiment of the present disclosure.

이하, 본 개시의 실시를 위한 구체적인 내용을 첨부된 도면을 참조하여 상세히 설명한다. 다만, 이하의 설명에서는 본 개시의 요지를 불필요하게 흐릴 우려가 있는 경우, 널리 알려진 기능이나 구성에 관한 구체적 설명은 생략하기로 한다.Hereinafter, specific details for implementing the present disclosure will be described in detail with reference to the attached drawings. However, in the following description, detailed descriptions of well-known functions or configurations will be omitted if there is a risk of unnecessarily obscuring the gist of the present disclosure.

첨부된 도면에서, 동일하거나 대응하는 구성요소에는 동일한 참조부호가 부여되어 있다. 또한, 이하의 실시예들의 설명에 있어서, 동일하거나 대응되는 구성요소를 중복하여 기술하는 것이 생략될 수 있다. 그러나 구성요소에 관한 기술이 생략되어도, 그러한 구성요소가 어떤 실시예에 포함되지 않는 것으로 의도되지는 않는다.In the accompanying drawings, identical or corresponding components are given the same reference numerals. Additionally, in the description of the following embodiments, overlapping descriptions of identical or corresponding components may be omitted. However, even if descriptions of components are omitted, it is not intended that such components are not included in any embodiment.

개시된 실시예의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 개시는 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 수 있으며, 단지 본 실시예들은 본 개시가 완전하도록 하고, 본 개시가 통상의 기술자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것일 뿐이다.Advantages and features of the disclosed embodiments and methods for achieving them will become clear by referring to the embodiments described below in conjunction with the accompanying drawings. However, the present disclosure is not limited to the embodiments disclosed below and may be implemented in various different forms. The present embodiments are merely provided to ensure that the present disclosure is complete and that the present disclosure does not fully convey the scope of the invention to those skilled in the art. It is only provided to inform you.

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

본 명세서에서의 단수의 표현은 문맥상 명백하게 단수인 것으로 특정하지 않는 한, 복수의 표현을 포함한다. 또한, 복수의 표현은 문맥상 명백하게 복수인 것으로 특정하지 않는 한, 단수의 표현을 포함한다. 명세서 전체에서 어떤 부분이 어떤 구성요소를 '포함'한다고 할 때, 이는 특별히 반대되는 기재가 없는 한 다른 구성요소를 제외하는 것이 아니라 다른 구성요소를 더 포함할 수 있음을 의미한다.In this specification, singular expressions include plural expressions, unless the context clearly specifies the singular. Additionally, plural expressions include singular expressions, unless the context clearly specifies plural expressions. When it is said that a part 'includes' a certain element throughout the specification, this means that it does not exclude other elements, but may further include other elements, unless specifically stated to the contrary.

도 1은 본 개시의 일 실시예에 따른 패턴 학습을 통한 이미지 분류 장치(100)의 구성을 나타내는 블록도이다. 본 개시에서 제공되는 패턴 학습을 통한 이미지 분류 장치(100)는 이미지에 포함된 패턴을 학습하도록 구성된 학습 모델을 지칭할 수 있다. 또한, 본 개시의 패턴 학습을 통한 이미지 분류 장치(100)는 상술한 학습 모델을 기초로 설계된 이미지 분류 모델을 지칭할 수 있다. 예를 들어, 패턴 학습을 통한 이미지 분류 장치(100)는 이미지 내 객체(정확하게는, 객체의 엣지 부분)의 패턴을 분석하고, 분석 결과를 기초로 해당 객체를 인식할 수 있다. 즉, 패턴 학습을 통한 이미지 분류 장치(100) 객체를 포함하는 이미지를 학습 데이터로 하여 입력된 이미지로부터 해당 객체를 지시하는 레이블(label)을 출력하도록 구성될 수 있다. Figure 1 is a block diagram showing the configuration of an image classification device 100 through pattern learning according to an embodiment of the present disclosure. The image classification device 100 through pattern learning provided in the present disclosure may refer to a learning model configured to learn patterns included in images. Additionally, the image classification device 100 through pattern learning of the present disclosure may refer to an image classification model designed based on the above-described learning model. For example, the image classification device 100 through pattern learning may analyze the pattern of an object (more precisely, an edge portion of the object) in an image and recognize the corresponding object based on the analysis result. That is, the image classification device 100 through pattern learning may be configured to use an image including an object as learning data and output a label indicating the object from the input image.

도 1을 참고하면, 이와 같은 패턴 학습을 통한 이미지 분류 장치(100)(이하, ‘장치’라 한다)는 메모리(110), 검색 횟수 저장 모듈(120), 제어 모듈(130), 레지스터(140) 및 클락(150) 중 적어도 하나를 더 포함할 수 있다.Referring to FIG. 1, the image classification device 100 through pattern learning (hereinafter referred to as 'device') includes a memory 110, a search count storage module 120, a control module 130, and a register 140. ) and a clock 150 may be further included.

메모리(110)는 장치(100)가 외부로부터 수신한 데이터 및/또는 장치(100) 내부에서 생성된 데이터를 저장할 수 있다. 예를 들어, 메모리(110)는 장치(100)에 입력된 이미지를 저장할 수 있다. 다른 예를 들어, 메모리(110)는 입력된 이미지에 포함된 복수의 패턴을 저장할 수 있다. 이 경우, 복수의 패턴 각각은 메모리(110)의 서로 다른 주소에 저장될 수 있다.The memory 110 may store data received by the device 100 from outside and/or data generated inside the device 100. For example, the memory 110 may store images input to the device 100. For another example, the memory 110 may store a plurality of patterns included in an input image. In this case, each of the plurality of patterns may be stored in a different address of the memory 110.

메모리(110)는 사전 결정된 복수의 레이블 각각에 대응하는 복수의 메모리 어레이를 포함할 수 있다. 이 경우, 복수의 레이블은 장치(100)의 학습에 이용되는 학습 데이터셋의 레이블(들)을 기초로 결정될 수 있다. 이에 따라, 장치(100)가 특정 레이블과 연관된 임의의 학습 데이터를 학습할 때, 해당 학습 데이터 및/또는 해당 학습 데이터와 연관된 다른 데이터는 특정 레이블에 대응하는 메모리 어레이에 저장될 수 있다. 또한, 장치(100)에 특정 레이블과 연관된 추론 데이터가 입력되는 경우, 장치(100)는 복수의 메모리 어레이 중 해당 추론 데이터의 레이블과 연관된 하나의 메모리 어레이를 결정하고, 결정된 하나의 메모리 어레이에 대응하는 레이블을 추론 데이터의 레이블로서 출력할 수 있다.The memory 110 may include a plurality of memory arrays, each corresponding to a plurality of predetermined labels. In this case, a plurality of labels may be determined based on the label(s) of the learning dataset used for learning of the device 100. Accordingly, when the device 100 learns any training data associated with a specific label, the training data and/or other data associated with the training data may be stored in a memory array corresponding to the specific label. In addition, when inference data associated with a specific label is input to the device 100, the device 100 determines one memory array associated with the label of the corresponding inference data among a plurality of memory arrays, and corresponds to the determined one memory array. The label can be output as a label of inference data.

메모리(110)는 입력된 데이터로부터 주소를 출력하도록 구성될 수 있다. 예를 들어, 메모리(110)는 입력된 데이터로부터 주소를 출력하도록 구성된 TCAM(Ternary Content Addressable Memory)를 포함할 수 있다. The memory 110 may be configured to output an address from input data. For example, the memory 110 may include a Ternary Content Addressable Memory (TCAM) configured to output an address from input data.

TCAM은 CAM의 일종으로, 입력된 데이터와 동일한 데이터가 저장된 주소를 출력하므로 통상적인 메모리에 비하여 빠른 검색 특성을 갖는다. 또한, TCAM은 입력된 패턴과 동일한 패턴을 검색하는 과정에서 해당 패턴을 구성하는 값으로써 ‘0’ 및 ‘1’외에 ‘X(don’t care)’를 허용하여 유연한 검색을 가능하게 한다. 일반적으로, TCAM은 word line과 match line을 포함하며, 그 중 match line은 입력된 패턴과 대상 주소의 패턴이 동일한 경우 high, 그렇지 않으면 low를 출력하는 방식으로 대상 패턴과 동일한 패턴이 저장된 주소를 탐색한다. 이와 관련된 상세한 설명은 도 2에서 후술된다.TCAM is a type of CAM and outputs the address where the same data as the input data is stored, so it has faster search characteristics than regular memory. In addition, TCAM enables flexible search by allowing ‘X (don’t care)’ in addition to ‘0’ and ‘1’ as values composing the pattern in the process of searching for a pattern identical to the input pattern. Generally, TCAM includes a word line and a match line, of which the match line outputs high if the input pattern and the pattern of the target address are the same, and outputs low otherwise, searching for an address where the same pattern as the target pattern is stored. do. A detailed description in this regard is provided later in FIG. 2 .

메모리(110)는 학습 이미지로부터 추출된 학습 패턴을 바이너리 데이터로 변환하여 임의의 주소 영역에 저장할 수 있다. 예를 들어, 메모리(110)는 학습 이미지에서 첫번째로 추출된 제1 학습 패턴을 바이너리 데이터로 변환하여 가장 높은 주소 값을 갖는 제1 주소 영역(즉, 최상위 주소 영역)에 저장하고, 제1 주소 영역과 연결된 검색 횟수 저장 모듈(120)의 데이터를 1만큼 증가시킬 수 있다. 그리고 나서, 메모리(110)는 학습 이미지에서 두번째로 추출된 제2 학습 패턴을 바이너리 데이터로 변환하여 저장할 수 있다. 이 때, 제2 학습 패턴이 제1 학습 패턴과 동일한 경우, 메모리(110)는 제1 주소 영역과 연결된 검색 횟수 저장 모듈(120)의 데이터를 1만큼 증가시킬 수 있다. 반면, 제2 학습 패턴이 제1 학습 패턴과 상이한 경우, 메모리(110)는 다른 주소 영역에 제2 학습 패턴을 저장할 수 있다.The memory 110 may convert the learning pattern extracted from the learning image into binary data and store it in an arbitrary address area. For example, the memory 110 converts the first learning pattern extracted from the learning image into binary data, stores it in the first address area (i.e., the highest address area) with the highest address value, and stores the first learning pattern extracted from the learning image into binary data. The data of the search count storage module 120 connected to the area can be increased by 1. Then, the memory 110 may convert the second learning pattern extracted from the learning image into binary data and store it. At this time, if the second learning pattern is the same as the first learning pattern, the memory 110 may increase the data in the search count storage module 120 connected to the first address area by 1. On the other hand, when the second learning pattern is different from the first learning pattern, the memory 110 may store the second learning pattern in a different address area.

메모리(110)는 추론 이미지로부터 추출된 대상 패턴을 바이너리 데이터로 변환할 수 있다. 그리고 나서, 메모리(110)는 변환된 바이너리 데이터와 동일한 바이너리 데이터가 저장된 메모리(110) 상의 주소를 출력할 수 있다. 즉, 본 개시에서 ‘바이너리 데이터’는 ‘패턴’으로 대체되어 해석될 수 있다.The memory 110 may convert the target pattern extracted from the inferred image into binary data. Then, the memory 110 may output an address on the memory 110 where the same binary data as the converted binary data is stored. In other words, in this disclosure, ‘binary data’ can be interpreted as being replaced with ‘pattern’.

메모리(110)는 입력된 바이너리 데이터와 메모리(110)의 복수의 주소에 각각 저장된 복수의 바이너리 데이터(구체적으로, 학습 패턴의 바이너리 데이터)를 상위 주소부터 하위 주소 순으로 차례대로 검색할 수 있다. 그리고 나서, 메모리(110)는 상술한 바와 같이 ‘high’를 출력한 주소를 대상 패턴과 동일한 학습 패턴이 저장된 주소 영역으로 결정할 수 있다.The memory 110 can sequentially search the input binary data and a plurality of binary data (specifically, binary data of a learning pattern) stored in a plurality of addresses of the memory 110 in order from the upper address to the lower address. Then, as described above, the memory 110 may determine the address that outputs 'high' as the address area where the learning pattern identical to the target pattern is stored.

검색 횟수 저장 모듈(120)은 장치(100)가 특정 데이터를 검색한 횟수를 저장할 수 있다. 구체적으로, 검색 횟수 저장 모듈(120)은 복수의 카운터(counter)를 포함하고, 복수의 카운터는 학습 데이터가 저장된 메모리(110)의 복수의 주소에 각각 대응하도록 연결될 수 있다. 이에 따라, 학습 데이터셋으로부터 검색된 제1 학습 패턴 및 제2 학습 패턴이 각각 메모리(110)의 제1 주소 및 제2 주소에 저장된 경우, 검색 횟수 저장 모듈(120)에서 제1 주소와 연결된 제1 카운터는 제1 학습 패턴이 검색된 횟수를 저장하고 제2 주소와 연결된 제2 카운터는 제2 학습 패턴이 검색된 횟수를 저장할 수 있다.The search count storage module 120 may store the number of times the device 100 searches for specific data. Specifically, the search number storage module 120 includes a plurality of counters, and the plurality of counters may be connected to respectively correspond to a plurality of addresses of the memory 110 where learning data is stored. Accordingly, when the first learning pattern and the second learning pattern retrieved from the learning dataset are stored in the first address and the second address of the memory 110, respectively, the first learning pattern connected to the first address in the search number storage module 120 The counter may store the number of times the first learning pattern has been searched, and the second counter connected to the second address may store the number of times the second learning pattern has been searched.

제어 모듈(130)은 검색 횟수 저장 모듈(120)에 저장된 데이터를 기초로 메모리(110)의 복수의 주소들 각각에 저장되는(또는, 저장된) 학습 데이터를 결정할 수 있다. 예를 들어, 제1 학습 단계에서 제1 학습 패턴보다 제2 학습 패턴이 더 많이 검색된 경우, 제어 모듈(130)은 메모리(110)의 제1 주소에 제1 학습 패턴을 저장하고, 제1 주소 보다 하위에 위치하는 제2 주소에 제2 학습 패턴을 저장할 수 있다. 다른 예를 들어, 제1 학습 단계 이후 제2 학습 단계까지 제2 학습 패턴보다 제1 학습 패턴이 더 많이 검색된 경우, 제어 모듈(130)은 제3 주소에 제2 학습 패턴을 저장하고, 제3 주소 보다 하위에 위치하는 제4 주소에 제1 학습 패턴을 저장할 수 있다.The control module 130 may determine learning data to be stored (or stored) in each of a plurality of addresses of the memory 110 based on the data stored in the search count storage module 120. For example, if the second learning pattern is searched more than the first learning pattern in the first learning step, the control module 130 stores the first learning pattern in the first address of the memory 110 and stores the first learning pattern in the first address. The second learning pattern can be stored in a lower second address. For another example, if the first learning pattern is searched more than the second learning pattern after the first learning step until the second learning step, the control module 130 stores the second learning pattern in the third address, and stores the third learning pattern in the third address. The first learning pattern can be stored in the fourth address located lower than the address.

레지스터(140)는 메모리(110)에 저장된 학습 데이터의 주소를 변경하기 위하여 학습 데이터를 임시로 저장할 수 있다. 이를 위해, 레지스터(140)는 하나 이상의(예: 2개)의 쉬프트 레지스터(shift)를 포함할 수 있다. 한편, 레지스터(140)가 학습 패턴들의 주소를 변경하는 과정은 6 단계를 포함할 수 있다. 이 때, 6 단계는 클락(160)이 출력하는 6 개의 클락 신호 마다 수행될 수 있다. 예를 들어, 제1 주소 영역에 저장된 제1 학습 패턴과 제2 주소 영역에 저장된 제2 학습 패턴의 위치를 바꾸는 과정은, 메모리(110)에 연결된 제1 쉬프트 레지스터가 제2 주소 영역에서 제2 학습 패턴을 읽는(read) 첫 번째 단계, 제1 쉬프트 레지스터에 저장된 제2 학습 패턴을 제1 쉬프트 레지스터와 연결된 제2 쉬프트 레지스터로 전송하는 두 번째 단계, 제1 쉬프트 레지스터가 제1 주소 영역에 저장된 제1 학습 패턴을 읽는 세 번째 단계, 제1 쉬프트 레지스터가 제2 주소 영역에 제1 학습 패턴을 쓰는 네 번째 단계, 제1 쉬프트 레지스터와 제2 쉬프트 레지스터에 저장된 제1 학습 패턴과 제2 학습 패턴을 교환하는 다섯 번째 단계, 제1 쉬프트 레지스터가 제2 학습 패턴을 제1 주소 영역에 쓰는 여섯 번째 단계를 포함할 수 있다.The register 140 may temporarily store learning data in order to change the address of the learning data stored in the memory 110. To this end, the register 140 may include one or more (e.g., two) shift registers (shift). Meanwhile, the process by which the register 140 changes the addresses of learning patterns may include six steps. At this time, step 6 can be performed for each of the six clock signals output by the clock 160. For example, the process of changing the positions of the first learning pattern stored in the first address area and the second learning pattern stored in the second address area is such that the first shift register connected to the memory 110 moves the second learning pattern in the second address area. The first step is to read the learned pattern, the second step is to transfer the second learned pattern stored in the first shift register to the second shift register connected to the first shift register, and the first shift register is stored in the first address area. A third step of reading the first learned pattern, a fourth step of the first shift register writing the first learned pattern into the second address area, the first learned pattern and the second learned pattern stored in the first shift register and the second shift register. A fifth step of exchanging , and a sixth step of writing the first shift register to the second learning pattern in the first address area.

도 2는 본 개시의 일 실시예에 따른 메모리(200)의 동작을 나타내는 모식도이다. 도시된 바와 같이, 메모리(200)는 미리 결정된 복수의 주소(여기서, 0 내지 5) 사전에 매칭된 복수의 영역(이하, ‘주소 영역’이라 한다)을 포함할 수 있다. 이 경우, 복수의 영역 각각은 하나의 학습 데이터를 저장할 수 있다. 예를 들어, 복수의 영역 각각은 학습 이미지(또는, 추론 이미지)로부터 획득된 하나의 패턴을 저장할 수 있다.Figure 2 is a schematic diagram showing the operation of the memory 200 according to an embodiment of the present disclosure. As shown, the memory 200 may include a plurality of areas (hereinafter referred to as ‘address areas’) that are matched in advance with a plurality of predetermined addresses (here, 0 to 5). In this case, each of the plurality of areas can store one learning data. For example, each of the plurality of areas may store one pattern obtained from a learning image (or inference image).

메모리(200)의 제1 주소 영역 내지 제6 주소 영역에 저장된 학습 패턴은 서로 상이할 수 있다. 예를 들어, 제1 주소 영역 내지 제6 주소 영역에는 각각 ‘10110’, ‘11001’, ‘00110’, ‘10101’, ‘01010’및 ‘11011’이 저장될 수 있다. 이 때, 장치(예: 장치(100)) 및/또는 메모리(200)에 ‘110XX’데이터가 입력된 경우, 메모리(200)는 ‘110XX’와 동일 및/또는 유사한 데이터인 ‘11001’이 저장된 제2 주소 영역의 주소로서 ‘1’을 출력할 수 있다. 또한, 메모리(200)는 ‘110XX’와 동일 및/또는 유사한 데이터인 ‘11011’이 저장된 제6 주소 영역의 주소로서 ‘5’를 출력할 수 있다.Learning patterns stored in the first to sixth address areas of the memory 200 may be different from each other. For example, ‘10110’, ‘11001’, ‘00110’, ‘10101’, ‘01010’, and ‘11011’ may be stored in the first to sixth address areas, respectively. At this time, when '110XX' data is input to the device (e.g., device 100) and/or memory 200, memory 200 stores '11001', which is the same and/or similar data as '110XX'. '1' can be output as the address of the second address area. Additionally, the memory 200 may output ‘5’ as the address of the sixth address area where ‘11011’, which is the same and/or similar data as ‘110XX’, is stored.

한편, 장치(예: 장치(100)) 및/또는 메모리(200)에 입력 및/또는 저장되는 데이터는 바이너리 데이터로 구성될 수 있다. 이 때, 해당 데이터의 각 비트(bit)에 저장된 값은 ‘0’ 및 ‘1’을 포함할 수 있다. 추가적으로, 해당 데이터의 각 비트(bit)에 저장된 값은 ‘X(또는, ‘don’t’ care’)’을 포함할 수 있다. 예를 들어, 입력된 데이터가 그레이(grey) 스케일의 이미지인 경우, 해당 이미지에서 검정색 픽셀은 ‘1’, 흰색 픽셀은 ‘0’, 회색 픽셀은 ‘X’로 표시된 데이터가 추출될 수 있다. 이 경우, 메모리(200)는 ‘X’를 ‘0’ 및/또는 ‘1’로 대체할 수 있다.Meanwhile, data input and/or stored in a device (eg, device 100) and/or memory 200 may be comprised of binary data. At this time, the value stored in each bit of the data may include ‘0’ and ‘1’. Additionally, the value stored in each bit of the data may include ‘X (or, ‘don’t’ care’)’. For example, if the input data is a gray scale image, data marked as ‘1’ for black pixels, ‘0’ for white pixels, and ‘X’ for gray pixels can be extracted from the image. In this case, the memory 200 may replace ‘X’ with ‘0’ and/or ‘1’.

도 3은 본 개시의 일 실시예에 따른 패턴들(310 내지 330)의 예시를 나타낸다. 여기서, 제1 패턴(310)은 장치(예: 장치(100))가 학습 데이터셋으로부터 추출한 패턴을 나타낸다. 예를 들어, 제1 패턴(310)은 학습 이미지로부터 추출된 학습 패턴으로, 메모리의 복수의 주소 중 하나의 주소에 저장될 수 있다. 한편, 제1 패턴(310)은 ‘101101001’의 값을 갖는 바이너리 데이터로 변환되어 저장될 수 있다.Figure 3 shows examples of patterns 310 to 330 according to an embodiment of the present disclosure. Here, the first pattern 310 represents a pattern extracted by a device (eg, device 100) from a learning dataset. For example, the first pattern 310 is a learning pattern extracted from a learning image, and may be stored at one address among a plurality of addresses in the memory. Meanwhile, the first pattern 310 may be converted to binary data with a value of ‘101101001’ and stored.

제2 패턴(320) 및 제3 패턴(330)은 장치가 추론 데이터셋으로부터 추출한 패턴을 나타낸다. 예를 들어, 장치는 입력된 추론 이미지로부터 제2 패턴(320)을 획득할 수 있다. 이 경우, 제2 패턴(320)은 ‘101101X01’의 값을 갖는 바이너리 데이터로 변환될 수 있다. 그리고 나서, 장치는 제2 패턴(320)과 학습이 완료된 메모리에 저장된 복수의 패턴을 비교할 수 있다. 상술한 바와 같이, ‘X’는 ‘0’ 또는 ‘1’로 치환될 수 있으므로, 장치의 메모리는 ‘101101001’ 및/또는 ‘101101101’의 값을 갖는 데이터가 저장된 주소를 출력할 수 있다.The second pattern 320 and the third pattern 330 represent patterns extracted by the device from the inference dataset. For example, the device may obtain the second pattern 320 from the input inferred image. In this case, the second pattern 320 can be converted to binary data with a value of ‘101101X01’. Then, the device can compare the second pattern 320 with a plurality of patterns stored in the memory for which learning has been completed. As described above, ‘X’ can be replaced with ‘0’ or ‘1’, so the memory of the device can output an address where data with values of ‘101101001’ and/or ‘101101101’ are stored.

도 3에서는 메모리에 ‘101101001’의 값을 갖는 제1 패턴(310)이 저장된 예시가 설명된다. 이 경우, 메모리는 제1 패턴(310)과 ‘101101001’로 해석된 제2 패턴(320)이 일치한다고 판단한 것에 응답하여, 제1 패턴(310)이 저장된 주소 값(예를 들어, 도 2의 ‘0’내지 ‘5’중 어느 하나)을 출력할 수 있다. 반면, 메모리는 제1 패턴(310)과‘010010010’의 값을 갖는 제3 패턴(330)이 일치하지 않는다고 판단하게 된다. 이와 동시에, 메모리는 제1 패턴(310)이 저장된 주소의 하위 주소에 저장된 패턴들에 대하여도 병렬적으로 검색을 수행할 수 있다. 이 때, 어느 하나의 하위 주소에 저장된 바이너리 데이터와 제3 패턴(330)의 바이너리 데이터가 일치하는 경우, 해당 하위 주소의 주소 값을 출력하고, 제3 패턴(330)의 바이너리 데이터와 일치하는 바이너리 데이터가 검색되지 않은 경우에는, 주소 값을 출력하지 않을 수 있다.In Figure 3, an example in which the first pattern 310 with a value of ‘101101001’ is stored in the memory is explained. In this case, the memory responds to determining that the first pattern 310 and the second pattern 320 interpreted as '101101001' match, and the address value where the first pattern 310 is stored (e.g., in FIG. 2 Any one of '0' to '5') can be output. On the other hand, the memory determines that the first pattern 310 and the third pattern 330 with a value of ‘010010010’ do not match. At the same time, the memory may also perform a parallel search for patterns stored in addresses lower than the address where the first pattern 310 is stored. At this time, if the binary data stored in any one lower address matches the binary data of the third pattern 330, the address value of the corresponding lower address is output, and the binary data matching the binary data of the third pattern 330 is output. If data is not searched, the address value may not be output.

도 4는 본 개시의 일 실시예에 따라 메모리(예: 메모리(110))에 학습 패턴(들)이 저장되는 과정을 나타내는 모식도이다. 구체적으로, 제1 단계(410) 및 제2 단계(420)는 각각 학습되기 전 메모리에 저장된 바이너리 데이터 및 학습된 후 메모리에 저장된 바이너리 데이터의 예시이다. 도시된 바와 같이, 메모리의 하나의 주소에는 9 비트(bit)로 표시된 바이너리 데이터가 저장될 수 있다. 이 경우, 메모리의 주소는 29개 이하로 구성될 수 있다.Figure 4 is a schematic diagram showing a process in which learning pattern(s) are stored in a memory (eg, memory 110) according to an embodiment of the present disclosure. Specifically, the first step 410 and the second step 420 are examples of binary data stored in the memory before learning and binary data stored in the memory after learning, respectively. As shown, binary data expressed as 9 bits can be stored in one address of the memory. In this case, the memory address may consist of 29 or less.

제1 단계(410)에서 메모리는 최상위 주소 영역에 최대 값의 바이너리 데이터를 초기값으로 저장하고, 하위 주소 영역으로 내려갈수록 작은 값의 바이너리 데이터를 초기값으로 저장할 수 있다. 그러나, 제2 단계(420)와 같이 학습이 완료된 후 메모리는 바이너리 데이터 값이 관계없이, 가장 많이 검색된 바이너리 데이터를 최상위 주소 영역에 저장하고, 하위 주소 영역으로 내려갈수록 검색된 횟수가 작은 바이너리 데이터를 순차적으로 저장할 수 있다.In the first step 410, the memory may store binary data with the maximum value as the initial value in the highest address area and store binary data with smaller values as the initial value as it moves down to the lower address area. However, after learning is completed in the second step 420, the memory stores the most searched binary data in the highest address area, regardless of the binary data value, and sequentially stores binary data with fewer searches as it goes down to the lower address area. It can be saved as .

도 5는 본 개시의 일 실시예에 따른 장치가 입력된 추론 이미지의 레이블을 결정하는 예시를 나타낸다. 제1 단계(510)는 장치가 추론 이미지에 포함된 제1 대상 패턴(512)을 메모리에서 검색하는 예시이고, 제2 단계(520)는 장치가 추론 이미지에 포함된 제2 대상 패턴(522)을 메모리에서 검색하는 예시이다.Figure 5 shows an example in which a device determines the label of an input inferred image according to an embodiment of the present disclosure. The first step 510 is an example in which the device searches the memory for the first target pattern 512 included in the inferred image, and the second step 520 is an example in which the device searches the memory for the second target pattern 522 included in the inferred image. This is an example of searching in memory.

제1 단계(510)에서 장치는 제1 대상 패턴(512)을 나타내는 바이너리 데이터 ‘111101001’과 동일한 값이 저장된 주소를 출력할 수 있다. 예를 들어, 제1 대상 패턴(512)을 메모리의 상위 주소 영역에 저장된 바이너리 데이터부터 하위 주소 영역에 저장된 바이너리 데이터까지 각각 병렬적으로 동시에 비교한 결과, 메모리는‘111101001’이 저장된 영역의 주소 값인 ‘2’를 출력할 수 있다. 그리고 나서, 장치는 사전 결정된 하나 이상의 임계점(514, 516)과 주소 값을 비교한 결과를 기초로, 히트 값을 산출할 수 있다.In the first step 510, the device may output an address storing the same value as the binary data ‘111101001’ representing the first target pattern 512. For example, as a result of simultaneously comparing the first target pattern 512 from the binary data stored in the upper address area of the memory to the binary data stored in the lower address area, the memory has '111101001', which is the address value of the stored area. '2' can be output. Then, the device may calculate a hit value based on a result of comparing the address value with one or more predetermined thresholds 514 and 516.

임계점(514, 516)은 입력된 추론 이미지의 레이블을 출력하기 위하여 사전 결정된 데이터를 지칭할 수 있다. 구체적으로, 임계점(514, 516)은 메모리에 저장된 복수의 주소들을 복수의 주소 그룹으로 구분하고, 장치는 추론 이미지로부터 획득된 대상 패턴과 동일한 학습 패턴이 저장된 주소와 임계점(514, 516)을 비교한 결과를 기초로 추론 이미지의 레이블을 결정하기 위한 히트 값을 산출할 수 있다. The critical points 514 and 516 may refer to predetermined data to output the label of the input inferred image. Specifically, the critical points 514 and 516 divide a plurality of addresses stored in the memory into a plurality of address groups, and the device compares the critical points 514 and 516 with addresses where a learning pattern identical to the target pattern obtained from the inferred image is stored. Based on the results, a hit value can be calculated to determine the label of the inferred image.

한편, 도 5에서는 복수의 주소가 미리 결정된 두 개의 임계점(514, 516)에 의해 세 개의 주소 그룹(여기서, 상위 주소 그룹, 중위 주소 그룹 및 하위 주소 그룹)으로 구분된 것으로 도시되었으나 이에 한정되지 않는다. 예를 들어, 메모리의 복수의 주소는 하나의 임계점에 의해 상위 주소 그룹 및 하위 주소 그룹으로 구분될 수 있다. Meanwhile, in FIG. 5, a plurality of addresses are shown divided into three address groups (here, an upper address group, a middle address group, and a lower address group) by two predetermined threshold points 514 and 516, but the present invention is not limited thereto. . For example, a plurality of addresses in a memory may be divided into an upper address group and a lower address group by a single threshold.

또한, 메모리의 복수의 주소는 3개 이상의 임계점에 의해 4개 이상의 주소 그룹으로 구분될 수 있다. 한편, 앞서 설명한 바와 같이 학습 데이터셋으로부터 추출된 학습 패턴들은 학습 과정에서 검색된 회수가 많을수록 상위 주소에 저장되므로, 도 5의 장치는 학습 데이터셋으로부터‘101101001’의 값을 갖는 학습 패턴을 가장 많이 검색하고, ‘010010110’의 값을 갖는 학습 패턴을 가장 적게 검색했음을 확인할 수 있다.Additionally, a plurality of addresses in the memory may be divided into four or more address groups by three or more critical points. Meanwhile, as described above, the learning patterns extracted from the learning dataset are stored in the upper address the more times they are searched during the learning process, so the device in FIG. 5 searches for the learning pattern with the value of '101101001' from the learning dataset the most. It can be confirmed that the learning pattern with the value of '010010110' was searched the least.

한편, 임계점(514, 516)에 의해 구분된 복수의 주소 그룹 각각에는 상술한 히트 값 산출에 이용되는 값이 사전에 매칭될 수 있다. 예를 들어, 2 개의 임계점(514, 516)에 의해 구분되는 상위 주소 그룹, 중위 주소 그룹 및 하위 주소 그룹에는 각각 ‘1’, ‘0.5’및 ‘0’이 매칭될 수 있다. 그리고 나서, 장치는 추론 이미지의 제1 대상 패턴(512)과 동일한 학습 패턴인 ‘111101001’이 저장된 영역의 주소 값과 제1 임계점(514) 및/또는 제2 임계점(516)을 각각 비교한 결과를 기초로, 히트 값에 ‘1’을 더할 수 있다. 이는, ‘111101001’의 값을 갖는 바이너리 데이터가 제1 임계점(516)을 기준으로 상위 주소 그룹에 저장되었다는 사실에 기반한다. Meanwhile, the value used to calculate the above-described hit value may be matched in advance to each of the plurality of address groups divided by the threshold points 514 and 516. For example, ‘1’, ‘0.5’, and ‘0’ may be matched to the upper address group, middle address group, and lower address group separated by two critical points 514 and 516, respectively. Then, the device compares the address value of the area where '111101001', which is the same learning pattern as the first target pattern 512 of the inferred image, is stored with the first critical point 514 and/or the second critical point 516, respectively. Based on this, you can add '1' to the hit value. This is based on the fact that binary data with the value of ‘111101001’ is stored in the upper address group based on the first critical point 516.

이와 유사하게, 장치는 추론 이미지의 제2 대상 패턴(522)과 동일한 학습 패턴인 ‘010010110’이 저장된 영역의 주소 값과 제1 임계점(514) 및/또는 제2 임계점(516)을 각각 비교한 결과를 기초로, 히트 값에 ‘0’을 더할 수 있다. 이는, ‘010010110’의 값을 갖는 바이너리 데이터가 제2 임계점(516)을 기준으로 하위 주소 그룹에 저장되었다는 사실에 기반한다. Similarly, the device compares the address value of the area where '010010110', which is the same learning pattern as the second target pattern 522 of the inferred image, is stored with the first critical point 514 and/or the second critical point 516, respectively. Based on the result, you can add '0' to the hit value. This is based on the fact that binary data with the value of ‘010010110’ is stored in the lower address group based on the second critical point (516).

이와 같이, 장치는 추론 이미지 내 대상 패턴이 학습 패턴으로부터 검색된 횟수가 클수록 큰 값을 히트 값에 더하는 방식으로 히트 값을 산출할 수 있다. 그리고, 높은 값의 히트 값은 학습 이미지에 많이 포함된 학습 데이터가 추론 이미지에도 많이 포함된 것을 의미하므로, 나아가 학습 이미지의 레이블과 추론 이미지의 레이블이 일치할 가능성이 높다는 것으로 해석될 수 있다.In this way, the device can calculate the hit value by adding a larger value to the hit value as the number of times the target pattern in the inferred image is searched from the learning pattern increases. In addition, a high hit value means that a lot of training data included in the training image is also included in the inference image, so it can be interpreted that there is a high possibility that the label of the training image and the label of the inference image will match.

도 6은 본 개시의 일 실시예에 따라 이미지(610)에 전처리를 수행하는 과정을 나타내는 모식도이다. 도 6의 전처리는 장치(예: 장치(100))에 포함되거나 장치와 연결되어 별도로 마련된 전처리 모듈(미도시)에 의해 수행될 수 있다. 도시된 바와 같이, 장치는 특정 레이블(여기서, ‘0’)과 연관된 이미지(학습 이미지 또는 추론 이미지)를 수신할 수 있다. 그리고 나서, 장치는 미리 저장된 하나 이상의 마스크(622 내지 638) 중 적어도 하나를 이용하여 이미지(610)로부터 서로 다른 복수의 엣지 정보를 각각 포함하는 복수의 서브 학습 이미지(642 내지 648)을 추출할 수 있다.Figure 6 is a schematic diagram showing a process of performing pre-processing on an image 610 according to an embodiment of the present disclosure. The preprocessing in FIG. 6 may be performed by a preprocessing module (not shown) included in the device (e.g., device 100) or separately provided in connection with the device. As shown, the device may receive images (training images or inference images) associated with a specific label (here, '0'). Then, the device can extract a plurality of sub-learning images 642 to 648, each containing a plurality of different edge information, from the image 610 using at least one of the one or more pre-stored masks 622 to 638. there is.

하나 이상의 마스크(622 내지 638)는 각각 이미지(610)에서 특정 방향의 엣지 정보를 필터링하도록 구성된 마스크를 지칭할 수 있다. 예를 들어, 제1 마스크(622) 및 제2 마스크(632)는 수평 방향의 엣지 정보, 제3 마스크(624) 및 제4 마스크(634)는 수직 방향의 엣지 정보, 제5 마스크(626) 및 제6 마스크(636)는 제1 대각 방향의 엣지 정보, 제7 마스크(628) 및 제8 마스크(638)는 제2 대각 방향의 엣지 정보를 각각 필터링 하도록 구성된 마스크를 지칭할 수 있다.One or more masks 622 to 638 may each refer to a mask configured to filter edge information in a specific direction in the image 610. For example, the first mask 622 and the second mask 632 are edge information in the horizontal direction, the third mask 624 and the fourth mask 634 are edge information in the vertical direction, and the fifth mask 626 is edge information in the vertical direction. And the sixth mask 636 may refer to a mask configured to filter edge information in the first diagonal direction, and the seventh mask 628 and the eighth mask 638 may refer to masks configured to filter edge information in the second diagonal direction, respectively.

장치는 입력된 이미지(610)로부터 하나 이상의 마스크(622 내지 638) 중 적어도 하나의 마스크를 이용하여 수평 방향의 엣지 정보를 포함하는 복수의 서브 학습 이미지(642 내지 648) 중 적어도 하나를 추출할 수 있다. 그리고 나서, 분할된 복수의 서브 학습 이미지(642 내지 648) 중 적어도 하나를 이용하여 이미지(610)에 대한 학습을 수행하는 경우, 장치의 추론 정확도를 극대화할 수 있다.The device can extract at least one of a plurality of sub-learning images 642 to 648 including edge information in the horizontal direction from the input image 610 using at least one of the one or more masks 622 to 638. there is. Then, when learning the image 610 using at least one of the plurality of divided sub-learning images 642 to 648, the inference accuracy of the device can be maximized.

도 7은 본 개시의 일 실시예에 따라 서브 학습 이미지의 학습 패턴을 저장하는 메모리 어레이(720)의 예시를 나타낸다. 장치(예: 장치(100))의 학습에 이용되는 학습 데이터셋은 복수의 학습 이미지를 포함할 수 있다. 나아가, 복수의 학습 이미지는 각각 사전에 결정된 복수의 레이블과 연관될 수 있다. 예를 들어, 숫자 ‘0’을 지시하는 제1 레이블은 숫자 ‘0’을 나타내는 객체가 표시된 학습 이미지와 연관될 수 있다. 다른 예를 들어, 숫자 ‘1’을 지시하는 제2 레이블은 숫자 ‘1’을 나타내는 객체가 표시된 학습 이미지와 연관될 수 있다.FIG. 7 shows an example of a memory array 720 that stores learning patterns of sub-learning images according to an embodiment of the present disclosure. A learning dataset used for learning of a device (e.g., device 100) may include a plurality of learning images. Furthermore, each of the plurality of learning images may be associated with a plurality of predetermined labels. For example, a first label indicating the number ‘0’ may be associated with a training image displaying an object representing the number ‘0’. As another example, a second label indicating the number ‘1’ may be associated with a training image displaying an object representing the number ‘1’.

즉, 학습 데이터셋이 숫자 객체와 연관된 복수의 학습 이미지로 구성된 경우, 복수의 학습 이미지의 레이블은 ‘0’ 내지 ‘9’를 지시하는 레이블들로 구성되고, 메모리(예: 메모리(110))는 해당 레이블들 각각에 대응하는 복수의 메모리 어레이로 구성될 수 있다. 한편, 도 7에는 ‘0’을 지시하는 제1 레이블에 대응하는 메모리 어레이(720)가 도시되어 있으나, 도 7에서 설명되는 메모리 어레이(720)가 학습 패턴을 저장하는 방식은 다른 메모리 어레이들에도 동일/유사하게 적용될 수 있다.That is, when the learning dataset consists of a plurality of learning images associated with numeric objects, the labels of the plurality of learning images consist of labels indicating '0' to '9', and are stored in a memory (e.g., memory 110). may be composed of a plurality of memory arrays corresponding to each of the labels. Meanwhile, in FIG. 7, the memory array 720 corresponding to the first label indicating '0' is shown, but the method in which the memory array 720 described in FIG. 7 stores the learning pattern is also used in other memory arrays. Can be applied identically/similarly.

메모리 어레이(720)는 복수의 메모리 어레이(722 내지 728)를 포함할 수 있다. 구체적으로, 하나의 레이블(여기서, ‘0’)에 대응하는 메모리 어레이(720)는 복수의 서브 학습 이미지(712 내지 718) 각각의 학습 패턴을 저장하기 위한 복수의 메모리 어레이(722 내지 728)를 포함할 수 있다. 여기서, 제1 메모리 어레이(722)는 학습 이미지(예: 학습 이미지(610))로부터 추출된 수평 방향의 엣지 정보를 포함하는 제1 서브 학습 이미지(712)의 학습 패턴을 저장할 수 있다. 또한, 제2 메모리 어레이(724), 제3 메모리 어레이(726) 및 제4 메모리 어레이(728)는 각각 수직 방향의 엣지 정보를 포함하는 제2 서브 학습 이미지(714), 제1 대각 방향의 엣지 정보를 포함하는 제3 서브 학습 이미지(716) 및 제2 대각 방향의 엣지 정보를 포함하는 제4 서브 학습 이미지(718) 중 적어도 하나를 포함할 수 있다.Memory array 720 may include a plurality of memory arrays 722 to 728. Specifically, the memory array 720 corresponding to one label (here, '0') includes a plurality of memory arrays 722 to 728 for storing learning patterns of each of the plurality of sub learning images 712 to 718. It can be included. Here, the first memory array 722 may store the learning pattern of the first sub-learning image 712 including horizontal edge information extracted from the learning image (eg, learning image 610). In addition, the second memory array 724, the third memory array 726, and the fourth memory array 728 each include a second sub-learning image 714 including edge information in the vertical direction and a first edge in the diagonal direction. It may include at least one of a third sub-learning image 716 including information and a fourth sub-learning image 718 including edge information in the second diagonal direction.

도 8은 본 개시의 일 실시예에 따라 특정 패턴을 학습하는 하나의 메모리 어레이의 동작 단계들(810 내지 850)을 나타낸다. 제1 동작 단계(810)에서 메모리 어레이의 제1 메모리 유닛(812)은 특정 위치에 발생된 하나의 패턴을 학습할 수 있다. 추가적으로, 제2 동작 단계(820), 제3 동작 단계(830), 제4 동작 단계(840) 및 제5 동작 단계(850)에서 제1 메모리 유닛(812)과 적어도 일부 중첩되는 제2 메모리 유닛(822), 제3 메모리 유닛(832), 제4 메모리 유닛(842) 및 제5 메모리 유닛(852)을 각각 이용하여 제1 메모리 유닛(812)에 의해 학습(또는, 검색)된 패턴을 중복적으로 검색할 수 있다. 예를 들어, 메모리 어레이에 의해 하나의 학습 이미지(또는, 서브 학습 이미지)의 패턴(들)이 검색되는 동안, 어느 하나의 패턴의 발생 위치가 미세하게 변경되어 해당 패턴은 제1 메모리 유닛(812)에 의해 검색되지 않을 수 있다. 이 경우, 해당 패턴은 제2 메모리 유닛(822) 내지 제5 메모리 유닛(852) 중 하나의 메모리 유닛에 의해 검색될 가능성이 높아지므로, 메모리 어레이에 의한 학습 정확도가 개선될 수 있다.FIG. 8 shows operation steps 810 to 850 of one memory array learning a specific pattern according to an embodiment of the present disclosure. In the first operation step 810, the first memory unit 812 of the memory array may learn one pattern generated at a specific location. Additionally, a second memory unit that at least partially overlaps the first memory unit 812 in the second operation step 820, the third operation step 830, the fourth operation step 840, and the fifth operation step 850. (822), the pattern learned (or searched) by the first memory unit 812 is duplicated using the third memory unit 832, fourth memory unit 842, and fifth memory unit 852, respectively. You can search online. For example, while the pattern(s) of one learning image (or sub-learning image) are searched by the memory array, the occurrence location of one pattern is slightly changed, so that the pattern is stored in the first memory unit 812. ) may not be searched. In this case, the possibility of the corresponding pattern being searched by one of the second to fifth memory units 822 to 852 increases, so learning accuracy by the memory array can be improved.

도 9는 본 개시의 일 실시예에 따른 실험례의 모식도이다. 도시된 바와 같이, 학습 이미지(또는, 서브 학습 이미지)(910)의 사이즈는 27*27이고, 메모리 어레이(920)의 사이즈는 25*25로 구성된다. 또한, 학습 이미지(910) 내 특정 위치에서 발생한 학습 패턴(912) 및 학습 패턴(912)을 학습하기 위한 5 개의 메모리 유닛(930 내지 938)의 사이즈는 각각 3*3으로 구성된다. 이 경우, 제2 메모리 유닛(932)은 제1 메모리 유닛(930)의 위치에서 상측으로 1만큼 이동한 영역에 위치하고, 제3 메모리 유닛(934)은 제1 메모리 유닛(930)의 위치에서 좌측으로 1만큼 이동한 영역에 위치한다. 또한, 제4 메모리 유닛(936)은 제1 메모리 유닛(930)의 위치에서 하측으로 1만큼 이동한 영역에 위치하고, 제5 메모리 유닛(938)은 제1 메모리 유닛(930)의 위치에서 우측으로 1만큼 이동한 영역에 위치한다. 한편, 위 실험례에서 제1 임계점(예: 제1 임계점(514))의 값은 0.85부터 0.99까지, 제2 임계점(예: 제2 임계점(516)의 값은 0.85부터 0.97까지 0.01 단위로 변경되었다. 그 결과, 평균 정확도는 95.65%로 9*9 사이즈의 메모리 어레이(미도시)를 이용하여 학습 이미지(910)내 패턴(들)을 1회씩 학습한 케이스의 평균 정확도 92.5%보다 3.15% 상승함을 확인할 수 있었다.Figure 9 is a schematic diagram of an experimental example according to an embodiment of the present disclosure. As shown, the size of the learning image (or sub-learning image) 910 is 27*27, and the size of the memory array 920 is 25*25. In addition, the size of the learning pattern 912 occurring at a specific location in the learning image 910 and the five memory units 930 to 938 for learning the learning pattern 912 are each 3*3. In this case, the second memory unit 932 is located in an area moved one unit upward from the position of the first memory unit 930, and the third memory unit 934 is located to the left of the position of the first memory unit 930. It is located in the area moved by 1. Additionally, the fourth memory unit 936 is located in an area moved one unit downward from the position of the first memory unit 930, and the fifth memory unit 938 is located to the right from the position of the first memory unit 930. It is located in an area that has moved by 1. Meanwhile, in the above experimental example, the value of the first critical point (e.g., first critical point 514) is changed from 0.85 to 0.99, and the value of the second critical point (e.g., second critical point 516) is changed from 0.85 to 0.97 in 0.01 increments. As a result, the average accuracy was 95.65%, which is 3.15% higher than the average accuracy of 92.5% in the case where the pattern(s) in the learning image 910 were learned once using a 9*9 memory array (not shown). It was confirmed that this was the case.

도 10은 본 개시의 일 실시예에 따른 장치(예: 장치(100))가 추론 이미지의 레이블을 결정하는 과정을 나타내는 모식도이다. 상술한 바와 같이, 메모리(예: 메모리(110))는 복수의 레이블 각각에 대응하는 복수의 메모리 어레이(1010 내지 1040)를 포함할 수 있다.FIG. 10 is a schematic diagram illustrating a process in which a device (eg, device 100) determines the label of an inferred image according to an embodiment of the present disclosure. As described above, a memory (eg, memory 110) may include a plurality of memory arrays 1010 to 1040, each corresponding to a plurality of labels.

장치는 추론 이미지(1000)가 입력된 경우, 추론 이미지(1000)에 포함된 복수의 대상 패턴을 추출할 수 있다. 그리고 나서, 추출된 대상 패턴 각각을 바이너리 데이터로 변환한 후 복수의 메모리 어레이(1010 내지 1040)에 입력할 수 있다. 이에 따라, 복수의 메모리 어레이(1010 내지 1040) 각각은 입력된 대상 패턴과 동일한 학습 패턴이 저장된 주소를 출력할 수 있다.When the inferred image 1000 is input, the device may extract a plurality of target patterns included in the inferred image 1000. Then, each extracted target pattern can be converted into binary data and then input into a plurality of memory arrays 1010 to 1040. Accordingly, each of the plurality of memory arrays 1010 to 1040 may output an address where a learning pattern identical to the input target pattern is stored.

장치는 복수의 메모리 어레이(1010 내지 1040) 각각에서 임의의 대상 패턴의 입력에 따라 출력된 주소와 미리 결정된 임계점을 비교할 수 있다. 그리고 나서, 비교된 결과를 기초로 히트 값 산출에 이용되는 값을 획득할 수 있다. 예를 들어, 장치는 추론 이미지(1000)로부터 획득된 제1 대상을 복수의 메모리 어레이(1010 내지 1040)에 입력할 수 있다. 그리고 나서, 복수의 메모리 어레이(1010 내지 1040) 각각으로부터 제1 대상 패턴의 입력에 따라 출력된 주소와 미리 결정된 임계점을 비교할 수 있다. 이 때, 제1 대상 패턴과 동일한 학습 패턴은 제1 메모리 어레이(1010) 내 중위 주소 그룹에 속하여, 장치는 제1 메모리 어레이(1010)의 제1 히트 값에 ‘0.5’을 더할 수 있다. 또한, 제1 대상 패턴과 동일한 학습 패턴은 제2 메모리 어레이(1020) 내 하위 주소 그룹에 속하여, 장치는 제2 메모리 어레이(1020)의 제2 히트 값에 ‘0’을 더할 수 있다. 또한, 제1 대상 패턴과 동일한 학습 패턴은 제3 메모리 어레이(1020) 내 상위 주소 그룹에 속하여, 장치는 제3 메모리 어레이(1030)의 제3 히트 값에 ‘1’을 더할 수 있다. 마지막으로, 제1 대상 패턴과 동일한 학습 패턴은 제4 메모리 어레이(1040) 내 중위 주소 그룹에 속하여, 장치는 제4 메모리 어레이(1040)의 제3 히트 값에 ‘0.5’를 더할 수 있다.The device may compare an address output according to an input of a random target pattern in each of the plurality of memory arrays 1010 to 1040 with a predetermined threshold. Then, the value used to calculate the hit value can be obtained based on the compared result. For example, the device may input the first object obtained from the inferred image 1000 into the plurality of memory arrays 1010 to 1040. Then, the address output according to the input of the first target pattern from each of the plurality of memory arrays 1010 to 1040 may be compared with a predetermined threshold. At this time, the learning pattern that is the same as the first target pattern belongs to the middle address group in the first memory array 1010, so the device can add ‘0.5’ to the first hit value of the first memory array 1010. Additionally, the learning pattern identical to the first target pattern belongs to the lower address group within the second memory array 1020, so the device may add ‘0’ to the second hit value of the second memory array 1020. Additionally, the learning pattern that is the same as the first target pattern belongs to the upper address group in the third memory array 1020, so the device can add ‘1’ to the third hit value of the third memory array 1030. Finally, the learning pattern that is the same as the first target pattern belongs to the middle address group in the fourth memory array 1040, so the device can add ‘0.5’ to the third hit value of the fourth memory array 1040.

상술한 방법에 따라 장치는 추론 이미지(1000)에 포함된 복수의 대상 패턴 각각에 대하여 복수의 메모리 어레이(1010 내지 1040)로부터 히트 값을 산출하고, 산출된 히트 값들을 서로 비교할 수 있다. 도 10을 참고하면, 복수의 메모리 어레이(1010 내지 1040) 각각으로부터 산출된 제1 히트 값, 제2 히트 값, 제3 히트 값 및 제4 히트 값은 각각 240, 224, 324 및 252이다. 장치는 산출된 히트 값들 중 가장 큰 값을 갖는 히트 값이 산출된 제3 메모리 어레이(1030)를 결정할 수 있다. 그리고 나서, 제3 메모리 어레이(1030)에 대응하는 레이블(여기서, ‘2’)을 추론 이미지(1000)의 레이블로 결정할 수 있다.According to the above-described method, the device can calculate hit values from the plurality of memory arrays 1010 to 1040 for each of the plurality of target patterns included in the inferred image 1000, and compare the calculated hit values with each other. Referring to FIG. 10 , the first hit value, second hit value, third hit value, and fourth hit value calculated from each of the plurality of memory arrays 1010 to 1040 are 240, 224, 324, and 252, respectively. The device may determine the third memory array 1030 for which a hit value having the largest value among the calculated hit values was calculated. Then, the label (here, ‘2’) corresponding to the third memory array 1030 may be determined as the label of the inferred image 1000.

한편, 도 10에는 설명의 편의를 위하여 ‘0’을 지시하는 레이블에 대응하는 제1 메모리 어레이(1010), ‘1’을 지시하는 레이블에 대응하는 제2 메모리 어레이(1020), ‘2’를 지시하는 레이블에 대응하는 제3 메모리 어레이(1030) 및 ‘9’를 지시하는 레이블에 대응하는 제4 메모리 어레이(1040)만 도시되어 있으나 이에 한정되지 않는다. 즉, ‘3’ 내지 ‘8’을 지시하는 레이블에 각각 대응하는 메모리 어레이들 또한 상술한 방법에 따라 추론 이미지(1000)의 추론에 이용될 수 있다.Meanwhile, in FIG. 10, for convenience of explanation, a first memory array 1010 corresponding to a label indicating '0', a second memory array 1020 corresponding to a label indicating '1', and '2' are shown. Only the third memory array 1030 corresponding to the label indicating and the fourth memory array 1040 corresponding to the label indicating '9' are shown, but the present invention is not limited thereto. That is, memory arrays corresponding to labels indicating ‘3’ to ‘8’ can also be used for inference of the inference image 1000 according to the above-described method.

도 11는 본 개시의 일 실시예에 따른 패턴 학습을 통한 이미지 분류 방법(1100)을 나타내는 흐름도이다. 방법(1100)은 본 개시의 패턴 학습을 통한 이미지 분류 장치(예: 장치(100))에 의해 수행될 수 있다. FIG. 11 is a flowchart illustrating an image classification method 1100 through pattern learning according to an embodiment of the present disclosure. Method 1100 may be performed by an image classification device (eg, device 100) through pattern learning of the present disclosure.

도 11를 참고하면, 방법(1100)은 학습 이미지에 대한 패턴 검색을 수행하여 학습 이미지에 포함된 서로 다른 복수의 학습 패턴을 메모리에 저장하는 단계(S1110)에 의해 개시될 수 있다. 또한, 방법(1100)은 전처리 모듈에 의해 학습 이미지로부터 서로 다른 복수의 엣지 정보를 각각 포함하는 복수의 서브 학습 이미지를 추출하는 단계로 개시될 수도 있다. 여기서, 복수의 엣지 정보는 수평 방향의 엣지 정보, 수직 방향의 엣지 정보 및 대각선 방향의 엣지 정보 중 적어도 하나를 포함할 수 있다. 방법(1100)이 전처리 모듈에 의해 개시되는 경우, 메모리는 복수의 서브 학습 이미지 각각에 대한 패턴 검색을 수행하여 서로 다른 복수의 학습 패턴을 저장할 수 있다. 한편, 메모리는 서로 다른 복수의 학습 패턴 중 하나의 학습 패턴에 대응하는 제1 메모리 유닛 및 제1 메모리 유닛과 적어도 일부 중첩되는 제2 메모리 유닛을 포함할 수 있다. 이 경우, 제1 메모리 유닛이 하나의 학습 패턴에 대한 검색을 수행함에 따라, 제2 메모리 유닛이 하나의 학습 패턴에 대한 검색을 수행하도록 구성될 수 있다. 추가적으로 또는 대안적으로, 메모리는 제1 메모리 유닛과 적어도 일부 중첩되는 제3 메모리 유닛, 제4 메모리 유닛 및 제5 메모리 유닛을 더 포함할 수도 있다. 이 경우, 제2 메모리 유닛, 제3 메모리 유닛, 제4 메모리 유닛 및 제5 메모리 유닛 각각과 제1 메모리 유닛이 중첩된 영역은 서로 상이하게 구성될 수 있다.Referring to FIG. 11 , the method 1100 may be initiated by performing a pattern search on a learning image and storing a plurality of different learning patterns included in the learning image in a memory (S1110). Additionally, the method 1100 may be initiated with the step of extracting a plurality of sub-learning images, each containing a plurality of different edge information, from a learning image by a pre-processing module. Here, the plurality of edge information may include at least one of horizontal edge information, vertical edge information, and diagonal edge information. When the method 1100 is initiated by the pre-processing module, the memory may perform a pattern search for each of the plurality of sub-learning images and store a plurality of different learning patterns. Meanwhile, the memory may include a first memory unit corresponding to one learning pattern among a plurality of different learning patterns and a second memory unit at least partially overlapping with the first memory unit. In this case, as the first memory unit performs a search for one learning pattern, the second memory unit may be configured to perform a search for one learning pattern. Additionally or alternatively, the memory may further include a third memory unit, a fourth memory unit, and a fifth memory unit that at least partially overlap the first memory unit. In this case, the areas where each of the second, third, fourth, and fifth memory units and the first memory unit overlap may be configured differently.

일 실시예에 따르면, 장치는 검색 횟수 모듈에 의해 패턴 검색이 수행되는 동안 메모리에 저장된 복수의 학습 패턴 각각이 검색된 횟수를 저장할 수 있다(S1120). 그리고 나서, 장치는 검색 횟수 저장 모듈에 저장된 검색된 횟수를 기초로 복수의 학습 패턴 각각이 저장되는 메모리 상의 주소를 결정할 수 있다(S1130). 이 경우, 메모리는 대상 패턴과 동일한 학습 패턴이 저장된 주소를 출력하도록 구성될 수 있다.According to one embodiment, the device may store the number of times each of the plurality of learning patterns stored in the memory is searched while the pattern search is performed by the search count module (S1120). Then, the device may determine an address on the memory where each of the plurality of learning patterns is stored based on the search number stored in the search number storage module (S1130). In this case, the memory may be configured to output an address where a learning pattern identical to the target pattern is stored.

일 실시예에 따르면, 장치는 추론 과정에서 대상 패턴을 포함하는 이미지를 수신하고(S1140), 복수의 학습 패턴 중 대상 패턴과 동일한 학습 패턴이 저장된 메모리 상의 주소를 기초로 추론 이미지의 레이블을 출력할 수 있다(S1150). 한편, 학습 이미지는 서로 상이한 복수의 레이블과 각각 연관된 복수의 학습 이미지를 포함하고, 메모리는 복수의 레이블 각각과 대응되는 복수의 메모리 어레이를 포함할 수 있다. 이 경우, 장치는 복수의 메모리 어레이 각각이 출력한 대상 패턴과 동일한 학습 패턴이 저장된 복수의 주소를 기초로 추론 이미지의 레이블을 결정할 수 있다. According to one embodiment, the device receives an image including a target pattern during the inference process (S1140) and outputs a label of the inference image based on the address in the memory where a learning pattern identical to the target pattern among a plurality of learning patterns is stored. (S1150). Meanwhile, the learning image may include a plurality of learning images each associated with a plurality of different labels, and the memory may include a plurality of memory arrays corresponding to each of the plurality of labels. In this case, the device may determine the label of the inferred image based on a plurality of addresses where learning patterns identical to the target pattern output from each of the plurality of memory arrays are stored.

추가적으로, 복수의 메모리 어레이 각각은 미리 결정된 임계치를 기초로 상위 주소 그룹 및 하위 주소 그룹으로 구분될 수 있다. 이 경우, 장치는 복수의 메모리 어레이 각각에서 대상 패턴과 동일한 학습 패턴이 저장된 주소를 상기 임계치와 비교한 결과를 기초로 복수의 메모리 어레이 각각에 대한 복수의 히트 값을 획득하고, 복수의 히트 값을 서로 비교한 결과를 기초로 복수의 레이블 중 하나의 레이블을 추론 이미지의 레이블로서 출력할 수 있다. 이 때, 해당 하나의 레이블에 대응하는 메모리 어레이로부터 획득된 히트 값은 복수의 히트 값 중 가장 높은 값을 가질 수 있다.Additionally, each of the plurality of memory arrays may be divided into an upper address group and a lower address group based on a predetermined threshold. In this case, the device obtains a plurality of hit values for each of the plurality of memory arrays based on the result of comparing the address where the learning pattern identical to the target pattern is stored in each of the plurality of memory arrays with the threshold, and determines the plurality of hit values. Based on the results of the comparison, one label among the plurality of labels can be output as the label of the inferred image. At this time, the hit value obtained from the memory array corresponding to the one label may have the highest value among the plurality of hit values.

본 개시의 앞선 설명은 통상의 기술자들이 본 개시를 행하거나 이용하는 것을 가능하게 하기 위해 제공된다. 본 개시의 다양한 수정예들이 통상의 기술자들에게 쉽게 자명할 것이고, 본원에 정의된 일반적인 원리들은 본 개시의 취지 또는 범위를 벗어나지 않으면서 다양한 변형예들에 적용될 수도 있다. 따라서, 본 개시는 본원에 설명된 예들에 제한되도록 의도된 것이 아니고, 본원에 개시된 원리들 및 신규한 특징들과 일관되는 최광의의 범위가 부여되도록 의도된다.The preceding description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications of the present disclosure will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to the various modifications without departing from the spirit or scope of the present disclosure. Accordingly, this disclosure is not intended to be limited to the examples shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

본 명세서에서는 본 개시가 일부 실시예들과 관련하여 설명되었지만, 본 발명이 속하는 기술분야의 통상의 기술자가 이해할 수 있는 본 개시의 범위를 벗어나지 않는 범위에서 다양한 변형 및 변경이 이루어질 수 있다는 점을 알아야 할 것이다. 또한, 그러한 변형 및 변경은 본 명세서에서 첨부된 특허청구의 범위 내에 속하는 것으로 생각되어야 한다.Although the present disclosure has been described in relation to some embodiments in the specification, it should be noted that various modifications and changes can be made without departing from the scope of the present disclosure as can be understood by those skilled in the art. something to do. Additionally, such modifications and changes should be considered to fall within the scope of the claims appended hereto.

100: 패턴 학습을 통한 이미지 분류 장치
110: 메모리
120: 검색 횟수 저장 모듈
130: 제어 모듈
140: 레지스터
150: 클락

100: Image classification device through pattern learning
110: memory
120: Search count storage module
130: control module
140: register
150: Clark

Claims (11)

학습 이미지에 대한 패턴 검색을 수행하여 상기 학습 이미지에 포함된 서로 다른 복수의 학습 패턴을 저장하는 메모리;
상기 패턴 검색이 수행되는 동안 상기 메모리에 저장된 상기 복수의 학습 패턴 각각이 검색된 횟수를 저장하는 검색 횟수 저장 모듈; 및
상기 검색 횟수 저장 모듈에 저장된 검색된 횟수를 기초로 상기 복수의 학습 패턴 각각이 저장되는 상기 메모리 상의 주소를 결정하는 제어 모듈
을 포함하고,
상기 메모리는 상기 서로 다른 복수의 학습 패턴 중 하나의 학습 패턴에 대응하는 제1 메모리 유닛 및 상기 제1 메모리 유닛과 적어도 일부 중첩되는 제2 메모리 유닛을 포함하고,
상기 제1 메모리 유닛이 상기 하나의 학습 패턴에 대한 검색을 수행함에 따라, 상기 제2 메모리 유닛이 상기 하나의 학습 패턴에 대한 검색을 수행하도록 구성되고,
대상 패턴을 포함하는 추론 이미지가 입력된 경우, 상기 복수의 학습 패턴 중 상기 대상 패턴과 동일한 학습 패턴이 저장된 상기 메모리 상의 주소를 기초로 상기 추론 이미지의 레이블을 출력하도록 구성되는, 패턴 학습을 통한 이미지 분류 장치.
a memory that performs a pattern search on a learning image and stores a plurality of different learning patterns included in the learning image;
a search count storage module that stores the number of times each of the plurality of learning patterns stored in the memory is searched while the pattern search is performed; and
A control module that determines an address on the memory where each of the plurality of learning patterns is stored based on the number of searches stored in the search number storage module.
Including,
The memory includes a first memory unit corresponding to one learning pattern among the plurality of different learning patterns and a second memory unit at least partially overlapping with the first memory unit,
As the first memory unit performs a search for the one learning pattern, the second memory unit is configured to perform a search for the one learning pattern,
An image through pattern learning, configured to output a label of the inference image based on an address in the memory where a learning pattern identical to the target pattern among the plurality of learning patterns is stored when an inference image including a target pattern is input. Sorting device.
제1항에 있어서,
상기 메모리는 상기 제1 메모리 유닛과 적어도 일부 중첩되는 제3 메모리 유닛, 제4 메모리 유닛 및 제5 메모리 유닛을 더 포함하고,
상기 제2 메모리 유닛, 상기 제3 메모리 유닛, 상기 제4 메모리 유닛 및 상기 제5 메모리 유닛 각각과 상기 제1 메모리 유닛이 중첩된 영역은 서로 상이하게 구성되는, 패턴 학습을 통한 이미지 분류 장치.
According to paragraph 1,
The memory further includes a third memory unit, a fourth memory unit, and a fifth memory unit that at least partially overlaps the first memory unit,
An image classification device through pattern learning, wherein areas where each of the second memory unit, the third memory unit, the fourth memory unit, and the fifth memory unit and the first memory unit overlap are configured differently.
제1항에 있어서,
상기 학습 이미지로부터 서로 다른 복수의 엣지 정보를 각각 포함하는 복수의 서브 학습 이미지를 추출하는 이미지 전처리 모듈
을 더 포함하고,
상기 메모리는 상기 복수의 서브 학습 이미지 각각에 대한 상기 패턴 검색을 수행하여 상기 서로 다른 복수의 학습 패턴을 저장하는, 패턴 학습을 통한 이미지 분류 장치.
According to paragraph 1,
An image pre-processing module that extracts a plurality of sub-learning images each containing a plurality of different edge information from the learning image.
It further includes,
The memory performs the pattern search for each of the plurality of sub-learning images and stores the plurality of different learning patterns.
제2항에 있어서,
상기 복수의 엣지 정보는 수평 방향의 엣지 정보, 수직 방향의 엣지 정보 및 대각선 방향의 엣지 정보 중 적어도 하나를 포함하는, 패턴 학습을 통한 이미지 분류 장치.
According to paragraph 2,
The plurality of edge information includes at least one of horizontal edge information, vertical edge information, and diagonal edge information.
제1항에 있어서,
상기 추론 이미지가 입력된 경우, 상기 메모리는 상기 대상 패턴과 동일한 학습 패턴이 저장된 주소를 출력하도록 구성되는, 패턴 학습을 통한 이미지 분류 장치.
According to paragraph 1,
When the inferred image is input, the memory is configured to output an address where a learned pattern identical to the target pattern is stored.
제1항에 있어서,
상기 학습 이미지는 서로 상이한 복수의 레이블과 각각 연관된 복수의 학습 이미지를 포함하고,
상기 메모리는 상기 복수의 레이블 각각과 대응되는 복수의 메모리 어레이를 포함하는, 패턴 학습을 통한 이미지 분류 장치.
According to paragraph 1,
The learning image includes a plurality of learning images each associated with a plurality of different labels,
The memory includes a plurality of memory arrays corresponding to each of the plurality of labels.
제6항에 있어서,
상기 추론 이미지가 입력된 경우, 상기 복수의 메모리 어레이 각각이 출력한 상기 대상 패턴과 동일한 학습 패턴이 저장된 복수의 주소를 기초로 상기 추론 이미지의 레이블을 결정하는, 패턴 학습을 통한 이미지 분류 장치.
According to clause 6,
When the inferred image is input, an image classification device through pattern learning that determines the label of the inferred image based on a plurality of addresses where learning patterns identical to the target pattern output from each of the plurality of memory arrays are stored.
제7항에 있어서,
상기 복수의 메모리 어레이 각각은 미리 결정된 임계치를 기초로 상위 주소 그룹 및 하위 주소 그룹으로 구분되고,
상기 추론 이미지가 입력된 경우, 상기 복수의 메모리 어레이 각각에서 상기 대상 패턴과 동일한 학습 패턴이 저장된 주소를 상기 임계치와 비교한 결과를 기초로 상기 복수의 메모리 어레이 각각에 대한 복수의 히트 값을 획득하고,
상기 복수의 히트 값을 서로 비교한 결과를 기초로 상기 복수의 레이블 중 하나의 레이블을 상기 추론 이미지의 레이블로서 출력하는, 패턴 학습을 통한 이미지 분류 장치.
In clause 7,
Each of the plurality of memory arrays is divided into an upper address group and a lower address group based on a predetermined threshold,
When the inferred image is input, a plurality of hit values are obtained for each of the plurality of memory arrays based on a result of comparing an address where a learning pattern identical to the target pattern is stored in each of the plurality of memory arrays with the threshold, and ,
An image classification device through pattern learning that outputs one label among the plurality of labels as a label of the inferred image based on a result of comparing the plurality of hit values.
제8항에 있어서,
상기 하나의 레이블에 대응하는 메모리 어레이로부터 획득된 히트 값은 상기 복수의 히트 값 중 가장 높은 값을 갖는, 패턴 학습을 통한 이미지 분류 장치.
According to clause 8,
An image classification device through pattern learning, wherein the hit value obtained from the memory array corresponding to the one label has the highest value among the plurality of hit values.
메모리에 의해 학습 이미지에 대한 패턴 검색을 수행하여 상기 학습 이미지에 포함된 서로 다른 복수의 학습 패턴을 저장하는 단계;
검색 횟수 저장 모듈에 의해 상기 패턴 검색이 수행되는 동안 상기 메모리에 저장된 상기 복수의 학습 패턴 각각이 검색된 횟수를 저장하는 단계;
제어 모듈에 의해 상기 검색 횟수 저장 모듈에 저장된 검색된 횟수를 기초로 상기 복수의 학습 패턴 각각이 저장되는 상기 메모리 상의 주소를 결정하는 단계;
대상 패턴을 포함하는 추론 이미지를 수신하는 단계; 및
상기 복수의 학습 패턴 중 상기 대상 패턴과 동일한 학습 패턴이 저장된 상기 메모리 상의 주소를 기초로 상기 추론 이미지의 레이블을 출력하는 단계
를 포함하고,
상기 메모리는 상기 서로 다른 복수의 학습 패턴 중 하나의 학습 패턴에 대응하는 제1 메모리 유닛 및 상기 제1 메모리 유닛과 적어도 일부 중첩되는 제2 메모리 유닛을 포함하고,
상기 제1 메모리 유닛이 상기 하나의 학습 패턴에 대한 검색을 수행함에 따라, 상기 제2 메모리 유닛이 상기 하나의 학습 패턴에 대한 검색을 수행하도록 구성되는, 패턴 학습을 통한 이미지 분류 방법.
Performing a pattern search for a learning image using a memory and storing a plurality of different learning patterns included in the learning image;
storing the number of times each of the plurality of learning patterns stored in the memory is searched while the pattern search is performed by a search number storage module;
determining, by a control module, an address on the memory where each of the plurality of learning patterns is stored based on the search number stored in the search number storage module;
Receiving an inferred image including a target pattern; and
Outputting a label of the inferred image based on an address in the memory where a learning pattern identical to the target pattern among the plurality of learning patterns is stored.
Including,
The memory includes a first memory unit corresponding to one learning pattern among the plurality of different learning patterns and a second memory unit at least partially overlapping with the first memory unit,
As the first memory unit performs a search for the one learning pattern, the second memory unit is configured to perform a search for the one learning pattern.
제10항에 기재된 패턴 학습을 통한 이미지 분류 방법을 실행시키도록 컴퓨터로 판독 가능한 기록 매체에 기록된 컴퓨터 프로그램.
A computer program recorded on a computer-readable recording medium to execute the image classification method through pattern learning according to claim 10.
KR1020220155547A 2022-11-18 2022-11-18 Apparatus and method for image classification through pattern learning KR20240073558A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020220155547A KR20240073558A (en) 2022-11-18 2022-11-18 Apparatus and method for image classification through pattern learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220155547A KR20240073558A (en) 2022-11-18 2022-11-18 Apparatus and method for image classification through pattern learning

Publications (1)

Publication Number Publication Date
KR20240073558A true KR20240073558A (en) 2024-05-27

Family

ID=91332390

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220155547A KR20240073558A (en) 2022-11-18 2022-11-18 Apparatus and method for image classification through pattern learning

Country Status (1)

Country Link
KR (1) KR20240073558A (en)

Similar Documents

Publication Publication Date Title
US9665083B2 (en) Counter operation in a state machine lattice
US10521366B2 (en) System and method for individual addressing
US9208374B2 (en) Information processing apparatus, control method therefor, and electronic device
US10698697B2 (en) Adaptive routing to avoid non-repairable memory and logic defects on automata processor
Wang et al. CDPM: Convolutional deformable part models for semantically aligned person re-identification
US11829730B2 (en) Elements for in-memory compute
US11526803B2 (en) Learning device and method for implementation of gradient boosted decision trees
US20190378046A1 (en) Learning and discrimination device, and learning and discrimination method
WO2019235636A1 (en) Learning device, and learning method
US20200143284A1 (en) Learning device and learning method
US20200050933A1 (en) Learning device and learning method
US20180113951A1 (en) Graph traversal using automata processor
US11599824B2 (en) Learning device and learning method
KR20240073558A (en) Apparatus and method for image classification through pattern learning
US11776650B2 (en) Memory calibration device, system and method
JP2019160256A (en) Learning discrimination device and method for learning discrimination
Deleu et al. Learning operations on a stack with Neural Turing Machines
KR20240001916A (en) Apparatus and method for image classification through pattern learning
Zhou et al. A high performance k-NN classifier using a binary correlation matrix memory
KR20240084914A (en) Device and method for optimizing memory usage in image classification
Ahmadi et al. An associative memory-based learning model with an efficient hardware implementation in FPGA
CN109902724A (en) Character recognition method, device and computer equipment based on support vector machines
Rabby et al. Towards building a robust large-scale bangla text recognition solution using a unique multiple-domain character-based document recognition approach
Wang et al. Offset neural network for document orientation identification
RU2762781C1 (en) Matrix device for parallel search of occurrences and data processing