KR102609153B1 - Apparatus and method for detecting anomalies in manufacturing images based on deep learning - Google Patents

Apparatus and method for detecting anomalies in manufacturing images based on deep learning Download PDF

Info

Publication number
KR102609153B1
KR102609153B1 KR1020210127263A KR20210127263A KR102609153B1 KR 102609153 B1 KR102609153 B1 KR 102609153B1 KR 1020210127263 A KR1020210127263 A KR 1020210127263A KR 20210127263 A KR20210127263 A KR 20210127263A KR 102609153 B1 KR102609153 B1 KR 102609153B1
Authority
KR
South Korea
Prior art keywords
image data
deep learning
image
anomaly detection
data
Prior art date
Application number
KR1020210127263A
Other languages
Korean (ko)
Other versions
KR20220159239A (en
Inventor
김대환
조한상
Original Assignee
삼성전기주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전기주식회사 filed Critical 삼성전기주식회사
Priority to CN202280026413.XA priority Critical patent/CN117121053A/en
Priority to PCT/KR2022/002927 priority patent/WO2022250253A1/en
Publication of KR20220159239A publication Critical patent/KR20220159239A/en
Application granted granted Critical
Publication of KR102609153B1 publication Critical patent/KR102609153B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • 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/08Learning methods
    • G06T5/009
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/92Dynamic range modification of images or parts thereof based on global image properties
    • 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)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Biomedical Technology (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

본 발명의 일 실시 예에 따른 딥러닝 기반 제조 영상의 이상 탐지 장치는, 학습대상인 양품의 복수의 영상 데이터에 대상으로 제1 딥러닝 알고리즘을 학습하고, 검사대상인 제1 영상 데이터에 대해 상기 학습된 제1 딥러닝 알고리즘을 적용하여 제2 영상 데이터를 생성하는 이미지 제너레이터; 상기 제1 영상 데이터와 상기 제2 영상 데이터에 대해 제1 연산을 수행하여, 상기 제1 영상 데이터와 상기 제2 영상 데이터 간의 차이 영상에 해당되는 제3 영상 데이터를 출력하는 제1 연산부; 학습대상인 양품의 복수의 영상 데이터를 대상으로 제2 딥러닝 알고리즘을 학습하고, 검사대상인 상기 제1 영상 데이터와 상기 제2 영상 데이터에 대해 상기 학습된 제2 딥러닝 알고리즘을 적용하여, 상기 제1 영상 데이터와 상기 제2 영상 데이터 간의 특징 정보를 갖는 영상 마스크 데이터를 출력하는 특징 추출기; 및 상기 제3 영상 데이터와 상기 영상 마스크 데이터에 대해 제2 연산을 수행하여, 이상 정보를 갖는 제4 영상 데이터를 생성하는 제2 연산부; 를 포함한다.A deep learning-based manufacturing video anomaly detection device according to an embodiment of the present invention learns a first deep learning algorithm on a plurality of image data of a good product as a learning target, and uses the learned algorithm for the first image data as an inspection target. An image generator that generates second image data by applying a first deep learning algorithm; a first operation unit that performs a first operation on the first image data and the second image data and outputs third image data corresponding to a difference image between the first image data and the second image data; A second deep learning algorithm is learned on a plurality of image data of a good product that is a learning target, and the learned second deep learning algorithm is applied to the first image data and the second image data that are inspection targets, and the first a feature extractor that outputs image mask data having feature information between image data and the second image data; and a second operation unit that performs a second operation on the third image data and the image mask data to generate fourth image data having abnormal information. Includes.

Description

딥러닝 기반 제조 영상의 이상 탐지 장치 및 방법{APPARATUS AND METHOD FOR DETECTING ANOMALIES IN MANUFACTURING IMAGES BASED ON DEEP LEARNING}Deep learning-based anomaly detection device and method in manufacturing images {APPARATUS AND METHOD FOR DETECTING ANOMALIES IN MANUFACTURING IMAGES BASED ON DEEP LEARNING}

본 발명은 딥러닝 알고리즘을 이용하여 제조 물품의 영상에 대한 이상(Anomalies)을 탐지하는 딥러닝 기반 제조 영상의 이상 탐지 장치 및 방법에 관한 것이다.The present invention relates to a deep learning-based anomaly detection device and method for manufacturing images that detect anomalies in images of manufactured products using a deep learning algorithm.

최근, 제조업에서 제조 물품의 영상(이하, '제조 영상'이라 함)에 대한 이상 여부를 검사하는 이상 검사 장치에 있어서, 기존의 영상 처리 알고리즘을 채용한 이상 검사 장치를 대체하기 위해, CNN(Convolutional Neural Network) 등의 딥러닝 기술을 채용한 비전 검사 시스템에 대한 연구 및 개발이 이루어지고 있다.Recently, in the manufacturing industry, in an abnormality inspection device that inspects images of manufactured products (hereinafter referred to as 'manufacturing images') for abnormalities, CNN (Convolutional Research and development are being conducted on vision inspection systems that employ deep learning technologies such as Neural Network.

특히, 분류(classification)는 딥러닝에서 특히 활용분야가 높으며 높은 정확도의 성능으로 제품의 양품과 불량을 구분하는데 사용될 수 있다. 하지만 분류의 경우, 많은 불량 데이터와 라벨이 필요하기 때문에 빠른 변화가 요구되는 제조현장에서는 그 사용에 매우 제한적이다. In particular, classification has a particularly high application in deep learning and can be used to distinguish between good and defective products with high accuracy performance. However, because classification requires a lot of defective data and labels, its use is very limited in manufacturing sites where rapid changes are required.

이러한 문제를 해결하기 위해, 최근에는 라벨이 없이 학습을 하는 자율 학습(Unsupervised learning)이 매우 활발히 연구되고 있다. 하지만 딥러닝은 데이터에 매우 종속적이기 때문에 연구되는 SNS(Social Networking Services) 데이터나 일반 영상을 기반으로 하는 알고리즘을 그대로 적용하게 되면 성능 저하를 보이게 된다. To solve this problem, unsupervised learning, which involves learning without labels, has been actively researched recently. However, because deep learning is very dependent on data, performance will deteriorate if algorithms based on SNS (Social Networking Services) data or general images being studied are applied as is.

기존의 영상처리 방식 대신, 딥러닝의 분류(Classification)를 적용함으로써, 영상처리로는 검출하기 어려운 불량유형에 대해 많은 성능 개선이 이루어져 왔지만, 분류의 성능이 보장되기 위해서는 양품과 불량의 데이터의 균형이 맞춰진 상태로 많은 데이터를 수집해야 한다. 특히, 발생빈도가 매우 낮은 불량 유형의 경우의 데이터는 수집하는데 장 시간(예, 2주 내지 1개월 이상)이 소요되는 단점이 있다.By applying deep learning classification instead of existing image processing methods, much performance has been improved for defect types that are difficult to detect through image processing. However, to ensure classification performance, a balance between good and defective data is required. With this in mind, a lot of data needs to be collected. In particular, there is a disadvantage in that it takes a long time (e.g., 2 weeks to 1 month or more) to collect data for defect types with a very low occurrence frequency.

기존의 이상탐지는 이러한 불량데이터 수집의 어려움을 해결할 수 있는 자율 학습(unsupervised learning) 알고리즘에 대해 많은 연구가 진행되어 왔다. 기존의 분류는 불량 유형별로 데이터를 수집하여 학습을 진행하지만, 기존의 이상탐지 방식은 오직 양품만을 수집하여 학습을 진행할 수 있다.In existing anomaly detection, much research has been conducted on unsupervised learning algorithms that can solve the difficulties of collecting such defective data. Existing classifications learn by collecting data by defect type, but existing anomaly detection methods can only learn by collecting good products.

실제로 양산에 사용중인 딥러닝의 분류 방식과 이상탐지 방식의 차이를 보면, 기존의 일반 분류 방식은 데이터 수집, 데이터 라벨링, 학습의 과정을 반복적으로 수행해야 하지만, 기존의 이상탐지 방식은 충분한 양품만을 수집하여 학습을 진행하기 때문에 데이터 수집기간이 매우 단축 될 수 있으며, 데이터 라벨링에 대한 작업도 필요 없게 되는 장점이 있지만, 기존의 이상탐지 방식은 학습된 데이터를 모두 이용하기 때문에 양품의 종류와 수량이 매우 많은 데이터에는 제대로 동작하지 않는다는 문제점이 있다.Looking at the difference between the deep learning classification method and anomaly detection method that are actually used in mass production, the existing general classification method requires repetitive data collection, data labeling, and learning processes, but the existing anomaly detection method only requires sufficient quality products. Because it collects and learns, the data collection period can be greatly shortened and has the advantage of eliminating the need for data labeling. However, the existing anomaly detection method uses all learned data, so the type and quantity of non-defective products are reduced. The problem is that it does not work properly with very large amounts of data.

일 예로, 오토 엔코더(Auto-encoder) 구조는 데이터를 효과적으로 압축 할 수 있는 딥러닝 구조로 자율 학습(Unsupervised learning)에서 널리 사용되는 구조이다. CNN 구조의 오토 엔코더(Auto-encoder)를 이용하면, 영상의 데이터 분포를 쉽게 학습 할 수 있기 때문에 양품 데이터를 학습한 뒤, 불량데이터를 오토 엔코더(Auto-encoder) 구조에 통과시키게 되면, 양품으로 복원되기 때문에 원본과의 영상차이를 이용하여 이상탐지에 이용 할 수 있다. For example, the auto-encoder structure is a deep learning structure that can effectively compress data and is a widely used structure in unsupervised learning. If you use an auto-encoder with a CNN structure, you can easily learn the data distribution of the image, so after learning the good product data, if you pass the bad data through the auto-encoder structure, it becomes a good product. Because it is restored, it can be used for abnormality detection using the image difference from the original.

하지만, 오토 엔코더(Auto-encoder)는 병목구조를 가지기 때문에 데이터 복원 시에 고주파 영역에 흐릿해지는 문제가 발생된다. 이는 미세 불량과 고주파 정상영역의 구분이 어렵게 되며, 이상탐지의 성능을 떨어뜨리게 되는 문제점이 있다.However, because the auto-encoder has a bottleneck structure, a problem of blurring in the high frequency region occurs during data restoration. This makes it difficult to distinguish between microscopic defects and high-frequency normal areas, and has the problem of deteriorating the performance of abnormality detection.

한편, 오토 엔코더(Auto-encoder) 구조가 아닌 GAN(Generative adversarial network)을 이용하거나, VAE(Variational AutoEncoder)를 이용한 이상탐지도 많이 연구되는 분야이나, GAN의 경우 예측시에 랜덤 벡터를 파인튜닝하여야 한다는 단점이 있으며, VAE는 오토 엔코더(Auto-encoder)와 같은 복원영상의 퀄리티가 낮아지는 문제가 존재하는 문제점이 있다.Meanwhile, anomaly detection using GAN (Generative adversarial network) rather than an auto-encoder structure or VAE ( Variational AutoEncoder) is also a field that is widely studied, but in the case of GAN, random vectors must be fine-tuned when making predictions. VAE has the disadvantage of lowering the quality of the restored image like an auto-encoder.

또한, 제조현장에서 이상탐지를 적용하기 위해서는 오토 엔코더(Auto-encoder)의 병목에 의한 데이터 소실문제가 해결되어야 하며, 매우 다양한 종류의 양품에도 적용이 가능해야 하는 문제점이 있다.In addition, in order to apply abnormality detection at the manufacturing site, the problem of data loss due to the bottleneck of the auto-encoder must be resolved, and it must be applicable to a wide variety of types of good products.

(선행기술문헌)(Prior art literature)

(특허문헌 1) JP 공개특허 공보 제2020-139905호 (2019.04.03) (Patent Document 1) JP Publication Patent Publication No. 2020-139905 (2019.04.03)

(특허문헌 2) KR 공개특허 공보 제10-2020-0135730 (2019.05.22) (Patent Document 2) KR Public Patent Publication No. 10-2020-0135730 (2019.05.22)

(특허문헌 3) KR 공개특허 공보 제10-2021-0050186 (2019.10.28) (Patent Document 3) KR Public Patent Publication No. 10-2021-0050186 (2019.10.28)

본 발명의 일 실시 예는, 오토-엔코더(Auto-encoder) 등의 이미지 제너레이터로 복원된 영상과 원본 영상에 대해, 패치단위로 대조학습을 수행하여, 신속하게 제조 영상의 이상을 감지할 수 있는 딥러닝 기반 제조 영상의 이상 탐지 장치 및 방법을 제공한다.One embodiment of the present invention is capable of quickly detecting abnormalities in the manufactured image by performing contrast learning on a patch-by-patch basis on the image restored with an image generator such as an auto-encoder and the original image. Provides a deep learning-based anomaly detection device and method in manufacturing images.

본 발명의 일 실시 예에 의해, 학습대상인 양품의 복수의 영상 데이터에 대상으로 제1 딥러닝 알고리즘을 학습하고, 검사대상인 제1 영상 데이터에 대해 상기 학습된 제1 딥러닝 알고리즘을 적용하여 제2 영상 데이터를 생성하는 이미지 제너레이터; 상기 제1 영상 데이터와 상기 제2 영상 데이터에 대해 제1 연산을 수행하여, 상기 제1 영상 데이터와 상기 제2 영상 데이터 간의 차이 영상에 해당되는 제3 영상 데이터를 출력하는 제1 연산부; 학습대상인 양품의 복수의 영상 데이터를 대상으로 제2 딥러닝 알고리즘을 학습하고, 검사대상인 상기 제1 영상 데이터와 상기 제2 영상 데이터에 대해 상기 학습된 제2 딥러닝 알고리즘을 적용하여, 상기 제1 영상 데이터와 상기 제2 영상 데이터 간의 특징 정보를 갖는 영상 마스크 데이터를 출력하는 특징 추출기; 및 상기 제3 영상 데이터와 상기 영상 마스크 데이터에 대해 제2 연산을 수행하여, 이상 정보를 갖는 제4 영상 데이터를 생성하는 제2 연산부; 를 포함하는 딥러닝 기반 제조 영상의 이상 탐지 장치가 제안된다.According to an embodiment of the present invention, a first deep learning algorithm is learned on a plurality of image data of a good product that is a learning target, and the learned first deep learning algorithm is applied to the first image data that is an inspection target to create a second deep learning algorithm. An image generator that generates image data; a first operation unit that performs a first operation on the first image data and the second image data and outputs third image data corresponding to a difference image between the first image data and the second image data; A second deep learning algorithm is learned on a plurality of image data of a good product that is a learning target, and the learned second deep learning algorithm is applied to the first image data and the second image data that are inspection targets, and the first a feature extractor that outputs image mask data having feature information between image data and the second image data; and a second operation unit that performs a second operation on the third image data and the image mask data to generate fourth image data having abnormal information. A deep learning-based anomaly detection device for manufacturing images is proposed.

또한, 본 발명의 다른 일 실시 예에 의해, 학습대상인 양품의 복수의 영상 데이터에 대상으로 제1 딥러닝 알고리즘을 학습하고, 검사대상인 제1 영상 데이터에 대해 상기 학습된 제1 딥러닝 알고리즘을 적용하여 제2 영상 데이터를 생성하는 이미지 제너레이팅 단계; 상기 제1 영상 데이터와 상기 제2 영상 데이터에 대해 제1 연산을 수행하여, 상기 제1 영상 데이터와 상기 제2 영상 데이터 간의 차이 영상에 해당되는 제3 영상 데이터를 출력하는 제1 연산 단계; 학습대상인 양품의 복수의 영상 데이터를 대상으로 제2 딥러닝 알고리즘을 학습하고, 검사대상인 상기 제1 영상 데이터와 상기 제2 영상 데이터에 대해 상기 학습된 제2 딥러닝 알고리즘을 적용하여, 상기 제1 영상 데이터와 상기 제2 영상 데이터 간의 특징 정보를 갖는 영상 마스크 데이터를 출력하는 특징 추출 단계; 및 상기 제3 영상 데이터와 상기 영상 마스크 데이터에 대해 제2 연산을 수행하여, 이상 정보를 갖는 제4 영상 데이터를 생성하는 제2 연산 단계; 를 포함하는 딥러닝 기반 제조 영상의 이상 탐지 방법이 제안된다.In addition, according to another embodiment of the present invention, a first deep learning algorithm is learned on a plurality of image data of a good product that is a learning target, and the learned first deep learning algorithm is applied to the first image data that is an inspection target. an image generating step of generating second image data; A first operation step of performing a first operation on the first image data and the second image data to output third image data corresponding to a difference image between the first image data and the second image data; A second deep learning algorithm is learned on a plurality of image data of a good product that is a learning target, and the learned second deep learning algorithm is applied to the first image data and the second image data that are inspection targets, and the first A feature extraction step of outputting image mask data having feature information between image data and the second image data; and a second operation step of performing a second operation on the third image data and the image mask data to generate fourth image data having abnormal information. A deep learning-based anomaly detection method of manufacturing images is proposed.

본 발명의 일 실시 예에 의하면, 제조 공정에서의 제조 영상에 대해, 오토 엔코더(Auto-encoder)등의 이미지 제너레이터로 복원된 영상과 원본 영상에 대해 패치단위로 콘트라-임베딩(contra-embedding) 알고리즘 학습을 통해, 각 패치(Patch)단위별로 특징벡터의 대조학습을 수행하여, 같은 위치의 특징벡터의 차이를 줄여주고, 다른 위치의 특징벡터의 차이가 커지도록 학습하여, 제조영상의 이상(Defect)을 신속하게 감지할 수 있는 효과가 있다.According to an embodiment of the present invention, for the manufacturing image in the manufacturing process, a contrast-embedding algorithm is applied on a patch-by-patch basis for the image restored by an image generator such as an auto-encoder and the original image. Through learning, contrast learning of feature vectors is performed for each patch unit, reducing the difference between feature vectors at the same location, and learning to increase the difference between feature vectors at different locations to detect defects in manufacturing images. ) has the effect of quickly detecting.

부연하면, 양품만으로 학습을 진행함에 따라 적기에 생산에 대응할 수 있고, 불량의 종류 중 사이즈를 측정해야 하는 경우가 있으며, 이를 딥러닝으로 해결하기 위해서는 세그먼테이션(Segmentation) 방법을 사용할 수 있고, 자동 생성된 세그먼테이션 마스크(Segmentation mask)를 통해 세그먼테이션(Segmentation) 학습라벨로 사용하게 되면, 세그먼테이션(Segmentation)용 데이터 구성에 시간을 대폭 단축 할 수 있는 효과가 있다.In other words, by learning only with good products, you can respond to production in a timely manner. In some cases, you need to measure the size of defects. To solve this with deep learning, you can use the segmentation method and automatically generate If the segmentation mask is used as a segmentation learning label, the time to configure data for segmentation can be significantly reduced.

도 1은 본 발명의 일 실시 예에 따른 딥러닝 기반 제조 영상의 이상 탐지 장치의 일 예시도이다.
도 2는 도 1의 영상 데이터의 예시도이다.
도 3은 제1 딥러닝 알리고리즘의 동작과정 설명도이다.
도 4는 딥러닝 기반 제조 영상의 이상 탐지 장치의 콘트라-임베딩(contra-embedding) 알고리즘에 의한 학습 과정을 보이는 예시도이다.
도 5는 이상탐지 결과 예시도이다.
도 6은 부품1에 대한 이상 탐지한 결과 영상에 대한 일 예시도이다.
도 7은 부품2에 대한 이상 탐지한 결과 영상에 대한 일 예시도이다.
도 8은 본 발명의 일 실시 예에 따른 딥러닝 기반 제조 영상의 이상 탐지 방법의 일 예시도이다.
1 is an exemplary diagram of a deep learning-based anomaly detection device in a manufacturing image according to an embodiment of the present invention.
FIG. 2 is an example diagram of the image data of FIG. 1.
Figure 3 is an explanatory diagram of the operation process of the first deep learning algorithm.
Figure 4 is an example diagram showing the learning process by the contra-embedding algorithm of the deep learning-based manufacturing image abnormality detection device.
Figure 5 is an example of anomaly detection results.
Figure 6 is an example diagram of an image as a result of abnormality detection for Part 1.
Figure 7 is an example diagram of an image resulting from abnormality detection for Part 2.
Figure 8 is an example diagram of a deep learning-based anomaly detection method in a manufacturing image according to an embodiment of the present invention.

이하에서는, 본 발명은 설명되는 실시 예에 한정되지 않으며, 본 발명의 정신 및 범위를 벗어나지 않으면서 다양하게 변경될 수 있음이 이해되어야 한다.Hereinafter, it should be understood that the present invention is not limited to the described embodiments, and that various changes may be made without departing from the spirit and scope of the present invention.

또한, 본 발명의 각 실시 예에 있어서, 하나의 예로써 설명되는 구조, 형상 및 수치는 본 발명의 기술적 사항의 이해를 돕기 위한 예에 불과하므로, 이에 한정되는 것이 아니라 본 발명의 정신 및 범위를 벗어나지 않으면서 다양하게 변경될 수 있음이 이해되어야 한다. 본 발명의 실시 예들은 서로 조합되어 여러 가지 새로운 실시 예가 이루어질 수 있다.In addition, in each embodiment of the present invention, the structure, shape and numerical value described as an example are only examples to help understand the technical details of the present invention, and are not limited thereto, but rather convey the spirit and scope of the present invention. It should be understood that various changes can be made without deviating from it. Embodiments of the present invention can be combined with each other to create various new embodiments.

그리고, 본 발명에 참조된 도면에서 본 발명의 전반적인 내용에 비추어 실질적으로 동일한 구성과 기능을 가진 구성요소들은 동일한 부호를 사용할 것이다.In addition, in the drawings referred to in the present invention, components having substantially the same structure and function in light of the overall content of the present invention will use the same symbols.

이하에서는, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있도록 하기 위해서, 본 발명의 실시 예를 첨부한 도면을 참조하여 상세히 설명한다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings in order to enable those skilled in the art to easily practice the present invention.

도 1은 본 발명의 일 실시 예에 따른 딥러닝 기반 제조 영상의 이상 탐지 장치의 일 예시도이고, 도 2는 도 1의 영상 데이터의 예시도이다.Figure 1 is an example diagram of an abnormality detection device for a deep learning-based manufacturing image according to an embodiment of the present invention, and Figure 2 is an example diagram of the image data of Figure 1.

도 1 및 도 2를 참조하면, 본 발명의 일 실시 예에 따른 딥러닝 기반 제조 영상의 이상 탐지 장치(10)는, 이미지 제너레이터(100), 제1 연산부(200), 특징 추출기(300), 및 제2 연산부(400)를 포함할 수 있다.Referring to Figures 1 and 2, the deep learning-based anomaly detection device 10 in a manufacturing image according to an embodiment of the present invention includes an image generator 100, a first calculation unit 200, a feature extractor 300, and a second calculation unit 400.

이미지 제너레이터(100)는, 학습대상인 양품의 복수의 영상 데이터에 대상으로 제1 딥러닝 알고리즘을 학습하고, 검사대상인 제1 영상 데이터(VD1)에 대해 상기 학습된 제1 딥러닝 알고리즘을 적용하여 제2 영상 데이터를 생성할 수 있다.The image generator 100 learns a first deep learning algorithm on a plurality of image data of a good product that is a learning target, and applies the learned first deep learning algorithm to the first image data (VD1) that is an inspection target to create a first deep learning algorithm. 2 Image data can be generated.

제1 연산부(200)는, 원본 영상에 대응되는 상기 제1 영상 데이터(VD1)와 이미지 제너레이터(100)에 의해 복원된 영상에 대응되는 상기 제2 영상 데이터(VD2)에 대해 제1 연산을 수행하여, 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2) 간의 차이 영상에 해당되는 제3 영상 데이터(VD3)를 출력할 수 있다.The first operation unit 200 performs a first operation on the first image data VD1 corresponding to the original image and the second image data VD2 corresponding to the image restored by the image generator 100. Accordingly, third image data VD3 corresponding to the difference image between the first image data VD1 and the second image data VD2 may be output.

