JP2023146059A - Method for detecting abnormal area, system, and program - Google Patents

Method for detecting abnormal area, system, and program Download PDF

Info

Publication number
JP2023146059A
JP2023146059A JP2022053045A JP2022053045A JP2023146059A JP 2023146059 A JP2023146059 A JP 2023146059A JP 2022053045 A JP2022053045 A JP 2022053045A JP 2022053045 A JP2022053045 A JP 2022053045A JP 2023146059 A JP2023146059 A JP 2023146059A
Authority
JP
Japan
Prior art keywords
feature extraction
feature
defective
abnormality
map
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2022053045A
Other languages
Japanese (ja)
Inventor
博之 増田
Hiroyuki Masuda
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson Corp
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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2022053045A priority Critical patent/JP2023146059A/en
Publication of JP2023146059A publication Critical patent/JP2023146059A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)

Abstract

To provide a method for detecting an abnormal area in which overlook of abnormality is reduced.SOLUTION: A method includes: (a) a step of performing processing of extracting a non-defective feature quantity group from a plurality of patches on a plurality of non-defective images; (b) a step of extracting a target feature quantity being the feature quantity of a target image from the plurality of patches; (c) a step of clustering a plurality of non-defective feature quantities to acquire a plurality of representative points being representative points of a plurality of clusters; (d) a step of creating, for each of the plurality of representative points, an appearance likelihood map for each of the plurality of patches; and (e) a step of calculating, for each feature extraction layer of a plurality of feature extraction layers, the most neighboring distance between the target feature quantity and the representative point with high appearance likelihood as the degree of abnormality for each of the plurality of patches by using the appearance likelihood map, thereby creating an abnormality degree map.SELECTED DRAWING: Figure 1

Description

本開示は、異常領域を検出する方法、システム、およびプログラムに関する。 The present disclosure relates to a method, system, and program for detecting an abnormal area.

非特許文献1には、ImageNetを学習したモデルからパッチ単位で良品の特徴量群と、検査用の入力データの特徴量とを取得し、両者の特徴空間上での距離を測ることによって異常検知を行う技術が開示されている。 Non-Patent Document 1 describes how to detect anomalies by acquiring a group of features of non-defective products and features of input data for inspection from a model trained on ImageNet in patch units, and measuring the distance between the two in the feature space. A technique for performing this has been disclosed.

Niv Cohen, Yedid Hoshen “Sub-Image Anomaly Detection with Deep Pyramid Correspondences”, arXiv:2005.02357, Wed, 3 Feb 2021.Niv Cohen, Yedid Hoshen “Sub-Image Anomaly Detection with Deep Pyramid Correspondences”, arXiv:2005.02357, Wed, 3 Feb 2021.

しかしながら、良品の特徴量に、取得された検査用の入力データの特徴量との距離が近い特徴量が存在すると、異常度は低く算出されて、異常を見逃してしまう可能性が高くなる場合がある。 However, if there are features that are close to the features of the acquired inspection input data among the features of a non-defective product, the degree of abnormality may be calculated to be low, increasing the possibility that an abnormality will be overlooked. be.

本開示の一形態によれば、異常領域を検出する方法が提供される。この方法は、この方法は、複数の特徴抽出層を有する畳み込みニューラルネットワークとして構成された特徴抽出モデルを用いて、対象画像に含まれる異常領域を検出する方法であって、(a)良品画像を前記特徴抽出モデルに入力し、前記複数の特徴抽出層のそれぞれにおいて、前記良品画像の特徴量である良品特徴量群を、画像を区画した複数のパッチ画像に対応する複数のパッチのそれぞれに対して抽出する処理を複数の前記良品画像に対して行う工程と、(b)前記対象画像を前記特徴抽出モデルに入力し、前記複数の特徴抽出層のそれぞれにおいて、前記対象画像の特徴量である対象特徴量を、前記複数のパッチのそれぞれに対して抽出する工程と、(c)前記複数の特徴抽出層の前記特徴抽出層ごとに、前記複数の良品特徴量をクラスタリングして複数のクラスターのそれぞれの代表点である複数の前記代表点を取得する工程と、(d)前記複数の代表点の前記代表点ごとに、前記複数のパッチのそれぞれについて、前記代表点が出現する出現可能性を算出することにより、出現可能性マップを作成する工程と、(e)前記複数の特徴抽出層の前記特徴抽出層ごとに、前記複数のパッチのそれぞれについて、前記出現可能性マップを用いて、前記対象特徴量と前記出現可能性が高い前記代表点との最近傍距離を異常度として算出することによって、異常度マップを作成する工程と、を含む。 According to one aspect of the present disclosure, a method of detecting an abnormal region is provided. This method is a method for detecting an abnormal region included in a target image using a feature extraction model configured as a convolutional neural network having multiple feature extraction layers, the method includes: The feature extraction model is input to the feature extraction model, and in each of the plurality of feature extraction layers, a group of non-defective features, which are the features of the non-defective image, are applied to each of a plurality of patches corresponding to a plurality of patch images obtained by partitioning the image. (b) inputting the target image into the feature extraction model, and in each of the plurality of feature extraction layers, extracting a feature amount of the target image. (c) extracting a target feature for each of the plurality of patches, and (c) clustering the plurality of non-defective features for each of the feature extraction layers of the plurality of feature extraction layers to form a plurality of clusters. (d) for each of the plurality of representative points, obtaining a plurality of representative points, each of which is a representative point, for each of the plurality of patches, calculating the probability that the representative point will appear; (e) for each of the plurality of feature extraction layers of the plurality of feature extraction layers, using the appearance possibility map for each of the plurality of patches; The method includes the step of creating an anomaly degree map by calculating the nearest neighbor distance between the target feature amount and the representative point that is likely to appear as an anomaly degree.

異常検出システムの構成を示すブロック図。FIG. 1 is a block diagram showing the configuration of an abnormality detection system. 特徴抽出モデルの構成例を示す説明図。FIG. 2 is an explanatory diagram showing a configuration example of a feature extraction model. 層別異常度マップを作成する流れを示す図。The figure which shows the flow of creating a stratified abnormality degree map. 良品画像および欠陥画像の例。Examples of non-defective and defective images. 異常検出処理のフローチャート。Flowchart of abnormality detection processing. 距離算出処理のフローチャート。Flowchart of distance calculation processing. 最近傍距離配列処理のフローチャート。Flowchart of nearest neighbor distance array processing. 距離算出結果を説明する図。A diagram illustrating distance calculation results. 最近傍距離の算出結果を説明する図。The figure explaining the calculation result of nearest neighbor distance. 出現可能性マップを説明する図。A diagram explaining an appearance possibility map. 異常度算出処理のフローチャート。Flowchart of abnormality degree calculation processing. 異常度算出方法を概念的に説明する図。FIG. 3 is a diagram conceptually explaining an abnormality degree calculation method. 第2実施形態に係る異常検出処理の前半のフローチャート。7 is a flowchart of the first half of abnormality detection processing according to the second embodiment. 第2実施形態に係る異常検出処理の後半のフローチャート。7 is a flowchart of the second half of the abnormality detection process according to the second embodiment. 表示部に表示されるGUIの例。An example of a GUI displayed on the display.

A.第1実施形態:
A1.システム構成:
図1は、図5に示す異常検出処理を実行する異常検出システムの構成を示すブロック図である。図1に示すように、異常検出システムは、情報処理装置100と、カメラ400とを含む。カメラ400は、異常検出の物体の画像を撮影する。情報処理装置100は、カメラ400で撮影された画像に含まれる異常を検出する異常検出装置として機能する。情報処理装置100は、例えば、パーソーナルコンピューターで実現可能である。
A. First embodiment:
A1. System configuration:
FIG. 1 is a block diagram showing the configuration of an abnormality detection system that executes the abnormality detection process shown in FIG. 5. As shown in FIG. 1, the abnormality detection system includes an information processing device 100 and a camera 400. The camera 400 captures an image of the object to be detected as an abnormality. The information processing device 100 functions as an abnormality detection device that detects abnormalities included in images captured by the camera 400. The information processing device 100 can be realized by, for example, a personal computer.

情報処理装置100は、プロセッサー110と、メモリー120と、インターフェイス回路130と、インターフェイス回路130に接続された入力デバイス140及び表示部150と、を有している。限定されないが例えば、プロセッサー110は、以下で詳述される処理を実行する機能を有するだけでなく、表示部150に、当該処理によって得られるデータ、および当該処理の過程で生成されるデータを表示する機能も有する。インターフェイス回路130には、カメラ400も接続されている。 The information processing device 100 includes a processor 110, a memory 120, an interface circuit 130, an input device 140 connected to the interface circuit 130, and a display section 150. For example, but not limited to, the processor 110 not only has the function of executing the processes detailed below, but also displays data obtained by the processes and data generated in the process of the processes on the display unit 150. It also has the function of A camera 400 is also connected to the interface circuit 130.

プロセッサー110は、画像に含まれる異常を検出する異常検出部112として機能する。異常検出部112の機能は、メモリー120に記憶されたコンピュータープログラムをプロセッサー110が実行することによって実現される。但し、異常検出部112の機能を専用の電子回路で実現してもよい。本明細書のプロセッサーは、このような専用の電子回路をも含む用語である。また、異常検出部112の処理を実行するプロセッサーは、ネットワークを介して情報処理装置100に接続されたリモートコンピューターに含まれるプロセッサーであってもよい。また、異常検出部112の処理は、複数のプロセッサーによって実行されてもよい。 The processor 110 functions as an anomaly detection unit 112 that detects anomalies included in images. The functions of the abnormality detection unit 112 are realized by the processor 110 executing a computer program stored in the memory 120. However, the function of the abnormality detection section 112 may be realized by a dedicated electronic circuit. Processor as used herein is a term that also includes such dedicated electronic circuits. Further, the processor that executes the processing of the abnormality detection unit 112 may be a processor included in a remote computer connected to the information processing device 100 via a network. Further, the processing of the abnormality detection unit 112 may be executed by a plurality of processors.

メモリー120には、特徴抽出モデル200と、良品画像群GMと、良品特徴量群GFとが記憶される。特徴抽出モデル200は、画像から特徴量を求める機械学習モデルであり、画像データベースを事前学習済みである。具体的には、特徴抽出モデル200として、ImageNetを事前学習したResNetを用いることができる。良品画像群GMは、異常を含まない良品の画像群である。良品特徴量群GFは、良品画像群GMの個々の良品画像を特徴抽出モデル200に入力したときに得られる特徴量から構成される。 The memory 120 stores a feature extraction model 200, a group of non-defective products images GM, and a group of non-defective product features GF. The feature extraction model 200 is a machine learning model that obtains feature amounts from images, and has been pre-trained on an image database. Specifically, ResNet, which is obtained by pre-learning ImageNet, can be used as the feature extraction model 200. The non-defective image group GM is an image group of non-defective products that does not contain any abnormality. The non-defective product feature group GF is composed of feature amounts obtained when each non-defective product image of the non-defective product image group GM is input to the feature extraction model 200.

