KR20230163183A - Anomaly detection method and appratus using neural network - Google Patents

Anomaly detection method and appratus using neural network Download PDF

Info

Publication number
KR20230163183A
KR20230163183A KR1020220062952A KR20220062952A KR20230163183A KR 20230163183 A KR20230163183 A KR 20230163183A KR 1020220062952 A KR1020220062952 A KR 1020220062952A KR 20220062952 A KR20220062952 A KR 20220062952A KR 20230163183 A KR20230163183 A KR 20230163183A
Authority
KR
South Korea
Prior art keywords
neural network
encoder
deep features
outlier detection
network model
Prior art date
Application number
KR1020220062952A
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 KR1020220062952A priority Critical patent/KR20230163183A/en
Publication of KR20230163183A publication Critical patent/KR20230163183A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • 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)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Neurology (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)

Abstract

뉴럴 네트워크를 이용하여 이상치를 탐지하는 전자 장치가 개시된다. 일 실시예에 따른 전자 장치는 메모리, 송수신기, 및 프로세서를 포함하고, 상기 프로세서는, 입력 이미지에 기초하여 산출된 심층 특징(feature) 및 상기 심층 특징의 평균에 기초하여 상기 입력 이미지에 대응하는 이상치를 탐지하도록 미리 학습된 뉴럴 네트워크 모델에 기초하여, 상기 입력 이미지의 이상치를 탐지할 수 있다.An electronic device for detecting outliers using a neural network is disclosed. An electronic device according to an embodiment includes a memory, a transceiver, and a processor, wherein the processor determines an abnormality corresponding to the input image based on deep features calculated based on an input image and an average of the deep features. Based on a neural network model previously trained to detect values, outliers in the input image can be detected.

Description

뉴럴 네트워크를 이용한 이상치 탐지 방법 및 장치{ANOMALY DETECTION METHOD AND APPRATUS USING NEURAL NETWORK}Outlier detection method and device using neural network {ANOMALY DETECTION METHOD AND APPRATUS USING NEURAL NETWORK}

아래 실시예들은 뉴럴 네트워크를 이용한 이상치 탐지 방법 및 장치에 관한 것이다. The following embodiments relate to an outlier detection method and device using a neural network.

이상치 탐지(Anomaly Detection)란 정상 샘플과 비정상 샘플을 구별해내는 데이터 분석 방법 또는 프로세스를 의미하며 제조업 뿐만 아니라 CCTV, 의료, 소셜 네트워크 등 다양한 분야에서 응용되고 연구되고 있다. 이상치 탐지 방법은 비정상적인 공정 패턴을 감지하는 데 유용하게 사용되며, 식품 업계에서는 이물질 탐지로 응용될 수 있다.Anomaly detection refers to a data analysis method or process that distinguishes between normal and abnormal samples, and is applied and studied in various fields such as manufacturing, CCTV, medical care, and social networks. Outlier detection methods are useful for detecting abnormal process patterns and can be applied to detect foreign substances in the food industry.

최근 딥러닝(Deep Learning) 기술이 발전되면서 뉴럴 네트워크(Neural Network)등을 이용한 이상치 검출 방법들이 다양한 응용 기술들에 제안되어왔고, 오토 인코더(Auto-encoder)의 데이터 복원(Reconstruction) 기능을 응용해 이상치 탐지를 시도하는 사례가 증가하고 있다. With the recent development of deep learning technology, outlier detection methods using neural networks have been proposed in various application technologies, and the data reconstruction function of the auto-encoder has been applied. The number of cases attempting to detect outliers is increasing.

그러나, 오토 인코더의 코드 사이즈와 같은 압축 정도에 따라 데이터의 복원 성능이 좌우되기 때문에, 오토 인코더의 입력과 출력의 차이를 어떻게 정의할 것인지, 어떤 손실 함수를 사용하여 오토 인코더를 학습시킬지 등을 포함하는 다수의 요인에 따라 양불 판정의 정확도가 다소 낮을 수 있다는 문제점이 있다. 따라서, 딥러닝 뉴럴 네트워크를 이용한 이상치 탐지 방법이 안정성 및 성능 면에서 개선될 필요성이 있다.However, since data restoration performance depends on the degree of compression, such as the code size of the autoencoder, it is important to include how to define the difference between the input and output of the autoencoder and what loss function to use to train the autoencoder. There is a problem that the accuracy of pass/fail judgment may be somewhat low depending on a number of factors. Therefore, there is a need for outlier detection methods using deep learning neural networks to be improved in terms of stability and performance.

실시예들은 뉴럴 네트워크를 이용한 이상치 탐지 방법 및 장치를 제공하는 데에 그 목적이 있다.The purpose of the embodiments is to provide an outlier detection method and device using a neural network.

다만, 본 개시가 해결하고자 하는 기술적 과제들은 상술한 기술적 과제들로 한정되는 것은 아니며, 또 다른 기술적 과제들이 존재할 수 있다.However, the technical problems that the present disclosure seeks to solve are not limited to the above-described technical problems, and other technical problems may exist.

일 실시예에 따른 뉴럴 네트워크를 이용하여 이상치를 탐지하는 이상치 탐지 장치는 메모리; 송수신기; 및 프로세서를 포함하고, 상기 프로세서는, 입력 이미지에 기초하여 산출된 심층 특징(feature) 및 상기 심층 특징의 평균에 기초하여 상기 입력 이미지에 대응하는 이상치를 탐지하도록 미리 학습된 뉴럴 네트워크 모델에 기초하여, 상기 입력 이미지의 이상치를 탐지할 수 있다.An outlier detection device that detects outliers using a neural network according to an embodiment includes: a memory; transceiver; and a processor, wherein the processor detects an outlier corresponding to the input image based on deep features calculated based on the input image and an average of the deep features. , it is possible to detect outliers in the input image.

상기 뉴럴 네트워크 모델은, 인코더를 통해 산출된 심층 특징 및 상기 심층 특징의 평균에 기초하여 생성되는 관계 벡터를 입력으로 하여 관계 점수(Relation Score)를 산출하도록 미리 학습된 인코더를 포함할 수 있다.The neural network model may include an encoder trained in advance to calculate a relationship score using deep features calculated through the encoder and a relationship vector generated based on the average of the deep features as input.

상기 뉴럴 네트워크는, 상기 입력 이미지에 기초하여 심층 특징을 산출하는 제1 인코더; 상기 입력 이미지에 기초하여 심층 특징을 산출하는 제2 인코더; 및 상기 제1 인코더로부터 산출된 심층 특징 및 상기 심층 특징의 평균에 기초하여 생성되는 상기 관계 벡터를 입력으로 하여 관계 점수를 출력하는 제3 인코더를 포함할 수 있다.The neural network includes a first encoder that calculates deep features based on the input image; a second encoder that calculates deep features based on the input image; And it may include a third encoder that outputs a relationship score by inputting the deep features calculated from the first encoder and the relationship vector generated based on the average of the deep features.

상기 뉴럴 네트워크 모델은, 수학식 1의 손실 함수를 통해 산출되는 손실값이 최소화되는 방향으로 학습되고, 상기 수학식 1은,이고, 상기는 손실 함수, 는 제2 인코더의 출력, 는 제3 인코더의 출력, 상기 N은 학습 데이터의 개수, 상기 i번째 학습 데이터에 대한 상기 뉴럴 네트워크의 최종 출력의 정답값, 상기 는 i번째 학습 데이터에 대응하는 관계 점수로, i번째 학습 데이터에 대한 상기 뉴럴 네트워크의 출력을 의미할 수 있다.The neural network model is learned in a way that minimizes the loss value calculated through the loss function of Equation 1, and Equation 1 is: And, the above is the loss function, is the output of the second encoder, is the output of the third encoder, N is the number of training data, The correct answer value of the final output of the neural network for the ith learning data, is a relationship score corresponding to the i-th learning data, and may mean the output of the neural network for the i-th learning data.

일 실시예에 따른 뉴럴 네트워크를 이용하여 이상치를 탐지하는 이상치 탐지 방법은 입력 이미지에 기초하여 심층 특징(feature)을 산출하는 단계; 상기 심층 특징의 평균을 산출하는 단계; 및 상기 평균 및 상기 심층 특징에 기초하여 상기 입력 이미지에 대응하는 이상치를 탐지하도록 미리 학습된 뉴럴 네트워크 모델에 기초하여, 상기 입력 이미지의 이상치를 탐지하는 단계를 포함할 수 있다.An outlier detection method for detecting outliers using a neural network according to an embodiment includes calculating deep features based on an input image; calculating an average of the deep features; and detecting outliers in the input image based on a neural network model previously trained to detect outliers corresponding to the input image based on the average and the deep features.

일 실시예에 따른 전자 장치는 메모리; 송수신기; 및 프로세서를 포함하고, 상기 프로세서는, 학습 데이터에 포함된 이미지에 기초하여 산출된 심층 특징(feature) 및 상기 심층 특징의 평균에 기초하여 산출된 손실함수에 기초하여 상기 이미지에 대응하는 이상치를 탐지하도록 뉴럴 네트워크 모델을 학습시킬 수 있다.An electronic device according to one embodiment includes memory; transceiver; and a processor, wherein the processor detects an outlier corresponding to the image based on a deep feature calculated based on an image included in learning data and a loss function calculated based on an average of the deep feature. You can train a neural network model to do this.

도 1은 일 실시예에 따른 이상치를 탐지하는 전자 장치의 개략적인 블록도를 나타낸다.
도 2는 뉴럴 네트워크 모델에 포함되는 인코더를 설명하기 위한 도면이다.
도 3은 일 실시예에 따른 이상치 탐지 장치를 통해 수행되는 이상치 탐지 알고리즘을 설명하기 위한 도면이다.
도 4는 뉴럴 네트워크 모델을 학습시키는 알고리즘의 순서를 나타낸다.
도 5 및 도 6은 정상 데이터가 딸기잼 이미지일 때 이상치 탐지 장치의 성능을 도시하는 도면이다.
도 7 및 도 8은 정상 데이터가 무화과 이미지일 때 이상치 탐지 장치의 성능을 도시하는 도면이다.
도 9 및 도 10은 정상 데이터가 쥐포 이미지일 때 이상치 탐지 장치의 성능을 도시하는 도면이다.
도 11은 일 실시예에 따른 이상치를 탐지하는 방법을 설명하기 위한 순서도이다.
도 12는 일 실시예에 따른 이상치 탐지 장치에서 활용되는 뉴럴 네트워크 모델을 학습시키는 방법을 설명하기 위한 순서도이다.
1 shows a schematic block diagram of an electronic device for detecting an outlier according to an embodiment.
Figure 2 is a diagram for explaining the encoder included in the neural network model.
Figure 3 is a diagram for explaining an outlier detection algorithm performed by an outlier detection device according to an embodiment.
Figure 4 shows the sequence of the algorithm for training a neural network model.
Figures 5 and 6 are diagrams showing the performance of the outlier detection device when normal data is a strawberry jam image.
Figures 7 and 8 are diagrams showing the performance of an outlier detection device when normal data is a fig image.
Figures 9 and 10 are diagrams showing the performance of an outlier detection device when normal data is a mouse gun image.
Figure 11 is a flowchart explaining a method for detecting an outlier according to an embodiment.
FIG. 12 is a flowchart illustrating a method of learning a neural network model used in an outlier detection device according to an embodiment.

