JP2022055953A - Defect classification device, defect classification method and program - Google Patents

Defect classification device, defect classification method and program Download PDF

Info

Publication number
JP2022055953A
JP2022055953A JP2020163685A JP2020163685A JP2022055953A JP 2022055953 A JP2022055953 A JP 2022055953A JP 2020163685 A JP2020163685 A JP 2020163685A JP 2020163685 A JP2020163685 A JP 2020163685A JP 2022055953 A JP2022055953 A JP 2022055953A
Authority
JP
Japan
Prior art keywords
classification
unit
defect
feature amount
defect detection
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.)
Granted
Application number
JP2020163685A
Other languages
Japanese (ja)
Other versions
JP7393313B2 (en
Inventor
義邦 原田
Yoshikuni Harada
哲也 藤田
Tetsuya Fujita
太重 鷹野
Hiroshige Takano
昌樹 平澤
Masaki Hirasawa
士嗣 寺師
Kototsugu Terashi
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.)
Kobe Steel Ltd
Takano Co Ltd
Original Assignee
Kobe Steel Ltd
Takano Co Ltd
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 Kobe Steel Ltd, Takano Co Ltd filed Critical Kobe Steel Ltd
Priority to JP2020163685A priority Critical patent/JP7393313B2/en
Publication of JP2022055953A publication Critical patent/JP2022055953A/en
Application granted granted Critical
Publication of JP7393313B2 publication Critical patent/JP7393313B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

To provide a defect classification device, a defect classification method and a program capable of improving accuracy in categorizing defects present in a checkup object.SOLUTION: A defect classification device 10 comprises: a defect detection unit 120 which detects defects from a captured image of a checkup object; a feature amount calculation unit 130 which calculates a feature amount of the defect detected by the defect detection unit 120; a first classification unit 140 which classifies the defect detected by the defect detection unit 120 by using a learned model 40 learned by deep learning; and a second classification unit 160 which classifies the defect detected by the defect detection unit 120, based on the feature amount calculated by the feature amount calculation unit 130 and a classification result by the first classification unit 140.SELECTED DRAWING: Figure 3

Description

本発明は、欠陥分類装置、欠陥分類方法及びプログラムに関する。 The present invention relates to a defect classification device, a defect classification method and a program.

検査対象が撮像された撮像画像に基づいて、検査対象に存在する欠陥を分類する技術が知られている。例えば、特許文献1は、自動欠陥分類機能を有する外観検査装置を開示している。特許文献1に開示された外観検査装置は、検査画像から検出された欠陥の特徴量を算出し、算出された特徴量を用いて欠陥を分類する。一方で、近年の人工知能(AI:Artificial Intelligence)技術の発展により、ディープラーニング(深層学習)を用いて検査対象に存在する欠陥を分類する手法の開発も進められている。 There is known a technique for classifying defects existing in an inspection target based on an captured image of the inspection target. For example, Patent Document 1 discloses a visual inspection apparatus having an automatic defect classification function. The visual inspection apparatus disclosed in Patent Document 1 calculates the feature amount of the defect detected from the inspection image, and classifies the defect using the calculated feature amount. On the other hand, with the recent development of artificial intelligence (AI) technology, the development of a method for classifying defects existing in the inspection target using deep learning (deep learning) is also underway.

特開2006-266872号公報Japanese Unexamined Patent Publication No. 2006-266872

特許文献1に開示されたような特徴量に基づいて欠陥を分類する手法は、複雑な欠陥に対して分類性能が上がらないという課題がある。この主たる要因として、複雑な欠陥は、分類に最適な特徴量の選択、及び分類に最適な特徴量を用いた分類条件を設定することが難しいことが挙げられる。これに対して、ディープラーニングを用いて欠陥を分類する手法は、特徴量に基づいた手法では難しい複雑な欠陥に対しても高い精度で分類することができるが、特徴量分類に基づいた手法では比較的簡単であった分類が難しい場合がある。この主たる要因として、ディープラーニングは事前に分類種別ごとに振り分けた欠陥を学習させる必要があるが、分類精度を上げるためには膨大な数の分類種別の設定が必要になることが挙げられる。このような状況に鑑み、検査対象に存在する欠陥の分類精度を向上させることが求められている。 The method of classifying defects based on the feature amount as disclosed in Patent Document 1 has a problem that the classification performance does not improve for complicated defects. The main reason for this is that it is difficult to select the optimum feature amount for classification and to set the classification condition using the optimum feature amount for classification of complicated defects. On the other hand, the method of classifying defects using deep learning can classify complex defects with high accuracy, which is difficult with the method based on feature quantity, but the method based on feature quantity classification can classify them with high accuracy. Classification, which was relatively easy, can be difficult. The main reason for this is that deep learning needs to learn defects sorted by classification type in advance, but it is necessary to set a huge number of classification types in order to improve classification accuracy. In view of such a situation, it is required to improve the classification accuracy of defects existing in the inspection target.

本発明は、上記のような問題点を解決するためになされたものであり、検査対象に存在する欠陥の分類精度を向上させることが可能な欠陥分類装置等を提供することを目的とする。 The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a defect classification device or the like capable of improving the classification accuracy of defects existing in an inspection target.

上記目的を達成するため、本発明の第1の観点に係る欠陥分類装置は、
検査対象が撮像された撮像画像から欠陥を検出する欠陥検出部と、
前記欠陥検出部により検出された前記欠陥の特徴量を計算する特徴量計算部と、
ディープラーニングにより学習された学習済みモデルを用いて、前記欠陥検出部により検出された前記欠陥を分類する第1の分類部と、
前記特徴量計算部により計算された前記特徴量と前記第1の分類部による分類結果とに基づいて、前記欠陥検出部により検出された前記欠陥を分類する第2の分類部と、を備える。
In order to achieve the above object, the defect classification device according to the first aspect of the present invention is
A defect detection unit that detects defects from the captured image of the inspection target, and
A feature amount calculation unit that calculates the feature amount of the defect detected by the defect detection unit, and a feature amount calculation unit.
Using the trained model trained by deep learning, a first classification unit that classifies the defects detected by the defect detection unit, and a first classification unit.
A second classification unit for classifying the defects detected by the defect detection unit is provided based on the feature amount calculated by the feature amount calculation unit and the classification result by the first classification unit.

上記目的を達成するため、本発明の第2の観点に係る欠陥分類方法は、
検査対象が撮像された撮像画像から欠陥を検出する欠陥検出ステップと、
前記欠陥検出ステップで検出された前記欠陥の特徴量を計算する特徴量計算ステップと、
ディープラーニングにより学習された学習済みモデルを用いて、前記欠陥検出ステップで検出された前記欠陥を分類する第1の分類ステップと、
前記特徴量計算ステップで計算された前記特徴量と前記第1の分類ステップでの分類結果とに基づいて、前記欠陥検出ステップで検出された前記欠陥を分類する第2の分類ステップと、を含む。
In order to achieve the above object, the defect classification method according to the second aspect of the present invention is:
Defect detection step to detect defects from the captured image of the inspection target,
A feature amount calculation step for calculating the feature amount of the defect detected in the defect detection step, and a feature amount calculation step.
Using the trained model trained by deep learning, a first classification step for classifying the defects detected in the defect detection step, and a first classification step.
Includes a second classification step for classifying the defects detected in the defect detection step based on the feature amount calculated in the feature amount calculation step and the classification result in the first classification step. ..

上記目的を達成するため、本発明の第3の観点に係るプログラムは、
コンピュータを、
検査対象が撮像された撮像画像から欠陥を検出する欠陥検出部、
前記欠陥検出部により検出された前記欠陥の特徴量を計算する特徴量計算部、
ディープラーニングにより学習された学習済みモデルを用いて、前記欠陥検出部により検出された前記欠陥を分類する第1の分類部、
前記特徴量計算部により計算された前記特徴量と前記第1の分類部による分類結果とに基づいて、前記欠陥検出部により検出された前記欠陥を分類する第2の分類部、として機能させる。
In order to achieve the above object, the program according to the third aspect of the present invention is
Computer,
Defect detection unit that detects defects from the captured image of the inspection target,
A feature amount calculation unit that calculates the feature amount of the defect detected by the defect detection unit,
A first classification unit that classifies the defects detected by the defect detection unit using a trained model trained by deep learning.
It functions as a second classification unit that classifies the defects detected by the defect detection unit based on the feature amount calculated by the feature amount calculation unit and the classification result by the first classification unit.

本発明によれば、検査対象に存在する欠陥の分類精度を向上させることができる。 According to the present invention, it is possible to improve the classification accuracy of defects existing in the inspection target.

実施形態1に係る欠陥分類装置のハードウェア構成を示すブロック図である。It is a block diagram which shows the hardware composition of the defect classification apparatus which concerns on Embodiment 1. FIG. (A)~(D)は、それぞれ、実施形態1における検査対象に存在する欠陥の例を示す図である。(A) to (D) are diagrams showing examples of defects existing in the inspection target in the first embodiment, respectively. 実施形態1に係る欠陥分類装置の機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the defect classification apparatus which concerns on Embodiment 1. FIG. 実施形態1において検査対象が撮像された撮像画像の例を示す図である。It is a figure which shows the example of the captured image which the inspection target was imaged in Embodiment 1. FIG. 実施形態1において第1の分類部による欠陥の分類に用いられるニューラルネットワークの概念図である。FIG. 3 is a conceptual diagram of a neural network used for classifying defects by the first classification unit in the first embodiment. (A)~(C)は、それぞれ、特徴量では分類が困難な欠陥の例を示す図である。(A) to (C) are diagrams showing examples of defects that are difficult to classify by features, respectively. (A)~(C)は、それぞれ、ディープラーニングでは分類が困難な欠陥の例を示す図である。(A) to (C) are diagrams showing examples of defects that are difficult to classify by deep learning, respectively. 実施形態1において第2の分類部による欠陥の分類条件の例を示す図である。It is a figure which shows the example of the classification condition of the defect by the 2nd classification part in Embodiment 1. FIG. 実施形態1に係る欠陥分類装置により実行される欠陥分類処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the defect classification process executed by the defect classification apparatus which concerns on Embodiment 1. FIG. 実施形態2に係る欠陥分類装置の機能的な構成を示すブロック図である。It is a block diagram which shows the functional structure of the defect classification apparatus which concerns on Embodiment 2.

以下、本発明の実施形態について、図面を参照しながら詳細に説明する。なお、図中同一又は相当部分には同一符号を付す。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The same or corresponding parts in the figure are designated by the same reference numerals.

(実施形態1)
図1に、本発明の実施形態1に係る欠陥分類装置10の構成を示す。欠陥分類装置10は、検査対象に存在する欠陥を分類することで検査対象を検査する装置である。ここで、検査対象は、欠陥検査される対象となる製品、商品等である。検査対象は、一例として、リチウムイオン2次電池(LIB:Lithium-Ion Battery)において用いられるフィルム状(シート状)の部材である。しかしながら、検査対象はこれに限らずどのようなものであっても良い。
(Embodiment 1)
FIG. 1 shows the configuration of the defect classification device 10 according to the first embodiment of the present invention. The defect classification device 10 is a device that inspects the inspection target by classifying the defects existing in the inspection target. Here, the inspection target is a product, a product, or the like to be inspected for defects. The inspection target is, for example, a film-shaped (sheet-shaped) member used in a lithium ion secondary battery (LIB: Lithium-Ion Battery). However, the inspection target is not limited to this and may be anything.