図2は、特徴抽出モデル200の構成例を示す説明図である。図2に示すように、特徴抽出モデル200は、入力画像IMを受ける入力層の後に、第1特徴抽出層FE1と、第2特徴抽出層FE2と、第3特徴抽出層FE3と、平均プーリング層240とがこの順に配列された畳み込みニューラルネットワークである。第1特徴抽出層FE1と、第2特徴抽出層FE2と、第3特徴抽出層FE3とを総称して特徴抽出層FEとも呼ぶ。また、特徴抽出層FEを単に「層」と記載する場合がある。4つの層FE1~FE3,240のうち、第1特徴抽出層FE1が最も下位の層であり、平均プーリング層240が最も上位の層である。図2の例では3つの特徴抽出層FEを用いているが、特徴抽出層FEの数は任意である。但し、2つ以上の特徴抽出層FEを用いることが好ましい。 FIG. 2 is an explanatory diagram showing a configuration example of the feature extraction model 200. As shown in FIG. 2, the feature extraction model 200 includes, after the input layer receiving the input image IM, a first feature extraction layer FE1, a second feature extraction layer FE2, a third feature extraction layer FE3, and an average pooling layer. 240 is a convolutional neural network arranged in this order. The first feature extraction layer FE1, the second feature extraction layer FE2, and the third feature extraction layer FE3 are also collectively referred to as the feature extraction layer FE. Further, the feature extraction layer FE may be simply referred to as a "layer". Among the four layers FE1 to FE3, 240, the first feature extraction layer FE1 is the lowest layer, and the average pooling layer 240 is the highest layer. Although three feature extraction layers FE are used in the example of FIG. 2, the number of feature extraction layers FE is arbitrary. However, it is preferable to use two or more feature extraction layers FE.

3つの特徴抽出層FE1は、入力画像IMの特徴をそれぞれ抽出する畳み込み層である。図2の例では、入力画像IMの平面サイズは224×224画素である。第1特徴抽出層FE1は、56×56個のノードで構成される平面サイズを有し、チャンネル数はZ1である。ノードとは、ニューロンを意味する。第2特徴抽出層FE2は、平面サイズが28×28、チャンネル数がZ2である。第3特徴抽出層FE3は、平面サイズが14×14、チャンネル数がZ3である。各層のチャンネル数Z1,Z2,Z3は、1以上の任意の数に設定できる。入力画像IMにおける16×16画素の画像をパッチ画像PT0又はパッチPT0と呼ぶ。入力画像IMにおけるパッチPT0は、第1特徴抽出層FE1では4×4サイズのパッチPT1に相当し、第2特徴抽出層FE2では2×2サイズのパッチPT2に相当し、第3特徴抽出層FE3では1×1サイズのパッチPT3に相当する。 The three feature extraction layers FE1 are convolution layers that respectively extract features of the input image IM. In the example of FIG. 2, the plane size of the input image IM is 224×224 pixels. The first feature extraction layer FE1 has a plane size of 56×56 nodes, and the number of channels is Z1. Node means neuron. The second feature extraction layer FE2 has a plane size of 28×28 and a number of channels Z2. The third feature extraction layer FE3 has a plane size of 14×14 and a channel number of Z3. The number of channels Z1, Z2, and Z3 in each layer can be set to any number greater than or equal to 1. The 16×16 pixel image in the input image IM is called a patch image PT0 or patch PT0. The patch PT0 in the input image IM corresponds to a 4×4 patch PT1 in the first feature extraction layer FE1, corresponds to a 2×2 patch PT2 in the second feature extraction layer FE2, and corresponds to a 2×2 patch PT2 in the third feature extraction layer FE3. This corresponds to a 1×1 size patch PT3.

異常検出処理では、第1特徴抽出層FE1に属する複数のノードの出力から、パッチPT1毎に特徴量が抽出される。第1特徴抽出層FE1における1パッチPT1分の特徴量は、[パッチPT1の平面サイズ]×[チャンネル数]のノード、すなわち、4×4×Z1個のノードの出力によって表現される。よって、例えば、1パッチPT1に対応する特徴量は、4×4×Z1の要素からなるベクトルである。同様に、第2特徴抽出層FE2では、パッチPT2毎に特徴量が抽出され、第3特徴抽出層FE3ではパッチPT3毎に特徴量が抽出される。従って、3つの特徴抽出層FEからは、いずれも14×14個のパッチからそれぞれの特徴量が抽出される。特徴抽出層FEは中間層に相当するので、特徴抽出層FEから抽出される特徴量を、「中間特徴量」と呼ぶことも可能である。 In the abnormality detection process, feature amounts are extracted for each patch PT1 from the outputs of a plurality of nodes belonging to the first feature extraction layer FE1. The feature amount for one patch PT1 in the first feature extraction layer FE1 is expressed by the output of [plane size of patch PT1]×[number of channels] nodes, that is, 4×4×Z1 nodes. Therefore, for example, the feature amount corresponding to one patch PT1 is a vector consisting of 4×4×Z1 elements. Similarly, in the second feature extraction layer FE2, a feature amount is extracted for each patch PT2, and in the third feature extraction layer FE3, a feature amount is extracted for each patch PT3. Therefore, each of the three feature extraction layers FE extracts respective feature amounts from 14×14 patches. Since the feature extraction layer FE corresponds to an intermediate layer, the feature amounts extracted from the feature extraction layer FE can also be called "intermediate feature amounts."

平均プーリング層240は、第3特徴抽出層FE3の14×14個のノードからの出力の平均値をチャンネル毎に求めることによって、1×1×Z3の出力を得る演算を実行する。平均プーリング層240の出力は、画像全体の特徴を表す特徴ベクトルである。ただし、本実施形態に係る異常検出処理において、平均プーリング層240の出力は用いられないため、平均プーリング層240を省略することも可能である。 The average pooling layer 240 executes an operation to obtain an output of 1×1×Z3 by calculating the average value of the outputs from the 14×14 nodes of the third feature extraction layer FE3 for each channel. The output of the average pooling layer 240 is a feature vector representing features of the entire image. However, since the output of the average pooling layer 240 is not used in the abnormality detection process according to this embodiment, the average pooling layer 240 may be omitted.

A2.異常検出処理の概要:
異常検出処理では、3つの特徴抽出層FEのそれぞれに対応する、第1層別異常度マップAM1、第2層別異常度マップAM2、および第3層別異常度マップAM3が作成される。第1層別異常度マップAM1と、第2層別異常度マップAM2と、第3層別異常度マップAM3とを総称して層別異常度マップAMとも呼ぶ。
A2. Overview of anomaly detection processing:
In the abnormality detection process, a first layered abnormality map AM1, a second layered abnormality map AM2, and a third layered abnormality map AM3 corresponding to each of the three feature extraction layers FE are created. The first stratified abnormality map AM1, the second stratified abnormality map AM2, and the third stratified abnormality map AM3 are also collectively referred to as the stratified abnormality map AM.

図3は、1つの層別異常度マップAMを作成する流れを示す図である。上記の様に、図3に示す良品画像群GMとは、良品の画像群である。そして、良品画像群GMの個々の良品画像を特徴抽出モデル200に入力したときに得られる特徴量Fの群が良品特徴量群GFである。本実施形態では、N枚の良品画像が用いられる。 FIG. 3 is a diagram showing the flow of creating one stratified abnormality map AM. As described above, the non-defective image group GM shown in FIG. 3 is an image group of non-defective products. A group of feature quantities F obtained when each non-defective image of the non-defective image group GM is input to the feature extraction model 200 is a non-defective feature group GF. In this embodiment, N non-defective images are used.

良品画像と同様に、検査対象である対象画像TMが特徴抽出モデル200に入力されて、特徴量Fがパッチ毎に抽出される。抽出された特徴量Fを対象特徴量TFと呼ぶ。 Similar to the non-defective image, the target image TM to be inspected is input to the feature extraction model 200, and the feature amount F is extracted for each patch. The extracted feature amount F is called a target feature amount TF.

層別異常度マップAMは、大まかには、対象特徴量TFと、良品特徴量群GFの特徴量Fとの類似の程度をパッチ単位で求め、求めた類似の程度をパッチ位置に配列して作成される。ここで類似の程度とは、具体的には、例えばユーグリッド距離やマンハッタン距離などの距離や、例えばコサイン類似度やピアソン類似度などの類似度である。類似度が高いほど、類似の程度は高い。距離が短いほど、類似の程度は高い。本明細書では、類似の程度を意味する用語として、距離を使用する。つまり、本明細書では、距離は、類似度を含む概念である。 Roughly speaking, the stratified abnormality map AM is created by determining the degree of similarity between the target feature value TF and the feature value F of the non-defective feature value group GF for each patch, and arranging the determined degree of similarity at patch positions. Created. Here, the degree of similarity specifically refers to a distance such as Eugrid distance or Manhattan distance, or a degree of similarity such as cosine similarity or Pearson similarity. The higher the degree of similarity, the higher the degree of similarity. The shorter the distance, the higher the degree of similarity. In this specification, the term distance is used to mean the degree of similarity. That is, in this specification, distance is a concept that includes similarity.

本実施形態では、対象特徴量TFと、良品特徴量群GFの特徴量Fとの類似の程度を求めるために、対象特徴量TFに最も近い良品特徴量群GFの特徴量Fと、対象特徴量TFとの距離である最近傍距離が用いられる。ここで、良品特徴量群GFのデータ数は膨大であるため、最近傍距離を求めるために、良品特徴量群GFを構成するすべての特徴量Fと対象特徴量TFとの距離を算出する場合には、計算量は膨大となる。そこで、本実施形態では、クラスタリングにより取得した代表点RPと、対象特徴量TFとの距離を求める。これにより、類似の程度の計算に要する計算負荷を低減することができる。なお、このような、良品特徴量群GFの特徴量Fと対象特徴量TFとの最近傍距離に代えて、良品特徴量群GFの代表点RPと対象特徴量TFとの最近傍距離を求める手法は、近似最近傍探索とも呼ばれる。 In this embodiment, in order to find the degree of similarity between the target feature TF and the feature F of the non-defective feature group GF, the feature F of the non-defective feature group GF that is closest to the target feature TF and the target feature The nearest neighbor distance is used, which is the distance to the quantity TF. Here, since the number of data in the non-defective feature group GF is enormous, in order to find the nearest neighbor distance, the distance between all the features F that make up the non-defective feature group GF and the target feature TF is calculated. The amount of calculation becomes enormous. Therefore, in this embodiment, the distance between the representative point RP obtained by clustering and the target feature amount TF is determined. This makes it possible to reduce the computational load required for calculations of similar degrees. Note that instead of the nearest neighbor distance between the feature F of the non-defective feature group GF and the target feature TF, the nearest neighbor distance between the representative point RP of the non-defective feature group GF and the target feature TF is determined. The method is also called approximate nearest neighbor search.