본 명세서에 개시되어 있는 본 발명의 개념에 따른 실시예들에 대해서 특정한 구조적 또는 기능적 설명들은 단지 본 발명의 개념에 따른 실시예들을 설명하기 위한 목적으로 예시된 것으로서, 본 발명의 개념에 따른 실시예들은 다양한 형태로 실시될 수 있으며 본 명세서에 설명된 실시예들에 한정되지 않는다.Specific structural or functional descriptions of the embodiments according to the concept of the present invention disclosed in this specification are merely illustrative for the purpose of explaining the embodiments according to the concept of the present invention. They may be implemented in various forms and are not limited to the embodiments described herein.

본 발명의 개념에 따른 실시예들은 다양한 변경들을 가할 수 있고 여러 가지 형태들을 가질 수 있으므로 실시예들을 도면에 예시하고 본 명세서에 상세하게 설명하고자 한다. 그러나, 이는 본 발명의 개념에 따른 실시예들을 특정한 개시형태들에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 변경, 균등물, 또는 대체물을 포함한다.Since the embodiments according to the concept of the present invention can make various changes and have various forms, the embodiments will be illustrated in the drawings and described in detail in this specification. However, this is not intended to limit the embodiments according to the concept of the present invention to specific disclosed forms, and includes changes, equivalents, or substitutes included in the spirit and technical scope of the present invention.

제1 또는 제2 등의 용어를 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만, 예를 들어 본 발명의 개념에 따른 권리 범위로부터 이탈되지 않은 채, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.Terms such as first or second may be used to describe various components, but the components should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another component, for example, a first component may be named a second component, without departing from the scope of rights according to the concept of the present invention, Similarly, the second component may also be referred to as the first component.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 구성요소들 간의 관계를 설명하는 표현들, 예를 들어 "~사이에"와 "바로~사이에" 또는 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.When a component is said to be "connected" or "connected" to another component, it is understood that it may be directly connected to or connected to the other component, but that other components may exist in between. It should be. On the other hand, when it is mentioned that a component is “directly connected” or “directly connected” to another component, it should be understood that there are no other components in between. Expressions that describe the relationship between components, such as “between”, “immediately between” or “directly adjacent to”, should be interpreted similarly.

본 명세서에서 사용한 용어는 단지 특정한 실시예들을 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 설시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함으로 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used herein is only used to describe specific embodiments and is not intended to limit the invention. Singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, terms such as "include" or "have" are intended to designate the presence of a described feature, number, step, operation, component, part, or combination thereof, and one or more other features or numbers, It should be understood that this does not exclude in advance the possibility of the presence or addition of steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by a person of ordinary skill in the technical field to which the present invention pertains. Terms as defined in commonly used dictionaries should be interpreted as having meanings consistent with the meanings they have in the context of the related technology, and unless clearly defined in this specification, should not be interpreted in an idealized or overly formal sense. No.

본 명세서에서의 프로세서(processor)는 본 명세서에서 설명되는 각 명칭에 따른 기능과 동작을 수행할 수 있는 하드웨어를 의미할 수도 있고, 특정 기능과 동작을 수행할 수 있는 컴퓨터 프로그램 코드를 의미할 수도 있고, 또는 특정 기능과 동작을 수행시킬 수 있는 컴퓨터 프로그램 코드가 탑재된 전자적 기록 매체를 의미할 수 있다.Processor in this specification may mean hardware that can perform functions and operations according to each name described in this specification, or may mean computer program code that can perform specific functions and operations. , or it may mean an electronic recording medium loaded with computer program code that can perform specific functions and operations.

다시 말해, 프로세서란 본 발명의 기술적 사상을 수행하기 위한 하드웨어 및/또는 상기 하드웨어를 구동하기 위한 소프트웨어의 기능적 및/또는 구조적 결합을 의미할 수 있다.In other words, a processor may mean a functional and/or structural combination of hardware for carrying out the technical idea of the present invention and/or software for driving the hardware.

이하, 실시예들을 첨부된 도면을 참조하여 상세하게 설명한다. 그러나, 특허출원의 범위가 이러한 실시예들에 의해 제한되거나 한정되는 것은 아니다. 각 도면에 제시된 동일한 참조 부호는 동일한 부재를 나타낸다.Hereinafter, embodiments will be described in detail with reference to the attached drawings. However, the scope of the patent application is not limited or limited by these examples. The same reference numerals in each drawing indicate the same members.

도 1은 일 실시예에 따른 이상치를 탐지하는 전자 장치의 개략적인 블록도를 나타낸다.1 shows a schematic block diagram of an electronic device for detecting an outlier according to an embodiment.

도 1을 참조하면, 이상치를 탐지하는 전자 장치(10)는 입력 이미지의 이상치를 탐지할 수 있다. 이상치를 탐지하는 전자 장치(10)는 '이상치 탐지 장치'로 지칭될 수 있다. 또한, 전자 장치(10)가 이하 설명되는 뉴럴 네트워크 모델을 학습시키는 과정에서는 '학습 장치'로 지칭될 수도 있다.Referring to FIG. 1, the electronic device 10 that detects outliers can detect outliers in an input image. The electronic device 10 that detects outliers may be referred to as an ‘outlier detection device’. Additionally, the electronic device 10 may be referred to as a 'learning device' during the process of training the neural network model described below.

예시적으로, 이상치 탐지 장치(10)는 정상 데이터가 딸기잼을 포함하는 이미지일 때 빨간 실 등의 이물질을 이상치로 탐지할 수 있다. 이상치 탐지 장치(10)는 이미지를 입력 받아 뉴럴 네트워크 모델을 이용하여 이미지를 처리함으로써 이미지에서 이상치에 대한 탐지를 수행할 수 있고, 이상치 탐지 결과를 출력할 수 있다. 이상치 탐지 결과는 이미지, 특정 값 또는 그래프로 표현될 수 있으며, 본 개시의 기술적 사상은 이에 한정되지 않는다. 이미지는 빛의 굴절이나 반사 등에 의하여 이루어진 물체의 상을 포함하는 것으로, 선이나 색채를 이용하여 사물의 형상을 나타낸 것을 의미할 수 있다. 이미지는 컴퓨터가 처리할 수 있는 형태로 된 정보로 이루어질 수 있고, 일 실시 예에 따라, 이미지는 초분광 이미지일 수 있다. 초분광 분석이란 보이지 않는 스펙트럼 영역까지 빛을 잘게 분리 및 감지하여 물질 특성을 분석하는 기술로, 초분광 이미지는 객체를 보이지 않는 빛까지 파장별로 잘게 나누어 기록된 이미지(들)을 의미할 수 있다.As an example, the outlier detection device 10 may detect a foreign substance such as a red thread as an outlier when normal data is an image containing strawberry jam. The outlier detection device 10 can receive an image as an input and process the image using a neural network model to detect outliers in the image and output an outlier detection result. The outlier detection result may be expressed as an image, a specific value, or a graph, but the technical idea of the present disclosure is not limited thereto. An image includes an image of an object created by refraction or reflection of light, and may mean representing the shape of the object using lines or colors. The image may consist of information in a form that can be processed by a computer, and according to one embodiment, the image may be a hyperspectral image. Hyperspectral analysis is a technology that analyzes material properties by finely separating and detecting light up to the invisible spectrum region. Hyperspectral images can refer to image(s) recorded by dividing an object by wavelength into invisible light.

뉴럴 네트워크 모델(또는 인공 신경망)은 기계학습과 인지과학에서 생물학의 신경을 모방한 통계학적 학습 알고리즘을 포함할 수 있다. 일 실시 예에 따른 이상치 탐지 장치(10)는 뉴럴 네트워크 모델을 통해 입력 이미지로부터 이상치를 탐지할 수 있다. 뉴럴 네트워크 모델은 시냅스의 결합으로 네트워크를 형성한 인공 뉴런(노드)이 학습을 통해 시냅스의 결합 세기를 변화시켜, 문제 해결 능력을 가지는 모델 전반을 의미할 수 있다. 일 실시예에 따른 뉴럴 네트워크 모델은 복수의 인코더가 결합된 구조일 수 있으며, 뉴럴 네트워크 모델의 구조에 대한 상세한 내용은 이하에서 후술한다.Neural network models (or artificial neural networks) can include statistical learning algorithms that mimic neurons in biology in machine learning and cognitive science. The outlier detection device 10 according to an embodiment can detect outliers from an input image through a neural network model. A neural network model can refer to an overall model in which artificial neurons (nodes), which form a network through the combination of synapses, change the strength of the synapse connection through learning and have problem-solving capabilities. The neural network model according to one embodiment may have a structure in which a plurality of encoders are combined, and details about the structure of the neural network model will be described later.

뉴럴 네트워크 모델의 뉴런은 가중치 또는 바이어스의 조합을 포함할 수 있다. 뉴럴 네트워크 모델은 하나 이상의 뉴런 또는 노드로 구성된 하나 이상의 레이어(layer)를 포함할 수 있다. 뉴럴 네트워크 모델은 뉴런의 가중치를 학습을 통해 변화시킴으로써 임의의 입력으로부터 예측하고자 하는 결과를 추론할 수 있다.Neurons in a neural network model can contain combinations of weights or biases. A neural network model may include one or more layers consisting of one or more neurons or nodes. A neural network model can infer the result to be predicted from arbitrary input by changing the weight of neurons through learning.