検査対象に存在する欠陥は、検査対象の機能、性能等の低下を及ぼす可能性がある部分である。具体的には、検査対象に存在する欠陥として、検査対象に存在するキズ、シワ、シミ等や、検査対象の表面に付着しているゴミ、ホコリ等の異物が挙げられる。 Defects existing in the inspection target are parts that may deteriorate the function, performance, etc. of the inspection target. Specifically, the defects existing in the inspection target include scratches, wrinkles, stains and the like existing in the inspection target, and foreign substances such as dust and dirt adhering to the surface of the inspection target.

図2(A)~(D)に、検査対象に存在する欠陥の例を示す。図2(A)及び図2(B)に示す点状の欠陥は、例えば、検査対象の表面に付着しているゴミ、ホコリ等の異物を表している。また、図2(C)及び図2(D)に示す線状の欠陥は、例えば、検査対象の表面に存在するキズを表している。 2 (A) to 2 (D) show examples of defects existing in the inspection target. The dot-like defects shown in FIGS. 2 (A) and 2 (B) represent, for example, foreign substances such as dust and dirt adhering to the surface of the inspection target. Further, the linear defects shown in FIGS. 2C and 2D represent, for example, scratches existing on the surface of the inspection target.

図1に示すように、欠陥分類装置10は、制御部11と、記憶部12と、入力受付部13と、表示部14と、通信部15と、撮像部16と、を備える。 As shown in FIG. 1, the defect classification device 10 includes a control unit 11, a storage unit 12, an input reception unit 13, a display unit 14, a communication unit 15, and an image pickup unit 16.

制御部11は、CPU(Central Processing Unit)、ROM(Read Only Memory)及びRAM(Random Access Memory)を備える。CPUは、マイクロプロセッサ等を備えており、様々な処理や演算を実行する中央演算処理部である。制御部11において、CPUが、ROMに記憶されている制御プログラムを読み出して、RAMをワークメモリとして用いながら、欠陥分類装置10全体の動作を制御する。 The control unit 11 includes a CPU (Central Processing Unit), a ROM (Read Only Memory), and a RAM (Random Access Memory). The CPU includes a microprocessor and the like, and is a central processing unit that executes various processes and operations. In the control unit 11, the CPU reads out the control program stored in the ROM and controls the operation of the entire defect classification device 10 while using the RAM as the work memory.

また、制御部11は、DSP(Digital Signal Processor)、GPU(Graphics Processing Unit)等の画像処理用のプロセッサと、処理される画像を一時的に保存するバッファメモリと、を備える。制御部11は、周知の画像処理の手法を用いて、検査対象の外観が撮像された撮像画像を処理する。 Further, the control unit 11 includes a processor for image processing such as a DSP (Digital Signal Processor) and a GPU (Graphics Processing Unit), and a buffer memory for temporarily storing the processed image. The control unit 11 processes the captured image in which the appearance of the inspection target is captured by using a well-known image processing method.

記憶部12は、フラッシュメモリ、ハードディスク等の不揮発性メモリを備えており、いわゆる二次記憶装置又は補助記憶装置としての役割を担う。記憶部12は、制御部11が各種処理を行うために使用するプログラム及びデータを記憶する。また、記憶部12は、制御部11が各種処理を行うことにより生成又は取得するデータを記憶する。例えば、記憶部12は、学習済みモデル40と学習用データ50と分類テーブル60とを記憶している。学習済みモデル40及び学習用データ50の詳細は後述する。 The storage unit 12 includes a non-volatile memory such as a flash memory and a hard disk, and serves as a so-called secondary storage device or auxiliary storage device. The storage unit 12 stores programs and data used by the control unit 11 to perform various processes. Further, the storage unit 12 stores data generated or acquired by the control unit 11 performing various processes. For example, the storage unit 12 stores the trained model 40, the training data 50, and the classification table 60. Details of the trained model 40 and the training data 50 will be described later.

入力受付部13は、キーボード、マウス、ボタン、タッチパッド、タッチパネル等の入力装置を備えており、ユーザからの操作入力を受け付ける。例えば、ユーザは、入力受付部13を操作することによって、欠陥分類装置10における処理の開始指示や各種の設定を入力することができる。 The input receiving unit 13 includes an input device such as a keyboard, a mouse, a button, a touch pad, and a touch panel, and receives an operation input from the user. For example, the user can input a process start instruction and various settings in the defect classification device 10 by operating the input receiving unit 13.

表示部14は、液晶ディスプレイ、有機EL(Electro Luminescence)ディスプレイ等の表示装置を備えており、制御部11による制御のもとで様々な画像を表示する。例えば、表示部14は、欠陥分類装置10による分類の結果を表す画像を表示する。 The display unit 14 includes a display device such as a liquid crystal display and an organic EL (Electro Luminescence) display, and displays various images under the control of the control unit 11. For example, the display unit 14 displays an image showing the result of classification by the defect classification device 10.

通信部15は、欠陥分類装置10の外部の機器と通信するための通信インタフェースを備える。例えば、通信部15は、LAN(Local Area Network)、USB(Universal Serial Bus)等の周知の通信規格に則って、外部の機器と通信する。 The communication unit 15 includes a communication interface for communicating with an external device of the defect classification device 10. For example, the communication unit 15 communicates with an external device in accordance with well-known communication standards such as LAN (Local Area Network) and USB (Universal Serial Bus).

撮像部16は、可視光を集光するレンズと、レンズの集光位置に配置されたCCD(Charge Coupled Device)、CMOS(Complementary Metal Oxide Semiconductor)等の撮像素子と、撮像素子により得られた画像を表すアナログ信号をデジタルデータに変換するA/D(Analog/Digital)変換器と、を備える。撮像部16は、制御部11の制御のもとで検査対象を撮像し、検査対象の外観が撮像された撮像画像を取得する。 The image pickup unit 16 includes a lens that collects visible light, an image pickup element such as a CCD (Charge Coupled Device) or CMOS (Complementary Metal Oxide Semiconductor) arranged at the focus position of the lens, and an image obtained by the image pickup element. It is provided with an A / D (Analog / Digital) converter that converts an analog signal representing the above into digital data. The image pickup unit 16 takes an image of the inspection target under the control of the control unit 11 and acquires an image of the appearance of the inspection target.

図3に、欠陥分類装置10の機能的な構成を示す。図3に示すように、欠陥分類装置10は、機能的に、撮像画像取得部110と、欠陥検出部120と、特徴量計算部130と、第1の分類部140と、学習部150と、第2の分類部160と、分類条件設定部170と、合否判定部180と、を備える。制御部11において、CPUは、ROMに記憶されたプログラムをRAMに読み出して、そのプログラムを実行して制御することにより、これら各部として機能する。 FIG. 3 shows a functional configuration of the defect classification device 10. As shown in FIG. 3, the defect classification device 10 functionally includes a captured image acquisition unit 110, a defect detection unit 120, a feature amount calculation unit 130, a first classification unit 140, and a learning unit 150. A second classification unit 160, a classification condition setting unit 170, and a pass / fail determination unit 180 are provided. In the control unit 11, the CPU reads the program stored in the ROM into the RAM, executes the program, and controls the program, thereby functioning as each of these units.

撮像画像取得部110は、検査対象が撮像された撮像画像を取得する。具体的に説明すると、撮像画像取得部110は、撮像部16の視野内に検査対象が入る状態で、撮像部16に検査対象を撮像させる。これにより、撮像画像取得部110は、検査対象の外観が撮像された撮像画像を取得する。撮像画像取得部110は、制御部11が撮像部16等と協働することにより実現される。 The captured image acquisition unit 110 acquires an captured image in which the inspection target is captured. Specifically, the captured image acquisition unit 110 causes the imaging unit 16 to image the inspection target in a state where the inspection target is within the field of view of the imaging unit 16. As a result, the captured image acquisition unit 110 acquires an captured image in which the appearance of the inspection target is captured. The captured image acquisition unit 110 is realized by the control unit 11 cooperating with the image pickup unit 16 and the like.

欠陥検出部120は、検査対象が撮像された撮像画像から、検査対象に存在する欠陥を検出する。具体的に説明すると、欠陥検出部120は、周知の画像処理の手法を用いて、撮像画像取得部110により取得された撮像画像を解析する。そして、欠陥検出部120は、撮像画像内の特定の条件を満たす領域を、欠陥が写っている可能性がある欠陥領域として検出する。 The defect detection unit 120 detects defects existing in the inspection target from the captured image of the inspection target. Specifically, the defect detection unit 120 analyzes the captured image acquired by the captured image acquisition unit 110 by using a well-known image processing technique. Then, the defect detection unit 120 detects a region in the captured image that satisfies a specific condition as a defect region in which the defect may be captured.

具体的に、図4に、撮像部16により検査対象が撮像された撮像画像30の例を示す。欠陥検出部120は、撮像画像30に含まれる各画素の画素値(輝度値)を解析し、周囲の画素との画素値の差が基準値よりも大きい領域の有無を判定する。そして、欠陥検出部120は、撮像画像30の中に周囲の画素との画素値の差が基準値よりも大きい領域が存在する場合、その領域を欠陥領域として検出する。 Specifically, FIG. 4 shows an example of the captured image 30 in which the inspection target is captured by the imaging unit 16. The defect detection unit 120 analyzes the pixel value (luminance value) of each pixel included in the captured image 30, and determines whether or not there is a region in which the difference in pixel value from the surrounding pixels is larger than the reference value. Then, when the defect detection unit 120 has a region in the captured image 30 in which the difference in pixel value from the surrounding pixels is larger than the reference value, the defect detection unit 120 detects the region as the defect region.

例えば、撮像画像30に3つの欠陥X1,X2,X3が写っている場合、欠陥検出部120は、撮像画像30内における欠陥X1,X2,X3のそれぞれの領域を、欠陥領域として検出する。欠陥検出部120は、制御部11が記憶部12等と協働することにより実現される。 For example, when three defects X1, X2, and X3 are shown in the captured image 30, the defect detection unit 120 detects each region of the defects X1, X2, and X3 in the captured image 30 as a defect region. The defect detection unit 120 is realized by the control unit 11 cooperating with the storage unit 12 and the like.

図3に戻って、特徴量計算部130は、欠陥検出部120により検出された欠陥の特徴量を計算する。ここで、欠陥の特徴量は、欠陥の特徴を示す値である。具体的には、特徴量計算部130は、欠陥の特徴量として、欠陥のサイズ、面積、真円度、及び明るさを計算する。 Returning to FIG. 3, the feature amount calculation unit 130 calculates the feature amount of the defect detected by the defect detection unit 120. Here, the feature amount of the defect is a value indicating the feature of the defect. Specifically, the feature amount calculation unit 130 calculates the size, area, roundness, and brightness of the defect as the feature amount of the defect.

欠陥のサイズ及び面積は、欠陥の大きさを示す指標である。具体的には、欠陥のサイズは、欠陥検出部120により検出された欠陥領域の、いずれか1以上の方向(例えば縦方向、横方向等)における長さに相当する。また、欠陥の面積は、欠陥検出部120により検出された欠陥領域に含まれる画素数に相当する。 The size and area of the defect are indicators of the size of the defect. Specifically, the size of the defect corresponds to the length of the defect region detected by the defect detection unit 120 in any one or more directions (for example, the vertical direction, the horizontal direction, etc.). Further, the area of the defect corresponds to the number of pixels included in the defect region detected by the defect detection unit 120.