특징 추출기(300)는, 학습대상인 양품의 복수의 영상 데이터를 대상으로 제2 딥러닝 알고리즘을 학습하고, 검사대상인 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2)에 대해 상기 학습된 제2 딥러닝 알고리즘을 적용하여, 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2) 간의 특징 정보를 갖는 영상 마스크 데이터(VMD)를 출력할 수 있다.The feature extractor 300 learns a second deep learning algorithm on a plurality of image data of a good product that is a learning target, and learns the first image data (VD1) and the second image data (VD2) that are inspection targets. By applying the second deep learning algorithm, image mask data (VMD) having characteristic information between the first image data (VD1) and the second image data (VD2) can be output.

일 예로, 상기 제2 딥러닝 알고리즘으로 콘트라-임베딩(contra-embedding) 알고리즘을 사용하여, 학습대상인 양품의 복수의 제1 영상 데이터와 제2 영상 데이터에 대해, 각 패치단위별 비교하는 상기 콘트라-임베딩(contra-embedding) 알고리즘을 학습하여, 상기 검사대상인 상기 제1 영상 데이터에 대해 각 패치단위별로 양품 및 불량을 분류할 수 있다.As an example, the contra-embedding algorithm is used as the second deep learning algorithm to compare a plurality of first image data and second image data of a good product that is a learning target for each patch unit. By learning a contra-embedding algorithm, it is possible to classify good products and defects for each patch unit for the first image data that is the inspection target.