より具体的には、良品特徴量群GFをクラスタリングすることによりグループ分けされて取得された各グループの代表点RPと、複数の対象特徴量TFの各々との最近傍距離がパッチ単位で算出される。算出された複数の最近傍距離のパッチ毎の平均がパッチ位置に配列されることでヒートマップである層別異常度マップAMが作成される。これにより、異常と判定された位置を可視化することができる。層別異常度マップAMは、最近傍距離の長さに応じて色分けされている。最近傍距離が大きいほど、類似の程度は低く、異常度は高い。 More specifically, the nearest neighbor distance between the representative point RP of each group obtained by clustering the non-defective features GF and each of the plurality of target features TF is calculated for each patch. Ru. A stratified abnormality map AM, which is a heat map, is created by arranging the calculated averages of the plurality of nearest neighbor distances for each patch at patch positions. This makes it possible to visualize the position determined to be abnormal. The stratified abnormality map AM is color-coded according to the length of the nearest neighbor distance. The larger the nearest neighbor distance, the lower the degree of similarity and the higher the degree of abnormality.

発明者らは、上記のように異常度を求めた場合、異常を検出しにくい欠陥画像が存在することに着目した。図4は、異常を含まない良品画像と、検出しにくい異常を含む欠陥画像との例である。図4には、ケーブルの良品画像および欠陥画像と、トランジスタの良品画像および欠陥画像とが模式的に示されている。 The inventors have focused on the fact that when determining the degree of abnormality as described above, there are defective images in which it is difficult to detect an abnormality. FIG. 4 is an example of a non-defective image containing no abnormality and a defective image containing an abnormality that is difficult to detect. FIG. 4 schematically shows a non-defective image and a defective image of a cable, and a non-defective image and a defective image of a transistor.

ケーブル画像は、3芯ケーブルの断面画像である。3芯ケーブルは、導線の束が第1被覆層IL1で覆われた第1ケーブルWY1、第2ケーブルWY2、および第3ケーブルWY3がまとめて第2被覆層IL2で被覆された構成を有している。第1ケーブルWY1と、第2ケーブルWY2と、第3ケーブルWY3とは、第1被覆層IL1の色が互いに異なる。欠陥画像では、第1ケーブルWY1の第1被覆層IL1と、第2ケーブルWY2の第1被覆層IL1との色が同じである点が良品画像とは異なる。 The cable image is a cross-sectional image of a three-core cable. The three-core cable has a configuration in which a first cable WY1, a second cable WY2, and a third cable WY3 each having a bundle of conducting wires covered with a first coating layer IL1 are collectively covered with a second coating layer IL2. There is. The first cable WY1, the second cable WY2, and the third cable WY3 have different colors of the first coating layer IL1. The defect image differs from the non-defective image in that the first coating layer IL1 of the first cable WY1 and the first coating layer IL1 of the second cable WY2 have the same color.

トランジスタ画像は、基板SBに端子TWを有するトランジスタTRが実装された画像である。欠陥画像では、トランジスタTRが配置されていない点が良品画像とは異なる。 The transistor image is an image in which a transistor TR having a terminal TW is mounted on a substrate SB. The defect image differs from the non-defective image in that the transistor TR is not arranged.

ケーブルの欠陥画像において、第1ケーブルWY1の第1被覆層IL1に位置する第1対象パッチPTT1から抽出された特徴量Fは、良品画像の第2ケーブルWY2の第1被覆層IL1に位置する第1良品パッチPG1から抽出された特徴量Fと類似する。そして、第1良品パッチPG1から抽出された特徴量Fは、図3に示す良品特徴量群GFに含まれる。このため、上記手法では、第1対象パッチPTT1における異常度は、低く算出されてしまう。 In the cable defect image, the feature amount F extracted from the first target patch PTT1 located in the first covering layer IL1 of the first cable WY1 is different from the feature amount F extracted from the first target patch PTT1 located in the first covering layer IL1 of the second cable WY2 in the non-defective image. It is similar to the feature amount F extracted from the first non-defective patch PG1. The feature amount F extracted from the first non-defective patch PG1 is included in the non-defective feature group GF shown in FIG. Therefore, in the above method, the degree of abnormality in the first target patch PTT1 is calculated to be low.

同様に、トランジスタの欠陥画像において、トランジスタTRの配置予定場所に位置する第2対象パッチPTT2から抽出された特徴量Fは、良品画像の基板SBに位置する第2良品パッチPG2から抽出された特徴量Fと類似する。そして、第2良品パッチPG2から抽出された特徴量Fは、良品特徴量群GFに含まれる。このため、上記手法では、第2対象パッチPTT2における異常度は、低く算出されてしまう。 Similarly, in the defect image of the transistor, the feature amount F extracted from the second target patch PTT2 located at the planned placement location of the transistor TR is the same as the feature amount F extracted from the second target patch PG2 located on the substrate SB of the non-defective image. Similar to quantity F. The feature amount F extracted from the second non-defective patch PG2 is included in the non-defective feature group GF. Therefore, in the above method, the degree of abnormality in the second target patch PTT2 is calculated to be low.

A3.異常検出処理:
本実施形態に係る異常検出処理では、例示した異常を検出できる工夫が施されている。図5は、異常検出処理のフローチャートである。図6は、距離算出処理のフローチャートである。図7は、最近傍距離配列処理のフローチャートである。図8は、後述する距離算出の結果を説明する図である。図9は、後述する最近傍距離の算出結果を説明する図である。図10は、後述する出現可能性マップMPを説明する図である。図11は、異常度算出処理のフローチャートである。図5に示すステップS10において、異常検出部112は、複数の良品画像群GMを特徴抽出モデル200に入力して、特徴量Fを抽出して、良品特徴量群GFを準備する。
A3. Anomaly detection processing:
The abnormality detection process according to this embodiment is designed to detect the illustrated abnormalities. FIG. 5 is a flowchart of the abnormality detection process. FIG. 6 is a flowchart of distance calculation processing. FIG. 7 is a flowchart of nearest neighbor distance arrangement processing. FIG. 8 is a diagram illustrating the results of distance calculation, which will be described later. FIG. 9 is a diagram illustrating the calculation result of the nearest neighbor distance, which will be described later. FIG. 10 is a diagram illustrating an appearance possibility map MP, which will be described later. FIG. 11 is a flowchart of the abnormality degree calculation process. In step S10 shown in FIG. 5, the abnormality detection unit 112 inputs the plurality of good product image groups GM into the feature extraction model 200, extracts the feature amount F, and prepares the good product feature amount group GF.

良品特徴量抽出処理では、良品画像群GMのうちの1つの良品画像を対象として、各特徴抽出層FEについて、パッチ毎に特徴抽出層FEを用いた特徴量Fの抽出が行われる。具体的には、1つの良品画像を対象として、パッチ毎に特徴量Fを抽出する処理が、すべての特徴抽出層FEについて終了するまで繰り返し行われる。そして、良品画像群GMに含まれるすべての良品画像について特徴量Fの抽出が終了するまで、各特徴抽出層FEについての特徴量Fの抽出が繰り返し行われる。パッチ毎に抽出された特徴量Fは、空間情報を持たないデータに変換された後、良品特徴量群GFに加えられる。 In the non-defective product feature amount extraction process, the feature amount F is extracted using the feature extraction layer FE for each patch for each feature extraction layer FE for one non-defective image of the non-defective image group GM. Specifically, for one non-defective image, the process of extracting the feature amount F for each patch is repeated until it is completed for all feature extraction layers FE. Then, extraction of the feature amount F for each feature extraction layer FE is repeatedly performed until extraction of the feature amount F is completed for all non-defective images included in the non-defective image group GM. The feature quantity F extracted for each patch is converted into data without spatial information, and then added to the non-defective feature quantity group GF.

図5のステップS20において、ステップS10と同様に、異常検出部112は、対象画像TMを特徴抽出モデル200に入力して、対象特徴量TFを抽出する。 In step S20 of FIG. 5, similarly to step S10, the abnormality detection unit 112 inputs the target image TM to the feature extraction model 200 and extracts the target feature amount TF.

ステップS30において、異常検出部112は、クラスタリングにより良品特徴量群GFのk個の代表点RPを取得する。本実施形態では、クラスタリングにk-means法が用いられる。 In step S30, the abnormality detection unit 112 obtains k representative points RP of the non-defective feature group GF by clustering. In this embodiment, the k-means method is used for clustering.

ステップS40において、異常検出部112は、出現可能性マップ作成処理を行う。出現可能性マップ作成処理は、ステップS410の距離算出処理と、ステップS420の最近傍距離配列処理とで構成されている。 In step S40, the abnormality detection unit 112 performs appearance possibility map creation processing. The appearance possibility map creation process includes a distance calculation process in step S410 and a nearest neighbor distance arrangement process in step S420.

図6に示すように、距離算出処理において、異常検出部112は、良品画像の1つについて、1つの特徴抽出層FEを対象として、パッチ毎に代表点RPと特徴量Fとの距離を算出するステップS411を行う。そして、異常検出部112は、ステップS411をすべての代表点について距離を算出するまで繰り返し行う。そして、1つの良品画像についてすべての特徴抽出層FEについて距離を算出するまで距離算出を繰り返し行い、すべての良品画像について距離算出を終了するまで距離算出を繰り返し行う。 As shown in FIG. 6, in the distance calculation process, the abnormality detection unit 112 calculates the distance between the representative point RP and the feature amount F for each patch, targeting one feature extraction layer FE for one of the non-defective images. Step S411 is performed. Then, the abnormality detection unit 112 repeatedly performs step S411 until distances are calculated for all representative points. Then, the distance calculation is repeated until the distance is calculated for all the feature extraction layers FE for one non-defective image, and the distance calculation is repeated until the distance calculation is completed for all the non-defective images.