欠陥の真円度は、欠陥の形状が円からどの程度外れているかの程度を示す値である。例えば、図4に示した欠陥X1,X2の形状は円に近いため、これらの真円度は0に近くなる。一方で、欠陥X3の形状は円とは大きく異なるため、真円度は0から外れた値になる。 The roundness of a defect is a value indicating how much the shape of the defect deviates from the circle. For example, since the shapes of the defects X1 and X2 shown in FIG. 4 are close to a circle, their roundness is close to 0. On the other hand, since the shape of the defect X3 is significantly different from that of the circle, the roundness deviates from 0.

欠陥の明るさは、欠陥の色情報により表される指標であって、欠陥が白色に近いか黒色に近いかを示す。欠陥の明るさは、例えば、欠陥検出部120により検出された欠陥領域に含まれる複数の画素の画素値の平均値、最頻値等の代表値により表される。 The brightness of a defect is an index represented by the color information of the defect, and indicates whether the defect is close to white or black. The brightness of the defect is represented by, for example, a representative value such as an average value or a mode value of the pixel values of a plurality of pixels included in the defect region detected by the defect detection unit 120.

特徴量計算部130は、撮像画像30から検出された欠陥領域を解析し、欠陥領域のサイズ、面積、真円度、及び明るさを、検査対象に存在する欠陥の特徴量として計算する。特徴量計算部130は、制御部11と記憶部12等と協働することにより実現される。 The feature amount calculation unit 130 analyzes the defect region detected from the captured image 30, and calculates the size, area, roundness, and brightness of the defect region as the feature amount of the defect existing in the inspection target. The feature amount calculation unit 130 is realized by cooperating with the control unit 11, the storage unit 12, and the like.

第1の分類部140は、ディープラーニングにより学習された学習済みモデル40を用いて、欠陥検出部120により検出された欠陥を分類する。具体的に説明すると、第1の分類部140は、欠陥検出部120により検出された欠陥を、予め定められた複数の種別のうちのいずれかに分類する。ここで、欠陥の種別とは、欠陥の種類による区別することであって、検査対象に存在する欠陥が、例えばキズ、シワ、ピンホール、異物等のうちのどれに該当するのかを示す情報である。 The first classification unit 140 classifies the defects detected by the defect detection unit 120 by using the trained model 40 learned by deep learning. Specifically, the first classification unit 140 classifies the defects detected by the defect detection unit 120 into one of a plurality of predetermined types. Here, the type of defect is to distinguish by the type of defect, and is information indicating which of the defects existing in the inspection target corresponds to, for example, scratches, wrinkles, pinholes, foreign substances, etc. be.

第1の分類部140は、欠陥検出部120により検出された欠陥を分類するために、記憶部12に記憶されている学習済みモデル40を参照する。学習済みモデル40は、検査対象に存在する欠陥が撮像された画像の入力に対して、その欠陥を複数の種別のうちのいずれかに分類した分類結果を出力するモデルである。 The first classification unit 140 refers to the trained model 40 stored in the storage unit 12 in order to classify the defects detected by the defect detection unit 120. The trained model 40 is a model that outputs a classification result of classifying the defect into one of a plurality of types in response to the input of the image in which the defect existing in the inspection target is captured.

学習部150は、学習用の欠陥画像とその欠陥画像に示される欠陥の種別との関係をディープラーニング(深層学習)により学習することにより、学習済みモデル40を生成する。学習部150は、ディープラーニングによる学習を実行するために、記憶部12に記憶されている学習用データ50を参照する。 The learning unit 150 generates a trained model 40 by learning the relationship between a defect image for learning and the type of defect shown in the defect image by deep learning. The learning unit 150 refers to the learning data 50 stored in the storage unit 12 in order to execute learning by deep learning.

学習用データ50は、学習部150が学習するために用いられるデータ(トレーニングデータ)であって、教師データとして用いられる複数のデータセットを含んでいる。複数のデータセットのそれぞれは、学習用の欠陥画像とその欠陥画像に示される欠陥の種別との対応関係を定めている。学習用の欠陥画像は、予め種別が判明しているサンプルとなる欠陥を示す画像である。 The learning data 50 is data (training data) used for learning by the learning unit 150, and includes a plurality of data sets used as teacher data. Each of the plurality of data sets defines the correspondence between the defect image for learning and the type of defect shown in the defect image. The defect image for learning is an image showing a defect as a sample whose type is known in advance.

学習部150は、学習用データ50に含まれる複数のデータセットを教師データとして用いて、ディープラーニングの手法により教師あり学習を実施する。ディープラーニングを実施するために、学習部150は、ニューラルネットワーク、より具体的には畳み込みニューラルネットワーク(CNN:Convolutional Neural Network)を生成する。ここで、CNNは、R-CNN(Regional-CNN)等のような、CNNを改良した各種手法であっても良い。 The learning unit 150 uses a plurality of data sets included in the learning data 50 as supervised data, and performs supervised learning by a deep learning method. In order to carry out deep learning, the learning unit 150 generates a neural network, more specifically, a convolutional neural network (CNN). Here, CNN may be various methods improved from CNN, such as R-CNN (Regional-CNN) and the like.

CNNは、図5に示すように、入力データが入力される入力層と、入力層に入力された画像に対して畳み込みを行う畳み込み層と、プーリングを行うプーリング層と、プーリング層からの出力を結合する全結合層と、活性化関数を用いて出力値を得る出力層と、によって構成される。全結合層は、複数の中間層(隠れ層)を含んでいる。CNNにおいて、畳み込み層とプーリング層とは複数組設けられており、入力層に入力された画像に対して畳み込み処理とプーリング処理とが複数回にわたって繰り返される。全結合層は、畳み込み層とプーリング層とで処理された後のデータを中間層において結合する。出力層は、全結合層で結合された値をsoftmaxなどの活性化関数を用いて出力データとして出力する。なお、図5に示したCNNの構成は一例であり、学習部150により生成されるニューラルネットワークの構成はこれに限らない。 As shown in FIG. 5, the CNN outputs an input layer into which input data is input, a convolution layer for convolving the image input to the input layer, a pooling layer for pooling, and an output from the pooling layer. It is composed of a fully connected layer that binds and an output layer that obtains an output value using an activation function. The fully connected layer contains a plurality of intermediate layers (hidden layers). In the CNN, a plurality of sets of the convolution layer and the pooling layer are provided, and the convolution process and the pooling process are repeated a plurality of times for the image input to the input layer. The fully connected layer combines the data after being processed by the convolutional layer and the pooling layer in the intermediate layer. The output layer outputs the values combined in the fully connected layer as output data using an activation function such as softmax. The configuration of the CNN shown in FIG. 5 is an example, and the configuration of the neural network generated by the learning unit 150 is not limited to this.

CNNは、入力データとして欠陥が撮像された画像のデータを受け付け、出力データとして欠陥の種別を示す情報を出力する。出力層のノードの数は、検査対象に存在する可能性がある欠陥の種別の数だけ予め定められている。図5の例では、出力層の各ノードに、種別A、種別B、…、種別N(例えば、キズ、シワ、ピンホール、異物等)が対応付けられている。 The CNN accepts the data of the image in which the defect is captured as the input data, and outputs the information indicating the type of the defect as the output data. The number of nodes in the output layer is predetermined by the number of types of defects that may exist in the inspection target. In the example of FIG. 5, each node of the output layer is associated with a type A, a type B, ..., A type N (for example, scratches, wrinkles, pinholes, foreign matter, etc.).

出力層の各ノードは、0以上1以下の値であるスコアを出力する。スコアは、入力層に入力された画像における欠陥が、各ノードに対応付けられた種別に該当する確からしさを示す値である。あるノードから出力されるスコアが1に近いほど、入力層に入力された画像における欠陥が、そのノードに対応付けられた種別に該当する確率が高いことを意味する。図5の例では、出力層のうちの種別Bのノードから出力されたスコアが0.78であり、他の種別のノードから出力されたスコアよりも高い。そのため、入力層に入力された画像における欠陥が種別Bに該当する確率が相対的に高い。 Each node of the output layer outputs a score which is a value of 0 or more and 1 or less. The score is a value indicating the certainty that the defect in the image input to the input layer corresponds to the type associated with each node. The closer the score output from a node is to 1, the higher the probability that the defect in the image input to the input layer corresponds to the type associated with that node. In the example of FIG. 5, the score output from the node of type B in the output layer is 0.78, which is higher than the score output from the node of other types. Therefore, the probability that the defect in the image input to the input layer corresponds to the type B is relatively high.

学習部150は、学習用データ50に含まれる複数のデータセットを教師データとして用いて、ニューラルネットワークにおけるパラメータ、具体的には畳み込み層におけるフィルタの値及び中間層における結合の重みを調整する。具体的に説明すると、学習部150は、各データセットに含まれる学習用の欠陥画像を入力データとして入力する。そして、学習部150は、出力層の各ノードから出力されるスコアのうちの、正解種別に対応するノードから出力されるスコアが1に近づき、且つ、その他のノードから出力されるスコアが0に近づくように、誤差逆伝播法等を用いてパラメータを調整する。ここで、正解種別は、入力層に入力された学習用の欠陥画像に対応付けられている欠陥の種別である。 The learning unit 150 uses a plurality of data sets included in the training data 50 as teacher data to adjust parameters in the neural network, specifically, filter values in the convolution layer and coupling weights in the intermediate layer. Specifically, the learning unit 150 inputs the defect image for learning included in each data set as input data. Then, in the learning unit 150, among the scores output from each node of the output layer, the score output from the node corresponding to the correct answer type approaches 1, and the score output from the other nodes becomes 0. Adjust the parameters using the backpropagation method or the like so that they are closer to each other. Here, the correct answer type is the type of defect associated with the defect image for learning input to the input layer.

学習部150は、このような処理を、学習用データ50に含まれる複数のデータセットのそれぞれに対して実行することにより、ニューラルネットワークにおける各層の結合の重みを最適化する。これにより、学習部150は、欠陥が撮像された画像の入力を受けて、その欠陥が、予め定められた複数の種別のそれぞれに該当する確からしさを示すスコアを出力するニューラルネットワークを構築する。学習部150は、ニューラルネットワークを構築すると、構築されたニューラルネットワークを学習済みモデル40として記憶部12に保存する。学習部150は、制御部11が記憶部12等と協働することにより実現される。 The learning unit 150 optimizes the weight of the connection of each layer in the neural network by executing such a process for each of the plurality of data sets included in the training data 50. As a result, the learning unit 150 constructs a neural network that receives the input of the image in which the defect is captured and outputs a score indicating the certainty that the defect corresponds to each of a plurality of predetermined types. When the learning unit 150 constructs the neural network, the learned neural network is stored in the storage unit 12 as a trained model 40. The learning unit 150 is realized by the control unit 11 cooperating with the storage unit 12 and the like.