뉴럴 네트워크 모델은 심층 뉴럴 네트워크 (Deep Neural Network)를 포함할 수 있다. 뉴럴 네트워크 모델은 CNN(Convolutional Neural Network), RNN(Recurrent Neural Network), 퍼셉트론(perceptron), 다층 퍼셉트론(multilayer perceptron), FF(Feed Forward), RBF(Radial Basis Network), DFF(Deep Feed Forward), LSTM(Long Short Term Memory), GRU(Gated Recurrent Unit), AE(Auto Encoder), VAE(Variational Auto Encoder), DAE(Denoising Auto Encoder), SAE(Sparse Auto Encoder), MC(Markov Chain), HN(Hopfield Network), BM(Boltzmann Machine), RBM(Restricted Boltzmann Machine), DBN(Depp Belief Network), DCN(Deep Convolutional Network), DN(Deconvolutional Network), DCIGN(Deep Convolutional Inverse Graphics Network), GAN(Generative Adversarial Network), LSM(Liquid State Machine), ELM(Extreme Learning Machine), ESN(Echo State Network), DRN(Deep Residual Network), DNC(Differentiable Neural Computer), NTM(Neural Turning Machine), CN(Capsule Network), KN(Kohonen Network) 및 AN(Attention Network)를 포함할 수 있으나 이에 한정되는 것이 아닌 임의의 뉴럴 네트워크를 포함할 수 있음은 통상의 기술자가 이해할 것이다.Neural network models may include deep neural networks. Neural network models include CNN (Convolutional Neural Network), RNN (Recurrent Neural Network), perceptron, multilayer perceptron, FF (Feed Forward), RBF (Radial Basis Network), DFF (Deep Feed Forward), LSTM (Long Short Term Memory), GRU (Gated Recurrent Unit), AE (Auto Encoder), VAE (Variational Auto Encoder), DAE (Denoising Auto Encoder), SAE (Sparse Auto Encoder), MC (Markov Chain), HN ( Hopfield Network), BM (Boltzmann Machine), RBM (Restricted Boltzmann Machine), DBN (Depp Belief Network), DCN (Deep Convolutional Network), DN (Deconvolutional Network), DCIGN (Deep Convolutional Inverse Graphics Network), GAN (Generative Adversarial) Network), LSM (Liquid State Machine), ELM (Extreme Learning Machine), ESN (Echo State Network), DRN (Deep Residual Network), DNC (Differentiable Neural Computer), NTM (Neural Turning Machine), CN (Capsule Network) , a Kohonen Network (KN), and an Attention Network (AN), but those skilled in the art will understand that it may include any neural network, but is not limited thereto.

이상치 탐지 장치(10)는 마더보드(motherboard)와 같은 인쇄 회로 기판(printed circuit board(PCB)), 집적 회로(integrated circuit(IC)), 또는 SoC(system on chip)로 구현될 수 있다. 예를 들어, 이상치 탐지 장치(10)는 애플리케이션 프로세서(application processor)로 구현될 수 있다.The outlier detection device 10 may be implemented with a printed circuit board (PCB) such as a motherboard, an integrated circuit (IC), or a system on chip (SoC). For example, the outlier detection device 10 may be implemented with an application processor.

또한, 이상치 탐지 장치(10)는 PC(personal computer), 데이터 서버, 또는 휴대용 장치 내에 구현될 수 있다.Additionally, the outlier detection device 10 may be implemented in a personal computer (PC), a data server, or a portable device.

휴대용 장치는 랩탑(laptop) 컴퓨터, 이동 전화기, 스마트 폰(smart phone), 태블릿(tablet) PC, 모바일 인터넷 디바이스(mobile internet device(MID)), PDA(personal digital assistant), EDA(enterprise digital assistant), 디지털 스틸 카메라(digital still camera), 디지털 비디오 카메라(digital video camera), PMP(portable multimedia player), PND(personal navigation device 또는 portable navigation device), 휴대용 게임 콘솔(handheld game console), e-북(e-book), 또는 스마트 디바이스(smart device)로 구현될 수 있다. 스마트 디바이스는 스마트 와치(smart watch), 스마트 밴드(smart band), 또는 스마트 링(smart ring)으로 구현될 수 있다.Portable devices include laptop computers, mobile phones, smart phones, tablet PCs, mobile internet devices (MIDs), personal digital assistants (PDAs), and enterprise digital assistants (EDAs). , digital still camera, digital video camera, portable multimedia player (PMP), personal navigation device or portable navigation device (PND), handheld game console, e-book ( It can be implemented as an e-book) or a smart device. A smart device may be implemented as a smart watch, smart band, or smart ring.

이상치 탐지 장치(10)는 송수신기(100) 및 프로세서(200)를 포함한다. 이상치 탐지 장치(10)는 메모리(300)를 더 포함할 수 있다.The outlier detection device 10 includes a transceiver 100 and a processor 200. The outlier detection device 10 may further include a memory 300.

송수신기(100)는 초분광 이미지(Hyperspectral Images)를 포함하는 초분광 데이터를 송신 또는 수신할 수 있다. 송수신기(100)는 송신 인터페이스 또는 수신 인터페이스를 포함할 수 있다. 예시적으로, 송수신기(100)는 입력된 초분광 데이터를 프로세서(200)로 출력할 수 있다. 다른 예로, 송수신기(100)는 입력된 초분광 데이터로부터 획득된 데이터(예를 들어, 초분광 이미지를 벡터화한 데이터)를 프로세서(200)로 출력할 수도 있다.The transceiver 100 may transmit or receive hyperspectral data including hyperspectral images. The transceiver 100 may include a transmission interface or a reception interface. Illustratively, the transceiver 100 may output the input hyperspectral data to the processor 200. As another example, the transceiver 100 may output data obtained from input hyperspectral data (for example, vectorized data of a hyperspectral image) to the processor 200.

프로세서(200)는 뉴럴 네트워크 모델을 통해 입력된 초분광 데이터로부터 이상치를 탐지할 수 있으며, 뉴럴 네트워크 모델은 복수의 인코더가 결합된 구조를 포함할 수 있다.The processor 200 may detect outliers from hyperspectral data input through a neural network model, and the neural network model may include a structure in which a plurality of encoders are combined.

프로세서(200)는 메모리(300)에 저장된 데이터를 처리할 수 있다. 프로세서(200)는 메모리(300)에 저장된 컴퓨터로 읽을 수 있는 코드(예를 들어, 소프트웨어) 및 프로세서(200)에 의해 유발된 인스트럭션(instruction)들을 실행할 수 있다. The processor 200 may process data stored in the memory 300. The processor 200 may execute computer-readable code (eg, software) stored in the memory 300 and instructions triggered by the processor 200 .

"프로세서(200)"는 목적하는 동작들(desired operations)을 실행시키기 위한 물리적인 구조를 갖는 회로를 포함하는 하드웨어로 구현된 데이터 처리 장치일 수 있다. 예를 들어, 목적하는 동작들은 프로그램에 포함된 코드(code) 또는 인스트럭션들(instructions)을 포함할 수 있다.The “processor 200” may be a data processing device implemented in hardware that includes a circuit with a physical structure for executing desired operations. For example, the intended operations may include code or instructions included in the program.

예를 들어, 하드웨어로 구현된 데이터 처리 장치는 마이크로프로세서(microprocessor), 중앙 처리 장치(central processing unit), 프로세서 코어(processor core), 멀티-코어 프로세서(multi-core processor), 멀티프로세서(multiprocessor), ASIC(Application-Specific Integrated Circuit), FPGA(Field Programmable Gate Array)를 포함할 수 있다.For example, data processing devices implemented in hardware include microprocessors, central processing units, processor cores, multi-core processors, and multiprocessors. , ASIC (Application-Specific Integrated Circuit), and FPGA (Field Programmable Gate Array).

프로세서(200)는 앞서 설명된 뉴럴 네트워크 모델을 학습시킬 수 있으며, 학습된 뉴럴 네트워크 모델을 활용하여 입력된 초분광 데이터로부터 이상치를 탐지할 수 있다. 뉴럴 네트워크 모델을 학습하는 방법에 대해서는 이하 첨부될 도면을 통해 보다 상세히 설명된다.The processor 200 can train the neural network model described above and detect outliers from the input hyperspectral data using the learned neural network model. The method of learning the neural network model is explained in more detail through the accompanying drawings below.

프로세서(200)는 수신된 초분광 데이터에 포함된 정상 및/또는 비정상 샘플 데이터(이하에서, '데이터'로 지칭될 수 있다)를 뉴럴 네트워크 모델에 포함된 인코더에 입력함으로써 수신된 초분광 데이터의 심층 특징들을 산출할 수 있다. 심층 특징이란 데이터에 직접적으로 보이지는 않지만 특정한 데이터 분포를 만드는 데 역할을 하는 변수로 정의될 수 있다. 인코더는 입력을 심층 특징과 같은 내부 표현으로 압축할 수 있다. 심층 특징은 코드 또는 잠재 변수(latent variable)로 지칭될 수 있다.The processor 200 inputs normal and/or abnormal sample data (hereinafter referred to as 'data') included in the received hyperspectral data into an encoder included in the neural network model. Deep features can be calculated. Deep features can be defined as variables that are not directly visible in the data but play a role in creating a specific data distribution. The encoder can compress the input into an internal representation, such as deep features. Deep features may be referred to as codes or latent variables.

프로세서(200)는 수신된 초분광 데이터에 포함된 정상 및/또는 비정상 샘플 데이터의 심층 특징들의 평균을 산출할 수 있다. 예시적으로, 프로세서(200)는 초분광 이미지에 포함된 N개의 픽셀에 대응되는 샘플 데이터의 심층 특징들을 산출하고, 산출된 심층 특징들의 평균을 연산할 수 있다.Processor 200 may calculate an average of deep features of normal and/or abnormal sample data included in the received hyperspectral data. As an example, the processor 200 may calculate deep features of sample data corresponding to N pixels included in a hyperspectral image and calculate an average of the calculated deep features.

프로세서(200)는 뉴럴 네트워크 모델에 포함된 인코더를 통해 산출된 심층 특징들 및 평균을 이용하여 관계 점수(relation score)를 산출할 수 있다. 관계 점수는 심층 특징들과 평균 간의 관계에 대한 정보를 포함할 수 있다. '심층 특징들과 평균 간의 관계'는 각각의 심층 특징들과 평균 사이의 논리적인 연관성을 의미할 수 있다.The processor 200 may calculate a relationship score using deep features and averages calculated through an encoder included in the neural network model. The relationship score may contain information about the relationship between deep features and the mean. 'Relationship between deep features and the average' may mean a logical relationship between each deep feature and the average.