예를 들어, 제2 딥러닝 알고리즘은, 콘트라-임베딩(Contra-embedding) 학습 알고리즘에 해당될 수 있으며, 이에 대해서는 도 4 및 하기 수학식 2를 참조하여 설명한다.For example, the second deep learning algorithm may correspond to a contra-embedding learning algorithm, which will be described with reference to FIG. 4 and Equation 2 below.

이에 따라, 상기 콘트라-임베딩(Contra-embedding)을 통해 학습된 네트워크와 기존 이미지 제너레이터(100)를 결합하여 최종 이상탐지 결과를 도출할 수 있다.Accordingly, the final anomaly detection result can be derived by combining the network learned through contra-embedding and the existing image generator 100.

부연하면, 본 발명에서는 이상탐지를 위해 두 개의 네트워크를 이용하는데, 첫 번째는 이미지 제너레이터(100) 구조이며, 두 번째는 콘트라-임베딩(Contra-embedding)을 통해 학습된 특징 추출기(Feature extractor)(300) 구조 이다. In detail, the present invention uses two networks for anomaly detection. The first is an image generator 100 structure, and the second is a feature extractor learned through contra-embedding ( 300) structure.

이미지 제너레이터(100) 구조는 양품의 제1 영상 데이터(VD1)를 압축한 뒤 복원하고, 이 경우, 만약 불량이 이미지 제너레이터(100)를 통과하면, 복원시 양품과 유사한 제2 영상 데이터(VD2)를 생성할 수 있다. 이들 두 영상 데이터(VD1,VD2) 간의 차이를 SSIM(Structural Similarity) 알고리즘을 통해 구하게 되면 제1 이상탐지 맵을 갖는 3 영상 데이터(VD3)를 생성할 수 있다. The structure of the image generator 100 compresses the first image data (VD1) of a good product and then restores it. In this case, if a defect passes through the image generator 100, the second image data (VD2) similar to the good product is generated during restoration. can be created. If the difference between these two image data (VD1, VD2) is obtained through the SSIM (Structural Similarity) algorithm, 3 image data (VD3) with the first anomaly detection map can be generated.