具体的にはステップS411では、異常検出部112は、代表点RPと複数の特徴量Fの各々との距離の平均を、パッチ毎の代表点RPと特徴量Fとの距離として算出する。1つの良品画像について、代表点RPと特徴量Fとの距離をパッチ位置に配列して作成されるマップを距離マップMDと呼ぶ。図8に示すように、距離マップMDは、特徴抽出層FE毎に、1つの代表点RPにつき、良品画像の枚数と同じN枚作成される。ステップS410が行われることにより、図2の例では、1つの特徴抽出層FEにつき、[N×k×14×14]のテンソルが作成される。 Specifically, in step S411, the abnormality detection unit 112 calculates the average distance between the representative point RP and each of the plurality of feature amounts F as the distance between the representative point RP and the feature amount F for each patch. A map created by arranging the distances between the representative point RP and the feature amount F at patch positions for one non-defective image is called a distance map MD. As shown in FIG. 8, N distance maps MD, which are the same as the number of non-defective images, are created for each representative point RP for each feature extraction layer FE. By performing step S410, in the example of FIG. 2, a tensor of [N×k×14×14] is created for one feature extraction layer FE.

図7に示すように、最近傍距離配列処理では、異常検出部112は、ステップS421において、パッチ毎に、最近傍距離として、N枚の良品画像の代表点RPと特徴量Fとの距離のうち、距離の最小値を取得する。そして、ステップS422において、取得した最近傍距離を、予め定められた閾値thを用いて2値化して出現可能性マップMPを作成する。本実施形態では、最近傍距離が閾値th未満である場合に、出現可能性が高いことを示すために、出現可能性は「0」に設定される。最近傍距離が閾値th以上である場合に、出現可能性が低いことを示すために、出現可能性は「1」に設定される。異常検出部112は、ステップS421およびステップS422をすべての代表点RPについて出現可能性マップMPを作成するまで繰り返し行い、すべての特徴抽出層FEについて出現可能性マップMPを作成するまで繰り返し行う。図9に示すように、出現可能性マップMPは、特徴抽出層FE毎に、1つの代表点RPにつき、1枚作成される。 As shown in FIG. 7, in the nearest neighbor distance arrangement process, the abnormality detection unit 112 determines the distance between the representative point RP of the N non-defective images and the feature amount F as the nearest neighbor distance for each patch in step S421. Obtain the minimum distance value. Then, in step S422, the obtained nearest neighbor distance is binarized using a predetermined threshold th to create an appearance possibility map MP. In this embodiment, when the nearest neighbor distance is less than the threshold th, the appearance possibility is set to "0" to indicate that the appearance possibility is high. When the nearest neighbor distance is equal to or greater than the threshold th, the appearance possibility is set to "1" to indicate that the appearance possibility is low. The anomaly detection unit 112 repeatedly performs steps S421 and S422 until it creates appearance possibility maps MP for all representative points RP, and repeatedly performs steps S421 and S422 until it creates appearance possibility maps MP for all feature extraction layers FE. As shown in FIG. 9, one appearance possibility map MP is created for each representative point RP in each feature extraction layer FE.

図10は、出現可能性マップMPを説明する図である。トランジスタの良品画像には、基板SB、トランジスタTR、および端子TWの各々の画像が含まれる。基板SBの画像から抽出された特徴量F群の代表点RPが第1代表点RP1である。トランジスタTRの画像から抽出された特徴量F群の代表点RPが第418代表点RP418である。端子TWの画像から抽出された特徴量F群の代表点RPが第756代表点RP756である。上記の手法によれば、第1代表点RP1の出現可能性マップMPは、基板SBの画像の範囲が、出現可能性が高い範囲となる。なお、図10に示す出現可能性マップMPでは、出現可能性が「0」であるパッチはハッチングなしで示され、出現可能性が「1」であるパッチは斜線ハッチングして示されている。同様に、第418代表点RP418の出現可能性マップMPは、トランジスタTRの画像の範囲が、出現可能性が高い範囲となる。第756代表点RP756の出現可能性マップMPは、端子TWの画像の範囲が、出現可能性が高い範囲となる。 FIG. 10 is a diagram illustrating the appearance possibility map MP. The non-defective image of the transistor includes images of each of the substrate SB, the transistor TR, and the terminal TW. The representative point RP of the feature quantity F group extracted from the image of the board SB is the first representative point RP1. The representative point RP of the feature quantity F group extracted from the image of the transistor TR is the 418th representative point RP418. The representative point RP of the feature quantity F group extracted from the image of the terminal TW is the 756th representative point RP756. According to the above method, in the appearance possibility map MP of the first representative point RP1, the range of the image of the substrate SB is a range where the appearance possibility is high. In the appearance possibility map MP shown in FIG. 10, patches with an appearance possibility of "0" are shown without hatching, and patches with an appearance possibility of "1" are shown with diagonal hatching. Similarly, in the appearance possibility map MP of the 418th representative point RP418, the range of the image of the transistor TR is a range with a high possibility of appearance. In the appearance possibility map MP of the 756th representative point RP756, the range of the image of the terminal TW is a range where the appearance possibility is high.

図5のステップS50において、異常検出部112は、異常度算出処理を行う。図11に示すように、異常検出部112は、1つの特徴抽出層FEについて、パッチ毎に異常度を算出する。具体的には、ステップS501において、異常検出部112は、対象のパッチについて出現可能性が高い、すなわち、出現可能性が「0」である代表点RPを抽出する。ステップS502において、異常検出部112は、抽出した代表点RP毎に、代表点RPと対象特徴量TFとの最近傍距離を異常度として算出する。具体的には、複数の対象特徴量TFの各々と対象の代表点RPとの距離を算出し、算出した複数の距離のうちの最小値を最近傍距離として取得する。このようにして取得された最近傍距離は、出現可能性が反映されているため、出現可能性が低い代表点RPとの距離を最近傍距離として算出し、異常度が低く算出される事を抑制することができる。 In step S50 of FIG. 5, the abnormality detection unit 112 performs abnormality degree calculation processing. As shown in FIG. 11, the anomaly detection unit 112 calculates the degree of anomaly for each patch in one feature extraction layer FE. Specifically, in step S501, the abnormality detection unit 112 extracts a representative point RP that has a high probability of appearing for the target patch, that is, the probability of appearing is "0". In step S502, the abnormality detection unit 112 calculates the nearest distance between the representative point RP and the target feature amount TF as the degree of abnormality for each extracted representative point RP. Specifically, the distance between each of the plurality of target feature quantities TF and the target representative point RP is calculated, and the minimum value among the plurality of calculated distances is obtained as the nearest neighbor distance. The nearest neighbor distance obtained in this way reflects the possibility of appearance, so the distance to the representative point RP with a low possibility of appearance is calculated as the nearest neighbor distance, and the degree of abnormality is calculated to be low. Can be suppressed.

異常検出部112は、すべてのパッチについて異常度を算出するまで異常度算出を繰り返し行い、すべての特徴抽出層FEについて異常度を算出するまで異常度算出を繰り返し行う。 The anomaly detection unit 112 repeatedly calculates the degree of abnormality until it calculates the degree of abnormality for all patches, and repeatedly calculates the degree of abnormality until it calculates the degree of abnormality for all feature extraction layers FE.

図12は、本実施形態に係る異常度算出方法を概念的に説明する図である。良品画像を用いて取得された代表点RPの群には、基板SBの画像の特徴を抽出した複数の代表点RP、トランジスタTRの画像の特徴を抽出した複数の代表点RP、端子TWの画像の特徴を抽出した複数の代表点RPが含まれている。対象画像TMのトランジスタTRが配置される予定の位置にあるパッチについて異常度を算出する場合、トランジスタTRの画像の特徴を抽出した代表点RP群は、出現可能性は低いため、最近傍距離算出の対象から除かれる。よって、トランジスタTRの画像の特徴を抽出した代表点RPを除いた代表点RP群との距離が異常度算出に用いられる。したがって、距離算出の対象となる代表点RPを制限しなかった場合における、異常度が低く算出される事が抑制される。よって、図4を用いて説明したような、部品の取り違いや、部品の欠損などの異常を検出することができる。 FIG. 12 is a diagram conceptually explaining the abnormality degree calculation method according to this embodiment. The group of representative points RP acquired using the non-defective image includes a plurality of representative points RP from which features of the image of the board SB are extracted, a plurality of representative points RP from which features of the image of the transistor TR are extracted, and an image of the terminal TW. A plurality of representative points RP from which features are extracted are included. When calculating the degree of abnormality for a patch in the target image TM at the position where the transistor TR is scheduled to be placed, the representative points RP group from which the characteristics of the image of the transistor TR are extracted are unlikely to appear, so nearest neighbor distance calculation is necessary. excluded from the scope of Therefore, the distance to a group of representative points RP excluding the representative point RP from which features of the image of the transistor TR are extracted is used for calculating the degree of abnormality. Therefore, the degree of abnormality is prevented from being calculated to be low when the representative point RP that is the object of distance calculation is not limited. Therefore, it is possible to detect abnormalities such as misplacement of parts and missing parts as explained using FIG. 4.

なお、部品の取り違いや、部品の欠損などの異常を検出するために、対象画像TMと、良品画像とを、画像位置毎に比較する手法が考えられる。このような、画像位置毎に比較する場合、画像に対する部品の位置が僅かにずれた場合にも異常として検出されると予想される。この点、本実施形態に係る異常検出方法によれば、出現可能性という指標を用いることで、画像に対する部品の位置ずれに対して緩やかに判断することが可能となる。そして、第2実施形態で述べるように、閾値thを調整することで、画像に対する部品の位置ずれの許容幅を調整することができる。 Note that in order to detect abnormalities such as misplacement of parts or missing parts, a method of comparing the target image TM and the non-defective image for each image position may be considered. When comparing each image position in this way, it is expected that even a slight shift in the position of a component with respect to the image will be detected as an abnormality. In this regard, according to the abnormality detection method according to the present embodiment, by using the index of appearance possibility, it becomes possible to make a gentle judgment regarding the positional deviation of the component with respect to the image. Then, as described in the second embodiment, by adjusting the threshold th, it is possible to adjust the permissible width of the positional shift of the component with respect to the image.

図5のステップS60において、異常検出部112は、最近傍距離をパッチ位置に配列して、異常度マップとしての層別異常度マップAMを作成する。この結果、図2の下方に示したように、3つの特徴抽出層FEのそれぞれについて、3つの層別異常度マップAMが作成される。第1層別異常度マップAM1は、パッチPT1毎の異常度を示すマップである。同様に、第2層別異常度マップAM2はパッチPT2毎の異常度を示すマップであり、第3層別異常度マップAM3はパッチPT3毎の異常度を示すマップである。 In step S60 of FIG. 5, the anomaly detection unit 112 arranges the nearest neighbor distances at patch positions to create a stratified anomaly degree map AM as an anomaly degree map. As a result, as shown in the lower part of FIG. 2, three stratified abnormality maps AM are created for each of the three feature extraction layers FE. The first layered abnormality degree map AM1 is a map showing the abnormality degree of each patch PT1. Similarly, the second layered abnormality degree map AM2 is a map that shows the degree of abnormality for each patch PT2, and the third layered abnormality degree map AM3 is a map that shows the degree of abnormality for each patch PT3.