일 실시예에 따르면, 프로세서(200)는 산출된 관계 점수에 기초하여 수신된 초분광 데이터에 대한 이상치를 탐지할 수 있다. 보다 구체적으로, 프로세서(200)는 산출된 관계 점수가 소정의 임계치 미만인 경우, 이상치(예를 들어, 식품 영상 내 이물질 등)가 탐지된 것으로 결정할 수 있다.According to one embodiment, the processor 200 may detect outliers in the received hyperspectral data based on the calculated relationship score. More specifically, if the calculated relationship score is less than a predetermined threshold, the processor 200 may determine that an outlier (for example, a foreign substance in a food image, etc.) has been detected.

프로세서(200)는 관계 점수에 기초하여 산출되는 손실 함수를 이용하여 뉴럴 네트워크 모델을 학습시킬 수 있다. 일 실시 예에 따른 손실 함수는 관계 점수를 파라미터로 포함할 수 있으며, 본 개시의 일 실시 예에 따른 손실 함수에 대한 상세한 내용은 이하 도면에서 보다 상세히 설명된다.The processor 200 may train a neural network model using a loss function calculated based on the relationship score. The loss function according to an embodiment may include a relationship score as a parameter, and details about the loss function according to an embodiment of the present disclosure are described in more detail in the drawings below.

프로세서(200)는 손실 함수를 통한 산출되는 손실값을 최소화하는 방향으로, 다시 말해, 높은 정확도를 갖도록 매개변수(예를 들어, 뉴럴 네트워크 모델의 가중치(weight) 또는 바이어스(bias))를 갱신하는 방향으로 학습될 수 있다. 예시적으로, 손실값이 최소가 되도록 학습된 뉴럴 네트워크 모델을 사용해 프로세서(200)는 이미지로부터 획득된 데이터가 이상치인지 여부를 판단할 수 있고, 이상치 탐지 결과(AD)를 출력할 수 있다. 예시적으로, 프로세서(200)는 초분광 이미지를 이용하여 식품의 이물질(이상치)를 탐지하고, 이물질 탐지 결과를 출력할 수 있다.The processor 200 updates parameters (e.g., weights or biases of a neural network model) to minimize the loss value calculated through the loss function, that is, to have high accuracy. direction can be learned. As an example, using a neural network model learned to minimize loss, the processor 200 can determine whether data obtained from an image is an outlier and output an outlier detection result (AD). As an example, the processor 200 may detect foreign substances (outliers) in food using a hyperspectral image and output a foreign substance detection result.

메모리(300)는 프로세서(200)에 의해 실행가능한 인스트럭션들(또는 프로그램)을 저장할 수 있다. 예를 들어, 인스트럭션들은 프로세서의 동작 및/또는 프로세서의 각 구성의 동작을 실행하기 위한 인스트럭션들을 포함할 수 있다.The memory 300 may store instructions (or programs) executable by the processor 200. For example, the instructions may include instructions for executing the operation of the processor and/or the operation of each component of the processor.

메모리(300)는 휘발성 메모리 장치 또는 불휘발성 메모리 장치로 구현될 수 있다.The memory 300 may be implemented as a volatile memory device or a non-volatile memory device.

휘발성 메모리 장치는 DRAM(dynamic random access memory), SRAM(static random access memory), T-RAM(thyristor RAM), Z-RAM(zero capacitor RAM), 또는 TTRAM(Twin Transistor RAM)으로 구현될 수 있다.Volatile memory devices may be implemented as dynamic random access memory (DRAM), static random access memory (SRAM), thyristor RAM (T-RAM), zero capacitor RAM (Z-RAM), or twin transistor RAM (TTRAM).

불휘발성 메모리 장치는 EEPROM(Electrically Erasable Programmable Read-Only Memory), 플래시(flash) 메모리, MRAM(Magnetic RAM), 스핀전달토크 MRAM(Spin-Transfer Torque(STT)-MRAM), Conductive Bridging RAM(CBRAM), FeRAM(Ferroelectric RAM), PRAM(Phase change RAM), 저항 메모리(Resistive RAM(RRAM)), 나노 튜브 RRAM(Nanotube RRAM), 폴리머 RAM(Polymer RAM(PoRAM)), 나노 부유 게이트 메모리(Nano Floating Gate Memory(NFGM)), 홀로그래픽 메모리(holographic memory), 분자 전자 메모리 소자(Molecular Electronic Memory Device), 또는 절연 저항 변화 메모리(Insulator Resistance Change Memory)로 구현될 수 있다.Non-volatile memory devices include EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory, MRAM (Magnetic RAM), Spin-Transfer Torque (STT)-MRAM (MRAM), and Conductive Bridging RAM (CBRAM). , FeRAM (Ferroelectric RAM), PRAM (Phase change RAM), Resistive RAM (RRAM), Nanotube RRAM (Nanotube RRAM), Polymer RAM (PoRAM), Nano Floating Gate Memory (NFGM), holographic memory, molecular electronic memory device, or insulation resistance change memory.

도 2는 뉴럴 네트워크 모델에 포함되는 인코더를 설명하기 위한 도면이다.Figure 2 is a diagram for explaining the encoder included in the neural network model.

일 실시예에 따른 뉴럴 네트워크 모델은 오토 인코더(20)에 포함된 인코더를 복수개 포함한 형태로 구현될 수 있다. 오토 인코더(20)는 딥 러닝(Deep learning)에서의 비지도(unsupervised) 학습 기법으로, 매니폴드 러닝(manifold learning)을 위한 구조로 정의될 수 있다. 오토 인코더(20)는 데이터의 심층 특징들을 유지하면서 고차원의 매니폴드를 저차원의 매니폴드로 압축할 수 있다. 매니폴드란 모든 데이터를 최대한 오차없이 아우를 수 있는 부분 공간(subspace)로 정의될 수 있다.The neural network model according to one embodiment may be implemented in a form that includes a plurality of encoders included in the auto encoder 20. The autoencoder 20 is an unsupervised learning technique in deep learning and can be defined as a structure for manifold learning. The autoencoder 20 can compress a high-dimensional manifold into a low-dimensional manifold while maintaining deep features of the data. A manifold can be defined as a subspace that can encompass all data with as little error as possible.

오토 인코더(20)는 인코더(encoder)(22)를 포함할 수 있다. 또한, 오토 인코더(20)는 디코더(decoder)(24)를 포함할 수 있다. 오토 인코더(20)는 입력(x)과 출력(x') 층의 뉴런 수가 동일할 수 있으며, 인코더(22)를 통해 입력(x)을 잠재 변수(latent variable)(z)로 변환하고, 디코더(24)를 통해 입력(x)과 유사한 출력(x')을 생성할 수 있다. The auto encoder 20 may include an encoder 22. Additionally, the auto encoder 20 may include a decoder 24. The auto encoder 20 may have the same number of neurons in the input (x) and output (x') layers, converts the input (x) into a latent variable (z) through the encoder 22, and decoders Through (24), an output (x') similar to the input (x) can be generated.

예시적으로, 학습된 오토 인코더(20)에 양품에 해당하는 정상 샘플 데이터를 입력하면 디코더(24)가 잘 복원하기 때문에 입력(x)과 출력(x')간의 차이가 거의 발생하지 않는 반면, 이물질에 해당하는 비정상 샘플 데이터를 입력하면 오토 인코더(20)는 정상 샘플처럼 복원하기 때문에 입력(x)과 출력(x')간의 차이가 크게 발생할 수 있다. 이러한 방법으로 비정상 샘플 데이터를 감지할 수 있다.For example, when normal sample data corresponding to a good product is input to the learned autoencoder 20, the decoder 24 restores it well, so there is almost no difference between the input (x) and the output (x'). When abnormal sample data corresponding to foreign matter is input, the auto encoder 20 restores it as if it were a normal sample, so a large difference between input (x) and output (x') may occur. In this way, abnormal sample data can be detected.

손실함수(L)는 오토 인코더(20) 의 출력 값 x' (즉, 예측 값)과 입력 값 x의 차이(loss)를 수치화해주는 함수로 정의될 수 있다. 오토 인코더(20)는 손실함수의 결과 값인 손실값이 최소가 되도록 만드는 가중치(weight) 매개변수를 찾는 방향으로 학습될 수 있다. 예시적으로, 손실함수(L)는 평균 제곱 오차(mean squared error: MSE) 또는 교차 엔트로피 오차(cross entropy error: CEE)가 사용될 수 있다.The loss function (L) can be defined as a function that quantifies the difference (loss) between the output value x' (i.e., predicted value) of the autoencoder 20 and the input value x. The autoencoder 20 can be trained to find a weight parameter that minimizes the loss value, which is the result of the loss function. Illustratively, the loss function (L) may be mean squared error (MSE) or cross entropy error (CEE).

도 2를 참조하면, 손실 함수(L)는 입력(x)과 출력(x')의 L2 놈(norm)의 제곱으로 정의될 수 있다. 일 실시예에 따른 뉴럴 네트워크 모델은 미리 학습된 오토 인코더(20)의 인코더(22)를 복수개 포함하는 구조로 구현될 수 있다. 예시적으로, 오토 인코더(20)는 초분광 이미지로 구성된 학습 데이터 입력 x에 기초하여 산출되는 손실 함수 L의 손실값을 최소화하는 방향으로 가중치가 결정됨으로써 사전에 학습될 수 있으며, 학습된 오토 인코더(20)의 인코더(22)가 뉴럴 네트워크 모델의 구현에 활용될 수 있다. Referring to FIG. 2, the loss function (L) can be defined as the square of the L2 norm of the input (x) and output (x'). The neural network model according to one embodiment may be implemented in a structure that includes a plurality of encoders 22 of the pre-trained autoencoder 20. As an example, the auto-encoder 20 may be trained in advance by determining the weight in a direction that minimizes the loss value of the loss function L calculated based on the learning data input x consisting of a hyperspectral image, and the learned auto-encoder The encoder (22) in (20) can be used to implement a neural network model.

도 3은 일 실시예에 따른 이상치 탐지 장치를 통해 수행되는 이상치 탐지 알고리즘을 설명하기 위한 도면이다.Figure 3 is a diagram for explaining an outlier detection algorithm performed by an outlier detection device according to an embodiment.