이어서, 특징 추출기(300)는, 학습대상인 양품 영상에 대해 콘트라-임베딩(Contra-embedding) 학습을 수행한 이후, 검사대상인 원본 영상의 제1 영상 데이터(VD1)와 이미지 제너레이터(100)에서 복원된 제2 영상 데이터(VD2) 사이의 패치단위 특징 벡터를 비교하여 제2 이상탐지 맵을 갖는 영상 마스크 데이터(VMD)를 생성할 수 있다.Subsequently, the feature extractor 300 performs contra-embedding learning on the image of a good product that is a learning target, and then extracts the first image data (VD1) of the original image that is an inspection target and restored from the image generator 100. Image mask data (VMD) having a second anomaly detection map can be generated by comparing patch unit feature vectors between the second image data (VD2).

일 예로, 특징 추출기(300)는, 제1 영상 데이터(VD1)는 각 패치(N*32*32)와, 제2 영상 데이터(VD2)의 각 패치(N*32*32)별로 비교할 수 있다. 여기서, N은 패치의 개수이고, '32*32'는 32픽셀*32픽셀 크기의 영상의 사이즈가 될 수 있다.As an example, the feature extractor 300 may compare each patch (N*32*32) of the first image data (VD1) with each patch (N*32*32) of the second image data (VD2). . Here, N is the number of patches, and '32*32' can be the size of the image of 32 pixels*32 pixels.

다음, 상기 제3 영상 데이터(VD3)와 영상 마스크 데이터(VMD)를 제2 연산(예, 곱셈)함으로써 최종 이상탐지 맵을 갖는 제4 영상 데이터(VD4)를 생성할 수 있으며, 상기 제4 영상 데이터(VD4)를 이용하여 이상 데이터를 검출할 수 있고 또한 세그멘테이션 마스크(Segmentation mask)로 이용할 수도 있다.Next, fourth image data VD4 having a final anomaly detection map can be generated by performing a second operation (e.g., multiplication) on the third image data VD3 and the image mask data VMD, and the fourth image data VD4 has a final anomaly detection map. Abnormal data can be detected using data VD4 and can also be used as a segmentation mask.

제2 연산부(400)는, 상기 제3 영상 데이터(VD3)와 상기 영상 마스크 데이터(VMD)에 대해 제2 연산(예, 곱셈)을 수행하여, 이상 정보를 갖는 제4 영상 데이터(VD4)를 생성할 수 있다.The second operation unit 400 performs a second operation (e.g., multiplication) on the third image data VD3 and the image mask data VMD to generate fourth image data VD4 having abnormal information. can be created.

상기 이미지 제너레이터(100)에서의 제1 딥러닝 알고리즘은, 학습대상인 양품에 대해 학습한 이후에, 검사과정에서 불량 영상에 해당되는 제1 영상 데이터를 입력받으면 복원시 양품영상에 해당되는 상기 제2 영상 데이터를 생성할 수 있다.The first deep learning algorithm in the image generator 100 learns about a good product as a learning object, and when it receives first image data corresponding to a defective image during the inspection process, the second deep learning algorithm corresponds to a good product image during restoration. Image data can be generated.

상기 제1 연산부(200)의 제1 연산은, 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2)를 감산하는 감산 연산을 포함할 수 있다.The first operation of the first operation unit 200 may include a subtraction operation for subtracting the first image data VD1 and the second image data VD2.

일 예로, 상기 제1 연산부(200)의 제1 연산은, SSIM (Structural Similarity))-오토 엔코더 (Auto-encoder) 알고리즘을 학습하는 과정에 해당될 수 있다.As an example, the first operation of the first operation unit 200 may correspond to a process of learning an SSIM (Structural Similarity)-Auto-encoder algorithm.

일 예로, 이미지 제너레이터(100)의 학습은 SSIM (Structural Similarity))-오토 엔코더(Auto-encoder) 알고리즘의 학습 방법을 이용하며, 손실(Loss) 함수인 SSIM은 하기 수학식1과 같다. As an example, the image generator 100 uses the learning method of the SSIM (Structural Similarity)-Auto-encoder algorithm, and SSIM, a loss function, is expressed in Equation 1 below.

[수학식 1][Equation 1]

상기 수학식1에서, p, q는 원본영상인 제1 영상 데이터(VD1)와 오토 엔코더(Auto-encoder)로 복원된 제2 영상 데이터(VD2)를 <k x k>로 크롭(crop)한 영상 데이터를 의미한다. μp, μq 는 평균강도이고, σp, σq는 분산이고, σpq는 공분산을 의미하며, c1 과 c2는 상수로 0.01, 0.03을 일반적으로 사용할 수 있다.In Equation 1, p and q are images obtained by cropping the first image data (VD1), which is the original image, and the second image data (VD2) restored with an auto-encoder to <kx k>. It means data. μ p, μ q are the average intensity, σ p, σ q are the variance, σ pq means the covariance, c 1 and c 2 are constants, and 0.01 and 0.03 can generally be used.

전술한 바와 같이, 양품인 영상 데이터를 오토 엔코더(Auto-encoder)에서 학습하게 되면, 양품의 데이터 분포를 배우게 되므로, 불량인 영상 데이터가 오토 엔코더(Auto-encoder)를 통과하면, 양품의 영상에 대응되는 영상 데이터로 복원되게 된다. As mentioned above, when the non-defective video data is learned from the auto-encoder, the data distribution of the non-defective product is learned. Therefore, when the defective video data passes through the auto-encoder, the video of the non-defective product is It is restored with corresponding video data.

본 발명의 각 도면에 대해, 동일한 부호 및 동일한 기능의 구성요소에 대해서는 가능한 불필요한 중복 설명은 생략될 수 있고, 각 도면에 대해 가능한 차이점에 대한 사항이 설명될 수 있다.For each drawing of the present invention, unnecessary redundant descriptions of components with the same symbols and the same function may be omitted, and possible differences between the drawings may be explained.

도 3은 제1 딥러닝 알리고리즘의 동작과정 설명도이다.Figure 3 is an explanatory diagram of the operation process of the first deep learning algorithm.

도 3을 참조하여, 제1 딥러닝 알고리즘의 동작과정에 대해 설명하면, 상기 제1 딥러닝 알고리즘은 VD1의 데이터분포를 학습하는 알고리즘으로 입력된 영상을 그대로 복원하는 과정이 수행 된다. Referring to FIG. 3, when explaining the operation process of the first deep learning algorithm, the first deep learning algorithm is an algorithm that learns the data distribution of VD1, and a process of restoring the input image as is is performed.

예를 들어, NxN크기의 영상이 입력되게 되면, 입력된 wxh의 영상크기는 일차원의 M크기의 벡터로 압축되게 되고, 압축된 벡터를 다시 wxh원본 크기로 복원하게 된다. For example, when an image of NxN size is input, the input image size of wxh is compressed into a one-dimensional vector of size M, and the compressed vector is restored to the original size of wxh.

이 과정에서 VD1 데이터들의 중요한 요소가 M크기의 벡터에 압축되게 되고, 학습이 종료된 이후에 학습되지 않은 데이터(불량영상)가 VD1로 입력되면 학습되었던 영상 중하나로 복원을 하게 된다. In this process, important elements of the VD1 data are compressed into a vector of size M, and after learning is completed, if untrained data (bad images) are input to VD1, they are restored to one of the learned images.