第1の分類部140は、このように学習部150により生成された学習済みモデル40を用いて、欠陥検出部120により検出された欠陥が該当する種別を推定し、欠陥検出部120により検出された欠陥を推定した種別に分類する。具体的に説明すると、第1の分類部140は、欠陥検出部120により撮像画像30から検出された欠陥の画像を、入力データとして学習済みモデル40に入力する。そして、第1の分類部140は、このような入力に対して学習済みモデル40から出力された、欠陥検出部120により検出された欠陥が、予め定められた複数の種別のそれぞれに該当する確からしさを示すスコアを参照する。そして、第1の分類部140は、複数の種別のうちの、学習済みモデル40から出力されたスコアが最も高い種別に、欠陥検出部120により検出された欠陥を分類する。 The first classification unit 140 estimates the type of the defect detected by the defect detection unit 120 using the trained model 40 generated by the learning unit 150 in this way, and is detected by the defect detection unit 120. Classify the defects into the estimated types. Specifically, the first classification unit 140 inputs the image of the defect detected from the captured image 30 by the defect detection unit 120 into the trained model 40 as input data. Then, in the first classification unit 140, it is certain that the defects detected by the defect detection unit 120 output from the trained model 40 with respect to such an input correspond to each of the plurality of predetermined types. Refer to the score that shows the uniqueness. Then, the first classification unit 140 classifies the defects detected by the defect detection unit 120 into the type having the highest score output from the trained model 40 among the plurality of types.

第1の分類部140は、例えば図4に示したように撮像画像30から複数の欠陥X1,X2,X3が検出された場合、このような種別分類処理を、検出された複数の欠陥X1,X2,X3のそれぞれに対して実行する。これにより、第1の分類部140は、複数の欠陥X1,X2,X3のそれぞれを、予め定められた複数の種別のうちのいずれかに分類する。第1の分類部140は、制御部11と記憶部12等と協働することにより実現される。 When, for example, as shown in FIG. 4, when a plurality of defects X1, X2, and X3 are detected in the captured image 30, the first classification unit 140 performs such a classification process on the detected defects X1, 1. Execute for each of X2 and X3. As a result, the first classification unit 140 classifies each of the plurality of defects X1, X2, and X3 into one of a plurality of predetermined types. The first classification unit 140 is realized by cooperating with the control unit 11, the storage unit 12, and the like.

図3に戻って、第2の分類部160は、特徴量計算部130により計算された特徴量と第1の分類部140による分類結果とに基づいて、欠陥検出部120により検出された欠陥を分類する。言い換えると、第2の分類部160は、特徴量計算部130により計算された特徴量と第1の分類部140による分類結果との両方を組み合わせて、欠陥を分類する。 Returning to FIG. 3, the second classification unit 160 detects the defect detected by the defect detection unit 120 based on the feature amount calculated by the feature amount calculation unit 130 and the classification result by the first classification unit 140. Classify. In other words, the second classification unit 160 classifies defects by combining both the feature amount calculated by the feature amount calculation unit 130 and the classification result by the first classification unit 140.

具体的に説明すると、欠陥のサイズ、面積、真円度、明るさ等のような特徴量のみに基づく分類は、人間が直観的に判断しているような複雑な欠陥に対して、分類性能が上がらないという課題がある。例えば、図6(A)~(C)に示すように、不定形の形状をしている欠陥(図6(A))、シワやキズ等が広範囲に分布している欠陥(図6(B))、及び、それらが組み合わされた欠陥(図6(C))に対して、特徴量のみでは分類が困難な傾向がある。この主たる要因は、分類に最適な特徴量の選択、及び分類に最適な特徴量を用いた分類条件の設定が困難であるためである。 Specifically, classification based only on features such as defect size, area, roundness, brightness, etc. is a classification performance for complex defects that humans intuitively judge. There is a problem that it does not rise. For example, as shown in FIGS. 6 (A) to 6 (C), defects having an irregular shape (FIG. 6 (A)) and defects in which wrinkles, scratches, etc. are widely distributed (FIG. 6 (B)). )) And defects in which they are combined (FIG. 6 (C)) tend to be difficult to classify based on the feature amount alone. This main factor is that it is difficult to select the optimum feature amount for classification and to set the classification condition using the optimum feature amount for classification.

これに対して、ディープラーニングを用いることにより、特徴量のみでは分類が困難であった複雑な欠陥に対して、分類精度を向上させることができる。しかしながら、ディープラーニングを用いた分類では、特徴量に基づく分類では比較的簡単な分類で誤判定することがある。例えば、図7(A)~(C)に示すように、形状が類似しているがサイズが異なる複数の欠陥に対して、ディープラーニングでは分類が不得手な傾向がある。この主たる要因は、ディープラーニングは事前に分類種別ごとに振り分けた欠陥を学習させる必要があるが、微小にサイズが異なる欠陥ごとに分類種別を設定すると、膨大な数の分類種別の設定が必要になるからである。特に、このような分類種別の設定を人手で行う場合、振り分けに関わる作業時間が膨大になり、ディープラーニングによる分類精度を向上させる上での妨げとなる。 On the other hand, by using deep learning, it is possible to improve the classification accuracy for complicated defects that were difficult to classify only by the feature amount. However, in the classification using deep learning, the classification based on the feature amount may be erroneously determined by a relatively simple classification. For example, as shown in FIGS. 7A to 7C, there is a tendency that deep learning is not good at classifying a plurality of defects having similar shapes but different sizes. The main reason for this is that deep learning needs to learn the defects sorted by classification type in advance, but if the classification type is set for each defect with a slightly different size, it is necessary to set a huge number of classification types. Because it becomes. In particular, when such classification type setting is performed manually, the work time related to sorting becomes enormous, which hinders improvement of classification accuracy by deep learning.

このように、特徴量のみに基づく分類を、ディープラーニングのみに基づく分類にそのまま置き換えるだけでは、欠陥の分類精度の向上に好適でない。このような状況を考慮して、第2の分類部160は、特徴量計算部130により計算された特徴量と、第1の分類部140によるディープラーニングを用いた分類結果と、の両方に基づいて、欠陥を分類する。 As described above, simply replacing the classification based only on the feature amount with the classification based only on deep learning is not suitable for improving the classification accuracy of defects. In consideration of such a situation, the second classification unit 160 is based on both the feature amount calculated by the feature amount calculation unit 130 and the classification result using deep learning by the first classification unit 140. And classify the defects.

具体的に説明すると、第2の分類部160は、記憶部12に記憶されている分類テーブル60を参照する。分類テーブル60は、第2の分類部160による欠陥の分類条件を設定しているテーブルである。第2の分類部160は、分類テーブル60に設定された分類条件に従って、欠陥検出部120により検出された欠陥を分類する。 Specifically, the second classification unit 160 refers to the classification table 60 stored in the storage unit 12. The classification table 60 is a table in which the defect classification conditions set by the second classification unit 160 are set. The second classification unit 160 classifies the defects detected by the defect detection unit 120 according to the classification conditions set in the classification table 60.

図8に、分類テーブル60に定められる分類条件の例を示す。分類テーブル60は、分類条件として、特徴量計算部130により計算された複数種類の特徴量と、第1の分類部140による学習済みモデル40を用いた分類により得られた欠陥の種別及びスコアに応じて、10個のグループG1~G10を定めている。 FIG. 8 shows an example of the classification conditions defined in the classification table 60. The classification table 60 includes a plurality of types of features calculated by the feature calculation unit 130 and the types and scores of defects obtained by classification using the trained model 40 by the first classification unit 140 as classification conditions. Correspondingly, 10 groups G1 to G10 are defined.

具体的に説明すると、分類テーブル60は、第1の分類部140により分類された欠陥の種別が“キズ”、“異物”、“シワ”のいずれであるかに応じて、特徴量に関して異なる分類条件を設定している。例えば、欠陥の種別が“キズ”である場合、その欠陥のサイズがL1よりも大きいか否かに応じて、第2の分類部160は、その欠陥をグループG1,G2のいずれかに分類する。また、欠陥の種別が“異物”である場合、その欠陥の明るさがB1よりも明るいか否かに応じて、及び、その欠陥の面積がA1又はA2よりも大きいか否かに応じて、第2の分類部160は、その欠陥をグループG3~G6のいずれかに分類する。更には、欠陥の種別が“シワ”である場合、スコアがS1より大きいか否かに応じて、及び、その欠陥のサイズがL2又はL3よりも大きいか否かに応じて、第2の分類部160は、その欠陥をグループG7~G10のいずれかに分類する。 Specifically, the classification table 60 is classified differently with respect to the feature amount depending on whether the type of the defect classified by the first classification unit 140 is "scratch", "foreign matter", or "wrinkle". The conditions are set. For example, when the type of defect is "scratch", the second classification unit 160 classifies the defect into one of the groups G1 and G2 depending on whether the size of the defect is larger than L1. .. Further, when the type of the defect is "foreign matter", depending on whether the brightness of the defect is brighter than B1 and whether the area of the defect is larger than A1 or A2. The second classification unit 160 classifies the defect into one of the groups G3 to G6. Furthermore, when the type of defect is "wrinkle", the second classification depends on whether the score is larger than S1 and whether the size of the defect is larger than L2 or L3. Part 160 classifies the defect into any of the groups G7 to G10.

このように、第2の分類部160は、特徴量計算部130により計算された特徴量に、第1の分類部140による分類結果として得られた種別とスコアを新たな特徴量として加えた組み合わせが、分類テーブル60に設定された複数のグループのうちのどれに該当するかを判定する。そして、第2の分類部160は、欠陥検出部120により検出された欠陥を、該当するグループに分類する。第2の分類部160は、制御部11と記憶部12等と協働することにより実現される。 In this way, the second classification unit 160 is a combination of the feature amount calculated by the feature amount calculation unit 130 and the type and score obtained as the classification result by the first classification unit 140 added as a new feature amount. Determines which of the plurality of groups set in the classification table 60 corresponds to. Then, the second classification unit 160 classifies the defects detected by the defect detection unit 120 into the corresponding group. The second classification unit 160 is realized by cooperating with the control unit 11, the storage unit 12, and the like.

なお、図8に示した分類テーブル60は一例であって、第2の分類部160は、分類テーブル60に設定される分類条件に限らず、様々な分類条件に従って欠陥を分類することができる。 The classification table 60 shown in FIG. 8 is an example, and the second classification unit 160 can classify defects according to various classification conditions, not limited to the classification conditions set in the classification table 60.

図3に戻って、分類条件設定部170は、ユーザから受け付けた操作に従って、第2の分類部160による欠陥の分類条件を設定する。具体的に説明すると、分類条件設定部170は、特徴量計算部130により計算される複数種類の特徴量と第1の分類部140による分類結果として得られる種別及びスコアとのうちから、分類に用いる組み合わせを設定する。また、分類条件設定部170は、特徴量、種別及びスコアのそれぞれにおけるグループの境界値、すなわち後述する合否判定部180が欠陥の合否を判定する基準値を設定する。 Returning to FIG. 3, the classification condition setting unit 170 sets the defect classification condition by the second classification unit 160 according to the operation received from the user. Specifically, the classification condition setting unit 170 classifies from among a plurality of types of feature quantities calculated by the feature quantity calculation unit 130 and the types and scores obtained as the classification result by the first classification unit 140. Set the combination to be used. Further, the classification condition setting unit 170 sets the boundary value of the group in each of the feature amount, the type, and the score, that is, the reference value for the pass / fail determination unit 180, which will be described later, to determine the pass / fail of the defect.