일 실시 예에 따라, 도 3은 이상치 탐지 알고리즘에 따라 이상치 탐지 결과(AD)(46)를 출력하는 과정이 도시된다.According to one embodiment, Figure 3 shows a process of outputting an outlier detection result (AD) 46 according to an outlier detection algorithm.

일 실시예에 따른 이상치 탐지 장치(10)는 제1 인코더(41), 제2 인코더(42) 및 제3 인코더(43)를 포함하는 뉴럴 네트워크 모델(40)을 활용하여 입력된 이미지(4)의 이상치를 탐지할 수 있다. 이상치 탐지 장치(10)는 입력된 이미지(들)(4)(또는, 이미지(들)(4)로부터 획득된 데이터)를 제1 인코더(41) 및 제2 인코더(42)에 입력할 수 있다. 일 예로, 이미지(들)(4)은 초분광 이미지(들)일 수 있다. 제1 인코더(41)은 오토 인코더의 일부로써 도 2의 인코더(22)에 대응될 수 있다. 제2 인코더(42) 및 제3 인코더(43)는 인코더(22)에 대한 추가적인 학습을 통해 가중치가 조정된 인코더로, 제2 인코더(42) 및 제3 인코더(43)에 대한 학습은 이하 첨부되는 도면을 통해 보다 상세히 설명된다.The outlier detection device 10 according to one embodiment uses a neural network model 40 including a first encoder 41, a second encoder 42, and a third encoder 43 to detect the input image 4. Outliers can be detected. The outlier detection device 10 may input the input image(s) 4 (or data obtained from the image(s) 4) to the first encoder 41 and the second encoder 42. . As an example, image(s) 4 may be hyperspectral image(s). The first encoder 41 is part of an auto encoder and may correspond to the encoder 22 in FIG. 2. The second encoder 42 and the third encoder 43 are encoders whose weights have been adjusted through additional learning for the encoder 22. Learning for the second encoder 42 and the third encoder 43 is attached below. This is explained in more detail through the drawings.

이상치 탐지 장치(10)는 제1 인코더(41)를 통해 산출된 이미지(4)의 심층 특징들의 평균(C)을 산출할 수 있다. 또한, 이상치 탐지 장치(10)는 제2 인코더(42)를 통해 이미지(4)에 대한 심층 특징(Z)를 산출할 수 있다. 이상치 탐지 장치(10)는 산출된 평균(C)과 심층 특징(Z)에 기초하여 생성된 관계 벡터([C, Z])(44)를 제3 인코더(43)에 입력할 수 있다. 이상치 탐지 장치(10)는 앞서 설명된 관계 벡터를 제3 인코더(43)에 입력하여 관계 점수(R)(Relation score)(45)를 산출할 수 있다. 이상치 탐지 장치(10)는 산출된 관계 점수(45)에 기초하여 이상치를 탐지 결과(46)를 출력할 수 있다. 탐지 결과는 이상치가 탐지되지 않은 정상 상태의 경우에 1에 가까운 값, 이상치가 탐지된 비정상 상태의 경우 0에 가까운 값으로 관계 점수(R)이 결정됨으로써 이상치 탐지 결과(46)가 결정되어 출력될 수 있다. 예시적으로, 관계 점수(R)이 소정의 임계치를 초과하는 경우에 한해 정상 상태인 것으로 이상치 탐지 결과가 출력될 수 있다.The outlier detection device 10 may calculate the average (C) of the deep features of the image 4 calculated through the first encoder 41. Additionally, the outlier detection device 10 may calculate deep features (Z) for the image 4 through the second encoder 42. The outlier detection device 10 may input a relationship vector ([C, Z]) 44 generated based on the calculated average (C) and deep features (Z) to the third encoder 43. The outlier detection device 10 may calculate a relationship score (R) 45 by inputting the previously described relationship vector into the third encoder 43. The outlier detection device 10 may output an outlier detection result 46 based on the calculated relationship score 45. The detection result is a value close to 1 in the case of a normal state in which no outliers are detected, and a value close to 0 in the case of an abnormal state in which an outlier is detected. The relationship score (R) is determined and the outlier detection result (46) is determined and output. You can. As an example, an outlier detection result may be output as a normal state only when the relationship score (R) exceeds a predetermined threshold.

일 실시예에 따른 이상치 탐지 장치(또는 학습 장치)(10)는 이하 수학식 1에 따른 손실 함수를 통해 산출되는 손실값이 최소화되는 방향으로 뉴럴 네트워크 모델(40)를 학습시킬 수 있다. 보다 구체적으로, 이상치 탐지 장치(또는 학습 장치) (10)는 수학식 1에 따른 손실값이 최소화되는 방향으로 제2 인코더(42) 및 제3 인코더(43)의 가중치(weight)를 갱신하는 프로세스를 통해 뉴럴 네트워크 모델(40)에 대한 학습을 수행할 수 있다. 학습 과정에서 제2 인코더(42) 및 제3 인코더(43)에 대한 가중치는 수학식 1의 결과가 최소화되는 방향으로 갱신될 수 있으나, 제1 인코더(41)의 가중치는 이전 도 2에서 설명된 학습 결과와 동일하게 유지될 수 있다.The outlier detection device (or learning device) 10 according to an embodiment can train the neural network model 40 in a way that minimizes the loss value calculated through the loss function according to Equation 1 below. More specifically, the outlier detection device (or learning device) 10 is a process of updating the weights of the second encoder 42 and the third encoder 43 in a direction that minimizes the loss value according to Equation 1. Learning about the neural network model 40 can be performed. During the learning process, the weights for the second encoder 42 and the third encoder 43 may be updated in a direction that minimizes the result of Equation 1, but the weight of the first encoder 41 is as described in FIG. 2 previously. The learning results can remain the same.

수학식 1에서,는 제2 인코더(42)의 출력, 는 제3 인코더(43)의 출력, N은 학습 데이터의 개수, 는 i번째 학습 데이터에 대응하는 관계 점수로써, 뉴럴 네트워크(40)의 최종 출력이고, 는 i번째 학습 데이터에 대한 뉴럴 네트워크(40)의 최종 출력의 정답값으로, i번째 학습 데이터에 대한 라벨(Label)을 의미하고,는 손실 함수를 의미할 수 있다. N은 전체 데이터의 개수로, 학습 데이터(예를 들어, 초분광 이미지들)에 포함된 전체 픽셀의 개수를 의미할 수 있다.In Equation 1, is the output of the second encoder 42, is the output of the third encoder 43, N is the number of learning data, is the relationship score corresponding to the ith learning data and is the final output of the neural network 40, is the correct answer value of the final output of the neural network 40 for the i-th learning data, and means the label for the i-th learning data, may mean a loss function. N is the total number of data and may mean the total number of pixels included in the training data (eg, hyperspectral images).

일 실시 예로, 는 i 번째 데이터가 이상치(abnormal)인 경우 0의 값으로, 이상치가 아니고 정상치(normal)인 경우 1로 표현되는 라벨일 수 있다.In one embodiment, may be a label expressed as a value of 0 if the i-th data is an outlier, and as 1 if it is not an outlier but a normal value.

도 4는 뉴럴 네트워크 모델(40)을 학습시키는 알고리즘의 순서를 나타낸다. Figure 4 shows the sequence of the algorithm for training the neural network model 40.

도 4를 참조하면, 뉴럴 네트워크 모델(40)의 제1 인코더(41) 및 제2 인코더(42)의 입력 이미지(들)(예를 들어, 도 3에 도시된 이미지(4)) x는 N 차원(입력 이미지의 픽셀의 개수에 대응) 및 C 차원(예시적으로, 입력 이미지 각각의 픽셀에 대응되는 특징 값의 개수에 대응) 실수 집합의 원소이고, 뉴럴 네트워크 모델(40)의 출력 y는 N 차원 실수 집합의 원소일 수 있다. 이 때, x는 NxC 크기를 갖고 y는 Nx1의 크기를 갖는 행렬의 형태일 수 있다.Referring to FIG. 4, the input image(s) of the first encoder 41 and the second encoder 42 of the neural network model 40 (e.g., image 4 shown in FIG. 3) x is N The dimension (corresponding to the number of pixels of the input image) and the C dimension (example corresponding to the number of feature values corresponding to each pixel of the input image) are elements of the real number set, and the output y of the neural network model 40 is It may be an element of an N-dimensional real number set. At this time, x may be in the form of a matrix with a size of NxC and y has a size of Nx1.

첫 번째 단계에서, 이상치 탐지 장치(10)는 x를 입력받아, 인코더를 통해 심층 특징(들) z을 출력할 수 있다. 예를 들어, 인코더(예를 들어, 도 3에 도시된 제1 인코더(41) 및 제2 인코더(42))는 초분광 이미지(들)(예를 들어, 도 3에 도시된 이미지(들)(4))가 N 개의 픽셀에 대응하는 데이터를 포함할 때, C 차원의 x를 입력받아 W 차원의 z로 출력할 수 있다. N은 W보다 큰 자연수일 수 있다. 인코더는 첫 번째 단계에서 차원 축소(demensinality reduction)를 통해 시간복잡도 및 공간복잡도를 감소시킴으로써 데이터의 심층 특징(들)(z)을 출력할 수 있다.In the first step, the outlier detection device 10 may receive x as input and output deep feature(s) z through an encoder. For example, the encoder (e.g., the first encoder 41 and the second encoder 42 shown in FIG. 3) may generate hyperspectral image(s) (e.g., the image(s) shown in FIG. 3). When (4)) includes data corresponding to N pixels, x in the C dimension can be input and output as z in the W dimension. N can be a natural number greater than W. The encoder can output deep feature(s) (z) of the data by reducing time and space complexity through dimensionality reduction in the first step.

두 번째 및 세 번째 단계에서, 이상치 탐지 장치(10)는 인코더(예를 들어, 도 3에 도시된 제1 인코더(41))를 통해 W 차원 실수 집합의 원소인 c를 빈 배열로 초기에 셋팅할 수 있고, for문을 사용하여 1부터 W까지의 범위 내의 값을 갖는 i에 대하여, 각 심층 특징들의 평균(c)을 산출할 수 있다.In the second and third steps, the outlier detection device 10 initially sets c, an element of the W-dimensional real number set, to an empty array through an encoder (e.g., the first encoder 41 shown in FIG. 3). You can use the for statement to calculate the average (c) of each deep feature for i with a value in the range from 1 to W.