도 4는 딥러닝 기반 제조 영상의 이상 탐지 장치의 콘트라-임베딩(contra-embedding) 알고리즘에 의한 학습 과정을 보이는 예시도이다.Figure 4 is an example diagram showing the learning process by the contra-embedding algorithm of the deep learning-based manufacturing image abnormality detection device.

도 4를 참조하면, 상기 특징 추출기(300)는, 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2)간의 특징 벡터 정보(FVI)를 추출하고, 상기 특징 벡터 정보(FVI)에 기초한 특징 정보를 갖는 영상 마스크 데이터(VMD)를 생성할 수 있다.Referring to FIG. 4, the feature extractor 300 extracts feature vector information (FVI) between the first image data (VD1) and the second image data (VD2), and adds the feature vector information (FVI) to the feature vector information (FVI). Image mask data (VMD) having based feature information can be generated.

일 예로, 상기 특징 추출기(300)는, 상기 제1 딥러닝 알고리즘을 학습하는 경우, 학습대상인 양품의 복수의 제1 영상 데이터(VD1)와 제2 영상 데이터(VD2)에 대해, 각 패치단위별 비교하는 콘트라-임베딩(contra-embedding) 알고리즘을 학습하여, 상기 검사대상인 상기 제1 영상 데이터(VD1)에 대해 각 패치단위별로 양품 및 불량을 분류할 수 있다.As an example, when learning the first deep learning algorithm, the feature extractor 300 is used for each patch unit for a plurality of first image data (VD1) and second image data (VD2) of a good product that is a learning target. By learning a contra-embedding algorithm for comparison, it is possible to classify good products and defective products for each patch unit for the first image data (VD1) that is the inspection target.

또한, 상기 특징 추출기(300)는, 상기 학습된 콘트라-임베딩(contra-embedding) 알고리즘을 적용하여, 검사 대상인 상기 제1 영상 데이터(VD1)에 대해, 각 패치단위별 특징 벡터 정보(FVI)를 추출하고, 이 특징 벡터 정보(FVI)에 기초해 각 패치단위별 양품 정보 및 불량 정보를 갖는 영상 마스크 데이터(VMD)를 출력할 수 있다.In addition, the feature extractor 300 applies the learned contra-embedding algorithm to generate feature vector information (FVI) for each patch unit to the first image data VD1, which is an inspection target. It is possible to extract image mask data (VMD) with good product information and defective information for each patch unit based on this feature vector information (FVI).

일 예로, 콘트라-임베딩(contra-embedding) 알고리즘에 의한 학습에서 사용되는 손실(LOSS) 함수는 하기 수학식2와 같다.As an example, the loss function used in learning by the contra-embedding algorithm is as shown in Equation 2 below.

[수학식 2][Equation 2]

상기 수학식2에서, zi 는 원본영상인 제1 영상 데이터의 패치가 특징 추출기(300)(Feature extractor)를 통해 얻어진 특징 벡터이고, zj는 이미지 제너레이터(100)로 복원된 제2 영상 데이터의 패치가 특징 추출기(300)(Feature extractor)로 얻어진 특징 벡터이다. Sim은 코사인 유사도를 의미하며, 는 하이퍼 파라미터이다.In Equation 2, z i is a feature vector obtained from a patch of the first image data, which is the original image, through the feature extractor 300, and z j is the second image data restored by the image generator 100. The patch is a feature vector obtained by the feature extractor 300. Sim means cosine similarity, is a hyperparameter.

도 4을 참조하면, 상기 특징 추출기(300)는, 크롭부(310), 대조학습부(330), 및 이상점수 산출부(350)를 포함할 수 있다.Referring to FIG. 4 , the feature extractor 300 may include a cropping unit 310, a contrast learning unit 330, and an abnormality score calculating unit 350.

먼저, 크롭부(310)는 이미지 제너레이터(100)를 통해 복원된 영상과 원본영상을 패치단위로 크롭(crop)할 수 있다.First, the crop unit 310 can crop the image restored through the image generator 100 and the original image in patch units.

대조학습부(330)는, 영상의 같은 위치에 대해서는 코사인 유사도가 같아지도록 학습하며, 다른 위치의 패치에 대해서는 코사인 유사도가 멀어지도록 학습하며, 여기서, 상기 대조학습부(330)는 프로젝터(Prpjector)를 더 포함할 수 있다. 예를 들어, 상기 프로젝터는 특징 추출기(feature extractor)에서 추출된 벡터 중 중요한 요소만 압축하는 역할을 수행할 수 있다.The contrast learning unit 330 learns so that the cosine similarity is the same for the same position in the image, and the cosine similarity learns to become distant for patches at different positions. Here, the contrast learning unit 330 is a projector (Prpjector). It may further include. For example, the projector may play the role of compressing only important elements among vectors extracted from a feature extractor.

이상점수 산출부(350)는, 이미지 제너레이터(100)를 통해 복윈 시에, 같은 위치의 특징벡터는 같아지고, 다른 위치의 특징벡터는 달라지면서, 이상 여부에 따른 차이가 명확히 생기게 되며, 이를 이용하여, 이상점수(anomaly score)를 산출할 수 있다.When regenerating through the image generator 100, the abnormality score calculation unit 350 uses the image generator 100 to ensure that the feature vectors at the same location become the same and the feature vectors at other locations change, clearly creating a difference depending on whether there is an abnormality. Thus, an anomaly score can be calculated.

부연하면, 이상 탐지 맵(Anomaly Map)(M)은 SSIM 알고리즘을 통해 얻어진 제3 영상 데이터에 포함된 제1 이상탐지 맵(Mssim)과 특징 추출기(300)의 콘트라-임베딩(contra-embedding) 알고리즘을 통해 얻어진 영상 마스크 데이터(VMD)에 포함된 제2 이상탐지 맵(Mcontra)을 곱함으로써, 최종 이상 탐지 맵(M)을 구할 수 있으며, 이상 점수(anomaly score)는 이상 탐지 맵(Anomaly Map)(M)에서 하기 수학식3과 같이, 가장 큰 값으로 선택할 수 있다. In detail, the anomaly detection map (M) is the contra-embedding of the first anomaly detection map (M ssim ) and the feature extractor 300 included in the third image data obtained through the SSIM algorithm. The final anomaly detection map (M) can be obtained by multiplying the image mask data (VMD) obtained through the algorithm by the second anomaly detection map (M contra ), and the anomaly score is the anomaly detection map (Anomaly score). In Map (M), the largest value can be selected as shown in Equation 3 below.

[수학식 3][Equation 3]

상기 제2 연산부(400)의 제2 연산은, 상기 제3 영상 데이터(VD3)와 상기 영상 마스크 데이터(VMD)를 곱하는 곱셈 연산을 포함할 수 있다.The second operation of the second operation unit 400 may include a multiplication operation that multiplies the third image data VD3 and the image mask data VMD.

또한, 도 4 및 상기 수학식 2를 참조하면, 일 예로, 제2 딥러닝 알고리즘은, 콘트라-임베딩(Contra-embedding) 학습 알고리즘에 해당될 수 있으며, 이는 이미지 제너레이터(100)에 의해 복원된 영상에 대응되는 제2 영상 데이터(VD2)와 원본영상에 대응되는 제1 영상 데이터(VD1)를 패치단위로 콘트라-임베딩(Contra-embedding) 학습을 수행하여, 같은 위치의 특징벡터의 차이를 줄여주고, 다른 위치의 특징벡터의 차이가 커지도록 학습할 수 있다.In addition, referring to FIG. 4 and Equation 2 above, as an example, the second deep learning algorithm may correspond to a contra-embedding learning algorithm, which is an image restored by the image generator 100. Contra-embedding learning is performed on the second image data (VD2) corresponding to the first image data (VD1) corresponding to the original image on a patch-by-patch basis to reduce the difference in feature vectors at the same location. , it can be learned so that the difference between feature vectors at different locations increases.

도 5는 이상탐지 결과 예시도이다.Figure 5 is an example of anomaly detection results.

도 5를 참조하면, 도 5에 도시된 테이블은, 학습 결과를 검사 정확도로 나타냈다.Referring to FIG. 5, the table shown in FIG. 5 represents learning results in test accuracy.

먼저, 커패시터(MLCC) 데이터를 본 발명에 적용한 경우, 커패시터(MLCC)에 본 방법을 적용하기 위해, 커패시터-부품1은 양품 6,880장을 이용하여 학습하였으며, 테스트 시에는 불량 587장, 양품 830장을 이용하였다. 이 경우, 검사 정확도는 97.1%를 보였다.First, when applying the capacitor (MLCC) data to the present invention, in order to apply the method to the capacitor (MLCC), capacitor-part 1 was learned using 6,880 good products, and during testing, 587 defective products and 830 good products were used. was used. In this case, the test accuracy was 97.1%.