ステップS100において、異常検出部112は、層別異常度マップAMを表示部150に表示し、本処理ルーチンを終了する。層別異常度マップAMが表示部150に表示されることにより、ユーザーは異常度が高い異常領域を確認することができる。 In step S100, the abnormality detection unit 112 displays the stratified abnormality degree map AM on the display unit 150, and ends this processing routine. By displaying the stratified abnormality degree map AM on the display unit 150, the user can confirm abnormal regions with a high degree of abnormality.

以上説明した第1実施形態によれば、ステップS50において、異常検出部112は、出現可能性マップMPを用いて異常度を算出する。これにより、出現可能性が低い代表点RPと対象特徴量TFとの最近傍距離が異常度に採用され、異常度が低く算出されることによる異常の見逃しを抑制することができる。 According to the first embodiment described above, in step S50, the abnormality detection unit 112 calculates the degree of abnormality using the appearance possibility map MP. Thereby, the nearest neighbor distance between the representative point RP and the target feature amount TF, which has a low probability of appearing, is adopted as the degree of abnormality, and it is possible to prevent an abnormality from being overlooked due to a low degree of abnormality being calculated.

また、ステップ420において、異常検出部112は、代表点RPが出現する確率として、代表点RPと複数の良品特徴量との最近傍距離を算出し、最近傍距離が閾値th未満であるパッチについて出現可能性を高く設定し、最近傍距離が閾値th以上であるパッチについて前記出現可能性を低く設定して出現可能性マップMPを作成する。これにより、代表点RPと良品特徴量との最近傍距離と、閾値thとを比較することにより、出現可能性マップを作成することができる。 In addition, in step 420, the abnormality detection unit 112 calculates the nearest neighbor distance between the representative point RP and the plurality of non-defective features as the probability that the representative point RP appears, and for patches whose nearest neighbor distance is less than the threshold th. An appearance possibility map MP is created by setting the appearance possibility high and setting the appearance possibility low for patches whose nearest neighbor distance is equal to or greater than the threshold th. Thereby, an appearance possibility map can be created by comparing the nearest neighbor distance between the representative point RP and the non-defective product feature amount and the threshold value th.

また、異常検出部112は、ステップS501において、対象とするパッチについて、出現可能性が高い代表点RPを抽出する。異常検出部112は、ステップS502において、抽出された代表点RPと、対象特徴量TFとの最近傍距離を異常度として算出する。これにより、出現可能性を異常度に反映させることができる。 Furthermore, in step S501, the abnormality detection unit 112 extracts a representative point RP that is likely to appear for the target patch. In step S502, the abnormality detection unit 112 calculates the nearest distance between the extracted representative point RP and the target feature amount TF as the degree of abnormality. This allows the probability of occurrence to be reflected in the degree of abnormality.

B.第2実施形態:
図13および図14は、本実施形態に係る異常検出処理の手順を示すフローチャートである。本実施形態に係る異常検出処理は、第1実施形態に係る異常検出処理と、統合異常度マップAMTを作成する点と、出現可能性マップMPの作成に用いる閾値thの変更を受け付ける点とが異なる。第1実施形態に係る処理ステップと同じステップには、同一の符号を付し、詳細な説明は適宜省略する。
B. Second embodiment:
FIGS. 13 and 14 are flowcharts showing the procedure of abnormality detection processing according to this embodiment. The anomaly detection process according to the present embodiment differs from the anomaly detection process according to the first embodiment in that an integrated anomaly degree map AMT is created, and that a change in the threshold th used for creating the appearance possibility map MP is accepted. different. Steps that are the same as the processing steps according to the first embodiment are given the same reference numerals, and detailed explanations will be omitted as appropriate.

図13に示すように、第1実施形態と同様に、異常検出部112により、ステップS10からステップS60まで行われる。 As shown in FIG. 13, similarly to the first embodiment, the abnormality detection unit 112 performs steps S10 to S60.

ステップS70において、異常検出部112により、層別異常度マップAM1,AM2,AM3を重み付き加算して、図15に示す統合異常度マップAMTが作成される。統合異常度マップAMTは、まず、層別異常度マップAM1,AM2,AM3の解像度を等しくする解像度調整を行い、解像度調整後の層別異常度マップAM1,AM2,AM3を加算することによって作成される。加算される場合、層別異常度マップAM1,AM2,AM3の重みが等分に加算されてもよく、重みが不等となるように加算されてもよい。ここで、不等とは、重みが互いに異なることを意味する。解像度調整は、特徴抽出モデル200への入力画像IMのサイズに合わせるように行われることが好ましい。図2の例では、入力画像IMのサイズは224×224画素なので、解像度調整後の層別異常度マップAM1,AM2,AM3のサイズもそれぞれ224×224画素となる。また、解像度調整の際には、画素値の補間を行ってもよい。また、層別異常度マップAM1,AM2,AM3の加算の前又は後に、ガウスフィルターなどのぼかしフィルターを用いてぼかし処理を行っても良い。 In step S70, the abnormality detection unit 112 performs weighted addition of the stratified abnormality maps AM1, AM2, and AM3 to create an integrated abnormality map AMT shown in FIG. The integrated abnormality map AMT is created by first performing resolution adjustment to equalize the resolution of the stratified abnormality maps AM1, AM2, and AM3, and then adding the stratified abnormality maps AM1, AM2, and AM3 after the resolution adjustment. Ru. When added, the weights of the stratified abnormality maps AM1, AM2, and AM3 may be added equally, or may be added so that the weights are unequal. Here, unequal means that the weights are different from each other. The resolution adjustment is preferably performed to match the size of the input image IM to the feature extraction model 200. In the example of FIG. 2, the size of the input image IM is 224×224 pixels, so the size of each of the stratified abnormality maps AM1, AM2, and AM3 after resolution adjustment is also 224×224 pixels. Further, when adjusting the resolution, pixel values may be interpolated. Further, before or after the addition of the stratified abnormality maps AM1, AM2, and AM3, blurring processing may be performed using a blurring filter such as a Gaussian filter.

図14に示すステップS80において、異常検出部112は、統合異常度マップAMTにおいて、異常度が予め定められた異常度閾値以上のパッチを異常箇所として検出する。ステップS110にて、異常検出部112は、検出した異常箇所を特定して、層別異常度マップAMと、統合異常度マップAMTとを表示部150に表示させる。具体的には、異常検出部112は、層別異常度マップAMおよび統合異常度マップAMTにおいて、異常箇所を他の箇所とは異なる色である、例えば赤色で表示する。これにより、ユーザーは、異常領域を確認することができる。 In step S80 shown in FIG. 14, the abnormality detection unit 112 detects a patch whose degree of abnormality is equal to or higher than a predetermined abnormality degree threshold as an abnormal location in the integrated abnormality degree map AMT. In step S110, the abnormality detection unit 112 identifies the detected abnormality location and causes the display unit 150 to display the stratified abnormality map AM and the integrated abnormality map AMT. Specifically, the abnormality detection unit 112 displays the abnormal location in a different color from other locations, for example, red, in the stratified abnormality map AM and the integrated abnormality map AMT. This allows the user to check the abnormal area.

図15は、表示部150に表示されるGUI(Graphical User Interface)の例である。図15に示すように、ウィンドウ500には、対象画像TMと、統合異常度マップAMTと、第1層別異常度マップAM1と、第2層別異常度マップAM2と、第3層別異常度マップAM3とが表示される。さらに、ウィンドウ500には、スライダー501と、再計算ボタン502とが表示される。スライダー501は、閾値thの変更を受け付ける。再計算ボタン502は、初期状態では、選択不可能なグレーアウトで表示されている。そして、閾値thが初期状態から変更された場合に、選択可能な有効状態にて表示される。ユーザーは、閾値thを変更したい場合、スライダー501を動かした後、有効状態となった再計算ボタン502を選択する。 FIG. 15 is an example of a GUI (Graphical User Interface) displayed on the display unit 150. As shown in FIG. 15, a window 500 displays a target image TM, an integrated abnormality map AMT, a first layered abnormality map AM1, a second layered abnormality map AM2, and a third layered abnormality map. Map AM3 is displayed. Further, the window 500 displays a slider 501 and a recalculation button 502. The slider 501 accepts changes in the threshold th. In the initial state, the recalculation button 502 is grayed out and cannot be selected. Then, when the threshold value th is changed from the initial state, it is displayed in a selectable valid state. If the user wants to change the threshold value th, after moving the slider 501, the user selects the recalculation button 502 which is in the enabled state.

図14のステップS120において、異常検出部112は、閾値thの変更を受け付けたか否かを判断する。具体的には、図15に示す再計算ボタン502が選択された場合には、閾値thの変更を受け付けたと判断する。一方、再計算ボタン502が選択不可能な状態で表示されており、再計算ボタン502が選択されていない場合には、閾値thの変更を受け付けたと判断する。 In step S120 of FIG. 14, the abnormality detection unit 112 determines whether or not a change in the threshold th has been received. Specifically, when the recalculation button 502 shown in FIG. 15 is selected, it is determined that the change of the threshold th has been accepted. On the other hand, if the recalculation button 502 is displayed in a non-selectable state and the recalculation button 502 is not selected, it is determined that the change of the threshold th has been accepted.

ステップS120において、異常検出部112は、閾値thの変更を受け付けていないと判断した場合、本処理ルーチンを終了する。一方、異常検出部112は、閾値thの変更を受け付けたと判断した場合、スライダー501にて受け付けた閾値thにて、ステップS420からステップS110までの処理を行う。これにより、ユーザーは、表示される層別異常度マップAMや統合異常度マップAMTを見て、スライダー501を調整することができる。例えば、ユーザーは、部品の僅かな位置ずれが異常として検出されている場合に、閾値thを高く調整することができる。 In step S120, if the abnormality detection unit 112 determines that the change in the threshold value th has not been accepted, the abnormality detection unit 112 ends this processing routine. On the other hand, if the abnormality detection unit 112 determines that the change in the threshold th has been accepted, it performs the processes from step S420 to step S110 using the threshold th accepted by the slider 501. Thereby, the user can adjust the slider 501 by looking at the displayed stratified abnormality map AM and integrated abnormality map AMT. For example, the user can adjust the threshold value th to a high value when a slight positional shift of a component is detected as an abnormality.

以上、説明した第2実施形態によれば、ステップS70において、統合異常度マップAMTが作成され、ステップS110において、表示部150に異常箇所が表示される。これにより、ユーザーは、異常箇所を見て確認することができる。 According to the second embodiment described above, the integrated abnormality degree map AMT is created in step S70, and abnormal locations are displayed on the display unit 150 in step S110. This allows the user to see and confirm the abnormal location.