네 번째 단계에서 이상치 탐지 장치(10)는 1부터 W까지의 범위 내의 모든 i에 대하여 를 산출한 후 for문을 종료할 수 있다.In the fourth step, the outlier detection device 10 detects all i in the range from 1 to W. After calculating , the for statement can be terminated.

다섯 번째 단계에서 이상치 탐지 장치(10)는 산출된 데이터의 심층 특징(들)(z) 및 각 심층 특징들의 평균(c)을 이용하여 관계 점수(R)(예를 들어, 도 3에 도시된 관계 점수(45))를 산출할 수 있다. R은 N 차원의 실수 집합의 원소이고, Nx1의 크기를 갖는 행렬의 형태일 수 있다.In the fifth step, the outlier detection device 10 uses the deep feature(s) (z) of the calculated data and the average (c) of each deep feature to create a relationship score (R) (e.g., shown in Figure 3). The relationship score (45)) can be calculated. R is an element of an N-dimensional real number set and may be in the form of a matrix with a size of Nx1.

여섯 번째 단계에서, 이상치 탐지 장치(10)는 첫 번째 단계 내지 다섯 번째 단계에서 산출한 변수들을 포함하는 손실 함수를 이용하여 손실 값(Loss)를 산출할 수 있다. 손실 값은 확률 손실 값(Probability loss)일 수 있다.In the sixth step, the outlier detection device 10 may calculate a loss value (Loss) using a loss function including the variables calculated in the first to fifth steps. The loss value may be a probability loss value.

이상치 탐지 장치(10)는 산출된 손실 값을 최소화하는 방향으로 인코더(예를 들어, 도 3에 도시된 제2 인코더(42) 및 제3 인코더(43))의 가중치(weight)를 갱신함으로써, 뉴럴 네트워크 모델에 대한 학습을 수행할 수 있다.The outlier detection device 10 updates the weights of the encoders (e.g., the second encoder 42 and the third encoder 43 shown in FIG. 3) in a direction that minimizes the calculated loss value, You can perform learning on a neural network model.

본 개시의 일 실시예에 따르면, 관계 기반 이상치 탐지 알고리즘에 따라 관계형 네트워크를 활용하여 뉴럴 네트워크 모델을 학습할 수 있고, 이상치 탐지 결과(AD)를 출력할 수 있다.According to an embodiment of the present disclosure, a neural network model can be learned using a relational network according to a relationship-based outlier detection algorithm, and an outlier detection result (AD) can be output.

도 5 및 도 6은 정상 데이터가 딸기잼 이미지일 때 이상치 탐지 장치의 성능을 도시하는 도면이다.Figures 5 and 6 are diagrams showing the performance of the outlier detection device when normal data is a strawberry jam image.

도 5 및 도 6에 실험에 사용된 모든 인코더는 동일하고, 실험에 사용된 전체 데이터를 100%라고 했을 때 실험에 사용된 모든 학습 데이터의 양은 전체 데이터의 10%, 실험에 사용된 모든 검증 데이터의 양은 전체 데이터의 40%, 실험에 사용된 모든 테스트 데이터의 양은 전체 데이터의 100%로 동일한 것을 가정한다. 또한, 모든 결과는 5번 샘플링한 각 결과 값의 평균으로 산출된 것이다.5 and 6, all encoders used in the experiment are the same, and when the total data used in the experiment is 100%, the amount of all learning data used in the experiment is 10% of the total data, and all verification data used in the experiment are 10% of the total data. It is assumed that the amount is 40% of the total data, and the amount of all test data used in the experiment is 100% of the total data. Additionally, all results are calculated as the average of each result sampled 5 times.

도 5를 참조하면, 실제 이미지(Ground Truth: GT)(60)는 딸기잼에 포함된 빨간 실을 나타낸다. 예측 이미지(62)는 일반적인 오토 인코더 기반 이상치 검출 알고리즘의 결과로, 실제 이미지와 동일한 위치의 빨간 실뿐만 아니라 다른 이상치 탐지 결과 값들도 포함한다. 이와 달리, 본원 발명에 따른 뉴럴 네트워크 모델을 활용하여 출력된 예측 이미지(64)는 예측 이미지(62) 대비 실제 이미지(60)와 더 유사한 것을 확인할 수 있다.Referring to Figure 5, the ground truth (GT) 60 shows a red thread included in strawberry jam. The predicted image 62 is the result of a general autoencoder-based outlier detection algorithm and includes not only a red thread at the same location as the actual image but also other outlier detection result values. In contrast, it can be confirmed that the predicted image 64 output using the neural network model according to the present invention is more similar to the actual image 60 than the predicted image 62.

일 실시 예에 따른 딸기잼의 이물질을 탐지하는 이상치 탐지 알고리즘의 경우, 실제 딸기잼이고 예측 결과도 딸기잼이라면 True Positive(TP), 실제 딸기잼이고 예측 결과는 딸기잼이 아니라면 False Negative(FN), 실제 딸기잼이 아니고 예측 결과 딸기잼이라면 False Positive(FP), 실제 딸기잼이 아니고 예측결과 딸기잼이 아니라면 True Negative(TN)의 상황을 포함하는 4가지로 실제와 예측 결과를 분류할 수 있다.In the case of an outlier detection algorithm that detects foreign substances in strawberry jam according to an embodiment, if it is actual strawberry jam and the prediction result is also strawberry jam, it is True Positive (TP), and if it is actual strawberry jam and the prediction result is not strawberry jam, it is False Negative (FN). , Actual and predicted results can be classified into four situations, including False Positive (FP) if it is not actual strawberry jam but the predicted result is strawberry jam, and True Negative (TN) if it is not actual strawberry jam and the predicted result is strawberry jam. .

정밀도(Precision)는 분류 평가 지표 중 하나로, 예측 값이 얼마나 정확한지를 나타내는 지표이다. 알고리즘에 따른 결과 True라고 예측한 것들 중에 실제 GT가 True인 비율을 의미하며, 정밀도는 TP/(TP+FP)로 계산될 수 있다.Precision is one of the classification evaluation indicators and is an indicator of how accurate the prediction value is. It refers to the ratio of the actual GT being True among those predicted to be True as a result of the algorithm, and the precision can be calculated as TP/(TP+FP).

민감도(Recall)는 재현율이라고 하며, 분류 평가 지표 중 하나로, 실제 정답을 얼마나 잘 맞췄는지를 나타내는 지표이다. 실제 GT가 True인 것들 중에 실제 True로 예측한 비율을 의미한다. 민감도는 TP/(TP+FN)로 계산될 수 있다.Sensitivity (Recall) is called recall rate and is one of the classification evaluation indicators, indicating how well the correct answer was actually answered. This refers to the ratio of those whose GT is actually True among those predicted to be actually True. Sensitivity can be calculated as TP/(TP+FN).

정밀도와 민감도 이외에, F1-score도 분류 평가 지표 중 하나로, 민감도와 정밀도의 조화 평균을 구해 하나의 값으로 알고리즘의 성능을 평가할 수 있는 지표로 정의될 수 있다. F1-score는 2*(Recall*Preicision)/(Recall+Precision)으로 계산될 수 있다. F1-score는 TP, FN, FP, TN 각각에 해당하는 모든 데이터들이 불균형할 때 직관적으로 알고리즘의 성능을 평가할 수 있는 지표일 수 있다.In addition to precision and sensitivity, F1-score is also one of the classification evaluation indicators. It can be defined as an indicator that can evaluate the performance of the algorithm as a single value by obtaining the harmonic average of sensitivity and precision. F1-score can be calculated as 2*(Recall*Preicision)/(Recall+Precision). F1-score can be an indicator that can intuitively evaluate the performance of the algorithm when all data corresponding to TP, FN, FP, and TN are unbalanced.

도 5를 참조하면, 비교 예에 대응되는 기반(baseline) 이상치 탐지 알고리즘에 따라 출력된 예측 이미지(62)는 정밀도가 0.485이고 민감도가 0.734이며 F1-score는 0.584이다. 반면에, 본원 발명에 따른 이상치 탐지 알고리즘에 따라 출력된 예측 이미지(64)는 정밀도가 0.571이고 민감도가 0.75이며 F1-score는 0.649이다. 따라서, 제안된 이상치 탐지 알고리즘이 모든 평가 지표 면에서 비교적 높은 성능을 보여준다고 볼 수 있다.Referring to FIG. 5, the predicted image 62 output according to the baseline outlier detection algorithm corresponding to the comparative example has a precision of 0.485, a sensitivity of 0.734, and an F1-score of 0.584. On the other hand, the predicted image 64 output according to the outlier detection algorithm according to the present invention has a precision of 0.571, a sensitivity of 0.75, and an F1-score of 0.649. Therefore, it can be seen that the proposed outlier detection algorithm shows relatively high performance in all evaluation indicators.

도 6을 참조하면, 이미지 평가 결과는 임계값(threshold)에 따른 F1-score를 나타내는 그래프로 도시된다.Referring to FIG. 6, the image evaluation results are shown as a graph showing the F1-score according to the threshold.

본 개시의 이상치 탐지 알고리즘들은 데이터의 불균형성에 의해 정밀도나 재현율 보다 F1-score에 따라 성능을 평가하는 것이 더 바람직한 방법일 수 있다. X축의 임계값은 알고리즘이 이상치 여부를 결정할 때의 기준값이며, 임계값 변경을 통해 F1-score의 평가 수치를 높이거나 낮출 수 있다. 도 6의 그래프에 따르면, 대체로 기반 이상치 탐지 알고리즘보다 제안된 이상치 탐지 알고리즘의 F1-Score 값이 높은 것을 확인할 수 있다.For the outlier detection algorithms of the present disclosure, it may be more desirable to evaluate performance based on F1-score rather than precision or recall due to data imbalance. The threshold value on the According to the graph in Figure 6, it can be seen that the F1-Score value of the proposed outlier detection algorithm is generally higher than that of the base outlier detection algorithm.

도 7 및 도 8은 정상 데이터가 무화과 이미지일 때 이상치 탐지 장치의 성능을 도시하는 도면이다.Figures 7 and 8 are diagrams showing the performance of an outlier detection device when normal data is a fig image.

실험의 조건은 앞서 도 5에서 설명된 바와 동일할 수 있다.The conditions of the experiment may be the same as previously described in FIG. 5.