다음, 커패시터-부품2는 양품 2201장을 학습 한 뒤, 양품 639장, 불량 1,013장을 테스트 하였다. 이 경우, 검사 정확도는 94.5%를 보였다. Next, Capacitor-Part 2 studied 2,201 good products, then tested 639 good products and 1,013 defective products. In this case, the test accuracy was 94.5%.

도 6은 부품1에 대한 이상 탐지한 결과 영상에 대한 일 예시도이고, 도 7은 부품2에 대한 이상 탐지한 결과 영상에 대한 일 예시도이다.Figure 6 is an example diagram of an image as a result of abnormality detection for Part 1, and Figure 7 is an example diagram of an image as a result of abnormality detection for Part 2.

도 6을 참조하면, 커패시터의 경우, 6가지 서로 다른 이상(Defect)을 갖는 케이스(C1~C6)에 대한 원본영상(제1 영상 데이터(VD1)에 해당됨)에 대해 검사한 결과, 검사영상(제4 영상 데이터(VD4)에 해당됨)에는, 원본 영상에 있는 이상(Defect)이 정확히 표시되어 있음을 알 수 있다.Referring to FIG. 6, in the case of a capacitor, as a result of inspecting the original image (corresponding to the first image data (VD1)) for cases (C1 to C6) with six different defects, the inspection image ( It can be seen that defects in the original image are accurately displayed in the fourth image data (corresponding to VD4).

도 7을 참조하면, 카메라 모듈의 경우, 4가지 서로 다른 이상(Defect)을 갖는 케이스(C1~C4)에 대한 원본영상(VD1)에 대해 검사한 결과, 검사 영상 (VD4)에는, 원본 영상에 있는 이상(Defect)이 정확히 표시되어 있음을 알 수 있다. Referring to FIG. 7, in the case of a camera module, as a result of inspecting the original image (VD1) for cases (C1 to C4) with four different defects, the inspection image (VD4) shows that the original image You can see that any defects are displayed accurately.

이후, 도 1 내지 도 8을 참조하여, 딥러닝 기반 제조 영상의 이상 탐지 방법에 대해 설명한다. Next, with reference to FIGS. 1 to 8, a method for detecting abnormalities in a deep learning-based manufacturing image will be described.

본 출원 서류에서, 딥러닝 기반 제조 영상의 이상 탐지 장치에 대한 설명은, 특별히 반대 설명이 없는 한, 기반 제조 영상의 이상 탐지 방법에 대해서도 적용될 수 있다. 즉, 도 1 내지 도 7을 참조하여 이루어진 설명이, 딥러닝 기반 제조 영상의 이상 탐지 방법에 대한 설명에 적용될 수 있으며, 이에 따라 딥러닝 기반 제조 영상의 이상 탐지 방법에 대한 설명에서, 중복되는 세부 설명은 생략될 수 있다.In this application document, the description of the deep learning-based manufacturing image anomaly detection device can also be applied to the abnormality detection method of the manufacturing image-based manufacturing image, unless specifically stated to the contrary. That is, the description made with reference to FIGS. 1 to 7 can be applied to the description of the method for detecting abnormalities in deep learning-based manufacturing images, and accordingly, in the description of the method for detecting abnormalities in deep learning-based manufacturing images, overlapping details Description may be omitted.

도 8은 본 발명의 일 실시 예에 따른 딥러닝 기반 제조 영상의 이상 탐지 방법의 일 예시도이다.Figure 8 is an example diagram of a deep learning-based anomaly detection method in a manufacturing image according to an embodiment of the present invention.

도 8을 참조하여, 본 발명의 일 실시 예에 따른 딥러닝 기반 제조 영상의 이상 탐지 방법에 대해 설명한다.With reference to FIG. 8, a deep learning-based anomaly detection method in a manufacturing image according to an embodiment of the present invention will be described.

이미지 제너레이팅 단계(S100)에서는, 학습대상인 양품의 복수의 영상 데이터에 대상으로 제1 딥러닝 알고리즘을 학습하고, 검사대상인 제1 영상 데이터(VD1)에 대해 상기 학습된 제1 딥러닝 알고리즘을 적용하여 제2 영상 데이터를 생성할 수 있다. 이는 이미지 제너레이터(100)에서 수행될 수 있다.In the image generation step (S100), a first deep learning algorithm is learned on a plurality of image data of a good product that is a learning target, and the learned first deep learning algorithm is applied to the first image data (VD1) that is an inspection target. Thus, second image data can be generated. This can be performed in the image generator 100.

제1 연산 단계(S200)에서는, 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2)에 대해 제1 연산을 수행하여, 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2) 간의 차이 영상에 해당되는 제3 영상 데이터(VD3)를 출력할 수 있다. 이는 제1 연산부(200)에 의해 수행될 수 있다.In the first operation step (S200), a first operation is performed on the first image data VD1 and the second image data VD2, so that the first image data VD1 and the second image data (VD2) are Third image data (VD3) corresponding to the difference image between VD2) may be output. This can be performed by the first operation unit 200.

특징 추출 단계(S300)에서는, 학습대상인 양품의 복수의 영상 데이터를 대상으로 제2 딥러닝 알고리즘을 학습하고, 검사대상인 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2)에 대해 상기 학습된 제2 딥러닝 알고리즘을 적용하여, 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2) 간의 특징 정보를 갖는 영상 마스크 데이터(VMD)를 출력할 수 있다. 이는 특징 추출기(300)에 의해 수행될 수 있다.In the feature extraction step (S300), a second deep learning algorithm is learned on a plurality of image data of a good product as a learning target, and the first image data (VD1) and the second image data (VD2) as inspection targets are studied. By applying the learned second deep learning algorithm, image mask data (VMD) having feature information between the first image data (VD1) and the second image data (VD2) can be output. This may be performed by feature extractor 300.

제2 연산 단계(S400)에서는, 상기 제3 영상 데이터(VD3)와 상기 영상 마스크 데이터(VMD)에 대해 제2 연산을 수행하여, 이상 정보를 갖는 제4 영상 데이터(VD4)를 생성할 수 있다. 이는 제2 연산부(400)에 의해 수행될 수 있다.In the second operation step (S400), a second operation may be performed on the third image data VD3 and the image mask data VMD to generate fourth image data VD4 having abnormal information. . This can be performed by the second operation unit 400.

상기 학습된 제1 딥러닝 알고리즘은, 양품에 대해 압축-복원 학습을 수행하여, 이후 불량에 해당되는 상기 제1 영상 데이터를 입력되면 복원시 양품에 해당되는 상기 제2 영상 데이터를 생성할 수 있다.The learned first deep learning algorithm performs compression-decompression learning on a non-defective product, and when the first image data corresponding to a defective product is input, the second image data corresponding to a defective product can be generated when restored. .

상기 제1 연산 단계(S200)의 제1 연산은, 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2)를 감산하는 감산 연산을 포함할 수 있다.The first operation of the first operation step (S200) may include a subtraction operation for subtracting the first image data VD1 and the second image data VD2.

상기 제1 연산 단계(S200)의 제1 연산은, SSIM (Structural Similarity))-오토 엔코더(Auto-encoder) 알고리즘을 학습하는 과정에 해당될 수 있다.The first operation of the first operation step (S200) may correspond to the process of learning the SSIM (Structural Similarity)-Auto-encoder algorithm.

상기 특징 추출 단계(S300)는, 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2)간의 특징 벡터 정보(FVI)를 추출하고, 상기 특징 벡터 정보(FVI)에 기초한 특징 정보를 갖는 영상 마스크 데이터(VMD)를 생성할 수 있다.The feature extraction step (S300) extracts feature vector information (FVI) between the first image data (VD1) and the second image data (VD2), and has feature information based on the feature vector information (FVI). Image mask data (VMD) can be generated.

상기 특징 추출 단계(S300)는, 상기 제1 딥러닝 알고리즘을 학습하는 경우, 학습대상인 양품의 상기 제1 영상 데이터(VD1)와 상기 제2 영상 데이터(VD2)에 대해, 각 패치단위별 비교하는 콘트라-임베딩(contra-embedding) 알고리즘을 학습하여, 상기 검사대상인 상기 제1 영상 데이터(VD1)에 대해 각 패치단위별로 양품 및 불량을 분류할 수 있다.In the feature extraction step (S300), when learning the first deep learning algorithm, the first image data (VD1) and the second image data (VD2) of a good product that is a learning target are compared for each patch unit. By learning a contra-embedding algorithm, the first image data VD1, which is the inspection target, can be classified as good or defective for each patch unit.