また、ステップS120において、閾値thの変更を受けた場合、異常検出部112は、再度、ステップS420からステップS110までを行う。これにより、ユーザーは、層別異常度マップAMや統合異常度マップAMTを見て、閾値thを調整することができる。 Moreover, in step S120, when the threshold value th has been changed, the abnormality detection unit 112 performs steps S420 to S110 again. Thereby, the user can adjust the threshold th by looking at the stratified abnormality map AM and the integrated abnormality map AMT.

C.他の実施形態:
(C1)他の実施形態1:
上記第1実施形態では、ステップS421において、N枚の良品画像について算出された距離のうち、最小の距離である最近傍距離を用いて、確率としての出現可能性を求めている。出現可能性の算出方法は、これに限定されず、例えば、N枚の良品画像について算出された距離のうち、予め定めた距離閾値以下である良品画像の枚数を頻度として求め、頻度が予め定めた頻度閾値以上であるパッチを出現可能性が高いとして出現可能性マップMPを作成してもよい。
C. Other embodiments:
(C1) Other embodiment 1:
In the first embodiment, in step S421, the probability of appearance is determined using the nearest distance, which is the smallest distance, among the distances calculated for N non-defective images. The method of calculating the probability of appearance is not limited to this, but for example, the number of non-defective images that are less than or equal to a predetermined distance threshold is calculated as the frequency among the distances calculated for N non-defective images, and the frequency is determined as the frequency is determined in advance. The occurrence probability map MP may be created by determining that patches whose frequency is equal to or higher than a frequency threshold are considered to have a high probability of appearing.

(C2)他の実施形態2:
上記第1実施形態では、層別異常度マップAMは、表示部150に表示して使用される。層別異常度マップAMの使用方法は、表示部150に表示して画像として用いられる場合に限られない。例えば、異常閾値以上の異常度を有するパッチの位置を用いて対象画像TMを分類して、不良の分析に使用することもできる。また、異常閾値以上の異常度を有するパッチの位置が特定の位置である対象画像TMを不良と判定するために用いてもよい。
(C2) Other Embodiment 2:
In the first embodiment, the stratified abnormality map AM is displayed on the display unit 150 and used. The method of using the stratified abnormality map AM is not limited to the case where it is displayed on the display unit 150 and used as an image. For example, the target image TM can be classified using the position of a patch having an abnormality level greater than or equal to an abnormality threshold, and used for defect analysis. Further, it may be used to determine that a target image TM in which a patch having a degree of abnormality equal to or higher than an abnormality threshold is located at a specific position is defective.

(C3)他の実施形態3:
上記第1実施形態では、クラスタリングにk-means法を用いたが他の手法、例えば、単リンク法などを用いてもよい。
(C3) Other Embodiment 3:
In the first embodiment, the k-means method is used for clustering, but other methods such as a single link method may be used.