도 7을 참조하면, 실제 이미지(Ground Truth: GT)(80)는 무화과에 이물질들로 포함된 초록색 털실, 황색 종이, 검은색 케이블 타이, 초록색 플라스틱, 벌레를 나타낸다. 비교 예에 대응되는 기반(baseline) 이상치 탐지 알고리즘에 따라 출력된 예측 이미지(82)는 실제 이미지와 동일한 위치의 이물질들 뿐만 아니라 다른 이상치 탐지 결과 값들도 포함한다. 이와 달리, 본원 발명에 따른 뉴럴 네트워크 모델을 통해 출력된 예측 이미지(84)는 예측 이미지(82) 대비 실제 이미지(80)와 더 유사한 것을 확인할 수 있다.Referring to FIG. 7, the ground truth (GT) 80 shows green yarn, yellow paper, black cable ties, green plastic, and bugs included as foreign substances in the fig. The predicted image 82 output according to the baseline outlier detection algorithm corresponding to the comparative example includes not only foreign substances at the same location as the actual image but also other outlier detection result values. In contrast, it can be confirmed that the predicted image 84 output through the neural network model according to the present invention is more similar to the actual image 80 than the predicted image 82.

비교 예에 대응되는 기반(baseline) 이상치 탐지 알고리즘에 따라 출력된 예측 이미지(82)는 정밀도가 0.789이고 민감도가 0.933이며 F1-score는 0.855이다. 반면에, 예측 이미지(84)는 정밀도가 0.886이고 민감도가 0.883이며 F1-score는 0.885이다. 따라서, 제안된 이상치 탐지 알고리즘이 F1-score에 따르면 비교적 높은 성능을 보여준다고 볼 수 있다.The predicted image 82 output according to the baseline outlier detection algorithm corresponding to the comparative example has a precision of 0.789, a sensitivity of 0.933, and an F1-score of 0.855. On the other hand, the predicted image 84 has a precision of 0.886, a sensitivity of 0.883, and an F1-score of 0.885. Therefore, it can be seen that the proposed outlier detection algorithm shows relatively high performance according to the F1-score.

도 8를 참조하면, 이미지 평가 결과는 임계값(threshold)에 따른 F1-score를 나타내는 그래프로 도시된다.Referring to FIG. 8, the image evaluation results are shown as a graph showing the F1-score according to the threshold.

도 8의 그래프에 따르면, 대체로 비교 예보다 제안된 이상치 탐지 알고리즘의 F1-Score 값이 높은 것을 확인할 수 있다.According to the graph in Figure 8, it can be seen that the F1-Score value of the proposed outlier detection algorithm is generally higher than that of the comparative example.

도 9 및 도 10은 정상 데이터가 쥐포 이미지일 때 이상치 탐지 장치의 성능을 도시하는 도면이다.Figures 9 and 10 are diagrams showing the performance of an outlier detection device when normal data is a mouse gun image.

실험의 조건은 앞서 도 5에서 설명된 바와 동일할 수 있다.The conditions of the experiment may be the same as previously described in FIG. 5.

도 9를 참조하면, 실제 이미지(Ground Truth: GT)(100)는 쥐포에 이물질들로 포함된 낚싯줄, 나뭇가지, 노끈, 채반, 실을 나타낸다. 본원 발명에 따른 뉴럴 네트워크 모델을 활용하여 출력된 예측 이미지(104)는 비교 예에 대응되는 예측 이미지(102) 대비 실제 이미지(100)와 더 유사한 것을 확인할 수 있다.Referring to FIG. 9, the actual image (Ground Truth: GT) 100 shows fishing line, tree branches, twine, straw, and thread included as foreign substances in the rat bag. It can be confirmed that the predicted image 104 output using the neural network model according to the present invention is more similar to the actual image 100 than the predicted image 102 corresponding to the comparative example.

도 9를 참조하면, 예측 이미지(102)는 정밀도가 0.651이고 민감도가 0.822이며 F1-score는 0.727이다. 예측 이미지(104)는 정밀도가 0.649이고 민감도가 0.838이며 F1-score는 0.731이다. 따라서, 제안된 이상치 탐지 알고리즘이 F1-score에 따르면 비교적 높은 성능을 보여준다고 볼 수 있다.Referring to FIG. 9, the prediction image 102 has a precision of 0.651, a sensitivity of 0.822, and an F1-score of 0.727. The predicted image 104 has a precision of 0.649, a sensitivity of 0.838, and an F1-score of 0.731. Therefore, it can be seen that the proposed outlier detection algorithm shows relatively high performance according to the F1-score.

도 10을 참조하면, 이미지 평가 결과는 임계값(threshold)에 따른 F1-score를 나타내는 그래프로 도시된다.Referring to FIG. 10, the image evaluation results are shown as a graph showing the F1-score according to the threshold.

도 10의 그래프에 따르면, 본원 발명에 따른 F1-Score 값이 비교 예에 비하여 높은 것을 확인할 수 있다.According to the graph of FIG. 10, it can be seen that the F1-Score value according to the present invention is higher than that of the comparative example.

도 11은 일 실시예에 따른 이상치를 탐지하는 방법을 설명하기 위한 순서도이다.Figure 11 is a flow chart to explain a method for detecting an outlier according to an embodiment.

S1101에서, 이상치를 탐지하는 전자 장치는 이미지를 수신할 수 있다. 일예로, 이미지는 N 픽셀에 대응하는 정보를 포함하는 초분광 이미지들일 수 있다(N은 실수).At S1101, an electronic device that detects outliers may receive an image. As an example, the image may be hyperspectral images containing information corresponding to N pixels (N is a real number).

S1102에서, 전자 장치는 이미지로부터 획득된 데이터의 심층 특징들을 산출할 수 있다. 이미지로부터 획득된 데이터의 심층 특징들은 앞서 설명된 제1 인코더에 기초하여 산출될 수 있다. At S1102, the electronic device may calculate deep features of data obtained from the image. Deep features of data obtained from an image may be calculated based on the first encoder described above.

S1103에서, 전자 장치는 심층 특징들의 평균을 산출할 수 있다. 심층 특징들의 평균은 앞서 설명된 제1 인코더를 통해 획득한 심층 특징들에 기초하여 산출될 수 있다.At S1103, the electronic device may calculate the average of the deep features. The average of the deep features may be calculated based on the deep features obtained through the first encoder described above.

S1104에서, 전자 장치는 제2 인코더를 통해 산출한 심층 특징들 및 앞선 단계를 통해 산출된 심층 특징들의 평균을 이용하여 관계 점수를 산출할 수 있다. 보다 구체적으로, 전자 장치는 앞서 설명된 제3 인코더에 기초하여 관계 점수를 산출할 수 있다. 심층 특징들의 평균 및 관계 점수를 산출하는 방식은 앞선 도면을 통해 설명된 방식과 동일할 수 있다.In S1104, the electronic device may calculate a relationship score using the deep features calculated through the second encoder and the average of the deep features calculated through the previous step. More specifically, the electronic device may calculate the relationship score based on the third encoder described above. The method of calculating the average and relationship scores of deep features may be the same as the method described through the previous drawing.

S1105에서, 전자 장치는 전자 장치는 이상치인지 여부에 대한 정보를 포함하는 최종 출력값을 출력할 수 있다. 최종 출력 값은 앞서 설명된 바와 같이, 이상치 여부를 0 또는 1로 표현한 값일 수 있다.In S1105, the electronic device may output a final output value including information on whether the electronic device is an outlier. As described above, the final output value may be a value expressing whether or not it is an outlier as 0 or 1.

도 12는 일 실시예에 따른 이상치 탐지 장치에서 활용되는 뉴럴 네트워크 모델을 학습시키는 방법을 설명하기 위한 순서도이다.FIG. 12 is a flowchart illustrating a method of learning a neural network model used in an outlier detection device according to an embodiment.

도 12를 참고하면, S1201에서, 전자 장치는 학습 데이터에 포함된 이미지들의 심층 특징을 산출할 수 있다. 보다 구체적으로, 전자 장치는 앞서 설명된 제1 인코더를 통해 학습 데이터에 포함된 이미지들의 심층 특징을 산출할 수 있다. 제1 인코더는 앞선 도 2에 설명된 방식을 통해 사전 학습이 이루어진 오토 인코더의 인코더일 수 있다.Referring to FIG. 12, in S1201, the electronic device may calculate deep features of images included in the learning data. More specifically, the electronic device can calculate deep features of images included in the learning data through the first encoder described above. The first encoder may be an encoder of an auto encoder that has undergone prior learning through the method described in FIG. 2 above.

S1202에서, 전자 장치는 심층 특징들의 평균을 산출할 수 있다. 심층 특징들의 평균은 앞서 설명된 제1 인코더를 통해 획득한 심층 특징들에 기초하여 산출될 수 있다.At S1202, the electronic device may calculate an average of the deep features. The average of the deep features may be calculated based on the deep features obtained through the first encoder described above.

S1203에서, 전자 장치는 제2 인코더를 통해 산출한 심층 특징들 및 앞선 단계를 통해 산출된 심층 특징들의 평균을 제3 인코더에 입력하여 관계 점수를 산출하고, 관계 점수에 기초하여 산출된 손실 함수에 기초하여 뉴럴 네트워크 모델을 학습시킬 수 있다. 제2 인코더 및 제3 인코더는 앞선 도 2의 방식으로 학습된 오토 인코더의 인코더일 수 있으며, 제2 인코더 및 제3 인코더의 가중치는 수학식 1의 손실값을 최소화하는 방향으로 갱신될 수 있으며, 이 과정에서 제1 인코더의 가중치는 유지될 수 있다. 위 설명된 방식에 기초하여 뉴럴 네트워크 모델에 대한 학습이 이루어질 수 있다. 심층 특징들의 평균 및 관계 점수를 산출하는 방식은 앞선 도면을 통해 설명된 방식과 동일할 수 있다.In S1203, the electronic device calculates a relationship score by inputting the deep features calculated through the second encoder and the average of the deep features calculated through the previous step to the third encoder, and enters the loss function calculated based on the relationship score. Based on this, a neural network model can be trained. The second and third encoders may be encoders of the auto encoder learned in the manner of FIG. 2, and the weights of the second and third encoders may be updated in a direction that minimizes the loss value of Equation 1, In this process, the weight of the first encoder can be maintained. Learning of a neural network model can be done based on the method described above. The method of calculating the average and relationship scores of deep features may be the same as the method described through the previous drawing.