ユーザは、入力受付部13を操作して指示を入力することにより、例えば図8に示した分類テーブル60に設定された分類条件をはじめとする、任意の分類条件を設定することができる。例えば、検査対象が製造ラインで製造される製品である場合、製品に応じて異なる分類条件を設定することができる。具体的には、ある製品ではサイズに依らずシワは許容するが基準値よりも大きなサイズのピンホールは許容できない、別の製品ではサイズに依らずシワは許容できないが基準値よりも明るい異物は許容できる等、である。 By operating the input receiving unit 13 and inputting an instruction, the user can set an arbitrary classification condition including the classification condition set in the classification table 60 shown in FIG. 8, for example. For example, when the inspection target is a product manufactured on a production line, different classification conditions can be set depending on the product. Specifically, one product allows wrinkles regardless of size but cannot tolerate pinholes larger than the standard value, and another product does not allow wrinkles regardless of size but is brighter than the standard value. It is acceptable, etc.

分類条件設定部170は、このように入力受付部13を介してユーザから受け付けた入力に従って、分類条件を設定する。第2の分類部160は、分類条件設定部170により設定された分類条件に従って、欠陥検出部120により検出された欠陥を分類する。分類条件設定部170は、制御部11が入力受付部13と協働することにより実現される。 The classification condition setting unit 170 sets the classification condition according to the input received from the user via the input reception unit 13 in this way. The second classification unit 160 classifies the defects detected by the defect detection unit 120 according to the classification conditions set by the classification condition setting unit 170. The classification condition setting unit 170 is realized by the control unit 11 cooperating with the input reception unit 13.

更に、分類条件設定部170は、分類条件として、特徴量計算部130により計算された特徴量と第1の分類部140によるディープラーニングを用いた分類結果との両方に基づいて欠陥を分類するか、それともいずれか一方のみに基づいて欠陥を分類するか、を設定する。 Further, whether the classification condition setting unit 170 classifies the defect based on both the feature amount calculated by the feature amount calculation unit 130 and the classification result using deep learning by the first classification unit 140 as the classification condition. , Or classify defects based on only one of them.

例えば、分類条件設定部170により特徴量とディープラーニングを用いた分類結果との両方に基づいて欠陥を分類することが設定された場合、第2の分類部160は、サイズ等の特徴量とディープラーニングを用いた分類結果である種別及びスコアとの組み合わせに基づいて、欠陥を分類する。これに対して、分類条件設定部170により特徴量とディープラーニングを用いた分類結果とのうちのいずれか一方のみに基づいて欠陥を分類することが設定された場合、第2の分類部160は、特徴量のみ、又はディープラーニングのみに基づいて欠陥を分類する。 For example, when the classification condition setting unit 170 is set to classify defects based on both the feature amount and the classification result using deep learning, the second classification unit 160 is set to the feature amount such as size and deep. Defects are classified based on the type and the score, which are the classification results using learning. On the other hand, when the classification condition setting unit 170 is set to classify defects based on only one of the feature amount and the classification result using deep learning, the second classification unit 160 is set. Defects are classified based on features only or deep learning only.

このように、特徴量を用いた分類とディープラーニングを用いた分類とをユーザが自由に組み合わせることができる。これにより、ディープラーニングを用いた分類を導入した後であっても、従来の特徴量のみを用いた分類も可能となる。言い換えると、ディープラーニングを用いた分類と従来の特徴量のみを用いた分類との間で高い互換性を確保することができる。そのため、例えば製造ラインにおいて、ディープラーニングを用いた分類を、その性能を見極めつつ徐々に導入することが可能となる。 In this way, the user can freely combine the classification using the feature amount and the classification using the deep learning. As a result, even after the introduction of classification using deep learning, it is possible to perform classification using only conventional features. In other words, high compatibility can be ensured between the classification using deep learning and the classification using only the conventional features. Therefore, for example, in a production line, it is possible to gradually introduce classification using deep learning while assessing its performance.

図3に戻って、合否判定部180は、第2の分類部160による分類結果に基づいて、欠陥検出部120により検出された欠陥の合否を判定する。ここで、欠陥の合否は、その欠陥が検査対象に含まれていることが許容されるか否かを意味する。 Returning to FIG. 3, the pass / fail determination unit 180 determines the pass / fail of the defect detected by the defect detection unit 120 based on the classification result by the second classification unit 160. Here, the pass / fail of a defect means whether or not the defect is allowed to be included in the inspection target.

図8に示したように、分類テーブル60は、第2の分類部160により欠陥が各グループに分類された場合におけるその欠陥の合否を設定している。合否判定部180は、第2の分類部160により欠陥が“OK”のグループ(具体的にはグループG2,G4,G6,G8,G10)に分類された場合、その欠陥が許容される欠陥であると判定する。一方で、合否判定部180は、第2の分類部160により欠陥が“NG”のグループ(具体的にはグループG1,G3,G5,G7,G9)に分類された場合、その欠陥が許容されない欠陥であると判定する。 As shown in FIG. 8, the classification table 60 sets the pass / fail of the defect when the defect is classified into each group by the second classification unit 160. When the defect is classified into a group of "OK" (specifically, groups G2, G4, G6, G8, G10) by the second classification unit 160, the pass / fail determination unit 180 is a defect to which the defect is allowed. Judge that there is. On the other hand, when the defect is classified into the "NG" group (specifically, the groups G1, G3, G5, G7, G9) by the second classification unit 160, the pass / fail determination unit 180 does not allow the defect. Judged as a defect.

合否を判定すると、合否判定部180は、判定結果を出力する。具体的に説明すると、合否判定部180は、合否判定部180による判定結果を表す画像を表示部14に表示し、検査対象に欠陥が含まれているか否かをユーザに認識させる。合否判定部180は、制御部11が表示部14等と協働することにより実現される。 When the pass / fail determination is made, the pass / fail determination unit 180 outputs the determination result. Specifically, the pass / fail determination unit 180 displays an image showing the determination result by the pass / fail determination unit 180 on the display unit 14, and causes the user to recognize whether or not the inspection target contains a defect. The pass / fail determination unit 180 is realized by the control unit 11 cooperating with the display unit 14 and the like.

なお、合否判定部180は、合否の判定結果を、表示部14に表示することに代えて又は加えて、音声で出力しても良い。或いは、合否判定部180は、合否判定部180による判定結果を示す情報を、通信部15を介して外部の機器に出力しても良い。 The pass / fail determination unit 180 may output the pass / fail determination result by voice instead of or in addition to displaying it on the display unit 14. Alternatively, the pass / fail determination unit 180 may output information indicating the determination result by the pass / fail determination unit 180 to an external device via the communication unit 15.

以上のように構成される欠陥分類装置10により実行される欠陥分類処理の流れについて、図9に示すフローチャートを参照して説明する。 The flow of the defect classification process executed by the defect classification device 10 configured as described above will be described with reference to the flowchart shown in FIG.

図9に示す欠陥分類処理が実行される前に、学習部150は、学習用データ50を用いてディープラーニングを実施することにより、学習済みモデル40を生成する。そして、生成された学習済みモデル40が記憶部12に記憶されている状態において、ユーザから入力受付部13を介して処理開始の指示が受け付けられると、図9に示す欠陥分類処理は開始する。 Before the defect classification process shown in FIG. 9 is executed, the learning unit 150 generates the trained model 40 by performing deep learning using the learning data 50. Then, in a state where the generated learned model 40 is stored in the storage unit 12, when an instruction to start processing is received from the user via the input reception unit 13, the defect classification process shown in FIG. 9 starts.

欠陥分類処理を開始すると、欠陥分類装置10において、制御部11は、分類条件設定部170として機能し、分類条件を設定する(ステップS1)。具体的に説明すると、制御部11は、入力受付部13を介してユーザから受け付けた入力に従って、例えば図8に示した分類テーブル60に定められる分類条件を設定する。 When the defect classification process is started, in the defect classification device 10, the control unit 11 functions as the classification condition setting unit 170 and sets the classification conditions (step S1). Specifically, the control unit 11 sets the classification conditions defined in, for example, the classification table 60 shown in FIG. 8 according to the input received from the user via the input reception unit 13.

分類条件を設定すると、制御部11は、撮像画像取得部110として機能し、検査対象が撮像された撮像画像を取得する(ステップS2)。具体的に説明すると、制御部11は、撮像部16により検査対象の外観を撮像することにより、例えば図4に示したような、検査対象の表面が写った撮像画像30を取得する。 When the classification condition is set, the control unit 11 functions as the captured image acquisition unit 110 and acquires the captured image captured by the inspection target (step S2). Specifically, the control unit 11 acquires the captured image 30 in which the surface of the inspection target is captured, as shown in FIG. 4, for example, by capturing the appearance of the inspection target by the imaging unit 16.

撮像画像を取得すると、制御部11は、欠陥検出部120として機能し、撮像画像から欠陥を検出する(ステップS3)。具体的に説明すると、制御部11は、撮像画像内における各画素の画素値を解析し、周囲と画素値が大きく異なる領域の有無を判定する。そして、制御部11は、周囲と画素値が大きく異なる領域が存在する場合に、その領域を、欠陥が写っている可能性がある欠陥領域として検出する。 When the captured image is acquired, the control unit 11 functions as the defect detection unit 120 and detects the defect from the captured image (step S3). Specifically, the control unit 11 analyzes the pixel value of each pixel in the captured image and determines the presence or absence of a region in which the pixel value is significantly different from the surroundings. Then, when there is a region whose pixel value is significantly different from that of the surrounding area, the control unit 11 detects the region as a defect region in which a defect may be reflected.

欠陥を検出すると、制御部11は、特徴量計算部130として機能し、欠陥の特徴量を計算する(ステップS4)。具体的に説明すると、制御部11は、ステップS3で検出された欠陥のサイズ、面積、真円度、及び明るさという複数種類の特徴量を計算する。 When the defect is detected, the control unit 11 functions as the feature amount calculation unit 130 and calculates the feature amount of the defect (step S4). Specifically, the control unit 11 calculates a plurality of types of feature quantities such as the size, area, roundness, and brightness of the defect detected in step S3.

欠陥の特徴量を計算すると、制御部11は、第1の分類部140として機能し、学習済みモデル40を用いて欠陥を分類する(ステップS5)。具体的に説明すると、制御部11は、記憶部12に記憶されている学習済みモデル40に、ステップS3で検出された欠陥の画像を入力する。そして、制御部11は、学習済みモデル40から出力される複数の種別のスコアを参照して、検出された欠陥を、複数の種別のうちのスコアが最も高い種別に分類する。 When the feature amount of the defect is calculated, the control unit 11 functions as the first classification unit 140 and classifies the defect using the trained model 40 (step S5). Specifically, the control unit 11 inputs an image of the defect detected in step S3 into the trained model 40 stored in the storage unit 12. Then, the control unit 11 refers to the scores of the plurality of types output from the trained model 40, and classifies the detected defects into the type having the highest score among the plurality of types.