상기 특징 추출 단계(S300)는, 상기 학습된 콘트라-임베딩(contra-embedding) 알고리즘을 적용하여, 검사 대상인 상기 제1 영상 데이터(VD1)에 대해, 각 패치단위별 특징 벡터 정보(FVI)를 추출하고, 이 특징 벡터 정보(FVI)에 기초해 각 패치단위별 양품 정보 및 불량 정보를 갖는 영상 마스크 데이터(VMD)를 출력할 수 있다.The feature extraction step (S300) applies the learned contra-embedding algorithm to extract feature vector information (FVI) for each patch unit for the first image data (VD1) that is the inspection target. And, based on this feature vector information (FVI), image mask data (VMD) having good product information and defective information for each patch unit can be output.

상기 제2 연산 단계(S400)의 제2 연산은, 상기 제3 영상 데이터(VD3)와 상기 영상 마스크 데이터(VMD)를 곱하는 곱셈 연산을 포함할 수 있다.The second operation of the second operation step (S400) may include a multiplication operation that multiplies the third image data VD3 and the image mask data VMD.

이상에서는 본 발명을 실시 예로써 설명하였으나, 본 발명은 상기한 실시 예에 한정되지 아니하며, 특허청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 분야에서 통상의 지식을 가진 자라면 누구든지 다양한 변형이 가능할 것이다.In the above, the present invention has been described by way of examples, but the present invention is not limited to the above-described embodiments, and those skilled in the art in the field to which the invention pertains can do so without departing from the gist of the invention as claimed in the patent claims. Anyone can make various variations.

100: 이미지 제너레이터
200: 제1 연산부
300: 특징 추출기
400: 제2 연산부
VD1: 제1 영상 데이터
VD2: 제2 영상 데이터
VD3: 제3 영상 데이터
VMD: 영상 마스크 데이터
VD4: 제4 영상 데이터
100: Image generator
200: first operation unit
300: Feature extractor
400: second operation unit
VD1: first image data
VD2: second video data
VD3: Third video data
VMD: Image Mask Data
VD4: Fourth video data

Claims (16)

학습대상인 양품의 복수의 영상 데이터를 대상으로 제1 딥러닝 알고리즘을 학습하고, 검사대상인 제1 영상 데이터에 대해 상기 학습된 제1 딥러닝 알고리즘을 적용하여 제2 영상 데이터를 생성하는 이미지 제너레이터;
상기 제1 영상 데이터와 상기 제2 영상 데이터에 대해 제1 연산을 수행하여, 상기 제1 영상 데이터와 상기 제2 영상 데이터 간의 차이 영상에 해당되는 제3 영상 데이터를 출력하는 제1 연산부;
학습대상인 상기 양품의 복수의 영상 데이터를 대상으로 제2 딥러닝 알고리즘을 학습하고, 검사대상인 상기 제1 영상 데이터와 상기 제2 영상 데이터에 대해 상기 학습된 제2 딥러닝 알고리즘을 적용하여, 상기 제1 영상 데이터와 상기 제2 영상 데이터 간의 특징 정보를 갖는 영상 마스크 데이터를 출력하는 특징 추출기; 및
상기 제3 영상 데이터와 상기 영상 마스크 데이터에 대해 제2 연산을 수행하여, 이상 정보를 갖는 제4 영상 데이터를 생성하는 제2 연산부;
를 포함하는 딥러닝 기반 제조 영상의 이상 탐지 장치.
An image generator that learns a first deep learning algorithm on a plurality of image data of a good product that is a learning target and generates second image data by applying the learned first deep learning algorithm to the first image data that is an inspection target;
a first operation unit that performs a first operation on the first image data and the second image data and outputs third image data corresponding to a difference image between the first image data and the second image data;
A second deep learning algorithm is learned on a plurality of image data of the good product as a learning target, and the learned second deep learning algorithm is applied to the first image data and the second image data as an inspection target, a feature extractor that outputs image mask data having feature information between first image data and the second image data; and
a second operation unit that performs a second operation on the third image data and the image mask data to generate fourth image data having abnormal information;
Deep learning-based manufacturing video anomaly detection device including.
제1항에 있어서, 상기 제1 딥러닝 알고리즘은,
양품에 대해 압축-복원 학습을 수행하여, 이후 불량에 해당되는 상기 제1 영상 데이터가 입력되면 복원시 양품에 해당되는 상기 제2 영상 데이터를 생성하는
딥러닝 기반 제조 영상의 이상 탐지 장치.
The method of claim 1, wherein the first deep learning algorithm is:
By performing compression-decompression learning on a good product, when the first image data corresponding to a defective product is input, the second image data corresponding to a good product is generated upon restoration.
Deep learning-based manufacturing video anomaly detection device.
제1항에 있어서, 상기 제1 연산부의 제1 연산은,
상기 제1 영상 데이터와 상기 제2 영상 데이터를 감산하는 감산 연산을 포함하는
딥러닝 기반 제조 영상의 이상 탐지 장치.
The method of claim 1, wherein the first operation of the first operation unit is:
Including a subtraction operation for subtracting the first image data and the second image data.
Deep learning-based manufacturing video anomaly detection device.
제1항에 있어서, 상기 제1 연산부의 제1 연산은,
SSIM (Structural Similarity))-오토 엔코더(Auto-encoder) 알고리즘을 학습하는 과정에 해당되는
딥러닝 기반 제조 영상의 이상 탐지 장치.
The method of claim 1, wherein the first operation of the first operation unit is:
SSIM (Structural Similarity) - Corresponds to the process of learning the auto-encoder algorithm.
Deep learning-based manufacturing video anomaly detection device.
제1항에 있어서, 상기 특징 추출기는,
상기 제1 영상 데이터와 상기 제2 영상 데이터 사이의 특징 벡터 정보를 추출하고, 상기 특징 벡터 정보에 기초한 특징 정보를 갖는 영상 마스크 데이터를 생성하는
딥러닝 기반 제조 영상의 이상 탐지 장치.
The method of claim 1, wherein the feature extractor,
Extracting feature vector information between the first image data and the second image data and generating image mask data having feature information based on the feature vector information.
Deep learning-based manufacturing video anomaly detection device.
제1항에 있어서, 상기 특징 추출기는,
학습대상인 상기 양품의 복수의 영상 데이터와 상기 제2 영상 데이터에 대해, 각 패치단위별 비교하는 콘트라-임베딩(contra-embedding) 알고리즘을 학습하여, 상기 검사대상인 상기 제1 영상 데이터에 대해 각 패치단위별로 양품 및 불량을 분류하는
딥러닝 기반 제조 영상의 이상 탐지 장치.
The method of claim 1, wherein the feature extractor,
A contra-embedding algorithm is learned to compare the plurality of image data of the good product, which is the learning target, with the second image data, for each patch unit, and each patch unit is used for the first image data, which is the inspection target. Classifies good and defective products
Deep learning-based manufacturing video anomaly detection device.
제6항에 있어서, 상기 특징 추출기는,
검사 대상인 상기 제1 영상 데이터에 대해, 각 패치단위별 특징 벡터 정보를 추출하고, 이 특징 벡터 정보에 기초해 각 패치단위별 양품 정보 및 불량 정보를 갖는 영상 마스크 데이터를 출력하는
딥러닝 기반 제조 영상의 이상 탐지 장치.
The method of claim 6, wherein the feature extractor,
For the first image data to be inspected, feature vector information for each patch unit is extracted, and image mask data having good product information and defective information for each patch unit is output based on this feature vector information.
Deep learning-based manufacturing video anomaly detection device.
제1항에 있어서, 상기 제2 연산부의 제2 연산은,
상기 제3 영상 데이터와 상기 영상 마스크 데이터를 곱하는 곱셈 연산을 포함하는
딥러닝 기반 제조 영상의 이상 탐지 장치.
The method of claim 1, wherein the second operation of the second operation unit is:
Including a multiplication operation to multiply the third image data and the image mask data.
Deep learning-based manufacturing video anomaly detection device.
학습대상인 양품의 복수의 영상 데이터를 대상으로 제1 딥러닝 알고리즘을 학습하고, 검사대상인 제1 영상 데이터에 대해 상기 학습된 제1 딥러닝 알고리즘을 적용하여 제2 영상 데이터를 생성하는 이미지 제너레이팅 단계;
상기 제1 영상 데이터와 상기 제2 영상 데이터에 대해 제1 연산을 수행하여, 상기 제1 영상 데이터와 상기 제2 영상 데이터 간의 차이 영상에 해당되는 제3 영상 데이터를 출력하는 제1 연산 단계;
학습대상인 상기 양품의 복수의 영상 데이터를 대상으로 제2 딥러닝 알고리즘을 학습하고, 검사대상인 상기 제1 영상 데이터와 상기 제2 영상 데이터에 대해 상기 학습된 제2 딥러닝 알고리즘을 적용하여, 상기 제1 영상 데이터와 상기 제2 영상 데이터 간의 특징 정보를 갖는 영상 마스크 데이터를 출력하는 특징 추출 단계; 및
상기 제3 영상 데이터와 상기 영상 마스크 데이터에 대해 제2 연산을 수행하여, 이상 정보를 갖는 제4 영상 데이터를 생성하는 제2 연산 단계;
를 포함하는 딥러닝 기반 제조 영상의 이상 탐지 방법.
An image generation step of learning a first deep learning algorithm on a plurality of image data of a good product that is a learning target, and generating second image data by applying the learned first deep learning algorithm to the first image data that is an inspection target. ;
A first operation step of performing a first operation on the first image data and the second image data to output third image data corresponding to a difference image between the first image data and the second image data;
A second deep learning algorithm is learned on a plurality of image data of the good product as a learning target, and the learned second deep learning algorithm is applied to the first image data and the second image data as an inspection target, A feature extraction step of outputting image mask data having feature information between first image data and the second image data; and
a second operation step of performing a second operation on the third image data and the image mask data to generate fourth image data having abnormal information;
Deep learning-based anomaly detection method of manufacturing video including.
제9항에 있어서, 상기 제1 딥러닝 알고리즘은,
양품에 대해 압축-복원 학습을 수행하여, 이후 불량에 해당되는 상기 제1 영상 데이터가 입력되면 복원시 양품에 해당되는 상기 제2 영상 데이터를 생성하는
딥러닝 기반 제조 영상의 이상 탐지 방법.
The method of claim 9, wherein the first deep learning algorithm is:
By performing compression-decompression learning on a good product, when the first image data corresponding to a defective product is input, the second image data corresponding to a good product is generated upon restoration.
Deep learning-based anomaly detection method in manufacturing video.
제9항에 있어서, 상기 제1 연산 단계의 제1 연산은,
상기 제1 영상 데이터와 상기 제2 영상 데이터를 감산하는 감산 연산을 포함하는
딥러닝 기반 제조 영상의 이상 탐지 방법.
The method of claim 9, wherein the first operation of the first operation step is,
Including a subtraction operation for subtracting the first image data and the second image data.
Deep learning-based anomaly detection method in manufacturing video.
제9항에 있어서, 상기 제1 연산 단계의 제1 연산은,
SSIM (Structural Similarity))-오토 엔코더(Auto-encoder) 알고리즘을 학습하는 과정에 해당되는
딥러닝 기반 제조 영상의 이상 탐지 방법.
The method of claim 9, wherein the first operation of the first operation step is,
SSIM (Structural Similarity) - Corresponds to the process of learning the auto-encoder algorithm.
Deep learning-based anomaly detection method in manufacturing video.
제9항에 있어서, 상기 특징 추출 단계는,
상기 제1 영상 데이터와 상기 제2 영상 데이터 사이의 특징 벡터 정보를 추출하고, 상기 특징 벡터 정보에 기초한 특징 정보를 갖는 영상 마스크 데이터를 생성하는
딥러닝 기반 제조 영상의 이상 탐지 방법.
The method of claim 9, wherein the feature extraction step is:
Extracting feature vector information between the first image data and the second image data and generating image mask data having feature information based on the feature vector information.
Deep learning-based anomaly detection method in manufacturing video.
제9항에 있어서, 상기 특징 추출 단계는,
학습대상인 상기 양품의 복수의 영상 데이터와 상기 제2 영상 데이터에 대해, 각 패치단위별 비교하는 콘트라-임베딩(contra-embedding) 알고리즘을 학습하여, 상기 검사대상인 상기 제1 영상 데이터에 대해 각 패치단위별로 양품 및 불량을 분류하는
딥러닝 기반 제조 영상의 이상 탐지 방법.
The method of claim 9, wherein the feature extraction step is:
A contra-embedding algorithm is learned to compare the plurality of image data of the good product, which is the learning target, with the second image data, for each patch unit, and each patch unit is used for the first image data, which is the inspection target. Classifies good and defective products
Deep learning-based anomaly detection method in manufacturing video.
제14항에 있어서, 상기 특징 추출 단계는,
검사 대상인 상기 제1 영상 데이터에 대해, 각 패치단위별 특징 벡터 정보를 추출하고, 이 특징 벡터 정보에 기초해 각 패치단위별 양품 정보 및 불량 정보를 갖는 영상 마스크 데이터를 출력하는
딥러닝 기반 제조 영상의 이상 탐지 방법.
The method of claim 14, wherein the feature extraction step includes:
For the first image data to be inspected, feature vector information for each patch unit is extracted, and image mask data having good product information and defective information for each patch unit is output based on this feature vector information.
Deep learning-based anomaly detection method in manufacturing video.
제9항에 있어서, 상기 제2 연산 단계의 제2 연산은,
상기 제3 영상 데이터와 상기 영상 마스크 데이터를 곱하는 곱셈 연산을 포함하는
딥러닝 기반 제조 영상의 이상 탐지 방법.
The method of claim 9, wherein the second operation of the second operation step is,
Including a multiplication operation to multiply the third image data and the image mask data.
Deep learning-based anomaly detection method in manufacturing video.
KR1020210127263A 2021-05-25 2021-09-27 Apparatus and method for detecting anomalies in manufacturing images based on deep learning KR102609153B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202280026413.XA CN117121053A (en) 2021-05-25 2022-03-02 Apparatus and method for manufacturing anomaly detection
PCT/KR2022/002927 WO2022250253A1 (en) 2021-05-25 2022-03-02 Apparatus and method with manufacturing anomaly detection

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020210067188 2021-05-25
KR20210067188 2021-05-25