일 실시예에 따른 이상치를 탐지하는 전자 장치는 하드웨어인 컴퓨터(또는, 컴퓨팅 장치)와 결합되어 상술한 S1101 내지 S1203를 수행하기 위해 컴퓨터 판독 가능한 기록 매체에 저장된 컴퓨터 프로그램을 포함할 수 있다. An electronic device for detecting an anomaly according to an embodiment may be combined with a computer (or computing device) as hardware and include a computer program stored in a computer-readable recording medium to perform steps S1101 to S1203 described above.

메모리에 로드된 프로그램들의 명령들(instructions)을 실행하는 적어도 하나의 프로세서를 포함하는 컴퓨팅 장치로 구현될 수 있으며, 상술한 S1201 내지 S1208를 실행하도록 기술된 명령들을 포함하는 프로그램이 메모리에 로드될 수 있다.It may be implemented as a computing device including at least one processor that executes instructions of programs loaded into memory, and a program including instructions described to execute S1201 to S1208 described above may be loaded into memory. there is.

이상에서 설명된 장치는 하드웨어 구성요소, 소프트웨어 구성요소, 및/또는 하드웨어 구성요소 및 소프트웨어 구성요소의 조합으로 구현될 수 있다. 예를 들어, 실시예들에서 설명된 장치 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 하나 이상의 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 하나 이상의 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 콘트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The device described above may be implemented with hardware components, software components, and/or a combination of hardware components and software components. For example, devices and components described in embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field programmable gate array (FPGA), etc. , may be implemented using one or more general-purpose or special-purpose computers, such as a programmable logic unit (PLU), a microprocessor, or any other device capable of executing and responding to instructions. A processing device may execute an operating system (OS) and one or more software applications that run on the operating system. Additionally, a processing device may access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, a single processing device may be described as being used; however, those skilled in the art will understand that a processing device includes multiple processing elements and/or multiple types of processing elements. It can be seen that it may include. For example, a processing device may include a plurality of processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are possible.

소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 하나 이상의 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing unit to operate as desired, or may be processed independently or collectively. You can command the device. Software and/or data may be used on any type of machine, component, physical device, virtual equipment, computer storage medium or device to be interpreted by or to provide instructions or data to a processing device. , or may be permanently or temporarily embodied in a transmitted signal wave. Software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored on one or more computer-readable recording media.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. The computer-readable medium may include program instructions, data files, data structures, etc., singly or in combination. Program instructions recorded on the medium may be specially designed and configured for the embodiment or may be known and available to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -Includes optical media (magneto-optical media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, etc. Examples of program instructions include machine language code, such as that produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc. The hardware devices described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.As described above, although the embodiments have been described with limited examples and drawings, various modifications and variations can be made by those skilled in the art from the above description. For example, the described techniques are performed in a different order than the described method, and/or components of the described system, structure, device, circuit, etc. are combined or combined in a different form than the described method, or other components are used. Alternatively, appropriate results may be achieved even if substituted or substituted by an equivalent.

그러므로, 다른 구현들, 다른 실시예들 및 청구범위와 균등한 것들도 후술하는 청구범위의 범위에 속한다.Therefore, other implementations, other embodiments and equivalents of the claims also fall within the scope of the following claims.

Claims (6)

뉴럴 네트워크를 이용하여 이상치를 탐지하는 이상치 탐지 장치로서,
메모리;
송수신기; 및
프로세서
를 포함하고,
상기 프로세서는,
입력 이미지에 기초하여 산출된 심층 특징(feature) 및 상기 심층 특징의 평균에 기초하여 상기 입력 이미지에 대응하는 이상치를 탐지하도록 미리 학습된 뉴럴 네트워크 모델에 기초하여, 상기 입력 이미지의 이상치를 탐지하는, 이상치 탐지 장치.
An outlier detection device that detects outliers using a neural network,
Memory;
transceiver; and
processor
Including,
The processor,
Detecting outliers in the input image based on deep features calculated based on the input image and a neural network model previously trained to detect outliers corresponding to the input image based on the average of the deep features, Outlier detection device.
제1항에 있어서,
상기 뉴럴 네트워크 모델은,
인코더를 통해 산출된 심층 특징 및 상기 심층 특징의 평균에 기초하여 생성되는 관계 벡터를 입력으로 하여 관계 점수(Relation Score)를 산출하도록 미리 학습된 인코더를 포함하는, 이상치 탐지 장치.
According to paragraph 1,
The neural network model is,
An outlier detection device comprising an encoder trained in advance to calculate a relationship score using deep features calculated through an encoder and a relationship vector generated based on an average of the deep features as input.
제2항에 있어서,
상기 뉴럴 네트워크는,
상기 입력 이미지에 기초하여 심층 특징을 산출하는 제1 인코더;
상기 입력 이미지에 기초하여 심층 특징을 산출하는 제2 인코더; 및
상기 제1 인코더로부터 산출된 심층 특징 및 상기 심층 특징의 평균에 기초하여 생성되는 상기 관계 벡터를 입력으로 하여 상기 관계 점수를 출력하는 제3 인코더
를 포함하는, 이상치 탐지 장치.
According to paragraph 2,
The neural network is,
a first encoder that calculates deep features based on the input image;
a second encoder that calculates deep features based on the input image; and
A third encoder that outputs the relationship score using the deep features calculated from the first encoder and the relationship vector generated based on the average of the deep features as input.
Including an outlier detection device.
제3항에 있어서,
상기 뉴럴 네트워크 모델은,
수학식 1의 손실 함수를 통해 산출되는 손실값이 최소화되는 방향으로 학습되고,
상기 수학식 1은,
이고,
상기는 손실 함수, 는 제2 인코더의 출력, 는 제3 인코더의 출력, 상기 N은 학습 데이터의 개수, 상기 는 i번째 학습 데이터에 대한 상기 뉴럴 네트워크의 최종 출력의 정답값, 상기 는 i번째 학습 데이터에 대응하는 관계 점수로, i번째 학습 데이터에 대한 상기 뉴럴 네트워크의 출력을 의미하는, 이상치 탐지 장치.
According to paragraph 3,
The neural network model is,
The loss value calculated through the loss function in Equation 1 is learned in a way that is minimized,
Equation 1 above is:
ego,
remind is the loss function, is the output of the second encoder, is the output of the third encoder, N is the number of training data, is the correct answer value of the final output of the neural network for the ith learning data, is a relationship score corresponding to the i-th learning data, which means the output of the neural network for the i-th learning data, an outlier detection device.
뉴럴 네트워크를 이용하여 이상치를 탐지하는 이상치 탐지 방법으로서,
입력 이미지에 기초하여 심층 특징(feature)을 산출하는 단계;
상기 심층 특징의 평균을 산출하는 단계; 및
상기 평균 및 상기 심층 특징에 기초하여 상기 입력 이미지에 대응하는 이상치를 탐지하도록 미리 학습된 뉴럴 네트워크 모델에 기초하여, 상기 입력 이미지의 이상치를 탐지하는 단계
를 포함하는, 이상치 탐지 방법.
An outlier detection method that detects outliers using a neural network,
calculating deep features based on the input image;
calculating an average of the deep features; and
Detecting outliers in the input image based on a neural network model previously trained to detect outliers corresponding to the input image based on the average and the deep features.
Including an outlier detection method.
전자 장치로서,
메모리;
송수신기; 및
프로세서
를 포함하고,
상기 프로세서는,
학습 데이터에 포함된 이미지에 기초하여 산출된 심층 특징(feature) 및 상기 심층 특징의 평균에 기초하여 산출된 손실함수에 기초하여 상기 이미지에 대응하는 이상치를 탐지하도록 뉴럴 네트워크 모델을 학습시키는, 전자 장치.
As an electronic device,
Memory;
transceiver; and
processor
Including,
The processor,
An electronic device that trains a neural network model to detect outliers corresponding to images based on deep features calculated based on images included in learning data and a loss function calculated based on the average of the deep features. .
KR1020220062952A 2022-05-23 2022-05-23 Anomaly detection method and appratus using neural network KR20230163183A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020220062952A KR20230163183A (en) 2022-05-23 2022-05-23 Anomaly detection method and appratus using neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020220062952A KR20230163183A (en) 2022-05-23 2022-05-23 Anomaly detection method and appratus using neural network

Publications (1)

Publication Number Publication Date
KR20230163183A true KR20230163183A (en) 2023-11-30

Family

ID=88968455

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220062952A KR20230163183A (en) 2022-05-23 2022-05-23 Anomaly detection method and appratus using neural network

Country Status (1)

Country Link
KR (1) KR20230163183A (en)

Similar Documents

Publication Publication Date Title
Cheng et al. Maximum resilience of artificial neural networks
KR102317992B1 (en) Product inspection method and appratus using the neural network and method of training product inspection appratus
KR20210107584A (en) Method for managing training data
CN111797895A (en) Training method of classifier, data processing method, system and equipment
US20210034971A1 (en) Method and system with neural network model updating
US11568212B2 (en) Techniques for understanding how trained neural networks operate
KR20240025578A (en) Hyperspectral image classification method and appratus using neural network
KR20240015120A (en) Hyperspectral image visualization method and appratus using neural network
KR20230150150A (en) Apparatus and method for preprocessing hyperspectral image analysis deep learning model
KR20230163183A (en) Anomaly detection method and appratus using neural network
US20230058341A1 (en) Neural network training method and apparatus using trend
KR102457893B1 (en) Method for predicting precipitation based on deep learning
KR102631310B1 (en) Trajectory prediction method and apparatus
US20220284262A1 (en) Neural network operation apparatus and quantization method
KR102506988B1 (en) Apparatus of anomaly detection using neural network trained using heterogeneous loss function
KR102668317B1 (en) System for object recognition using radar signal processing
KR102504412B1 (en) Apparatus and method for fine dust sensor calibration based on machine learning
KR102611480B1 (en) Product inspection method and appratus using neural networks
KR20230085529A (en) Method for classifying multi-label in a partially labeled environment and an apparatus for performing the same
KR20240064412A (en) Defect detection method and apparatus for performing the same
KR20230159953A (en) Apparatus and method of anomaly detection using neural network
KR102302341B1 (en) Product inspection method and appratus using based self-supervised learning
KR102666670B1 (en) Label prediction method, appratus based neural network and training method for group-labeling-learning using effective embedding vector generation
Wołk et al. Soft dropout method in training of contextual neural networks
KR20240095894A (en) Method and appratus for generating high-quality scene images using attention mechanism