学習済みモデル40を用いて欠陥を分類すると、制御部11は、第2の分類部160として機能し、特徴量と、学習済みモデル40を用いた分類結果と、に基づいて欠陥を更に分類する(ステップS6)。具体的に説明すると、制御部11は、ステップS1で設定された分類条件に従って、複数のグループのうちから、ステップS4で計算した欠陥の特徴量とステップS5で分類した欠陥の種別及びスコアとの組み合わせが該当するグループを特定する。そして、制御部11は、ステップS3で検出された欠陥を、特定したグループに分類する。 When the defect is classified using the trained model 40, the control unit 11 functions as the second classification unit 160, and further classifies the defect based on the feature amount and the classification result using the trained model 40. (Step S6). Specifically, the control unit 11 determines the feature amount of the defect calculated in step S4 and the type and score of the defect classified in step S5 from the plurality of groups according to the classification conditions set in step S1. Identify the group to which the combination applies. Then, the control unit 11 classifies the defects detected in step S3 into the specified group.

欠陥を分類すると、制御部11は、合否判定部180として機能し、欠陥の合否を判定及び出力する(ステップS7)。具体的に説明すると、制御部11は、ステップS6において欠陥が、合否が“OK”に設定されているグループと合否が“NG”に設定されているグループとのどちらに分類されたかを判定する。判定の結果、制御部11は、合否が“NG”に設定されているグループに欠陥が分類された場合、その欠陥が許容されない(不良である)と判定し、その旨を表示部14に表示する。一方で、制御部11は、合否が“OK”に設定されているグループに欠陥が分類された場合、その欠陥が許容される(不良でない)と判定し、その旨を表示部14に表示する。 When the defects are classified, the control unit 11 functions as a pass / fail determination unit 180, determines and outputs the pass / fail of the defect (step S7). Specifically, the control unit 11 determines in step S6 whether the defect is classified into a group in which the pass / fail is set to "OK" or a group in which the pass / fail is set to "NG". .. As a result of the determination, when the defect is classified into the group whose pass / fail is set to "NG", the control unit 11 determines that the defect is unacceptable (defective) and displays that fact on the display unit 14. do. On the other hand, when the defect is classified into the group whose pass / fail is set to "OK", the control unit 11 determines that the defect is acceptable (not defective) and displays that fact on the display unit 14. ..

なお、制御部11は、ステップS3において撮像画像30から複数の欠陥が検出された場合、検出された複数の欠陥のそれぞれに対してステップS4~S7の処理を実行する。これにより、制御部11は、検査対象に許容されない(不良に相当する)欠陥が含まれているか否かを検査する。以上により、図9に示した欠陥分類処理は終了する。 When a plurality of defects are detected in the captured image 30 in step S3, the control unit 11 executes the processes of steps S4 to S7 for each of the detected defects. As a result, the control unit 11 inspects whether or not the inspection target contains an unacceptable (corresponding to a defect) defect. As a result, the defect classification process shown in FIG. 9 is completed.

以上説明したように、実施形態1に係る欠陥分類装置10は、検査対象が撮像された撮像画像から検出された欠陥の特徴量を計算すると共に、ディープラーニングにより学習された学習済みモデル40を用いて、検出された欠陥を分類する。そして、実施形態1に係る欠陥分類装置10は、特徴量と学習済みモデル40による分類結果とに基づいて、検出された欠陥を更に分類する。このように、実施形態1に係る欠陥分類装置10は、特徴量を用いた分類とディープラーニングを用いた分類とを組み合わせて、検査対象に存在する欠陥を分類する。そのため、特徴量のみを用いた場合とディープラーニングのみを用いた場合との一方のみでは分類が困難な欠陥を、高い精度で分類することができる。その結果として、検査対象に存在する欠陥の分類精度を向上させることができる。 As described above, the defect classification device 10 according to the first embodiment calculates the feature amount of the defect detected from the captured image captured by the inspection target, and uses the trained model 40 learned by deep learning. And classify the detected defects. Then, the defect classification device 10 according to the first embodiment further classifies the detected defects based on the feature amount and the classification result by the trained model 40. As described above, the defect classification device 10 according to the first embodiment classifies the defects existing in the inspection target by combining the classification using the feature amount and the classification using the deep learning. Therefore, defects that are difficult to classify using only one of the case where only the feature amount is used and the case where only the deep learning is used can be classified with high accuracy. As a result, the accuracy of classifying defects existing in the inspection target can be improved.

また、実施形態1に係る欠陥分類装置10は、ディープラーニングによる分類結果を新たな特徴量として従来のサイズ等の特徴量に組み合わせて扱う。そのため、従来のサイズ等の特徴量を用いた分類条件の設定方法を変えることなく、特徴量を用いた分類とディープラーニングによる分類とのどちらか一方を選択して使用すること、及び、両方を組み合わせて使用することが容易に可能となる。これにより、検査対象の欠陥及び分類の目的に応じて、最適な分類条件を容易に設定することができる。 Further, the defect classification device 10 according to the first embodiment handles the classification result by deep learning as a new feature amount in combination with the feature amount such as the conventional size. Therefore, without changing the method of setting the classification condition using the feature amount such as the conventional size, either the classification using the feature amount or the classification by deep learning should be selected and used, or both. It can be easily used in combination. Thereby, the optimum classification conditions can be easily set according to the defect to be inspected and the purpose of classification.

特に、例えば製造ラインで製造される製品が検査対象である場合において、製品の製造工程において発生する欠陥は、製造方法や製造工程によって、単純なものから複雑なものまで様々な欠陥に対して高い分類性能が求められる。その上で、分類条件の設定を容易にして、分類条件の設定に要する時間をより少なくする必要がある。実施形態1に係る欠陥分類装置10は、ディープラーニングによる分類結果を新たな特徴量として従来のサイズ等の特徴量に組み合わせて扱うことにより、検査対象に存在する様々な欠陥の分類精度を向上させるとともに、分類条件を容易に設定することができる。 In particular, for example, when a product manufactured on a manufacturing line is an inspection target, defects generated in the manufacturing process of the product are high for various defects from simple to complex depending on the manufacturing method and manufacturing process. Classification performance is required. On top of that, it is necessary to facilitate the setting of classification conditions and reduce the time required to set the classification conditions. The defect classification device 10 according to the first embodiment improves the classification accuracy of various defects existing in the inspection target by handling the classification result by deep learning as a new feature amount in combination with the feature amount such as the conventional size. At the same time, the classification conditions can be easily set.

また、実施形態1に係る欠陥分類装置10は、ディープラーニングによる分類結果を新たな特徴量として従来のサイズ等の特徴量に組み合わせて扱うため、従来のサイズ等の特徴量を用いた分類シーケンスを変えずに導入することができる。その結果、実施形態1に係る欠陥分類装置10は、例えば製造ラインで製造される製品が検査対象である場合において、欠陥の判定基準を大幅に変更することなく導入することができる。 Further, since the defect classification device 10 according to the first embodiment handles the classification result by deep learning as a new feature amount in combination with the feature amount such as the conventional size, a classification sequence using the feature amount such as the conventional size is used. It can be introduced without change. As a result, the defect classification device 10 according to the first embodiment can be introduced without significantly changing the defect determination criteria, for example, when a product manufactured on a production line is an inspection target.

更には、ディープラーニング等のAIによる分類結果は、分類の過程が外部から見えないため、その分類基準を人間が説明できないことが多い。そのため、例えば製造ラインにおいて製品の品質を管理する上で、全ての欠陥の分類をAIに置き換えることは難しい。実施形態1に係る欠陥分類装置10は、従来のサイズ等の特徴量を用いた分類シーケンスを変えずに導入することができるため、人間に説明し易い分類基準を維持しつつ、ディープラーニングによる欠陥の分類を導入することができる。 Furthermore, in the classification results by AI such as deep learning, since the classification process cannot be seen from the outside, it is often impossible for humans to explain the classification criteria. Therefore, for example, in controlling the quality of products on a production line, it is difficult to replace all defect classifications with AI. Since the defect classification device 10 according to the first embodiment can be introduced without changing the conventional classification sequence using features such as size, defects due to deep learning are maintained while maintaining classification criteria that are easy for humans to explain. Classification can be introduced.

(実施形態2)
次に、本発明の実施形態2について説明する。実施形態1と同様の構成及び機能については、適宜説明を省略する。
(Embodiment 2)
Next, the second embodiment of the present invention will be described. The same configurations and functions as those of the first embodiment will be omitted as appropriate.

図10に、実施形態2に係る欠陥分類装置20の機能的な構成を示す。図10に示すように、欠陥分類装置20は、機能的に、撮像画像取得部110と、欠陥検出部120と、特徴量計算部130と、第1の分類部140と、第2の分類部160と、分類条件設定部170と、合否判定部180と、モデル設定部210と、を備える。CPUは、ROMに記憶されたプログラムをRAMに読み出して、そのプログラムを実行して制御することにより、これら各部として機能する。 FIG. 10 shows a functional configuration of the defect classification device 20 according to the second embodiment. As shown in FIG. 10, the defect classification device 20 functionally includes a captured image acquisition unit 110, a defect detection unit 120, a feature amount calculation unit 130, a first classification unit 140, and a second classification unit. It includes 160, a classification condition setting unit 170, a pass / fail determination unit 180, and a model setting unit 210. The CPU reads the program stored in the ROM into the RAM, executes the program, and controls the program to function as each of these parts.

具体的に説明すると、実施形態1に係る欠陥分類装置10は、学習部150を備えていたのに対して、実施形態2に係る欠陥分類装置20は、学習部150を備えていない。その代わりに、実施形態2に係る欠陥分類装置20は、モデル設定部210を備えている。 More specifically, the defect classification device 10 according to the first embodiment includes the learning unit 150, whereas the defect classification device 20 according to the second embodiment does not include the learning unit 150. Instead, the defect classification device 20 according to the second embodiment includes a model setting unit 210.

モデル設定部210は、ユーザから受け付けた操作に従って、学習済みモデル40を設定する。具体的に説明すると、欠陥分類装置20は、異なる学習用データ50を用いたディープラーニングにより生成された複数の学習済みモデル40を、記憶部12に記憶する。モデル設定部210は、入力受付部13を介してユーザから受け付けた入力に従って、記憶部12に記憶されている複数の学習済みモデル40のうちから1つを選択する。そして、モデル設定部210は、選択した学習済みモデル40を、第1の分類部140が分類に用いる学習済みモデル40として設定する。モデル設定部210は、制御部11が入力受付部13と協働することにより実現される。 The model setting unit 210 sets the trained model 40 according to the operation received from the user. Specifically, the defect classification device 20 stores a plurality of trained models 40 generated by deep learning using different learning data 50 in the storage unit 12. The model setting unit 210 selects one of the plurality of learned models 40 stored in the storage unit 12 according to the input received from the user via the input reception unit 13. Then, the model setting unit 210 sets the selected trained model 40 as the trained model 40 used by the first classification unit 140 for classification. The model setting unit 210 is realized by the control unit 11 cooperating with the input reception unit 13.

なお、欠陥分類装置20が学習部150を備えていないため、複数の学習済みモデル40のそれぞれは、欠陥分類装置20自体により生成されず、欠陥分類装置20とは異なる外部の装置により生成される。欠陥分類装置10は、例えば通信部15を介してその装置と通信することにより、外部の装置で生成された複数の学習済みモデル40を取得し、記憶部12に記憶する。 Since the defect classification device 20 does not include the learning unit 150, each of the plurality of trained models 40 is not generated by the defect classification device 20 itself, but is generated by an external device different from the defect classification device 20. .. The defect classification device 10 acquires a plurality of learned models 40 generated by an external device and stores them in the storage unit 12, for example, by communicating with the device via the communication unit 15.