(C4)他の実施形態4:
上記第1実施形態では、ステップS422において、代表点RPと良品の特徴量Fとの最近傍距離を、閾値thを用いて2値化して出現可能性マップMPが作成される。出現可能性マップMPの作成方法は、これに限定されない。
(C4-1)例えば、最近傍距離マップ(一旦MD’:2値化する前の距離マップ)を2値化せずにMPとして扱い異常度マップに反映してもよい。この場合、代表点RPについて算出された最近傍距離に対して、最近傍となった代表点MD’の該当座標の最近傍距離を加算することで、異常度に反映される。
具体的には、2値化前の、ステップS422にて取得された、位置情報を有する最近傍距離をパッチ位置に配列して作成されたマップを、出現可能性マップMPとして用いてもよい。本実施形態(C4-1)に係る出現可能性マップMPを用いて異常度マップを作成する方法として、次の方法がある。対象パッチについて、各代表点RPについて算出された異常度として用いられる最近傍距離に対して、すべての代表点RPについての、対象パッチの出現可能性として用いられる最近傍距離、すなわち本実施形態(C4-1)に係る出現可能性マップMPの最近傍距離のうち最も距離の小さい距離を加算した指標を異常度としてもよい。
(C4-2)その他に最近傍距離マップを正規化することでMPを算出してもよい。この場合、代表点RPとの距離ごとにMPで重み付けをした後に最近傍距離を求めることで異常度に反映される。
具体的に説明すると、上記の本実施形態(C4-1)に係る出現可能性マップMPの最近傍距離を正規化した値をパッチ位置に配列して作成されたマップを、出現可能性マップMPとして用いてもよい。本実施形態(C4-2)に係る出現可能性マップMPを用いて異常度マップを作成する方法として、次の方法がある。対象パッチについて算出された異常度として用いられる最近傍距離に対して、対象パッチの出現可能性として用いられる正規化後の最近傍距離を用いて、出現可能性が高いほど異常度が高くなるように重み付けをした指標を異常度としてもよい。
(C4) Other Embodiment 4:
In the first embodiment, in step S422, the nearest neighbor distance between the representative point RP and the feature amount F of a non-defective product is binarized using the threshold th to create an appearance possibility map MP. The method of creating the appearance possibility map MP is not limited to this.
(C4-1) For example, the nearest neighbor distance map (MD': distance map before being binarized) may be treated as MP without being binarized and reflected in the abnormality degree map. In this case, the nearest neighbor distance of the corresponding coordinates of the nearest representative point MD' is added to the nearest neighbor distance calculated for the representative point RP, and this is reflected in the degree of abnormality.
Specifically, a map created by arranging the nearest neighbor distances having position information acquired in step S422 before binarization at patch positions may be used as the appearance possibility map MP. The following method is available as a method for creating an abnormality map using the appearance possibility map MP according to the present embodiment (C4-1). Regarding the target patch, the nearest neighbor distance used as the degree of abnormality calculated for each representative point RP is the nearest neighbor distance used as the probability of appearance of the target patch for all representative points RP, that is, in this embodiment ( The degree of abnormality may be an index obtained by adding the shortest distance among the nearest neighbor distances of the appearance possibility map MP related to C4-1).
(C4-2) Alternatively, MP may be calculated by normalizing the nearest neighbor distance map. In this case, the distance from the representative point RP is weighted by MP and then the nearest neighbor distance is determined, which is reflected in the degree of abnormality.
Specifically, a map created by arranging the values obtained by normalizing the nearest neighbor distances of the appearance possibility map MP according to the present embodiment (C4-1) at patch positions is used as the appearance possibility map MP. It may also be used as The following method is available as a method for creating an abnormality map using the appearance possibility map MP according to the present embodiment (C4-2). The normalized nearest neighbor distance, which is used as the probability of appearance of the target patch, is used for the nearest neighbor distance, which is used as the degree of abnormality calculated for the target patch, so that the higher the probability of appearance, the higher the degree of abnormality. An index that is weighted may be used as the degree of abnormality.

D.他の形態:
本開示は、上述の実施形態に限られるものではなく、その趣旨を逸脱しない範囲において種々の構成で実現することができる。例えば、以下に記載する各形態中の技術的特徴に対応する実施形態の技術的特徴は、上述の課題の一部又は全部を解決するために、あるいは、上述の効果の一部又は全部を達成するために、適宜、差し替えや、組み合わせを行うことが可能である。また、その技術的特徴が本明細書中に必須なものとして説明されていなければ、適宜、削除することが可能である。
D. Other forms:
The present disclosure is not limited to the embodiments described above, and can be implemented in various configurations without departing from the spirit thereof. For example, the technical features of the embodiments corresponding to the technical features in each form described below are used to solve some or all of the above-mentioned problems or achieve some or all of the above-mentioned effects. In order to do so, it is possible to replace or combine them as appropriate. Further, unless the technical feature is described as essential in this specification, it can be deleted as appropriate.

(1)本開示の第1形態によれば、異常領域を検出する方法が提供される。この方法は、複数の特徴抽出層を有する畳み込みニューラルネットワークとして構成された特徴抽出モデルを用いて、対象画像に含まれる異常領域を検出する方法であって、(a)良品画像を前記特徴抽出モデルに入力し、前記複数の特徴抽出層のそれぞれにおいて、前記良品画像の特徴量である良品特徴量群を、画像を区画した複数のパッチ画像に対応する複数のパッチのそれぞれに対して抽出する処理を複数の前記良品画像に対して行う工程と、(b)前記対象画像を前記特徴抽出モデルに入力し、前記複数の特徴抽出層のそれぞれにおいて、前記対象画像の特徴量である対象特徴量を、前記複数のパッチのそれぞれに対して抽出する工程と、(c)前記複数の特徴抽出層の前記特徴抽出層ごとに、前記複数の良品特徴量をクラスタリングして複数のクラスターのそれぞれの代表点である複数の前記代表点を取得する工程と、(d)前記複数の代表点の前記代表点ごとに、前記複数のパッチのそれぞれについて、前記代表点が出現する出現可能性を算出することにより、出現可能性マップを作成する工程と、(e)前記複数の特徴抽出層の前記特徴抽出層ごとに、前記複数のパッチのそれぞれについて、前記出現可能性マップを用いて、前記対象特徴量と前記出現可能性が高い前記代表点との最近傍距離を異常度として算出することによって、異常度マップを作成する工程と、を含む。この形態によれば、出現可能性が高い代表点と対象特徴量との最近傍距離を異常度として算出するため、出現可能性が低い代表点と対象特徴量との最近傍距離が異常度に採用され、異常度を低く算出することによる異常の見逃しを抑制することができる。 (1) According to the first aspect of the present disclosure, a method of detecting an abnormal region is provided. This method is a method for detecting an abnormal region included in a target image using a feature extraction model configured as a convolutional neural network having multiple feature extraction layers, the method includes: (a) converting a non-defective image into the feature extraction model and in each of the plurality of feature extraction layers, a process of extracting a group of non-defective feature quantities, which are feature quantities of the non-defective image, for each of a plurality of patches corresponding to a plurality of patch images obtained by partitioning the image. (b) inputting the target image into the feature extraction model, and in each of the plurality of feature extraction layers, calculating the target feature quantity that is the feature quantity of the target image; , extracting for each of the plurality of patches, and (c) clustering the plurality of non-defective product features for each of the feature extraction layers of the plurality of feature extraction layers to extract representative points of each of the plurality of clusters. (d) for each of the plurality of representative points, for each of the plurality of patches, calculating the probability that the representative point will appear; , creating an appearance possibility map; (e) for each of the plurality of feature extraction layers, for each of the plurality of patches, using the appearance possibility map, determining the target feature amount and The method includes the step of creating an abnormality degree map by calculating the nearest neighbor distance to the representative point with a high possibility of appearance as the abnormality degree. According to this form, the nearest neighbor distance between a representative point with a high probability of appearing and the target feature is calculated as the abnormality degree, so the nearest neighbor distance between the representative point with a low probability of appearing and the target feature is calculated as the abnormality degree. By adopting this method, it is possible to prevent an abnormality from being overlooked by calculating a low abnormality degree.

(2)上記形態において、前記(d)工程において、前記出現可能性として、前記代表点が出現する頻度と確率との少なくとも何れか一方を算出してもよい。この形態によれば、代表点が出現する代表点が出現する頻度と確率との少なくとも何れか一方を用いて、出現可能性を算出することができる。 (2) In the above embodiment, in the step (d), at least one of the frequency and probability of the appearance of the representative point may be calculated as the appearance possibility. According to this embodiment, the probability of appearance can be calculated using at least one of the frequency and probability of the appearance of the representative point.

(3)上記形態において、前記(d)工程において、前記複数のパッチの前記パッチごとに、前記確率として、前記代表点と前記複数の良品特徴量との最近傍距離を算出し、前記最近傍距離が閾値未満である前記パッチについて前記出現可能性を高く設定し、前記最近傍距離が前記閾値以上である前記パッチについて前記出現可能性を低く設定して前記出現可能性マップを作成してもよい。この形態によれば、代表点と良品特徴量との最近傍距離と閾値とを比較することにより、出現可能性マップを作成することができる。 (3) In the above embodiment, in the step (d), the nearest neighbor distance between the representative point and the plurality of non-defective product features is calculated as the probability for each of the plurality of patches, and The appearance possibility map may be created by setting the appearance possibility high for the patch whose distance is less than the threshold value and setting the appearance possibility low for the patch whose nearest neighbor distance is the threshold value or more. good. According to this form, the appearance possibility map can be created by comparing the nearest neighbor distance between the representative point and the non-defective product feature amount and the threshold value.

(4)上記形態において、前記(e)工程において、対象とする前記パッチについて、前記出現可能性が高い前記代表点を抽出し、抽出された前記代表点と、前記対象特徴量との最近傍距離を前記異常度として算出してもよい。この形態によれば、抽出した出現可能性が高い代表点と対象特徴量との最近傍距離を異常度として算出することにより、出現可能性を異常度に反映させることができる。 (4) In the above embodiment, in the step (e), for the target patch, the representative point with a high probability of appearance is extracted, and the nearest neighbor between the extracted representative point and the target feature amount. The distance may be calculated as the degree of abnormality. According to this embodiment, the probability of appearance can be reflected in the degree of abnormality by calculating the nearest neighbor distance between the extracted representative point with a high possibility of appearance and the target feature amount as the degree of abnormality.

(5)上記形態において、前記工程(e)の後、更に、(f)前記複数の特徴抽出層について得られた複数の前記異常度マップの解像度を等しくする解像度調整を行い、前記解像度調整後の前記複数の異常度マップを加算することによって、統合異常度マップを作成する工程と、(g)前記統合異常度マップにおいて、前記異常度が異常度閾値以上の画素を異常箇所として検出する工程と、(h)前記異常箇所を表示部に表示させる工程と、を含んでもよい。この形態によれば、ユーザーは表示部に表示される異常箇所を見て、異常箇所を確認することができる。 (5) In the above embodiment, after the step (e), further (f) a resolution adjustment is performed to equalize the resolution of the plurality of abnormality maps obtained for the plurality of feature extraction layers, and after the resolution adjustment (g) detecting, in the integrated abnormality map, pixels for which the abnormality is equal to or higher than an abnormality threshold as abnormal locations; and (h) displaying the abnormal location on a display unit. According to this embodiment, the user can confirm the abnormality by looking at the abnormality displayed on the display unit.

(6)上記形態において、前記閾値は、予め定められており、前記工程(h)の後、さらに、(i)前記閾値の変更を受け付ける工程を行い、受け付けた前記閾値を用いて、再度、前記工程(d)から前記工程(h)までの工程を行ってもよい。この形態によれば、ユーサーは、閾値を自由に変更して、表示部を見て、変更後の閾値を用いて検出された異常箇所を確認することができる。 (6) In the above embodiment, the threshold value is predetermined, and after the step (h), further performs the step of (i) accepting a change in the threshold value, and using the accepted threshold value, The steps from step (d) to step (h) may be performed. According to this embodiment, the user can freely change the threshold value, look at the display section, and confirm the detected abnormality using the changed threshold value.

本開示は、異常領域を検出する方法以外の種々の形態で実現することも可能である。例えば、異常領域を検出するシステムや異常領域を検出する方法を実現するコンピュータープログラム、そのコンピュータープログラムを記録した一時的でない記録媒体等の形態で実現することができる。 The present disclosure can also be implemented in various forms other than the method of detecting an abnormal region. For example, it can be realized in the form of a computer program that implements a system for detecting an abnormal area or a method for detecting an abnormal area, a non-temporary recording medium on which the computer program is recorded, or the like.

100…情報処理装置、110…プロセッサー、112…異常検出部、120…メモリー、130…インターフェイス回路、140…入力デバイス、150…表示部、200…特徴抽出モデル、240…平均プーリング層、400…カメラ、500…ウィンドウ、501…スライダー、502…再計算ボタン、AM1…第1層別異常度マップ、AM2…第2層別異常度マップ、AM3…第3層別異常度マップ、AMT…統合異常度マップ、F…特徴量、FE1…特徴抽出層、FE2…第2特徴抽出層、FE3…第3特徴抽出層、GF…良品特徴量群、GM…良品画像群、IL1…第1被覆層、IL2…第2被覆層、IM…入力画像、MD…距離マップ、MP…出現可能性マップ、PG1…第1良品パッチ、PG2…第2良品パッチ、PT0,PT1,PT2,PT3…パッチ、PTT1…第1対象パッチ、PTT2…第2対象パッチ、RP…代表点、RP1…第1代表点、RP418…第418代表点、RP756…第756代表点、SB…基板、TF…対象特徴量、TM…対象画像、TR…トランジスタ、TW…端子、WY1…第1ケーブル、WY2…第2ケーブル、WY3…第3ケーブル、th…閾値 DESCRIPTION OF SYMBOLS 100... Information processing device, 110... Processor, 112... Abnormality detection part, 120... Memory, 130... Interface circuit, 140... Input device, 150... Display part, 200... Feature extraction model, 240... Average pooling layer, 400... Camera , 500...Window, 501...Slider, 502...Recalculation button, AM1...First layered abnormality degree map, AM2...Second layered abnormality degree map, AM3...Third layered abnormality degree map, AMT...Integrated abnormality degree Map, F...feature quantity, FE1...feature extraction layer, FE2...second feature extraction layer, FE3...third feature extraction layer, GF...good product feature quantity group, GM...good product image group, IL1...first covering layer, IL2 ...second covering layer, IM...input image, MD...distance map, MP...appearance possibility map, PG1...first good patch, PG2...second good patch, PT0, PT1, PT2, PT3...patch, PTT1...th 1 target patch, PTT2...2nd target patch, RP...representative point, RP1...1st representative point, RP418...418th representative point, RP756...756th representative point, SB...substrate, TF...target feature amount, TM...target Image, TR...transistor, TW...terminal, WY1...first cable, WY2...second cable, WY3...third cable, th...threshold

Claims (8)

複数の特徴抽出層を有する畳み込みニューラルネットワークとして構成された特徴抽出モデルを用いて、対象画像に含まれる異常領域を検出する方法であって、
(a)良品画像を前記特徴抽出モデルに入力し、前記複数の特徴抽出層のそれぞれにおいて、前記良品画像の特徴量である良品特徴量群を、画像を区画した複数のパッチ画像に対応する複数のパッチのそれぞれに対して抽出する処理を複数の前記良品画像に対して行う工程と、
(b)前記対象画像を前記特徴抽出モデルに入力し、前記複数の特徴抽出層のそれぞれにおいて、前記対象画像の特徴量である対象特徴量を、前記複数のパッチのそれぞれに対して抽出する工程と、
(c)前記複数の特徴抽出層の前記特徴抽出層ごとに、前記複数の良品特徴量をクラスタリングして複数のクラスターのそれぞれの代表点である複数の前記代表点を取得する工程と、
(d)前記複数の代表点の前記代表点ごとに、前記複数のパッチのそれぞれについて、前記代表点が出現する出現可能性を算出することにより、出現可能性マップを作成する工程と、
(e)前記複数の特徴抽出層の前記特徴抽出層ごとに、前記複数のパッチのそれぞれについて、前記出現可能性マップを用いて、前記対象特徴量と前記出現可能性が高い前記代表点との最近傍距離を異常度として算出することによって、異常度マップを作成する工程と、を含む、方法。
A method for detecting an abnormal region included in a target image using a feature extraction model configured as a convolutional neural network having multiple feature extraction layers, the method comprising:
(a) A non-defective product image is input to the feature extraction model, and in each of the plurality of feature extraction layers, a group of non-defective feature quantities, which are the feature quantities of the non-defective product image, are extracted into a plurality of non-defective feature quantities corresponding to a plurality of patch images obtained by partitioning the image. performing a process of extracting each of the patches on the plurality of non-defective images;
(b) inputting the target image into the feature extraction model, and extracting a target feature quantity, which is a feature quantity of the target image, for each of the plurality of patches in each of the plurality of feature extraction layers; and,
(c) for each of the feature extraction layers of the plurality of feature extraction layers, clustering the plurality of non-defective product feature quantities to obtain a plurality of representative points that are representative points of each of the plurality of clusters;
(d) creating an appearance possibility map by calculating the appearance possibility of the representative point appearing for each of the plurality of patches for each of the plurality of representative points;
(e) For each of the plurality of feature extraction layers of the plurality of feature extraction layers, for each of the plurality of patches, use the appearance possibility map to determine the relationship between the target feature amount and the representative point with a high possibility of appearance. A method comprising: creating an anomaly degree map by calculating a nearest neighbor distance as an anomaly degree.
請求項1に記載の方法であって、
前記(d)工程において、前記出現可能性として、前記代表点が出現する頻度と確率との少なくとも何れか一方を算出する、方法。
The method according to claim 1, comprising:
In the step (d), at least one of a frequency and a probability that the representative point appears is calculated as the appearance possibility.
請求項2に記載の方法であって、
前記(d)工程において、前記複数のパッチの前記パッチごとに、前記確率として、前記代表点と前記複数の良品特徴量との最近傍距離を算出し、前記最近傍距離が閾値未満である前記パッチについて前記出現可能性を高く設定し、前記最近傍距離が前記閾値以上である前記パッチについて前記出現可能性を低く設定して前記出現可能性マップを作成する、方法。
3. The method according to claim 2,
In the step (d), for each patch of the plurality of patches, the nearest neighbor distance between the representative point and the plurality of non-defective product features is calculated as the probability, and the nearest neighbor distance is less than the threshold value. A method of creating the appearance possibility map by setting the appearance possibility high for patches and setting the appearance possibility low for the patches whose nearest neighbor distance is equal to or greater than the threshold value.
請求項1に記載の方法であって、
前記(e)工程において、対象とする前記パッチについて、前記出現可能性が高い前記代表点を抽出し、抽出された前記代表点と、前記対象特徴量との最近傍距離を前記異常度として算出する、方法。
The method according to claim 1, comprising:
In the step (e), for the target patch, the representative point with a high probability of appearance is extracted, and the nearest distance between the extracted representative point and the target feature is calculated as the abnormality degree. how to.
請求項3に記載の方法であって、前記工程(e)の後、更に、
(f)前記複数の特徴抽出層について得られた複数の前記異常度マップの解像度を等しくする解像度調整を行い、前記解像度調整後の前記複数の異常度マップを加算することによって、統合異常度マップを作成する工程と、
(g)前記統合異常度マップにおいて、前記異常度が異常度閾値以上の画素を異常箇所として検出する工程と、
(h)前記異常箇所を表示部に表示させる工程と、を含む、方法。
4. The method of claim 3, further comprising, after step (e),
(f) Performing resolution adjustment to equalize the resolution of the plurality of anomaly degree maps obtained for the plurality of feature extraction layers, and adding the plurality of anomaly degree maps after the resolution adjustment to create an integrated anomaly degree map. The process of creating
(g) detecting, in the integrated abnormality map, pixels whose abnormality is equal to or higher than an abnormality threshold as abnormal locations;
(h) A method including the step of displaying the abnormal location on a display unit.
請求項5に記載の方法であって、
前記閾値は、予め定められており、前記工程(h)の後、さらに、
(i)前記閾値の変更を受け付ける工程を行い、
受け付けた前記閾値を用いて、再度、前記工程(d)から前記工程(h)までの工程を行う、方法。
6. The method according to claim 5,
The threshold value is predetermined, and after the step (h), further:
(i) performing a step of accepting a change in the threshold;
A method of performing the steps from step (d) to step (h) again using the received threshold value.
複数の特徴抽出層を有する畳み込みニューラルネットワークとして構成された特徴抽出モデルを用いて、対象画像に含まれる異常領域を検出するシステムであって、
前記特徴抽出モデルと、複数の良品画像を前記特徴抽出モデルに入力したときに前記複数の特徴抽出層のそれぞれから得られる複数の良品特徴量と、を記憶するメモリーと、
前記特徴抽出モデルを用いた演算を実行する1つ又は複数のプロセッサーと、
を備え、
前記プロセッサーは、
(a)良品画像を前記特徴抽出モデルに入力し、前記複数の特徴抽出層のそれぞれにおいて、前記良品画像の特徴量である良品特徴量を、画像を区画した複数のパッチ画像に対応する複数のパッチのそれぞれに対して抽出する処理を複数の前記良品画像に対して行う工程と、
(b)前記対象画像を前記特徴抽出モデルに入力し、前記複数の特徴抽出層のそれぞれにおいて、前記対象画像の特徴量である対象特徴量を、前記複数のパッチのそれぞれに対して抽出する工程と、
(c)前記複数の特徴抽出層の前記特徴抽出層ごとに、前記複数の良品特徴量をクラスタリングして複数のクラスターのそれぞれの代表点である複数の前記代表点を取得する工程と、
(d)前記複数の代表点の前記代表点ごとに、前記複数のパッチのそれぞれについて、前記代表点が出現する出現可能性を算出することにより、出現可能性マップを作成する工程と、
(e)前記複数の特徴抽出層の前記特徴抽出層ごとに、前記複数のパッチのそれぞれについて、前記出現可能性マップを用いて、前記対象特徴量と前記出現可能性が高い前記代表点との最近傍距離を異常度として算出することによって、異常度マップを作成する工程と、を実行する、システム。
A system for detecting abnormal regions included in a target image using a feature extraction model configured as a convolutional neural network having multiple feature extraction layers, the system comprising:
a memory that stores the feature extraction model and a plurality of non-defective product features obtained from each of the plurality of feature extraction layers when a plurality of non-defective product images are input to the feature extraction model;
one or more processors that execute calculations using the feature extraction model;
Equipped with
The processor includes:
(a) A non-defective image is input to the feature extraction model, and in each of the plurality of feature extraction layers, the non-defective feature quantity, which is the feature quantity of the non-defective image, is input to a plurality of patch images corresponding to a plurality of patch images obtained by partitioning the image. a step of performing extraction processing on each of the patches on the plurality of non-defective images;
(b) inputting the target image into the feature extraction model, and extracting a target feature quantity, which is a feature quantity of the target image, for each of the plurality of patches in each of the plurality of feature extraction layers; and,
(c) for each of the feature extraction layers of the plurality of feature extraction layers, clustering the plurality of non-defective product feature quantities to obtain a plurality of representative points that are representative points of each of the plurality of clusters;
(d) creating an appearance possibility map by calculating the appearance possibility of the representative point appearing for each of the plurality of patches for each of the plurality of representative points;
(e) For each of the plurality of feature extraction layers of the plurality of feature extraction layers, for each of the plurality of patches, use the appearance possibility map to determine the relationship between the target feature amount and the representative point with a high possibility of appearance. A system that performs the steps of: creating an anomaly degree map by calculating a nearest neighbor distance as an anomaly degree.
複数の特徴抽出層を有する畳み込みニューラルネットワークとして構成された特徴抽出モデルを用いて、対象画像に含まれる異常領域を検出するプログラムであって、
(a)良品画像を前記特徴抽出モデルに入力し、前記複数の特徴抽出層のそれぞれにおいて、前記良品画像の特徴量である良品特徴量を、画像を区画した複数のパッチ画像に対応する複数のパッチのそれぞれに対して抽出する抽出処理を複数の前記良品画像に対して行う処理と、
(b)前記対象画像を前記特徴抽出モデルに入力し、前記複数の特徴抽出層のそれぞれにおいて、前記対象画像の特徴量である対象特徴量を、前記複数のパッチのそれぞれに対して抽出する処理と、
(c)前記複数の特徴抽出層の前記特徴抽出層ごとに、前記複数の良品特徴量をクラスタリングして複数のクラスターのそれぞれの代表点である複数の前記代表点を取得する処理と、
(d)前記複数の代表点の前記代表点ごとに、前記複数のパッチのそれぞれについて、前記代表点が出現する出現可能性を算出することにより、出現可能性マップを作成する処理と、
(e)前記複数の特徴抽出層の前記特徴抽出層ごとに、前記複数のパッチのそれぞれについて、前記出現可能性マップを用いて、前記対象特徴量と前記出現可能性が高い前記代表点との最近傍距離を異常度として算出することによって、異常度マップを作成する処理と、をコンピュータに実行させる、プログラム。
A program for detecting abnormal regions included in a target image using a feature extraction model configured as a convolutional neural network having multiple feature extraction layers, the program comprising:
(a) A non-defective image is input to the feature extraction model, and in each of the plurality of feature extraction layers, the non-defective feature quantity, which is the feature quantity of the non-defective image, is input to a plurality of patch images corresponding to a plurality of patch images obtained by partitioning the image. a process of performing an extraction process for each of the patches on the plurality of non-defective images;
(b) A process of inputting the target image into the feature extraction model and extracting a target feature quantity, which is a feature quantity of the target image, for each of the plurality of patches in each of the plurality of feature extraction layers. and,
(c) a process of clustering the plurality of non-defective product feature values for each of the feature extraction layers of the plurality of feature extraction layers to obtain a plurality of representative points that are representative points of each of the plurality of clusters;
(d) creating an appearance possibility map by calculating the appearance possibility of the representative point appearing for each of the plurality of patches for each of the plurality of representative points;
(e) For each of the plurality of feature extraction layers of the plurality of feature extraction layers, for each of the plurality of patches, use the appearance possibility map to determine the relationship between the target feature amount and the representative point with a high possibility of appearance. A program that causes a computer to execute a process of creating an anomaly degree map by calculating the nearest neighbor distance as an anomaly degree.
JP2022053045A 2022-03-29 2022-03-29 Method for detecting abnormal area, system, and program Pending JP2023146059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022053045A JP2023146059A (en) 2022-03-29 2022-03-29 Method for detecting abnormal area, system, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022053045A JP2023146059A (en) 2022-03-29 2022-03-29 Method for detecting abnormal area, system, and program

Publications (1)

Publication Number Publication Date
JP2023146059A true JP2023146059A (en) 2023-10-12

Family

ID=88286341

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022053045A Pending JP2023146059A (en) 2022-03-29 2022-03-29 Method for detecting abnormal area, system, and program

Country Status (1)

Country Link
JP (1) JP2023146059A (en)

Similar Documents

Publication Publication Date Title
KR101608608B1 (en) Method for measuring overlay, measuring device, scanning electron microscope, and gui
US8577124B2 (en) Method and apparatus of pattern inspection and semiconductor inspection system using the same
KR101868379B1 (en) System, method and computer program product for classification within inspection images
JP6629934B2 (en) Method and system for generating test strategy
CN113808138B (en) Artificial intelligence-based wire and cable surface defect detection method
JP4603512B2 (en) Abnormal region detection apparatus and abnormal region detection method
TW202142852A (en) Method of deep learning - based examination of a semiconductor specimen and system thereof
JP2012026982A (en) Inspection device
TW202036475A (en) Method of examination of a specimen and system thereof
JP2012032370A (en) Defect detection method, defect detection apparatus, learning method, program, and recording medium
KR101618996B1 (en) Sampling method and image processing apparatus for estimating homography
JP4728444B2 (en) Abnormal region detection apparatus and abnormal region detection method
WO2019176990A1 (en) Inspection device, image discriminating device, discriminating device, inspection method, and inspection program
US11429806B2 (en) Devices, systems, and methods for anomaly detection
TW201731004A (en) Reducing registration and design vicinity induced noise for intra-die inspection
CN108401565B (en) Remote sensing image registration method based on improved KAZE features and Pseudo-RANSAC algorithms
JP7180283B2 (en) Image processing device and image processing method
JP7056259B2 (en) Inspection system, identification system, and classifier evaluation device
JP2023146059A (en) Method for detecting abnormal area, system, and program
JP4629086B2 (en) Image defect inspection method and image defect inspection apparatus
Widodo et al. Application of self organizing map for intelligent machine fault diagnostics based on infrared thermography images
CN112801950B (en) Image adaptation quality evaluation method based on geometric distortion measurement
US20220358321A1 (en) Detection Method And Device For Assembly Body Multi-View Change Based On Feature Matching
US11361424B2 (en) Neural network-type image processing device, appearance inspection apparatus and appearance inspection method
JP2023147677A (en) Method of detecting abnormal area, system, and program