Publications (2)

Publication Number Publication Date
KR20220159239A KR20220159239A (en) 2022-12-02
KR102609153B1 true KR102609153B1 (en) 2023-12-05

Family

ID=84417869

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210127263A KR102609153B1 (en) 2021-05-25 2021-09-27 Apparatus and method for detecting anomalies in manufacturing images based on deep learning

Country Status (1)

Country Link
KR (1) KR102609153B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020171841A (en) 2018-09-12 2020-10-22 株式会社Splink Diagnosis assistance system and method
US20210074036A1 (en) 2018-03-23 2021-03-11 Memorial Sloan Kettering Cancer Center Deep encoder-decoder models for reconstructing biomedical images
US20210120255A1 (en) 2020-01-10 2021-04-22 Intel Corporation Image compression using autoencoder information

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20200132665A (en) * 2019-05-17 2020-11-25 삼성전자주식회사 Attention layer included generator based prediction image generating apparatus and controlling method thereof
EP3798916A1 (en) * 2019-09-24 2021-03-31 Another Brain Transformation of data samples to normal data

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210074036A1 (en) 2018-03-23 2021-03-11 Memorial Sloan Kettering Cancer Center Deep encoder-decoder models for reconstructing biomedical images
JP2020171841A (en) 2018-09-12 2020-10-22 株式会社Splink Diagnosis assistance system and method
US20210120255A1 (en) 2020-01-10 2021-04-22 Intel Corporation Image compression using autoencoder information

Also Published As

Publication number Publication date
KR20220159239A (en) 2022-12-02

Similar Documents

Publication Publication Date Title
US7027934B2 (en) Apparatus and method for automated web inspection
CN111008961B (en) Transmission line equipment defect detection method and system, equipment and medium thereof
Bong et al. Vision-based inspection system for leather surface defect detection and classification
CN112150460B (en) Detection method, detection system, device and medium
CN113160200B (en) Industrial image defect detection method and system based on multi-task twin network
CN112801962B (en) Semi-supervised industrial product flaw detection method and system based on positive sample learning
KR20210038303A (en) System and method of classifying manufactured products
CN115830004A (en) Surface defect detection method, device, computer equipment and storage medium
CN116228651A (en) Cloth defect detection method, system, equipment and medium
CN116977292A (en) Method for detecting cold joint of solar cell
CN115861210A (en) Transformer substation equipment abnormity detection method and system based on twin network
D'Angelo et al. Deep learning-based object detection for digital inspection in the mining industry
Hashmi et al. Computer-vision based visual inspection and crack detection of railroad tracks
KR102609153B1 (en) Apparatus and method for detecting anomalies in manufacturing images based on deep learning
Thiruganam et al. Automatic defect detection and counting in radiographic weldment images
CN117252815A (en) Industrial part defect detection method, system, equipment and storage medium based on 2D-3D multi-mode image
CN111028250A (en) Real-time intelligent cloth inspecting method and system
Ma et al. An algorithm for fabric defect detection based on adaptive canny operator
WO2022130814A1 (en) Index selection device, information processing device, information processing system, inspection device, inspection system, index selection method, and index selection program
KR20230036650A (en) Defect detection method and system based on image patch
CN115601293A (en) Object detection method and device, electronic equipment and readable storage medium
CN114581722A (en) Two-stage multi-classification industrial image defect detection method based on twin residual error network
Weimer et al. Context-aware deep convolutional neural networks for industrial inspection
CN113781449A (en) Textile flaw classification method based on multi-scale feature fusion
CN114155186A (en) Unsupervised learning-based defect detection system and method

Legal Events

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