第1の分類部140は、モデル設定部210により設定された学習済みモデル40を用いて、欠陥検出部120により検出された欠陥を分類する。第1の分類部140をはじめとして、モデル設定部210以外の各部の機能は実施形態1と同様であるため、説明を省略する。 The first classification unit 140 classifies the defects detected by the defect detection unit 120 by using the trained model 40 set by the model setting unit 210. Since the functions of each unit other than the model setting unit 210, including the first classification unit 140, are the same as those in the first embodiment, the description thereof will be omitted.

このように、実施形態2に係る欠陥分類装置20は、学習部150の機能を備えておらず、ユーザから受け付けた操作に従って、欠陥の分類に用いる学習済みモデル40を設定する。これにより、ディープラーニングを用いた欠陥の分類の設定をユーザが柔軟に調整することができる。 As described above, the defect classification device 20 according to the second embodiment does not have the function of the learning unit 150, and sets the learned model 40 used for classifying the defects according to the operation received from the user. This allows the user to flexibly adjust the setting of defect classification using deep learning.

(変形例)
以上、本発明の実施形態を説明したが、各実施形態を組み合わせたり、各実施形態を適宜、変形、省略したりすることが可能である。
(Modification example)
Although the embodiments of the present invention have been described above, it is possible to combine the embodiments and appropriately modify or omit the embodiments.

例えば、上記実施形態では、特徴量計算部130は、欠陥検出部120により検出された欠陥の特徴量として、欠陥のサイズ、面積、真円度及び明るさという4つの値を計算した。しかしながら、特徴量計算部130は、欠陥の特徴量として、これら4つの値の全てを計算することに限らず、これら4つの値のうちの一部のみを計算するものであっても良い。また、特徴量計算部130は、欠陥の特徴量として、これら4つの値以外の値を計算しても良いし、これら4つの値のうちの少なくとも1つとこれら4つの値以外の値とをどちらも計算するものであっても良い。 For example, in the above embodiment, the feature amount calculation unit 130 calculates four values of the defect size, area, roundness, and brightness as the feature amount of the defect detected by the defect detection unit 120. However, the feature amount calculation unit 130 is not limited to calculating all of these four values as the feature amount of the defect, and may calculate only a part of these four values. Further, the feature amount calculation unit 130 may calculate a value other than these four values as the feature amount of the defect, and which of at least one of these four values and a value other than these four values is used. May also be calculated.

上記実施形態では、第2の分類部160は、記憶部12に記憶されている分類テーブル60を参照して、欠陥検出部120により検出された欠陥を分類した。このとき、第2の分類部160は、ランダムフォレスト法を用いて欠陥を分類しても良い。ランダムフォレスト法とは、ランダムサンプリングされた学習用データ(トレーニングデータ)に基づいて学習を行って多数の決定木を生成する方法である。具体的には説明すると、第2の分類部160は、特徴量計算部130により計算された特徴量と第1の分類部140による分類結果として得られた種別及びスコアとを説明変数として用いて、多数の決定木により構成される分類器を生成する。そして、第2の分類部160は、ランダムフォレスト法によって生成された分類器を用いて、欠陥を分類する。 In the above embodiment, the second classification unit 160 classifies the defects detected by the defect detection unit 120 with reference to the classification table 60 stored in the storage unit 12. At this time, the second classification unit 160 may classify the defects by using the random forest method. The random forest method is a method of generating a large number of decision trees by learning based on randomly sampled training data (training data). Specifically, the second classification unit 160 uses the feature amount calculated by the feature amount calculation unit 130 and the type and score obtained as the classification result by the first classification unit 140 as explanatory variables. , Generates a classifier composed of a large number of decision trees. Then, the second classification unit 160 classifies the defects by using the classifier generated by the random forest method.

上記実施形態では、第2の分類部160は、特徴量計算部130により計算された特徴量と、第1の分類部140により分類された種別及びその種別に該当する確からしさを示すスコアと、に基づいて、欠陥検出部120により検出された欠陥を分類した。しかしながら、第2の分類部160は、スコアを用いずに、特徴量計算部130により計算された特徴量と第1の分類部140により分類された種別に基づいて、欠陥検出部120により検出された欠陥を分類しても良い。 In the above embodiment, the second classification unit 160 includes a feature amount calculated by the feature amount calculation unit 130, a type classified by the first classification unit 140, and a score indicating the certainty corresponding to the type. The defects detected by the defect detection unit 120 were classified based on the above. However, the second classification unit 160 is detected by the defect detection unit 120 based on the feature amount calculated by the feature amount calculation unit 130 and the type classified by the first classification unit 140 without using the score. Defects may be classified.

或いは、第2の分類部160は、複数の種別及び複数のスコアを用いても良い。例えば、第2の分類部160は、ニューラルネットワークの出力層の複数のノードから出力される複数の種別のうちの、スコアが最も高い種別とそのスコアだけに限らず、スコアが高い順に2以上の種別と、それらの種別のスコアと、を用いても良い。 Alternatively, the second classification unit 160 may use a plurality of types and a plurality of scores. For example, the second classification unit 160 is not limited to the type having the highest score and its score among the plurality of types output from the plurality of nodes in the output layer of the neural network, and has two or more in descending order of the score. The types and the scores of those types may be used.

上記実施形態では、欠陥分類装置10,20は、撮像部16を備えていた。しかしながら、欠陥分類装置10,20自体が撮像部16を備えておらず、欠陥分類装置10,20とは独立した撮像装置が検査対象を撮像しても良い。撮像装置が欠陥分類装置10,20とは別に設けられている場合、撮像画像取得部110は、通信部15を介して撮像装置と通信することにより、撮像部16により検査対象の外観が撮像された撮像画像を取得する。 In the above embodiment, the defect classification devices 10 and 20 include an imaging unit 16. However, the defect classification devices 10 and 20 themselves do not include the image pickup unit 16, and an image pickup device independent of the defect classification devices 10 and 20 may image the inspection target. When the image pickup device is provided separately from the defect classification devices 10 and 20, the image pickup image acquisition unit 110 communicates with the image pickup device via the communication unit 15, and the image pickup unit 16 captures the appearance of the inspection target. Acquire the captured image.

上記実施形態では、欠陥分類装置10,20の制御部11において、CPUがROM又は記憶部12に記憶されたプログラムを実行することによって、図3又は図10に示した各部として機能した。しかしながら、制御部11は、CPUの代わりに、例えばASIC(Application Specific Integrated Circuit)、FPGA(Field-Programmable Gate Array)、各種制御回路等の専用のハードウェアを備え、専用のハードウェアが、図3又は図10に示した各部として機能しても良い。この場合、各部の機能それぞれを個別のハードウェアで実現しても良いし、各部の機能をまとめて単一のハードウェアで実現しても良い。また、各部の機能のうち、一部を専用のハードウェアによって実現し、他の一部をソフトウェア又はファームウェアによって実現しても良い。 In the above embodiment, in the control unit 11 of the defect classification devices 10 and 20, the CPU functions as each unit shown in FIG. 3 or FIG. 10 by executing the program stored in the ROM or the storage unit 12. However, the control unit 11 is provided with dedicated hardware such as an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), and various control circuits instead of the CPU, and the dedicated hardware is shown in FIG. Alternatively, it may function as each part shown in FIG. In this case, the functions of each part may be realized by individual hardware, or the functions of each part may be collectively realized by a single hardware. Further, some of the functions of each part may be realized by dedicated hardware, and other parts may be realized by software or firmware.

欠陥分類装置10,20の動作を規定するプログラムを、パーソナルコンピュータ、情報端末装置等の既存のコンピュータに適用することで、当該コンピュータを、欠陥分類装置10,20として機能させることも可能である。また、このようなプログラムの配布方法は任意であり、例えば、CD-ROM(Compact Disk ROM)、DVD(Digital Versatile Disk)、MO(Magneto Optical Disk)、又は、メモリカード等のコンピュータ読み取り可能な記録媒体に格納して配布してもよいし、インターネット等の通信ネットワークを介して配布してもよい。 By applying a program that defines the operation of the defect classification devices 10 and 20 to an existing computer such as a personal computer and an information terminal device, the computer can be made to function as the defect classification devices 10 and 20. Further, the distribution method of such a program is arbitrary, and for example, a computer-readable recording such as a CD-ROM (Compact Disk ROM), a DVD (Digital Versatile Disk), an MO (Magneto Optical Disk), or a memory card. It may be stored in a medium and distributed, or may be distributed via a communication network such as the Internet.

本発明は、本発明の広義の精神と範囲を逸脱することなく、様々な実施形態及び変形が可能とされるものである。また、上述した実施形態は、この発明を説明するためのものであり、本発明の範囲を限定するものではない。すなわち、本発明の範囲は、実施形態ではなく、特許請求の範囲によって示される。そして特許請求の範囲内及びそれと同等の発明の意義の範囲内で施される様々な変形が、この発明の範囲内とみなされる。 The present invention allows for various embodiments and modifications without departing from the broad spirit and scope of the invention. Further, the above-described embodiment is for explaining the present invention, and does not limit the scope of the present invention. That is, the scope of the present invention is shown not by the embodiment but by the claims. And various modifications made within the scope of the claims and within the scope of the equivalent invention are considered to be within the scope of the invention.

10,20 欠陥分類装置、11 制御部、12 記憶部、13 入力受付部、14 表示部、15 通信部、16 撮像部、30 撮像画像、40 学習済みモデル、50 学習用データ、60 分類テーブル、110 撮像画像取得部、120 欠陥検出部、130 特徴量計算部、140 第1の分類部、150 学習部、160 第2の分類部、170 分類条件設定部、180 合否判定部、210 モデル設定部、X1,X2,X3 欠陥 10, 20 Defect classification device, 11 Control unit, 12 Storage unit, 13 Input reception unit, 14 Display unit, 15 Communication unit, 16 Imaging unit, 30 Captured image, 40 Trained model, 50 Learning data, 60 Classification table, 110 Image acquisition unit, 120 Defect detection unit, 130 Feature amount calculation unit, 140 First classification unit, 150 Learning unit, 160 Second classification unit, 170 Classification condition setting unit, 180 Pass / fail judgment unit, 210 Model setting unit , X1, X2, X3 Defects

Claims (10)

検査対象が撮像された撮像画像から欠陥を検出する欠陥検出部と、
前記欠陥検出部により検出された前記欠陥の特徴量を計算する特徴量計算部と、
ディープラーニングにより学習された学習済みモデルを用いて、前記欠陥検出部により検出された前記欠陥を分類する第1の分類部と、
前記特徴量計算部により計算された前記特徴量と前記第1の分類部による分類結果とに基づいて、前記欠陥検出部により検出された前記欠陥を分類する第2の分類部と、を備える、
欠陥分類装置。
A defect detection unit that detects defects from the captured image of the inspection target, and
A feature amount calculation unit that calculates the feature amount of the defect detected by the defect detection unit, and a feature amount calculation unit.
Using the trained model trained by deep learning, a first classification unit that classifies the defects detected by the defect detection unit, and a first classification unit.
A second classification unit for classifying the defects detected by the defect detection unit based on the feature amount calculated by the feature amount calculation unit and the classification result by the first classification unit is provided.
Defect classifier.
ユーザから受け付けた操作に従って、前記第2の分類部による前記欠陥の分類条件を設定する分類条件設定部、を更に備え、
前記第2の分類部は、前記分類条件設定部により設定された分類条件に従って、前記欠陥検出部により検出された前記欠陥を分類する、
請求項1に記載の欠陥分類装置。
Further, a classification condition setting unit for setting the classification condition of the defect by the second classification unit according to the operation received from the user is provided.
The second classification unit classifies the defects detected by the defect detection unit according to the classification conditions set by the classification condition setting unit.
The defect classification device according to claim 1.
前記分類条件設定部は、前記分類条件として、前記特徴量計算部により計算された前記特徴量と前記第1の分類部による前記分類結果との両方に基づいて前記欠陥を分類するか、前記特徴量計算部により計算された前記特徴量と前記第1の分類部による前記分類結果とのうちのいずれか一方のみに基づいて前記欠陥を分類するか、を設定する、
請求項2に記載の欠陥分類装置。
As the classification condition, the classification condition setting unit classifies the defect based on both the feature amount calculated by the feature amount calculation unit and the classification result by the first classification unit, or the feature. It is set whether to classify the defect based on only one of the feature amount calculated by the quantity calculation unit and the classification result by the first classification unit.
The defect classification device according to claim 2.
ユーザから受け付けた操作に従って、前記学習済みモデルを設定するモデル設定部、を更に備え、
前記第1の分類部は、前記モデル設定部により設定された前記学習済みモデルを用いて、前記欠陥検出部により検出された前記欠陥を分類する、
請求項1から3のいずれか1項に記載の欠陥分類装置。
Further provided with a model setting unit for setting the trained model according to the operation received from the user.
The first classification unit classifies the defects detected by the defect detection unit using the trained model set by the model setting unit.
The defect classification device according to any one of claims 1 to 3.
前記学習済みモデルは、前記欠陥検出部により検出された前記欠陥が、予め定められた複数の種別のそれぞれに該当する確からしさを示すスコアを出力し、
前記第1の分類部は、前記欠陥検出部により検出された前記欠陥を、前記複数の種別のうちの、前記学習済みモデルから出力されたスコアが最も高い種別に分類し、
前記第2の分類部は、前記特徴量計算部により計算された前記特徴量と、前記第1の分類部により分類された前記種別及び該種別に該当する確からしさを示す前記スコアと、に基づいて、前記欠陥検出部により検出された前記欠陥を分類する、
請求項1から4のいずれか1項に記載の欠陥分類装置。
The trained model outputs a score indicating the certainty that the defect detected by the defect detection unit corresponds to each of a plurality of predetermined types.
The first classification unit classifies the defect detected by the defect detection unit into the type having the highest score output from the trained model among the plurality of types.
The second classification unit is based on the feature amount calculated by the feature amount calculation unit, the type classified by the first classification unit, and the score indicating the certainty corresponding to the type. Then, the defect detected by the defect detection unit is classified.
The defect classification device according to any one of claims 1 to 4.
前記特徴量計算部は、前記特徴量として、前記欠陥検出部により検出された前記欠陥のサイズと面積と真円度と明るさとのうちの少なくとも1つを計算する、
請求項1から5のいずれか1項に記載の欠陥分類装置。
The feature amount calculation unit calculates at least one of the size, area, roundness, and brightness of the defect detected by the defect detection unit as the feature amount.
The defect classification device according to any one of claims 1 to 5.
学習用の欠陥画像と該欠陥画像に示される欠陥の種別との関係を前記ディープラーニングにより学習することにより、前記学習済みモデルを生成する学習部、を更に備え、
前記第1の分類部は、前記学習部により生成された前記学習済みモデルを用いて、前記欠陥検出部により検出された前記欠陥を分類する、
請求項1から6のいずれか1項に記載の欠陥分類装置。
A learning unit that generates the trained model by learning the relationship between the defect image for learning and the type of defect shown in the defect image by the deep learning is further provided.
The first classification unit classifies the defects detected by the defect detection unit using the trained model generated by the learning unit.
The defect classification device according to any one of claims 1 to 6.
前記第2の分類部による分類結果に基づいて、前記欠陥検出部により検出された前記欠陥の合否を判定する合否判定部、を更に備える、
請求項1から7のいずれか1項に記載の欠陥分類装置。
Further, a pass / fail determination unit for determining the pass / fail of the defect detected by the defect detection unit is further provided based on the classification result by the second classification unit.
The defect classification device according to any one of claims 1 to 7.
検査対象が撮像された撮像画像から欠陥を検出する欠陥検出ステップと、
前記欠陥検出ステップで検出された前記欠陥の特徴量を計算する特徴量計算ステップと、
ディープラーニングにより学習された学習済みモデルを用いて、前記欠陥検出ステップで検出された前記欠陥を分類する第1の分類ステップと、
前記特徴量計算ステップで計算された前記特徴量と前記第1の分類ステップでの分類結果とに基づいて、前記欠陥検出ステップで検出された前記欠陥を分類する第2の分類ステップと、を含む、
欠陥分類方法。
Defect detection step to detect defects from the captured image of the inspection target,
A feature amount calculation step for calculating the feature amount of the defect detected in the defect detection step, and a feature amount calculation step.
Using the trained model trained by deep learning, a first classification step for classifying the defects detected in the defect detection step, and a first classification step.
Includes a second classification step for classifying the defects detected in the defect detection step based on the feature amount calculated in the feature amount calculation step and the classification result in the first classification step. ,
Defect classification method.
コンピュータを、
検査対象が撮像された撮像画像から欠陥を検出する欠陥検出部、
前記欠陥検出部により検出された前記欠陥の特徴量を計算する特徴量計算部、
ディープラーニングにより学習された学習済みモデルを用いて、前記欠陥検出部により検出された前記欠陥を分類する第1の分類部、
前記特徴量計算部により計算された前記特徴量と前記第1の分類部による分類結果とに基づいて、前記欠陥検出部により検出された前記欠陥を分類する第2の分類部、として機能させる、
プログラム。
Computer,
Defect detection unit that detects defects from the captured image of the inspection target,
A feature amount calculation unit that calculates the feature amount of the defect detected by the defect detection unit,
A first classification unit that classifies the defects detected by the defect detection unit using a trained model trained by deep learning.
It functions as a second classification unit for classifying the defects detected by the defect detection unit based on the feature amount calculated by the feature amount calculation unit and the classification result by the first classification unit.
program.
JP2020163685A 2020-09-29 2020-09-29 Defect classification device, defect classification method and program Active JP7393313B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020163685A JP7393313B2 (en) 2020-09-29 2020-09-29 Defect classification device, defect classification method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020163685A JP7393313B2 (en) 2020-09-29 2020-09-29 Defect classification device, defect classification method and program

Publications (2)

Publication Number Publication Date
JP2022055953A true JP2022055953A (en) 2022-04-08
JP7393313B2 JP7393313B2 (en) 2023-12-06

Family

ID=80998402

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020163685A Active JP7393313B2 (en) 2020-09-29 2020-09-29 Defect classification device, defect classification method and program

Country Status (1)

Country Link
JP (1) JP7393313B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115294135A (en) * 2022-10-09 2022-11-04 临沂华太电池有限公司 Battery edge curling and sealing quality detection method
WO2023176132A1 (en) * 2022-03-14 2023-09-21 東レエンジニアリング株式会社 Defect classification device
WO2023199928A1 (en) * 2022-04-14 2023-10-19 株式会社アーステクニカ Determination device, selection device, and determination method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004294360A (en) * 2003-03-28 2004-10-21 Hitachi High-Technologies Corp Method and apparatus for classifying defects
JP2012181209A (en) * 2012-06-14 2012-09-20 Hitachi Ltd Defect classification method and apparatus therefor
US20150254832A1 (en) * 2014-03-06 2015-09-10 Kla-Tencor Corporation Composite Defect Classifier
JP2019124591A (en) * 2018-01-17 2019-07-25 東京エレクトロン株式会社 Substrate defect inspection device, substrate defect inspection, and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004294360A (en) * 2003-03-28 2004-10-21 Hitachi High-Technologies Corp Method and apparatus for classifying defects
JP2012181209A (en) * 2012-06-14 2012-09-20 Hitachi Ltd Defect classification method and apparatus therefor
US20150254832A1 (en) * 2014-03-06 2015-09-10 Kla-Tencor Corporation Composite Defect Classifier
JP2019124591A (en) * 2018-01-17 2019-07-25 東京エレクトロン株式会社 Substrate defect inspection device, substrate defect inspection, and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
橘高 翼: "産業用画像処理アプリケーションへの機械学習技術の適用", 画像ラボ, vol. 第28巻 第2号, JPN6023036086, 10 February 2017 (2017-02-10), JP, pages 70 - 75, ISSN: 0005144114 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023176132A1 (en) * 2022-03-14 2023-09-21 東レエンジニアリング株式会社 Defect classification device
WO2023199928A1 (en) * 2022-04-14 2023-10-19 株式会社アーステクニカ Determination device, selection device, and determination method
CN115294135A (en) * 2022-10-09 2022-11-04 临沂华太电池有限公司 Battery edge curling and sealing quality detection method

Also Published As

Publication number Publication date
JP7393313B2 (en) 2023-12-06

Similar Documents

Publication Publication Date Title
JP7393313B2 (en) Defect classification device, defect classification method and program
JP7015001B2 (en) Defect inspection equipment, defect inspection methods, and their programs
JP7004145B2 (en) Defect inspection equipment, defect inspection methods, and their programs
JP6869490B2 (en) Defect inspection equipment, defect inspection methods, and their programs
JP6403261B2 (en) Classifier generation device, visual inspection device, classifier generation method, and program
WO2023077404A1 (en) Defect detection method, apparatus and system
JP6992475B2 (en) Information processing equipment, identification system, setting method and program
JP2018005640A (en) Classifying unit generation device, image inspection device, and program
JP2018005639A (en) Image classification device, image inspection device, and program
JP4861806B2 (en) Red-eye detection and correction
JP6932987B2 (en) Image processing device, image processing program, image processing system
JP2011188496A (en) Backlight detection device and backlight detection method
JP2011214903A (en) Appearance inspection apparatus, and apparatus, method and program for generating appearance inspection discriminator
JP2008192100A (en) Eyelid detector and program
CN101983507A (en) Automatic redeye detection
CN110596120A (en) Glass boundary defect detection method, device, terminal and storage medium
US20120207379A1 (en) Image Inspection Apparatus, Image Inspection Method, And Computer Program
US20220222822A1 (en) Microscopy System and Method for Evaluating Image Processing Results
JP2020187656A (en) Image inspection device
JP2021174456A (en) Abnormality determination method and abnormality determination device
CN115018797A (en) Screen defect detection method, screen defect detection device and computer-readable storage medium
JP2010008159A (en) Visual inspection processing method
WO2022130814A1 (en) Index selection device, information processing device, information processing system, inspection device, inspection system, index selection method, and index selection program
CN111563869A (en) Stain testing method for quality inspection of camera module
KR20230127121A (en) Method and apparatus for evaluating value of electronic device and method for training deep learning model

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221021

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230825

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230905

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20231023

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20231107

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231124

R150 Certificate of patent or registration of utility model

Ref document number: 7393313

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150