JP2023122140A - Teacher data generation device, teacher data generation method, and program - Google Patents

Teacher data generation device, teacher data generation method, and program Download PDF

Info

Publication number
JP2023122140A
JP2023122140A JP2022025618A JP2022025618A JP2023122140A JP 2023122140 A JP2023122140 A JP 2023122140A JP 2022025618 A JP2022025618 A JP 2022025618A JP 2022025618 A JP2022025618 A JP 2022025618A JP 2023122140 A JP2023122140 A JP 2023122140A
Authority
JP
Japan
Prior art keywords
defect
area
image
region
teacher data
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
JP2022025618A
Other languages
Japanese (ja)
Inventor
順一 塩見
Junichi Shiomi
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.)
Screen Holdings Co Ltd
Original Assignee
Screen Holdings 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 Screen Holdings Co Ltd filed Critical Screen Holdings Co Ltd
Priority to JP2022025618A priority Critical patent/JP2023122140A/en
Priority to TW111142102A priority patent/TW202334900A/en
Priority to KR1020220156345A priority patent/KR20230126163A/en
Priority to CN202310108322.7A priority patent/CN116645314A/en
Publication of JP2023122140A publication Critical patent/JP2023122140A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • G06V10/267Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion by performing operations on regions, e.g. growing, shrinking or watersheds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30141Printed circuit board [PCB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Databases & Information Systems (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Automation & Control Theory (AREA)
  • Chemical & Material Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Signal Processing (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)

Abstract

To easily generate teacher data including an image where an unnecessary area other than a defective area is reduced.SOLUTION: A teacher data generation device 4 comprises: an image reception section 41 for receiving a predetermined size of defective image including a defect detection area and also receiving defective information indicating the range of the detection area in the defective image from an inspection device 2 for imaging an object so as to detect a defect; a segmented image generation section 42 for segmenting an area including the detection area from the defective image as a segmented image based on the defect information; a display control section 43 for displaying at least a part of the defective image on a display 35; a determination result reception section 44 for receiving an input of a defect type determination result by an operator with respect to the defective image displayed on the display 35; and a teacher data generation section 45 for generating teacher data by labelling the determination result to the segmented image. Thus, the teacher data including an image where an unnecessary area other than the defective area is reduced can be easily generated.SELECTED DRAWING: Figure 3

Description

本発明は、教師データを生成する技術に関する。 The present invention relates to technology for generating training data.

対象物を撮像して欠陥を検出する検査装置では、欠陥が検出された場合に、欠陥領域を含む所定サイズの欠陥画像が出力される。このような欠陥画像が示す欠陥の種別を、学習済みモデル(分類器)により分類することが考えられる。この場合、作業者が、予め準備された欠陥画像に対する欠陥種別を判定することにより(すなわち、アノテーションにより)、当該欠陥画像に一の欠陥種別がラベル付けされた教師データが生成され、複数の教師データを用いて学習を行うことにより、上記学習済みモデルが生成される。 2. Description of the Related Art An inspection apparatus that detects defects by imaging an object outputs a defect image of a predetermined size including a defect area when a defect is detected. It is conceivable to classify the types of defects indicated by such defect images using a trained model (classifier). In this case, the operator determines the defect type for the defect image prepared in advance (that is, by annotation), thereby generating teacher data in which the defect image is labeled with one defect type. The learned model is generated by performing learning using the data.

なお、特許文献1では、画像の欠陥が含まれている領域を作業者の入力により取得し、当該領域の内部に含まれる画素が所定量多くなるように、領域の外縁を広げる補正を行い、補正された領域を当該画像に関連付けることにより、学習用データを生成する手法が開示されている。 In Patent Document 1, a region containing an image defect is acquired by an operator's input, and correction is performed to widen the outer edge of the region so that the number of pixels contained inside the region increases by a predetermined amount. A technique is disclosed for generating learning data by associating corrected regions with the image.

特開2019-87078号公報JP 2019-87078 A

ところで、検査装置から出力される欠陥画像は一定のサイズであり、欠陥領域以外の不要な領域が多く含まれる。したがって、このような欠陥画像を含む教師データを用いて学習を行っても、高精度な学習済みモデルを得ることは困難である。特許文献1の手法のように、欠陥が含まれている領域を作業者が入力することにより、不要な領域が低減された画像を得ることも考えられるが、作業負担が大きくなる。したがって、欠陥領域以外の不要な領域が低減された画像を含む教師データを容易に生成する手法が求められている。 By the way, the defect image output from the inspection apparatus has a fixed size and includes many unnecessary areas other than the defect area. Therefore, it is difficult to obtain a highly accurate trained model even if learning is performed using teacher data including such defect images. As in the technique of Patent Document 1, it is conceivable to obtain an image in which unnecessary areas are reduced by an operator inputting an area including a defect, but this increases the work load. Therefore, there is a need for a method of easily generating teacher data including an image in which unnecessary regions other than defective regions are reduced.

本発明は上記課題に鑑みなされたものであり、欠陥領域以外の不要な領域が低減された画像を含む教師データを容易に生成することを目的としている。 SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and it is an object of the present invention to easily generate teacher data including an image in which unnecessary areas other than defective areas are reduced.

請求項1に記載の発明は、教師データを生成する教師データ生成装置であって、対象物を撮像して欠陥を検出する検査装置から、欠陥の検出領域を含む所定サイズの欠陥画像と、前記欠陥画像における前記検出領域の範囲を示す欠陥情報とを受け付ける画像受付部と、前記欠陥情報に基づいて、前記欠陥画像から前記検出領域を含む領域を切出画像として切り出す切出画像生成部と、ディスプレイに前記欠陥画像の少なくとも一部を表示する表示制御部と、前記ディスプレイに表示された前記欠陥画像に対する、作業者による欠陥種別の判定結果の入力を受け付ける判定結果受付部と、前記切出画像に前記判定結果をラベル付けして教師データを生成する教師データ生成部とを備える。 According to a first aspect of the present invention, there is provided a training data generation apparatus for generating training data, wherein a defect image having a predetermined size including a defect detection area and the defect detection area are generated from an inspection apparatus for detecting defects by imaging an object. an image reception unit that receives defect information indicating the range of the detection area in a defect image; a cutout image generation unit that cuts out an area including the detection area from the defect image as a cutout image based on the defect information; a display control unit for displaying at least part of the defect image on a display; a determination result receiving unit for receiving an input of a defect type determination result input by a worker for the defect image displayed on the display; and the clipped image. and a teacher data generation unit that labels the determination result and generates teacher data.

請求項2に記載の発明は、請求項1に記載の教師データ生成装置であって、前記対象物の各位置が、複数の領域種別のうちの一の領域種別に属しており、前記欠陥情報が、前記検出領域が属する領域種別を示す領域種別情報を含み、前記切出画像生成部が、各領域種別に対して設定された拡張量を記憶し、前記領域種別情報を用いて特定される拡張量だけ前記検出領域を拡張した領域を前記切出画像に含める。 The invention according to claim 2 is the training data generation device according to claim 1, wherein each position of the object belongs to one region type out of a plurality of region types, and the defect information contains area type information indicating the area type to which the detection area belongs, and the clipped image generation unit stores an expansion amount set for each area type, and is specified using the area type information An area obtained by extending the detection area by the amount of extension is included in the clipped image.

請求項3に記載の発明は、請求項2に記載の教師データ生成装置であって、前記対象物がプリント基板であり、前記複数の領域種別が、少なくともメッキ領域およびソルダレジスト領域を含む。 The invention according to claim 3 is the training data generating apparatus according to claim 2, wherein the object is a printed circuit board, and the plurality of area types include at least a plating area and a solder resist area.

請求項4に記載の発明は、請求項1ないし3のいずれか1つに記載の教師データ生成装置であって、前記対象物の各位置に対して複数の検査感度のうち一の検査感度が設定されており、前記欠陥情報が、前記検出領域の検出の際に用いられた検査感度を示す検査感度情報を含み、前記切出画像生成部が、各検査感度に対して設定された拡張量を記憶し、前記検査感度情報を用いて特定される拡張量だけ前記検出領域を拡張した領域を前記切出画像に含める。 The invention according to claim 4 is the teacher data generating apparatus according to any one of claims 1 to 3, wherein one of a plurality of inspection sensitivities is selected for each position of the object. is set, the defect information includes inspection sensitivity information indicating the inspection sensitivity used when detecting the detection area, and the clipped image generation unit determines the expansion amount set for each inspection sensitivity is stored, and an area obtained by extending the detection area by an amount of extension specified using the inspection sensitivity information is included in the clipped image.

請求項5に記載の発明は、請求項1ないし4のいずれか1つに記載の教師データ生成装置であって、前記対象物の各位置が、複数の領域種別のうちの一の領域種別に属しており、前記欠陥情報が、前記検出領域が属する領域種別を示す領域種別情報を含み、前記教師データ生成部が、前記判定結果に加えて、前記検出領域が属する領域種別を前記切出画像にラベル付けする。 The invention according to claim 5 is the training data generation device according to any one of claims 1 to 4, wherein each position of the object corresponds to one region type out of a plurality of region types. the defect information includes area type information indicating the area type to which the detection area belongs; to label.

請求項6に記載の発明は、教師データを生成する教師データ生成方法であって、a)対象物を撮像して欠陥を検出する検査装置から、欠陥の検出領域を含む所定サイズの欠陥画像と、前記欠陥画像における前記検出領域の範囲を示す欠陥情報とを受け付ける工程と、b)前記欠陥情報に基づいて、前記欠陥画像から前記検出領域を含む領域を切出画像として切り出す工程と、c)ディスプレイに前記欠陥画像の少なくとも一部を表示する工程と、d)前記ディスプレイに表示された前記欠陥画像に対する、作業者による欠陥種別の判定結果の入力を受け付ける工程と、e)前記切出画像に前記判定結果をラベル付けして教師データを生成する工程とを備える。 According to a sixth aspect of the present invention, there is provided a teaching data generation method for generating teaching data, comprising: a) a defect image of a predetermined size including a defect detection area and a defect image of a predetermined size from an inspection apparatus that images an object to detect defects; , receiving defect information indicating the range of the detection area in the defect image; b) extracting an area including the detection area from the defect image as a clipped image based on the defect information; and c) a step of displaying at least a portion of the defect image on a display; d) receiving an input of a defect type determination result by an operator for the defect image displayed on the display; and labeling the determination result to generate teacher data.

請求項7に記載の発明は、請求項6に記載の教師データ生成方法であって、前記対象物の各位置が、複数の領域種別のうちの一の領域種別に属しており、前記欠陥情報が、前記検出領域が属する領域種別を示す領域種別情報を含み、前記b)工程において、各領域種別に対して設定された拡張量が準備されており、前記領域種別情報を用いて特定される拡張量だけ前記検出領域を拡張した領域が前記切出画像に含められる。 The invention according to claim 7 is the training data generation method according to claim 6, wherein each position of the object belongs to one region type out of a plurality of region types, and the defect information contains area type information indicating the area type to which the detection area belongs, and in the step b), an extension amount set for each area type is prepared and specified using the area type information A region obtained by expanding the detection region by the expansion amount is included in the cutout image.

請求項8に記載の発明は、請求項7に記載の教師データ生成方法であって、前記対象物がプリント基板であり、前記複数の領域種別が、少なくともメッキ領域およびソルダレジスト領域を含む。 The invention according to claim 8 is the training data generation method according to claim 7, wherein the object is a printed circuit board, and the plurality of area types include at least a plating area and a solder resist area.

請求項9に記載の発明は、請求項6ないし8のいずれか1つに記載の教師データ生成方法であって、前記対象物の各位置に対して複数の検査感度のうち一の検査感度が設定されており、前記欠陥情報が、前記検出領域の検出の際に用いられた検査感度を示す検査感度情報を含み、前記b)工程において、各検査感度に対して設定された拡張量が準備されており、前記検査感度情報を用いて特定される拡張量だけ前記検出領域を拡張した領域が前記切出画像に含められる。 The invention according to claim 9 is the teacher data generation method according to any one of claims 6 to 8, wherein one of a plurality of inspection sensitivities is selected for each position of the object. and the defect information includes inspection sensitivity information indicating the inspection sensitivity used in detecting the detection area, and in the step b), an extension amount set for each inspection sensitivity is prepared. and an area obtained by extending the detection area by an amount of extension specified using the inspection sensitivity information is included in the clipped image.

請求項10に記載の発明は、請求項6ないし9のいずれか1つに記載の教師データ生成方法であって、前記対象物の各位置が、複数の領域種別のうちの一の領域種別に属しており、前記欠陥情報が、前記検出領域が属する領域種別を示す領域種別情報を含み、前記e)工程において、前記判定結果に加えて、前記検出領域が属する領域種別が前記切出画像にラベル付けされ、一の領域種別がラベル付けされた複数の教師データを用いて、前記一の領域種別の欠陥分類用の学習済みモデルが生成される。 The invention according to claim 10 is the training data generation method according to any one of claims 6 to 9, wherein each position of the object corresponds to one region type out of a plurality of region types. the defect information includes area type information indicating the area type to which the detection area belongs, and in step e), in addition to the determination result, the area type to which the detection area belongs is included in the clipped image A trained model for defect classification of the one region type is generated using a plurality of labeled teacher data labeled with the one region type.

請求項11に記載の発明は、コンピュータに教師データを生成させるプログラムであって、前記プログラムのコンピュータによる実行は、前記コンピュータに、a)対象物を撮像して欠陥を検出する検査装置から、欠陥の検出領域を含む所定サイズの欠陥画像と、前記欠陥画像における前記検出領域の範囲を示す欠陥情報とを受け付ける工程と、b)前記欠陥情報に基づいて、前記欠陥画像から前記検出領域を含む領域を切出画像として切り出す工程と、c)ディスプレイに前記欠陥画像の少なくとも一部を表示する工程と、d)前記ディスプレイに表示された前記欠陥画像に対する、作業者による欠陥種別の判定結果の入力を受け付ける工程と、e)前記切出画像に前記判定結果をラベル付けして教師データを生成する工程とを実行させる。 The invention according to claim 11 is a program that causes a computer to generate training data, and execution of the program by the computer causes the computer to: a) inspect an object to detect defects; a step of receiving a defect image of a predetermined size including a detection area of and defect information indicating the range of the detection area in the defect image; b) an area including the detection area from the defect image based on the defect information as a clipped image; c) displaying at least a portion of the defect image on a display; and d) inputting the defect type determination result by the operator for the defect image displayed on the display. and e) labeling the cutout image with the determination result to generate training data.

本発明によれば、欠陥領域以外の不要な領域が低減された画像を含む教師データを容易に生成することができる。 According to the present invention, it is possible to easily generate teacher data including an image in which unnecessary areas other than defective areas are reduced.

検査システムの構成を示す図である。It is a figure which shows the structure of an inspection system. コンピュータの構成を示す図である。It is a figure which shows the structure of a computer. 教師データ生成装置の構成を示す図である。It is a figure which shows the structure of a teacher data generation apparatus. 教師データを生成する処理の流れを示す図である。FIG. 10 is a diagram showing the flow of processing for generating teacher data; 撮像画像を示す図である。It is a figure which shows a captured image. 撮像画像を示す図である。It is a figure which shows a captured image. 撮像画像を示す図である。It is a figure which shows a captured image. 欠陥画像を示す図である。It is a figure which shows a defect image. 欠陥画像を示す図である。It is a figure which shows a defect image. 欠陥画像を示す図である。It is a figure which shows a defect image. 欠陥領域の近傍を示す図である。It is a figure which shows the vicinity of a defect area. 欠陥画像を示す図である。It is a figure which shows a defect image. 欠陥領域の近傍を示す図である。It is a figure which shows the vicinity of a defect area. 欠陥領域の近傍を示す図である。It is a figure which shows the vicinity of a defect area. 欠陥領域の近傍を示す図である。It is a figure which shows the vicinity of a defect area. プリント基板を示す図である。It is a figure which shows a printed circuit board. プリント基板の一部を拡大して示す図である。It is a figure which expands and shows a part of printed circuit board. 分類器の他の例を示す図である。FIG. 10 is a diagram showing another example of a classifier;

(第1実施形態)
図1は、本発明の第1実施形態に係る検査システム1の構成を示す図である。検査システム1は、対象物であるプリント基板を検査する。検査システム1は、検査装置2と、コンピュータ3とを備える。図1では、コンピュータ3が実現する機能構成を破線の矩形にて囲んでいる。検査装置2は、図示省略の撮像部と、移動機構と、欠陥検出部とを備える。撮像部は、プリント基板を撮像する。移動機構は、撮像部に対してプリント基板を相対的に移動する。欠陥検出部は、撮像部から出力される画像から欠陥を検出する。欠陥検出部において欠陥が検出されると、欠陥領域を含む所定サイズ(欠陥ブロックサイズとも呼ばれる。)の欠陥画像がコンピュータ3に出力される。
(First embodiment)
FIG. 1 is a diagram showing the configuration of an inspection system 1 according to the first embodiment of the present invention. The inspection system 1 inspects a printed circuit board, which is an object. An inspection system 1 includes an inspection device 2 and a computer 3 . In FIG. 1, the functional configuration realized by the computer 3 is surrounded by a dashed rectangle. The inspection device 2 includes an imaging unit (not shown), a moving mechanism, and a defect detection unit. The imaging unit images the printed circuit board. The moving mechanism moves the printed circuit board relative to the imaging section. The defect detection section detects defects from the image output from the imaging section. When a defect is detected by the defect detector, a defect image of a predetermined size (also called a defect block size) including the defect area is output to the computer 3 .

図2はコンピュータ3の構成を示す図である。コンピュータ3は、CPU31と、ROM32と、RAM33と、固定ディスク34と、ディスプレイ35と、入力部36と、読取装置37と、通信部38と、GPU39と、バス30とを含む一般的なコンピュータシステムの構成を有する。CPU31は、各種演算処理を行う。GPU39は、画像処理に関する各種演算処理を行う。ROM32は、基本プログラムを記憶する。RAM33は、各種情報を記憶する。固定ディスク34は、情報記憶を行う。ディスプレイ35は、画像等の各種情報の表示を行う。入力部36は、作業者からの入力を受け付けるキーボード36aおよびマウス36bを備える。読取装置37は、光ディスク、磁気ディスク、光磁気ディスク、メモリカード等のコンピュータ読み取り可能な記録媒体81から情報の読み取りを行う。通信部38は、検査システム1の他の構成、および、外部の装置との間で信号を送受信する。バス30は、CPU31、GPU39、ROM32、RAM33、固定ディスク34、ディスプレイ35、入力部36、読取装置37および通信部38を接続する信号回路である。 FIG. 2 is a diagram showing the configuration of the computer 3. As shown in FIG. The computer 3 is a general computer system including a CPU 31, a ROM 32, a RAM 33, a fixed disk 34, a display 35, an input unit 36, a reader 37, a communication unit 38, a GPU 39, and a bus 30. has a configuration of The CPU 31 performs various arithmetic processing. The GPU 39 performs various types of arithmetic processing related to image processing. The ROM 32 stores basic programs. The RAM 33 stores various information. The fixed disk 34 stores information. The display 35 displays various information such as images. The input unit 36 includes a keyboard 36a and a mouse 36b that receive inputs from the operator. The reader 37 reads information from a computer-readable recording medium 81 such as an optical disk, magnetic disk, magneto-optical disk, or memory card. The communication unit 38 transmits and receives signals to and from other components of the inspection system 1 and external devices. Bus 30 is a signal circuit that connects CPU 31 , GPU 39 , ROM 32 , RAM 33 , fixed disk 34 , display 35 , input section 36 , reading device 37 and communication section 38 .

コンピュータ3では、事前に読取装置37を介して記録媒体81からプログラム811が読み出されて固定ディスク34に記憶されている。プログラム811はネットワークを介して固定ディスク34に記憶されてもよい。CPU31およびGPU39は、プログラム811に従ってRAM33や固定ディスク34を利用しつつ演算処理を実行する。CPU31およびGPU39は、コンピュータ3において演算部として機能する。CPU31およびGPU39以外に演算部として機能する他の構成が採用されてもよい。 In the computer 3 , the program 811 is read from the recording medium 81 through the reading device 37 and stored in the fixed disk 34 in advance. Program 811 may be stored on fixed disk 34 via a network. The CPU 31 and GPU 39 execute arithmetic processing while using the RAM 33 and fixed disk 34 according to the program 811 . The CPU 31 and GPU 39 function as arithmetic units in the computer 3 . A configuration other than the CPU 31 and the GPU 39 may be employed that functions as an arithmetic unit.

検査システム1では、コンピュータ3がプログラム811に従って演算処理等を実行することにより、図1中に破線にて囲む機能構成が実現される。すなわち、コンピュータ3のCPU31、GPU39、ROM32、RAM33、固定ディスク34およびこれらの周辺構成は、教師データ生成装置4と、学習部51と、分類器52とを実現する。これらの機能の全部または一部は専用の電気回路により実現されてもよい。また、複数のコンピュータによりこれらの機能が実現されてもよい。 In the inspection system 1, the computer 3 executes arithmetic processing and the like according to the program 811, thereby realizing the functional configuration enclosed by the dashed line in FIG. That is, the CPU 31 , GPU 39 , ROM 32 , RAM 33 , fixed disk 34 and their peripheral components of the computer 3 realize the teacher data generation device 4 , the learning section 51 and the classifier 52 . All or part of these functions may be realized by a dedicated electric circuit. Also, these functions may be realized by a plurality of computers.

分類器52は、検査装置2から入力される欠陥画像が示す欠陥を真欠陥または偽欠陥に分類する学習済みモデルである。学習部51は、後述する複数の教師データを用いて学習を行うことにより、学習済みモデル(分類器52)を生成する。教師データ生成装置4は、学習部51において用いられる教師データを生成する。 The classifier 52 is a trained model that classifies a defect indicated by a defect image input from the inspection apparatus 2 into a true defect or a false defect. The learning unit 51 generates a trained model (classifier 52) by performing learning using a plurality of teacher data, which will be described later. The teacher data generation device 4 generates teacher data used in the learning section 51 .

図3は、教師データ生成装置4の構成を示す図である。教師データ生成装置4は、画像受付部41と、切出画像生成部42と、表示制御部43と、判定結果受付部44と、教師データ生成部45とを備える。画像受付部41は、検査装置2に接続され、検査装置2からの欠陥画像等の入力を受け付ける。切出画像生成部42は、欠陥画像から後述の切出画像を切り出す。表示制御部43は、ディスプレイ35に接続され、ディスプレイ35に欠陥画像等を表示する。判定結果受付部44は、入力部36に接続され、作業者による入力部36を介した入力を受け付ける。教師データ生成部45は、切出画像にラベル付けを行って教師データを生成する。 FIG. 3 is a diagram showing the configuration of the training data generation device 4. As shown in FIG. The training data generation device 4 includes an image reception unit 41 , a clipped image generation unit 42 , a display control unit 43 , a determination result reception unit 44 , and a training data generation unit 45 . The image reception unit 41 is connected to the inspection device 2 and receives inputs such as defect images from the inspection device 2 . The clipped image generator 42 clips a clipped image, which will be described later, from the defect image. The display control unit 43 is connected to the display 35 and displays a defect image or the like on the display 35 . The determination result reception unit 44 is connected to the input unit 36 and receives input from the operator via the input unit 36 . The teacher data generation unit 45 labels the clipped image to generate teacher data.

図4は、教師データ生成装置4が教師データを生成する処理の流れを示す図である。まず、画像受付部41では、検査装置2から欠陥画像と後述の欠陥情報とが受け付けられる(ステップS11)。 FIG. 4 is a diagram showing the flow of processing in which the teacher data generating device 4 generates teacher data. First, the image reception unit 41 receives a defect image and defect information described later from the inspection device 2 (step S11).

ここで、検査装置2が欠陥を検出する処理の一例について説明する。図5は、プリント基板の一部を撮像した多階調の撮像画像を示す図である。例えば、撮像画像は、カラー画像である。撮像画像は、グレースケール画像であってもよい。プリント基板の主面には、複数種類の領域が設けられる。具体的には、銅等の金属がメッキされたメッキ領域、表面にソルダレジストが設けられたソルダレジスト領域(以下、「SR領域」ともいう。)、ソルダレジスト上に印刷された文字や記号等であるシルク領域、貫通孔の開口であるスルーホール領域等が設けられる。また、SR領域は、ソルダレジストの下層が銅箔である第1SR領域と、ソルダレジストの下層がプリント基板の基材である第2SR領域とに区別可能であり、両者では色が異なっている。以上のように、プリント基板の主面上の各位置は、メッキ領域、第1SR領域、第2SR領域、シルク領域等を含む複数の領域種別のいずれか1つに属する。 Here, an example of processing for detecting defects by the inspection device 2 will be described. FIG. 5 is a diagram showing a multi-gradation captured image of part of a printed circuit board. For example, the captured image is a color image. The captured image may be a grayscale image. A plurality of types of regions are provided on the main surface of the printed circuit board. Specifically, a plated area plated with a metal such as copper, a solder resist area having a solder resist provided on the surface (hereinafter also referred to as "SR area"), letters and symbols printed on the solder resist, etc. A silk region, which is an opening of a through hole, and the like are provided. In addition, the SR area can be distinguished into a first SR area in which the lower layer of the solder resist is a copper foil and a second SR area in which the lower layer of the solder resist is the base material of the printed circuit board, and the two have different colors. As described above, each position on the main surface of the printed circuit board belongs to one of a plurality of area types including the plating area, first SR area, second SR area, silk area, and the like.

図5の例は、メッキ領域を示す領域61と、SR領域を示す領域62とを含み、領域62は、第1SR領域を示す領域621と、第2SR領域を示す領域622とを含む。以下の説明では、領域61,62,621,622を、同様に「メッキ領域61」、「SR領域62」、「第1SR領域621」および「第2SR領域622」という。プリント基板の他の種類の領域についても、撮像画像の対応する領域を同じ名称で呼ぶ。 The example of FIG. 5 includes a region 61 indicating the plating region and a region 62 indicating the SR region. The region 62 includes a region 621 indicating the first SR region and a region 622 indicating the second SR region. In the following description, the regions 61, 62, 621, 622 are similarly referred to as "plating region 61", "SR region 62", "first SR region 621" and "second SR region 622". For other types of areas on the printed circuit board, the corresponding areas in the captured image are called by the same name.

検査装置2の欠陥検出部では、例えば、設計データ(CAMデータ等)を参照することにより、撮像画像における各位置が属する領域種別が特定される。また、各領域種別には、各色成分の階調値の正常範囲が設定されている。撮像画像において、各位置の階調値が色成分毎に正常範囲と比較され、正常範囲外となる画素の集合が欠陥の領域として検出される。図5の例では、第1SR領域621上において周囲に比べて暗い領域71が存在しており、当該領域71が、撮像画像を観察した作業者が認識する欠陥領域71である。図6では、検査装置2により欠陥として検出される領域72(以下、「検出領域72」という。)の外縁を破線にて示している。図6の例では、検出領域72は、欠陥領域71とほぼ一致する。 In the defect detection unit of the inspection apparatus 2, for example, by referring to design data (such as CAM data), the region type to which each position in the captured image belongs is specified. A normal range of gradation values for each color component is set for each area type. In the captured image, the gradation value at each position is compared with the normal range for each color component, and a set of pixels outside the normal range is detected as a defect area. In the example of FIG. 5, a region 71 that is darker than the surroundings exists on the first SR region 621, and the region 71 is a defect region 71 recognized by the operator observing the captured image. In FIG. 6, the outer edge of an area 72 detected as a defect by the inspection apparatus 2 (hereinafter referred to as "detection area 72") is indicated by a dashed line. In the example of FIG. 6, the detection area 72 approximately coincides with the defect area 71 .

検査装置2では、欠陥が検出されると、検出領域72を含む所定サイズの画像が欠陥画像として取得される。また、欠陥画像における検出領域72の位置および形状(大きさを含む。)を示す欠陥情報が取得される。なお、欠陥の検出では、様々な周知の手法(検査ロジック等)が用いられてよく、領域種別毎に異なる手法が用いられてもよい。 In the inspection apparatus 2, when a defect is detected, an image of a predetermined size including the detection area 72 is acquired as a defect image. Also, defect information indicating the position and shape (including size) of the detection area 72 in the defect image is acquired. Various well-known methods (inspection logic, etc.) may be used for defect detection, and different methods may be used for each region type.

教師データの生成を開始する際には、検査装置2により、複数のプリント基板に対する多数の撮像画像から複数の欠陥画像が予め取得されている。当該複数の欠陥画像は、同じサイズ(欠陥ブロックサイズ)であり、プリント基板における同じ大きさの領域を示す。また、各欠陥画像には、検出領域72の位置および形状を示す欠陥情報が関連付けられている。図4のステップS11では、複数の欠陥画像と当該複数の欠陥画像の欠陥情報とが、画像受付部41において受け付けられる。例えば、複数の欠陥画像の欠陥情報は、複数の欠陥画像にそれぞれ関連付けられた状態で1つのリストに含められる。 When starting to generate teacher data, the inspection apparatus 2 acquires in advance a plurality of defect images from a large number of captured images of a plurality of printed circuit boards. The plurality of defect images have the same size (defect block size) and indicate the same size area on the printed circuit board. Each defect image is associated with defect information indicating the position and shape of the detection area 72 . In step S11 of FIG. 4, the image reception unit 41 receives a plurality of defect images and defect information of the plurality of defect images. For example, defect information of a plurality of defect images are included in one list while being associated with the plurality of defect images.

続いて、切出画像生成部42では、各欠陥画像から検出領域72を含む領域が、切出画像として切り出される(ステップS12)。図6の例では、図7に示すように、検出領域72の外接矩形73(図7中に破線にて示す。)の領域が、切出画像として切り出される。外接矩形73の各辺は、欠陥画像の上下方向(列方向)または左右方向(行方向)に平行である。切出画像生成部42の設計によっては、検出領域72に対して設定可能な最小の外接矩形(各辺が上下方向および左右方向に対して傾斜してもよい。)の領域が、切出画像として切り出されてもよい。 Subsequently, the clipped image generator 42 clips a region including the detection region 72 from each defect image as a clipped image (step S12). In the example of FIG. 6, as shown in FIG. 7, a region of a circumscribing rectangle 73 (indicated by a dashed line in FIG. 7) of the detection region 72 is cut out as a cut-out image. Each side of the circumscribing rectangle 73 is parallel to the vertical direction (column direction) or horizontal direction (row direction) of the defect image. Depending on the design of the clipped image generator 42, the minimum circumscribing rectangle (each side may be inclined with respect to the vertical direction and the horizontal direction) that can be set for the detection region 72 is the region of the clipped image. may be cut out as

また、表示制御部43により、ディスプレイ35に欠陥画像が表示される(ステップS13)。ディスプレイ35に表示される画像は、欠陥画像の全体または一部のいずれであってもよい。例えば、欠陥画像の切出画像が表示されてもよく、切出画像を所定の画素数だけ広げた画像、すなわち、検出領域72、および、その周囲を含む画像が表示されてもよい。このように、表示制御部43は、ディスプレイ35に欠陥画像の少なくとも一部を表示する。一例では、ディスプレイ35上のウィンドウには、複数の欠陥画像のサムネイルが配列表示されており、作業者が入力部36を介して1つの欠陥画像のサムネイルを選択することにより、ディスプレイ35に当該欠陥画像(以下、「選択欠陥画像」という。)の少なくとも一部が表示される。ディスプレイ35に表示する欠陥画像の選択は、様々な周知の手法により行われてよい。 Further, the defect image is displayed on the display 35 by the display control unit 43 (step S13). The image displayed on display 35 may be either the entire defect image or a portion thereof. For example, a clipped image of the defect image may be displayed, or an image obtained by expanding the clipped image by a predetermined number of pixels, that is, an image including the detection area 72 and its surroundings may be displayed. In this manner, the display control unit 43 displays at least part of the defect image on the display 35. FIG. In one example, thumbnails of a plurality of defect images are arranged and displayed in a window on the display 35 , and when the operator selects a thumbnail of one defect image via the input unit 36 , the corresponding defect is displayed on the display 35 . At least part of the image (hereinafter referred to as "selected defect image") is displayed. The selection of defect images for display on display 35 may be performed by various well-known techniques.

判定結果受付部44では、ディスプレイ35に表示された選択欠陥画像に対する、作業者による真欠陥または偽欠陥の判定結果の入力が受け付けられる(ステップS14)。一例では、ディスプレイ35上のウィンドウに、選択欠陥画像と共に、「真欠陥」を示すボタンおよび「偽欠陥」を示すボタンが設けられる。作業者が選択欠陥画像を確認し、入力部36を介していずれかのボタンを選択することにより、選択欠陥画像が示す欠陥が真欠陥または偽欠陥のいずれであるかを示す判定結果の入力が行われる。当該判定結果の入力は、判定結果受付部44により受け付けられる。作業者による判定結果の入力は、様々な周知の手法により行われてよい。 The determination result reception unit 44 receives the operator's input of the determination result as to whether the selected defect image displayed on the display 35 is a true defect or a false defect (step S14). In one example, a window on display 35 is provided with a button indicating "true defect" and a button indicating "false defect" along with the selected defect image. The operator confirms the selected defect image and selects one of the buttons via the input unit 36, thereby inputting the determination result indicating whether the defect indicated by the selected defect image is a true defect or a false defect. done. Input of the determination result is received by the determination result receiving unit 44 . Input of the determination result by the operator may be performed by various well-known methods.

教師データ生成部45では、切出画像に判定結果をラベル付けすることにより、教師データが生成される(ステップS15)。教師データは、欠陥画像から得られる切出画像と、当該欠陥画像に対する作業者による判定結果とを含むデータである。教師データは、欠陥画像を含んでもよい。実際には、複数の欠陥画像に対して、作業者による判定結果の入力が行われ、複数の教師データが生成される。以上により、教師データ生成処理が完了し、複数の教師データ(学習用データセット)が得られる。 The teacher data generation unit 45 generates teacher data by labeling the clipped image with the determination result (step S15). The training data is data that includes a clipped image obtained from the defect image and a judgment result of the defect image by the operator. The training data may include defect images. In practice, the operator inputs determination results for a plurality of defect images to generate a plurality of teacher data. As described above, the teacher data generation process is completed, and a plurality of teacher data (learning data sets) are obtained.

複数の教師データが生成されると、図1の学習部51では、複数の教師データにおける切出画像の入力に対する分類器の出力と、複数の教師データが示す判定結果(真欠陥または偽欠陥)とがほぼ同じになるように機械学習が行われ、分類器が生成される。分類器は、画像が示す欠陥を真欠陥または偽欠陥に分類する学習済みモデルであり、分類器の生成では、分類器が含むパラメータの値や、分類器の構造が決定される。機械学習は、例えば、ニューラルネットワークを用いたディープラーニングにより行われる。当該機械学習は、ディープラーニング以外の周知の方法により行われてもよい。分類器(実際には、パラメータの値や、分類器の構造を示す情報)は、分類器52に転送されて導入される。 When a plurality of teacher data are generated, in the learning unit 51 of FIG. 1, the output of the classifier for the input of the clipped image in the plurality of teacher data and the determination result (true defect or false defect) indicated by the plurality of teacher data Machine learning is performed to generate a classifier so that A classifier is a trained model that classifies a defect indicated by an image into a true defect or a false defect. In generating a classifier, parameter values included in the classifier and the structure of the classifier are determined. Machine learning is performed, for example, by deep learning using a neural network. The machine learning may be performed by well-known methods other than deep learning. The classifier (actually, parameter values and information indicating the structure of the classifier) is transferred to and introduced into the classifier 52 .

検査システム1がプリント基板を検査する際には、検査装置2において、プリント基板の複数の位置を示す複数の撮像画像が取得され、複数の撮像画像における欠陥の有無が検査される。欠陥が検出されると、検出領域72を含む所定サイズの画像が欠陥画像として分類器52に出力される。分類器52では、欠陥画像が示す欠陥が真欠陥または偽欠陥に分類され、分類結果が記憶される、または、外部に出力される。好ましい検査システム1では、コンピュータ3の切出画像生成部42において、教師データの生成時と同様に、欠陥画像における検出領域72の外接矩形73の領域が切出画像として切り出され、当該切出画像が分類器52に入力される。これにより、分類器52では、欠陥画像が示す欠陥が真欠陥または偽欠陥のいずれであるかをより精度よく分類することが可能となる。 When the inspection system 1 inspects the printed circuit board, the inspection device 2 acquires a plurality of captured images indicating a plurality of positions of the printed circuit board, and inspects the presence or absence of defects in the plurality of captured images. When a defect is detected, an image of a predetermined size including the detection area 72 is output to the classifier 52 as a defect image. The classifier 52 classifies the defect indicated by the defect image into a true defect or a false defect, and stores the classification result or outputs it to the outside. In the preferred inspection system 1, in the clipped image generation unit 42 of the computer 3, the region of the circumscribed rectangle 73 of the detection region 72 in the defect image is clipped as a clipped image in the same manner as when the teacher data is generated. is input to classifier 52 . As a result, the classifier 52 can more accurately classify whether the defect indicated by the defect image is a true defect or a false defect.

ここで、教師データを生成する比較例の処理について説明する。図8Aおよび図8Bは、欠陥画像を示す図であり、欠陥領域71を含んでいる。図8Aおよび図8Bでは、欠陥領域71に対して、SR領域62よりも間隔の狭い平行斜線を付しており、欠陥領域71は、検査装置2により取得される検出領域とほぼ一致する。なお、図8Bの例では、複数の欠陥部分領域711の集合が1つの欠陥領域71として検出されている。 Here, a process of a comparative example for generating teacher data will be described. 8A and 8B are diagrams showing defect images, including defect area 71. FIG. In FIGS. 8A and 8B , the defect area 71 is hatched with narrower parallel lines than the SR area 62 , and the defect area 71 substantially matches the detection area acquired by the inspection apparatus 2 . Note that in the example of FIG. 8B , a set of multiple defective partial areas 711 is detected as one defective area 71 .

第1の比較例の処理では、欠陥画像の全体が教師データの画像として用いられる。図8Aおよび図8Bに示すように、欠陥画像は、通常、欠陥領域71よりもかなり大きな領域を示すため、第1の比較例では、欠陥領域71以外の不要な領域の特徴も、学習部51による学習に用いられてしまう。換言すると、教師データの画像が欠陥領域71(検出領域)の特徴を効率よく示すものとはならないため、分類器における分類精度が低くなる。 In the processing of the first comparative example, the entire defect image is used as the teacher data image. As shown in FIGS. 8A and 8B, the defect image usually shows an area considerably larger than the defect area 71. Therefore, in the first comparative example, the feature of the unnecessary area other than the defect area 71 is also obtained by the learning unit 51. is used for learning by In other words, since the image of the teacher data does not efficiently show the features of the defect area 71 (detection area), the classification accuracy of the classifier is low.

第2の比較例の処理では、欠陥画像において、欠陥領域71を含む一定サイズの領域が切り出され、教師データの画像として用いられる。図8Aおよび図8Bでは、第2の比較例において欠陥画像から切り出される切出領域A1を二点鎖線にて示している。切出領域A1のサイズは、例えば経験的に決定される。第2の比較例では、教師データの画像(切出領域A1の画像)において、欠陥領域71以外の不要な領域が第1の比較例に比べて低減されるが、まだある程度含まれてしまう。また、図8Bの例のように、欠陥領域71が比較的大きい場合、切出領域A1からはみ出してしまうため、教師データの画像が欠陥領域71(検出領域)の全ての特徴を示すものとはならなくなる。 In the process of the second comparative example, an area of a certain size including the defect area 71 is cut out from the defect image and used as the image of the teacher data. In FIGS. 8A and 8B, the clipping region A1 clipped from the defect image in the second comparative example is indicated by a two-dot chain line. The size of the cutout region A1 is empirically determined, for example. In the second comparative example, unnecessary regions other than the defect region 71 are reduced in the image of the teacher data (the image of the cutout region A1) compared to the first comparative example, but are still included to some extent. Also, as in the example of FIG. 8B, when the defect area 71 is relatively large, it protrudes from the cutout area A1, so the image of the teacher data does not show all the features of the defect area 71 (detection area). will not be.

さらに、第1および第2の比較例において、分類器における分類精度を高くするには、多くの教師データが必要となり、作業者による欠陥画像に対する判定結果の入力回数(アノテーション回数)が増加してしまう。多くの教師データを用いても、高精度な分類器を生成することができない場合もある。 Furthermore, in the first and second comparative examples, a large amount of teacher data is required in order to increase the classification accuracy of the classifier, and the number of inputs of judgment results (annotations) for the defect image by the operator increases. put away. Even with a large amount of training data, it may not be possible to generate a highly accurate classifier.

これに対し、図3の教師データ生成装置4では、欠陥の検出領域72を含む所定サイズの欠陥画像と、当該欠陥画像における検出領域72の位置および形状を示す欠陥情報とが、検査装置2から入力され、画像受付部41において受け付けられる。切出画像生成部42では、欠陥情報に基づいて、欠陥画像から検出領域72を含む領域が切出画像として切り出される。また、表示制御部43により、欠陥画像の少なくとも一部がディスプレイ35に表示され、表示された欠陥画像に対する、作業者による真欠陥または偽欠陥の判定結果の入力が判定結果受付部44により受け付けられる。そして、教師データ生成部45により、当該判定結果が切出画像にラベル付けされ、教師データが生成される。 On the other hand, in the training data generation device 4 of FIG. It is input and accepted by the image accepting unit 41 . Based on the defect information, the clipped image generator 42 clips a region including the detection region 72 from the defect image as a clipped image. Further, at least a part of the defect image is displayed on the display 35 by the display control unit 43, and the determination result receiving unit 44 receives the input of the determination result of the true defect or the false defect by the operator for the displayed defect image. . Then, the teacher data generation unit 45 labels the extracted image with the determination result to generate teacher data.

これにより、欠陥領域71以外の不要な領域が低減された画像(切出画像)を含む教師データを容易に生成することができる。また、当該画像では、欠陥領域71のほぼ全ての特徴が示される。このように、欠陥領域71の特徴を効率よく示す教師データを用いることにより、少ない教師データで高精度な学習済みモデル(分類器52)を生成することができ、作業者によるアノテーション回数も少なくすることができる。なお、図8Aおよび図8Bでは、切出画像として切り出される検出領域の外接矩形73を破線にて示している。 This makes it possible to easily generate teacher data including an image (cutout image) in which unnecessary areas other than the defect area 71 are reduced. The image also shows almost all features of the defect area 71 . In this way, by using teacher data that efficiently shows the features of the defect area 71, it is possible to generate a highly accurate trained model (classifier 52) with less teacher data, and reduce the number of annotations by the operator. be able to. In FIGS. 8A and 8B, the circumscribed rectangle 73 of the detection area cut out as the cut-out image is indicated by a dashed line.

(第2実施形態)
次に、本発明の第2実施形態に係る教師データ生成処理について説明する。図9は、欠陥画像を示す図であり、メッキ領域61上に欠陥領域71が存在する例を示している。図9では、欠陥領域71に対して、SR領域62よりも間隔の狭い平行斜線を付している(後述の図11ないし図14において同様)。図10は、欠陥領域71の近傍を拡大して示す図であり、検査装置2により取得される検出領域72を黒く塗りつぶしている(後述の図12ないし図14において同様)。メッキ領域61上に欠陥領域71が存在する場合、検出領域72の外縁は、欠陥画像を観察した作業者が認識する欠陥領域71の外縁とほぼ一致する傾向があり、図10では、検出領域72の全体が、欠陥領域71の全体とほぼ重なっている。
(Second embodiment)
Next, teaching data generation processing according to the second embodiment of the present invention will be described. FIG. 9 is a diagram showing a defect image, showing an example in which a defect area 71 exists on a plated area 61. FIG. In FIG. 9, the defect region 71 is marked with parallel oblique lines with narrower intervals than the SR region 62 (the same applies to FIGS. 11 to 14 described later). FIG. 10 is an enlarged view showing the vicinity of the defect area 71, in which the detection area 72 acquired by the inspection apparatus 2 is blacked out (the same applies to FIGS. 12 to 14 described later). When the defect area 71 exists on the plating area 61, the outer edge of the detection area 72 tends to substantially match the outer edge of the defect area 71 recognized by the operator who observes the defect image. substantially overlaps the entire defect area 71 .

図11は、欠陥画像を示す図であり、SR領域62上に欠陥領域71が存在する例を示している。図12は、欠陥領域71の近傍を拡大して示す図であり、複数の検出部分領域721の集合が1つの検出領域72として検出される。図11および図12では、欠陥領域71の外縁を破線にて示すことにより、欠陥領域71の外縁(すなわち、周囲との境界)が不明瞭であることを示している(後述の図14において同様)。SR領域62上に欠陥領域71が存在する場合、検出領域72の外縁は、欠陥画像を観察した作業者が認識する欠陥領域71の外縁よりも小さくなる傾向があり、図12では、検出領域72は、欠陥領域71の一部のみと重なっている。なお、メッキ領域61とSR領域62とで欠陥検出手法が異なっていてもよい。 FIG. 11 is a diagram showing a defect image, showing an example in which a defect area 71 exists on the SR area 62. As shown in FIG. FIG. 12 is an enlarged view showing the vicinity of the defect area 71, and a set of a plurality of detection partial areas 721 is detected as one detection area 72. FIG. In FIGS. 11 and 12, the outer edge of the defective area 71 is indicated by broken lines, indicating that the outer edge of the defective area 71 (that is, the boundary with the surroundings) is unclear (the same applies to FIG. 14, which will be described later). ). When the defect area 71 exists on the SR area 62, the outer edge of the detection area 72 tends to be smaller than the outer edge of the defect area 71 recognized by the operator who observes the defect image. overlaps only part of the defect area 71 . Incidentally, the plating region 61 and the SR region 62 may use different defect detection methods.

既述のように、プリント基板の主面上の各位置は、複数の領域種別のうちの一の領域種別に属しており、検査装置2においても、撮像画像における各位置が属する領域種別が特定される。本処理例における検査装置2では、欠陥を検出した際に、検出領域72が属する領域種別を示す領域種別情報が生成され、欠陥情報に含められる。 As described above, each position on the main surface of the printed circuit board belongs to one of a plurality of region types, and the inspection apparatus 2 also identifies the region type to which each position in the captured image belongs. be done. In the inspection apparatus 2 in this processing example, when a defect is detected, area type information indicating the area type to which the detection area 72 belongs is generated and included in the defect information.

教師データ生成装置4による教師データの生成では、画像受付部41において、検査装置2から欠陥画像と欠陥情報とが受け付けられる(図4:ステップS11)。既述のように、欠陥情報は、欠陥画像における検出領域72の位置および形状に加えて、領域種別情報を含んでいる。切出画像生成部42では、検出領域72が属する領域種別に応じて、当該検出領域72の外接矩形を上下左右に拡張した領域が、切出画像として切り出される(ステップS12)。 In the generation of teacher data by the teacher data generator 4, the image reception unit 41 receives the defect image and the defect information from the inspection device 2 (FIG. 4: step S11). As described above, the defect information includes area type information in addition to the position and shape of the detection area 72 in the defect image. In the clipped image generation unit 42, a region obtained by extending the circumscribing rectangle of the detection region 72 vertically and horizontally is clipped as a clipped image according to the region type to which the detection region 72 belongs (step S12).

具体的には、外接矩形を上下左右に拡張する画素数(自然数である。以下同様。)を拡張量として、複数の領域種別のそれぞれに対して拡張量が予め設定され、切出画像生成部42に記憶されて準備されている。既述のように、メッキ領域61上の検出領域72の外縁は、欠陥領域71の外縁とほぼ一致する傾向にあるため、メッキ領域61に対する拡張量は比較的小さい画素数(例えば、0~5画素)とされる。したがって、検出領域72がメッキ領域61に属する図10の例では、図13に示すように、検出領域72の外接矩形73(図13中に破線にて示す。)の領域、または、当該領域を極僅かに拡張した領域が、切出画像として切り出される。当該切出画像は、欠陥領域71のほぼ全体を含む。 Specifically, the number of pixels (a natural number; the same shall apply hereinafter) by which the circumscribing rectangle is expanded vertically and horizontally is set in advance for each of a plurality of region types, and the expansion amount is set in advance for each of the plurality of region types. 42 is stored and prepared. As described above, the outer edge of the detection area 72 on the plated area 61 tends to substantially coincide with the outer edge of the defect area 71, so the expansion amount for the plated area 61 is a relatively small number of pixels (for example, 0 to 5 pixels). pixels). Therefore, in the example of FIG. 10 where the detection region 72 belongs to the plating region 61, as shown in FIG. A very slightly expanded region is cut out as a cut image. The clipped image includes substantially the entire defect area 71 .

また、SR領域62上の検出領域72の外縁は、欠陥領域71の外縁よりも小さくなる傾向にあるため、SR領域62に対する拡張量は比較的大きい画素数(例えば、10~20画素)とされる。したがって、検出領域72がSR領域62に属する図12の例では、図14に示すように、検出領域72の外接矩形73を拡張量だけ拡張した領域74が、切出画像として切り出される。図14では、外接矩形73および領域74を破線にて示している。当該切出画像(すなわち、領域74)は、欠陥領域71のほぼ全体を含む。なお、検出領域72の外接矩形73を拡張量だけ拡張した領域74は、検出領域72を拡張量だけ拡張した領域の外接矩形と同じである。 Further, since the outer edge of the detection area 72 on the SR area 62 tends to be smaller than the outer edge of the defect area 71, the expansion amount for the SR area 62 is set to a relatively large number of pixels (eg, 10 to 20 pixels). be. Therefore, in the example of FIG. 12 where the detection area 72 belongs to the SR area 62, as shown in FIG. 14, an area 74 obtained by extending the circumscribing rectangle 73 of the detection area 72 by the extension amount is cut out as a cutout image. In FIG. 14, the circumscribing rectangle 73 and the area 74 are indicated by dashed lines. The cropped image (ie, region 74) includes substantially the entire defect region 71. FIG. A region 74 obtained by expanding the circumscribing rectangle 73 of the detection region 72 by the expansion amount is the same as the circumscribing rectangle of the region obtained by expanding the detection region 72 by the expansion amount.

教師データ生成装置4では、ディスプレイ35に選択欠陥画像が表示された後(ステップS13)、選択欠陥画像に対する真欠陥または偽欠陥の判定結果の入力が作業者により行われ、当該入力が受け付けられる(ステップS14)。そして、切出画像に判定結果をラベル付けすることにより、教師データが生成される(ステップS15)。その後、上述の処理例と同様に、複数の教師データを用いて分類器52が生成される。 In the training data generating device 4, after the selected defect image is displayed on the display 35 (step S13), the operator inputs the determination result of the true defect or the false defect for the selected defect image, and the input is accepted ( step S14). Then, teacher data is generated by labeling the clipped image with the determination result (step S15). After that, the classifier 52 is generated using a plurality of teacher data in the same manner as in the processing example described above.

検査システム1におけるプリント基板の検査では、検査装置2において欠陥が検出されると、検出領域72を含む所定サイズの画像が欠陥画像としてコンピュータ3に出力され、分類器52による分類結果が取得される。好ましい検査システム1では、教師データの生成時と同様に、検出領域72が属する領域種別に応じて、当該検出領域72の外接矩形73を上下左右に拡張した領域が、切出画像として切り出され、当該切出画像が分類器52に入力される。これにより、分類器52では、欠陥画像が示す欠陥が真欠陥または偽欠陥のいずれであるかをより精度よく分類することが可能となる。 In the inspection of the printed circuit board by the inspection system 1, when a defect is detected by the inspection device 2, an image of a predetermined size including the detection area 72 is output to the computer 3 as a defect image, and the classification result by the classifier 52 is obtained. . In the preferred inspection system 1, in the same manner as when generating the teacher data, an area obtained by extending the circumscribing rectangle 73 of the detection area 72 vertically and horizontally according to the area type to which the detection area 72 belongs is cut out as a cutout image. The clipped image is input to the classifier 52 . As a result, the classifier 52 can more accurately classify whether the defect indicated by the defect image is a true defect or a false defect.

以上のように、本処理例では、検出領域72が属する領域種別を示す領域種別情報が、欠陥情報に含められる。切出画像生成部42では、各領域種別に対して設定された拡張量が記憶されており、領域種別情報を用いて特定される拡張量だけ検出領域72を拡張した領域が切出画像に含められる。これにより、欠陥領域71のおよそ全体を示す好ましい切出画像を得ることができ、高精度な学習済みモデル(分類器52)を生成することができる。プリント基板では、メッキ領域およびSR領域が大部分を占めるため、好ましい切出画像を得るという観点では、上記複数の領域種別が、少なくともメッキ領域およびソルダレジスト領域を含むことが好ましい。 As described above, in this processing example, the defect information includes the area type information indicating the area type to which the detection area 72 belongs. In the clipped image generation unit 42, the extension amount set for each area type is stored, and the area obtained by extending the detection area 72 by the extension amount specified using the area type information is included in the clipped image. be done. As a result, it is possible to obtain a preferable cropped image showing approximately the entire defect area 71, and to generate a highly accurate trained model (classifier 52). Since the printed circuit board is mostly occupied by the plated region and the SR region, the plurality of region types preferably include at least the plated region and the solder resist region from the viewpoint of obtaining a preferable cutout image.

(第3実施形態)
次に、本発明の第3実施形態に係る教師データ生成処理について説明する。図15は、プリント基板9の全体を示す図である。製造途中のプリント基板9では、最終製品において除去される部分である、捨て基板領域92が含まれている。図15では、捨て基板領域92に平行斜線を付している。図16は、図15のプリント基板9において破線にて囲む部分B1を拡大して示す図であり、捨て基板領域92を太い破線にて囲んでいる。図16に示すように、プリント基板9では、小さいメッキ領域が密に配列されていたり、細い配線パターンが設けられる領域91(図16中にて細い破線にて囲む領域)が存在する。
(Third embodiment)
Next, teaching data generation processing according to the third embodiment of the present invention will be described. FIG. 15 is a diagram showing the entire printed circuit board 9. As shown in FIG. The printed circuit board 9 that is being manufactured includes a waste board area 92 that is a portion that will be removed in the final product. In FIG. 15, the waste substrate area 92 is hatched. FIG. 16 is an enlarged view of a portion B1 surrounded by a dashed line in the printed circuit board 9 of FIG. As shown in FIG. 16, in the printed circuit board 9, small plated areas are densely arranged, and there are areas 91 (areas surrounded by thin broken lines in FIG. 16) where fine wiring patterns are provided.

領域91に存在する欠陥は、プリント基板9の動作に大きな影響を及ぼすため、本処理例における検査装置2では、領域91に対して、他の領域に比べて厳しい検査感度が設定される。以下、領域91を「第1感度設定領域91」という。一方、既述の捨て基板領域92に存在する欠陥は、プリント基板9の動作にほとんど影響を及ぼさないため、捨て基板領域92に対して、他の領域に比べて緩い検査感度が設定される。以下、捨て基板領域92を「第2感度設定領域92」という。また、第1感度設定領域91および第2感度設定領域92以外の領域93には、中間的な検査感度が設定される。以下、領域93を「第3感度設定領域93」という。 A defect existing in the area 91 greatly affects the operation of the printed circuit board 9, so in the inspection apparatus 2 in this processing example, a stricter inspection sensitivity is set for the area 91 than for other areas. Hereinafter, the area 91 will be referred to as a "first sensitivity setting area 91". On the other hand, since defects existing in the above-described discarded board area 92 hardly affect the operation of the printed circuit board 9, a looser inspection sensitivity is set for the discarded board area 92 than for other areas. The discarded substrate area 92 is hereinafter referred to as a "second sensitivity setting area 92". An intermediate inspection sensitivity is set in a region 93 other than the first sensitivity setting region 91 and the second sensitivity setting region 92 . Hereinafter, the area 93 will be referred to as a "third sensitivity setting area 93".

このように、プリント基板9の各位置には、複数の検査感度のいずれか1つが設定されている。検査装置2において、撮像画像の各位置の階調値が正常範囲と比較される上述の例では、検査感度は正常範囲の広さである。第1感度設定領域91では、他の領域よりも狭い正常範囲が設定され、第2感度設定領域92では、他の領域よりも広い正常範囲が設定される。既述のように、欠陥の検出では、様々な手法が用いられてよく、検査感度の設定の仕方は、欠陥の検出手法に応じて適宜変更される。 In this manner, one of a plurality of inspection sensitivities is set at each position on the printed circuit board 9 . In the above-described example in which the gradation value at each position of the captured image is compared with the normal range in the inspection apparatus 2, the inspection sensitivity is the width of the normal range. A normal range narrower than the other areas is set in the first sensitivity setting area 91 , and a normal range wider than the other areas is set in the second sensitivity setting area 92 . As described above, various methods may be used for defect detection, and the method of setting the inspection sensitivity is appropriately changed according to the defect detection method.

検査装置2では、例えば、設計データ(CAMデータ等)を参照することにより、撮像画像における各位置が、第1感度設定領域91、第2感度設定領域92および第3感度設定領域93のいずれに属するかが特定され、比較すべき正常範囲が取得される。そして、当該位置の階調値が当該正常範囲と比較され、正常範囲外となる画素の集合が、検出領域72として取得される。検査装置2では、検査感度情報が、既述の欠陥情報に含められる。検査感度情報は、検出領域72の検出の際に用いられた検査感度が特定可能な情報であり、本処理例における検査感度情報は、第1感度設定領域91、第2感度設定領域92および第3感度設定領域93のいずれか1つを示す情報である。 In the inspection apparatus 2, for example, by referring to design data (such as CAM data), each position in the captured image is assigned to any one of the first sensitivity setting area 91, the second sensitivity setting area 92, and the third sensitivity setting area 93. The belonging is identified and the normal range to compare is obtained. Then, the gradation value at that position is compared with the normal range, and a set of pixels outside the normal range is acquired as the detection area 72 . In the inspection apparatus 2, the inspection sensitivity information is included in the already-described defect information. The inspection sensitivity information is information that can specify the inspection sensitivity used when detecting the detection area 72, and the inspection sensitivity information in this processing example includes the first sensitivity setting area 91, the second sensitivity setting area 92, and the second sensitivity setting area 92. This is information indicating any one of the three sensitivity setting areas 93 .

教師データ生成装置4による教師データの生成では、画像受付部41において、検査装置2から欠陥画像と欠陥情報とが受け付けられる(図4:ステップS11)。既述のように、欠陥情報は、欠陥画像における検出領域72の位置および形状に加えて、検査感度情報を含んでいる。切出画像生成部42では、検出領域72の検出の際に用いられた検査感度に応じて、当該検出領域72の外接矩形73を上下左右に拡張した領域が、切出画像として切り出される(ステップS12)。 In the generation of teacher data by the teacher data generator 4, the image reception unit 41 receives the defect image and the defect information from the inspection device 2 (FIG. 4: step S11). As described above, the defect information includes inspection sensitivity information in addition to the position and shape of the detection area 72 in the defect image. In the clipped image generation unit 42, an area obtained by extending the circumscribing rectangle 73 of the detection region 72 vertically and horizontally is clipped as a clipped image according to the inspection sensitivity used when detecting the detection region 72 (step S12).

具体的には、外接矩形73を上下左右に拡張する画素数を拡張量として、複数の検査感度のそれぞれに対して拡張量が予め設定され、切出画像生成部42に記憶されて準備されている。最も緩い検査感度では(すなわち、検出領域72が第2感度設定領域92に位置する場合)、検出領域72の外縁は、欠陥領域71の外縁よりも小さくなる傾向にあるため、拡張量は比較的大きい画素数α(例えば、8~12画素)とされる。最も厳しい検査感度では(すなわち、検出領域72が第1感度設定領域91に位置する場合)、検出領域72の外縁は、欠陥領域71の外縁とほぼ一致する傾向にあるため、拡張量は比較的小さい画素数β(例えば、0~3画素)とされる。中間的な検査感度では(すなわち、検出領域72が第3感度設定領域93に位置する場合)、検出領域72の外縁は、欠陥領域71の外縁よりも僅かに小さくなる傾向にあるため、拡張量は、検査感度が最も緩い場合の画素数と検査感度が最も厳しい場合の画素数との間の画素数γ(例えば、4~7画素)とされる。 Specifically, the number of pixels by which the circumscribing rectangle 73 is expanded vertically and horizontally is used as the expansion amount, and the expansion amount is set in advance for each of the plurality of inspection sensitivities, and is stored and prepared in the clipped image generation unit 42. there is At the loosest inspection sensitivity (that is, when the detection area 72 is located in the second sensitivity setting area 92), the outer edge of the detection area 72 tends to be smaller than the outer edge of the defect area 71, so the expansion amount is relatively A large number of pixels α (eg, 8 to 12 pixels) is used. At the strictest inspection sensitivity (that is, when the detection area 72 is located in the first sensitivity setting area 91), the outer edge of the detection area 72 tends to substantially match the outer edge of the defect area 71, so the expansion amount is relatively A small number of pixels β (for example, 0 to 3 pixels) is used. With an intermediate inspection sensitivity (that is, when the detection area 72 is located in the third sensitivity setting area 93), the outer edge of the detection area 72 tends to be slightly smaller than the outer edge of the defect area 71, so the expansion amount is the number of pixels γ (for example, 4 to 7 pixels) between the number of pixels for the weakest inspection sensitivity and the number of pixels for the strictest inspection sensitivity.

以上のように、検査感度が最も緩い場合の拡張量が最も大きく、検査感度が最も厳しい場合の拡張量が最も小さくなる。換言すると、α>γ>βが満たされる。その結果、検出領域72の外接矩形73を拡張量だけ拡張した領域、すなわち、切出画像は、欠陥領域71のほぼ全体を含む。 As described above, the expansion amount is the largest when the inspection sensitivity is the loosest, and the expansion amount is the smallest when the inspection sensitivity is the strictest. In other words, α>γ>β is satisfied. As a result, the area obtained by extending the circumscribing rectangle 73 of the detection area 72 by the amount of extension, that is, the clipped image includes almost the entire defect area 71 .

教師データ生成装置4では、ディスプレイ35に選択欠陥画像が表示された後(ステップS13)、選択欠陥画像に対する真欠陥または偽欠陥の判定結果の入力が作業者により行われ、当該入力が受け付けられる(ステップS14)。そして、切出画像に判定結果をラベル付けすることにより、教師データが生成される(ステップS15)。その後、上述の処理例と同様に、複数の教師データを用いて分類器52が生成される。 In the training data generating device 4, after the selected defect image is displayed on the display 35 (step S13), the operator inputs the determination result of the true defect or the false defect for the selected defect image, and the input is accepted ( step S14). Then, teacher data is generated by labeling the clipped image with the determination result (step S15). After that, the classifier 52 is generated using a plurality of teacher data in the same manner as in the processing example described above.

検査システム1におけるプリント基板の検査では、検査装置2において欠陥が検出されると、検出領域72を含む所定サイズの画像が欠陥画像としてコンピュータ3に出力され、分類器52による分類結果が取得される。好ましい検査システム1では、教師データの生成時と同様に、検出領域72の検出の際に用いられた検査感度に応じて、当該検出領域72の外接矩形73を上下左右に拡張した領域が、切出画像として切り出され、当該切出画像が分類器52に入力される。これにより、分類器52では、欠陥画像が示す欠陥が真欠陥または偽欠陥のいずれであるかをより精度よく分類することが可能となる。 In the inspection of the printed circuit board by the inspection system 1, when a defect is detected by the inspection device 2, an image of a predetermined size including the detection area 72 is output to the computer 3 as a defect image, and the classification result by the classifier 52 is obtained. . In the preferred inspection system 1, similarly to when the teacher data is generated, an area obtained by extending the circumscribing rectangle 73 of the detection area 72 vertically and horizontally according to the inspection sensitivity used when detecting the detection area 72 is cut. The cutout image is cut out as an output image, and the cutout image is input to the classifier 52 . As a result, the classifier 52 can more accurately classify whether the defect indicated by the defect image is a true defect or a false defect.

以上のように、本処理例では、プリント基板の各位置に対して複数の検査感度のうち一の検査感度が設定されており、検出領域72の検出の際に用いられた検査感度を示す検査感度情報が欠陥情報に含められる。切出画像生成部42では、各検査感度に対して設定された拡張量が記憶されており、検査感度情報を用いて特定される拡張量だけ検出領域72を拡張した領域が切出画像に含められる。これにより、欠陥領域71のおよそ全体を示す好ましい切出画像を得ることができ、高精度な学習済みモデル(分類器52)を生成することができる。 As described above, in this processing example, one inspection sensitivity out of a plurality of inspection sensitivities is set for each position on the printed circuit board, and an inspection indicating the inspection sensitivity used when detecting the detection area 72 is performed. Sensitivity information is included in the defect information. In the clipped image generation unit 42, the expansion amount set for each inspection sensitivity is stored, and the region obtained by expanding the detection region 72 by the expansion amount specified using the inspection sensitivity information is included in the clipped image. be done. As a result, it is possible to obtain a preferable cropped image showing approximately the entire defect area 71, and to generate a highly accurate trained model (classifier 52).

(第4実施形態)
次に、本発明の第4実施形態に係る教師データ生成処理について説明する。既述のように、プリント基板の主面上の各位置は、複数の領域種別のうちの一の領域種別に属している。検査装置2では、欠陥を検出した際に、検出領域72が属する領域種別を示す領域種別情報が生成され、欠陥情報に含められる。
(Fourth embodiment)
Next, teaching data generation processing according to the fourth embodiment of the present invention will be described. As described above, each position on the main surface of the printed circuit board belongs to one of the plurality of area types. In the inspection apparatus 2, when a defect is detected, area type information indicating the area type to which the detection area 72 belongs is generated and included in the defect information.

本処理例における、図4のステップS11~S14は、上記第1実施形態と同様である。ステップS12において、第2実施形態と同様に、検出領域72が属する領域種別に応じて、当該検出領域72の外接矩形73を上下左右に拡張した領域が、切出画像として切り出されてもよい。また、第3実施形態と同様に、検出領域72の検出の際に用いられた検査感度に応じて、当該検出領域72の外接矩形73を上下左右に拡張した領域が、切出画像として切り出されてもよい。 Steps S11 to S14 in FIG. 4 in this processing example are the same as those in the first embodiment. In step S12, as in the second embodiment, a region obtained by extending the circumscribing rectangle 73 of the detection region 72 vertically and horizontally may be cut out as a cutout image according to the region type to which the detection region 72 belongs. Further, as in the third embodiment, a region obtained by extending the circumscribing rectangle 73 of the detection region 72 vertically and horizontally is cut out as a cutout image according to the inspection sensitivity used when detecting the detection region 72. may

教師データ生成部45では、選択欠陥画像に対する、作業者による真欠陥または偽欠陥の判定結果に加えて、検出領域72が属する領域種別を切出画像にラベル付けすることにより、教師データが生成される(ステップS15)。教師データ生成処理では、複数の欠陥画像から各領域種別に対する複数の教師データが生成される。ここでは、メッキ領域用の複数の教師データと、SR領域用の複数の教師データとが生成されたものとする。 The teacher data generator 45 generates teacher data by labeling the cutout image with the area type to which the detection area 72 belongs, in addition to the operator's judgment result of the selected defect image as to whether it is a true defect or a false defect. (step S15). In the training data generation process, a plurality of training data for each area type is generated from a plurality of defect images. Here, it is assumed that a plurality of teacher data for the plating area and a plurality of teacher data for the SR area are generated.

学習部51では、メッキ領域用の複数の教師データを用いて機械学習を行うことにより、図17に示すメッキ領域用学習済みモデル521が生成される。また、SR領域用の複数の教師データを用いて機械学習を行うことにより、SR領域用学習済みモデル522が生成される。 The learning unit 51 performs machine learning using a plurality of teaching data for the plating area, thereby generating a trained model 521 for the plating area shown in FIG. Also, by performing machine learning using a plurality of teacher data for the SR region, a learned model 522 for the SR region is generated.

検査システム1がプリント基板を検査する際には、検査装置2において、プリント基板の複数の位置を示す複数の撮像画像が取得され、複数の撮像画像における欠陥の有無が検査される。欠陥が検出されると、検出領域72を含む所定サイズの欠陥画像が、領域種別情報を含む欠陥情報と共に、分類器52に出力される。分類器52では、欠陥画像の検出領域72がメッキ領域に属する場合に、メッキ領域用学習済みモデル521を用いて、欠陥画像が示す欠陥が真欠陥または偽欠陥に分類される。欠陥画像の検出領域72がSR領域に属する場合に、SR領域用学習済みモデル522を用いて、欠陥画像が示す欠陥が真欠陥または偽欠陥に分類される。 When the inspection system 1 inspects the printed circuit board, the inspection device 2 acquires a plurality of captured images indicating a plurality of positions of the printed circuit board, and inspects the presence or absence of defects in the plurality of captured images. When a defect is detected, a defect image of a predetermined size including the detection area 72 is output to the classifier 52 along with defect information including area type information. In the classifier 52, when the detection area 72 of the defect image belongs to the plating area, the learned model 521 for the plating area is used to classify the defect indicated by the defect image into a true defect or a false defect. When the detection area 72 of the defect image belongs to the SR area, the trained model 522 for the SR area is used to classify the defect indicated by the defect image into a true defect or a false defect.

以上のように、本処理例では、検出領域72が属する領域種別を示す領域種別情報が、欠陥情報に含められる。教師データ生成部45では、作業者による真欠陥または偽欠陥の判定結果に加えて、検出領域72が属する領域種別が切出画像にラベル付けされる。これにより、学習部51では、一の領域種別がラベル付けされた複数の教師データを用いて、当該領域種別の欠陥分類用の学習済みモデルを生成することが可能となる。このように、領域種別毎の学習済みモデルを生成することにより、分類精度をさらに向上することができる。 As described above, in this processing example, the defect information includes the area type information indicating the area type to which the detection area 72 belongs. In the teacher data generation unit 45, the cutout image is labeled with the region type to which the detection region 72 belongs, in addition to the result of the operator's determination of a true defect or a false defect. As a result, the learning unit 51 can use a plurality of teacher data labeled with one region type to generate a learned model for defect classification of the region type. By generating a trained model for each area type in this way, the classification accuracy can be further improved.

上記教師データ生成装置4および教師データ生成方法では様々な変形が可能である。 Various modifications are possible for the training data generation device 4 and the training data generation method.

検査装置2から教師データ生成装置4に入力される欠陥情報は、欠陥画像における検出領域72の範囲を示すものであればよく、検出領域72の位置および形状を示すものには限定されない。例えば、欠陥情報は、欠陥画像における検出領域72の外接矩形の範囲(すなわち、上下方向および左右方向のそれぞれにおける範囲)を示すものであってもよい。 The defect information that is input from the inspection device 2 to the training data generation device 4 only needs to indicate the range of the detection area 72 in the defect image, and is not limited to information indicating the position and shape of the detection area 72 . For example, the defect information may indicate the range of the circumscribed rectangle of the detection area 72 in the defect image (that is, the range in each of the vertical direction and the horizontal direction).

切出画像として切り出される欠陥画像の領域は、欠陥情報に基づいて決定され、かつ、検出領域72を含むものであればよいが、好ましくは、検出領域72に略外接する領域である。検出領域72に略外接する領域は、検出領域72に外接する領域のみならず、既述の拡張量だけ検出領域72を拡張した領域に外接する領域を含む。 The region of the defect image that is cut out as the cut-out image may be determined based on the defect information and includes the detection region 72 . The area substantially circumscribing the detection area 72 includes not only the area circumscribing the detection area 72 but also the area circumscribing the area obtained by expanding the detection area 72 by the expansion amount described above.

上記実施の形態では、図4のステップS14において、欠陥画像に対する真欠陥または偽欠陥の判定結果が作業者により入力されるが、真欠陥および偽欠陥以外の欠陥種別(例えば、異物付着、膜剥がれ等)の判定結果が入力されてもよい。すなわち、判定結果受付部44では、ディスプレイ35に表示された欠陥画像に対する、作業者による欠陥種別の判定結果(真欠陥または偽欠陥の判定結果を含む。)の入力が受け付けられる。 In the above embodiment, in step S14 of FIG. 4, the operator inputs the determination result of the true defect or the false defect for the defect image. etc.) may be input. That is, the determination result receiving unit 44 receives the input of the defect type determination result (including the determination result of true defect or false defect) by the operator for the defect image displayed on the display 35 .

第2実施形態において、検出領域72が、異なる2以上の領域種別にそれぞれ属する部位を含む場合に、検出領域72の拡張では、当該2以上の領域種別のいずれの領域種別に対する拡張量が用いられてもよい。欠陥領域71のおよそ全体を示す好ましい切出画像を得るという観点では、当該2以上の領域種別に対する拡張量のうち、最大の拡張量を用いることが好ましい。 In the second embodiment, when the detection region 72 includes portions belonging to two or more different region types, the extension amount for any one of the two or more region types is used in expanding the detection region 72. may From the viewpoint of obtaining a preferable cropped image showing substantially the entire defect area 71, it is preferable to use the maximum expansion amount among the expansion amounts for the two or more area types.

第3実施形態において、検出領域72が、異なる2以上の検査感度にてそれぞれ検出された部位を含む場合に、検出領域72の拡張では、当該2以上の検査感度のいずれの検査感度に対する拡張量が用いられてもよい。欠陥領域71のおよそ全体を示す好ましい切出画像を得るという観点では、当該2以上の検査感度に対する拡張量のうち、最大の拡張量を用いることが好ましい。 In the third embodiment, when the detection region 72 includes parts detected with two or more different test sensitivities, the extension of the detection region 72 is the amount of expansion for any one of the two or more test sensitivities. may be used. From the standpoint of obtaining a preferable clipped image showing substantially the entire defect region 71, it is preferable to use the maximum extension amount among the extension amounts for the two or more inspection sensitivities.

検査装置2における検査の対象物は、プリント基板以外に、半導体基板やガラス基板等の基板であってもよい。また、機械部品等、基板以外の対象物の欠陥が検査装置2により検出されてもよい。教師データ生成装置4は、様々な対象物の欠陥分類用の学習済みモデルの生成に用いられる、好ましい教師データを容易に生成することが可能である。 The object to be inspected by the inspection apparatus 2 may be a substrate such as a semiconductor substrate or a glass substrate in addition to the printed circuit board. Also, the inspection device 2 may detect defects in objects other than the substrate, such as machine parts. The teacher data generation device 4 can easily generate preferable teacher data used to generate trained models for defect classification of various objects.

上記実施の形態および各変形例における構成は、相互に矛盾しない限り適宜組み合わされてよい。 The configurations in the above embodiment and each modified example may be combined as appropriate as long as they do not contradict each other.

2 検査装置
3 コンピュータ
4 教師データ生成装置
9 プリント基板
35 ディスプレイ
41 画像受付部
42 切出画像生成部
43 表示制御部
44 判定結果受付部
45 教師データ生成部
72 検出領域
521,522 学習済みモデル
811 プログラム
S11~S15 ステップ
2 inspection device 3 computer 4 teacher data generation device 9 printed circuit board 35 display 41 image reception unit 42 clipped image generation unit 43 display control unit 44 determination result reception unit 45 teacher data generation unit 72 detection area 521, 522 trained model 811 program S11-S15 steps

Claims (11)

教師データを生成する教師データ生成装置であって、
対象物を撮像して欠陥を検出する検査装置から、欠陥の検出領域を含む所定サイズの欠陥画像と、前記欠陥画像における前記検出領域の範囲を示す欠陥情報とを受け付ける画像受付部と、
前記欠陥情報に基づいて、前記欠陥画像から前記検出領域を含む領域を切出画像として切り出す切出画像生成部と、
ディスプレイに前記欠陥画像の少なくとも一部を表示する表示制御部と、
前記ディスプレイに表示された前記欠陥画像に対する、作業者による欠陥種別の判定結果の入力を受け付ける判定結果受付部と、
前記切出画像に前記判定結果をラベル付けして教師データを生成する教師データ生成部と、
を備えることを特徴とする教師データ生成装置。
A training data generation device that generates training data,
an image receiving unit that receives a defect image of a predetermined size including a defect detection area and defect information indicating the range of the detection area in the defect image from an inspection apparatus that detects defects by imaging an object;
a clipped image generating unit that clips a region including the detection region from the defect image as a clipped image based on the defect information;
a display control unit that displays at least part of the defect image on a display;
a determination result receiving unit that receives an input of a defect type determination result by a worker for the defect image displayed on the display;
a training data generation unit that labels the cutout image with the determination result to generate training data;
A teacher data generation device characterized by comprising:
請求項1に記載の教師データ生成装置であって、
前記対象物の各位置が、複数の領域種別のうちの一の領域種別に属しており、
前記欠陥情報が、前記検出領域が属する領域種別を示す領域種別情報を含み、
前記切出画像生成部が、各領域種別に対して設定された拡張量を記憶し、前記領域種別情報を用いて特定される拡張量だけ前記検出領域を拡張した領域を前記切出画像に含めることを特徴とする教師データ生成装置。
The training data generation device according to claim 1,
each position of the object belongs to one region type among a plurality of region types;
The defect information includes area type information indicating an area type to which the detection area belongs,
The cut-out image generation unit stores the expansion amount set for each area type, and includes the area obtained by expanding the detection area by the expansion amount specified using the area type information in the cut-out image. A teacher data generation device characterized by:
請求項2に記載の教師データ生成装置であって、
前記対象物がプリント基板であり、前記複数の領域種別が、少なくともメッキ領域およびソルダレジスト領域を含むことを特徴とする教師データ生成装置。
The training data generation device according to claim 2,
The teacher data generating apparatus, wherein the object is a printed circuit board, and the plurality of area types include at least a plating area and a solder resist area.
請求項1ないし3のいずれか1つに記載の教師データ生成装置であって、
前記対象物の各位置に対して複数の検査感度のうち一の検査感度が設定されており、
前記欠陥情報が、前記検出領域の検出の際に用いられた検査感度を示す検査感度情報を含み、
前記切出画像生成部が、各検査感度に対して設定された拡張量を記憶し、前記検査感度情報を用いて特定される拡張量だけ前記検出領域を拡張した領域を前記切出画像に含めることを特徴とする教師データ生成装置。
The training data generation device according to any one of claims 1 to 3,
One inspection sensitivity among a plurality of inspection sensitivities is set for each position of the object,
The defect information includes inspection sensitivity information indicating the inspection sensitivity used when detecting the detection area,
The clipped image generation unit stores an expansion amount set for each inspection sensitivity, and includes an area obtained by expanding the detection area by the expansion amount specified using the inspection sensitivity information in the clipped image. A teacher data generation device characterized by:
請求項1ないし4のいずれか1つに記載の教師データ生成装置であって、
前記対象物の各位置が、複数の領域種別のうちの一の領域種別に属しており、
前記欠陥情報が、前記検出領域が属する領域種別を示す領域種別情報を含み、
前記教師データ生成部が、前記判定結果に加えて、前記検出領域が属する領域種別を前記切出画像にラベル付けすることを特徴とする教師データ生成装置。
The training data generation device according to any one of claims 1 to 4,
each position of the object belongs to one region type among a plurality of region types;
The defect information includes area type information indicating an area type to which the detection area belongs,
The teacher data generation device, wherein the teacher data generation unit labels the clipped image with an area type to which the detection area belongs in addition to the determination result.
教師データを生成する教師データ生成方法であって、
a)対象物を撮像して欠陥を検出する検査装置から、欠陥の検出領域を含む所定サイズの欠陥画像と、前記欠陥画像における前記検出領域の範囲を示す欠陥情報とを受け付ける工程と、
b)前記欠陥情報に基づいて、前記欠陥画像から前記検出領域を含む領域を切出画像として切り出す工程と、
c)ディスプレイに前記欠陥画像の少なくとも一部を表示する工程と、
d)前記ディスプレイに表示された前記欠陥画像に対する、作業者による欠陥種別の判定結果の入力を受け付ける工程と、
e)前記切出画像に前記判定結果をラベル付けして教師データを生成する工程と、
を備えることを特徴とする教師データ生成方法。
A teacher data generation method for generating teacher data,
a) a step of receiving a defect image of a predetermined size including a defect detection area and defect information indicating the range of the detection area in the defect image from an inspection apparatus that detects defects by imaging an object;
b) cutting out a region including the detection region from the defect image as a cutout image based on the defect information;
c) displaying at least a portion of said defect image on a display;
d) a step of receiving an input of a defect type determination result by an operator for the defect image displayed on the display;
e) labeling the cutout image with the determination result to generate training data;
A teacher data generation method characterized by comprising:
請求項6に記載の教師データ生成方法であって、
前記対象物の各位置が、複数の領域種別のうちの一の領域種別に属しており、
前記欠陥情報が、前記検出領域が属する領域種別を示す領域種別情報を含み、
前記b)工程において、各領域種別に対して設定された拡張量が準備されており、前記領域種別情報を用いて特定される拡張量だけ前記検出領域を拡張した領域が前記切出画像に含められることを特徴とする教師データ生成方法。
The teacher data generation method according to claim 6,
each position of the object belongs to one region type among a plurality of region types;
The defect information includes area type information indicating an area type to which the detection area belongs,
In the step b), an extension amount set for each area type is prepared, and an area obtained by extending the detection area by an extension amount specified using the area type information is included in the clipped image. A training data generation method characterized by:
請求項7に記載の教師データ生成方法であって、
前記対象物がプリント基板であり、前記複数の領域種別が、少なくともメッキ領域およびソルダレジスト領域を含むことを特徴とする教師データ生成方法。
The teacher data generation method according to claim 7,
The teacher data generation method, wherein the object is a printed circuit board, and the plurality of area types include at least a plating area and a solder resist area.
請求項6ないし8のいずれか1つに記載の教師データ生成方法であって、
前記対象物の各位置に対して複数の検査感度のうち一の検査感度が設定されており、
前記欠陥情報が、前記検出領域の検出の際に用いられた検査感度を示す検査感度情報を含み、
前記b)工程において、各検査感度に対して設定された拡張量が準備されており、前記検査感度情報を用いて特定される拡張量だけ前記検出領域を拡張した領域が前記切出画像に含められることを特徴とする教師データ生成方法。
The teacher data generation method according to any one of claims 6 to 8,
One inspection sensitivity among a plurality of inspection sensitivities is set for each position of the object,
The defect information includes inspection sensitivity information indicating the inspection sensitivity used when detecting the detection area,
In the step b), an expansion amount set for each inspection sensitivity is prepared, and an area obtained by expanding the detection area by an expansion amount specified using the inspection sensitivity information is included in the clipped image. A training data generation method characterized by:
請求項6ないし9のいずれか1つに記載の教師データ生成方法であって、
前記対象物の各位置が、複数の領域種別のうちの一の領域種別に属しており、
前記欠陥情報が、前記検出領域が属する領域種別を示す領域種別情報を含み、
前記e)工程において、前記判定結果に加えて、前記検出領域が属する領域種別が前記切出画像にラベル付けされ、
一の領域種別がラベル付けされた複数の教師データを用いて、前記一の領域種別の欠陥分類用の学習済みモデルが生成されることを特徴とする教師データ生成方法。
The teacher data generation method according to any one of claims 6 to 9,
each position of the object belongs to one region type among a plurality of region types;
The defect information includes area type information indicating an area type to which the detection area belongs,
In step e), in addition to the determination result, the cutout image is labeled with a region type to which the detection region belongs,
A teacher data generation method, wherein a trained model for defect classification of one region type is generated using a plurality of teacher data labeled with one region type.
コンピュータに教師データを生成させるプログラムであって、前記プログラムのコンピュータによる実行は、前記コンピュータに、
a)対象物を撮像して欠陥を検出する検査装置から、欠陥の検出領域を含む所定サイズの欠陥画像と、前記欠陥画像における前記検出領域の範囲を示す欠陥情報とを受け付ける工程と、
b)前記欠陥情報に基づいて、前記欠陥画像から前記検出領域を含む領域を切出画像として切り出す工程と、
c)ディスプレイに前記欠陥画像の少なくとも一部を表示する工程と、
d)前記ディスプレイに表示された前記欠陥画像に対する、作業者による欠陥種別の判定結果の入力を受け付ける工程と、
e)前記切出画像に前記判定結果をラベル付けして教師データを生成する工程と、
を実行させることを特徴とするプログラム。
A program that causes a computer to generate training data, wherein execution of the program by the computer causes the computer to:
a) receiving a defect image of a predetermined size including a defect detection area and defect information indicating a range of the detection area in the defect image from an inspection apparatus that detects defects by imaging an object;
b) cutting out a region including the detection region from the defect image as a cutout image based on the defect information;
c) displaying at least a portion of said defect image on a display;
d) a step of receiving an input of a defect type determination result by an operator for the defect image displayed on the display;
e) labeling the cutout image with the determination result to generate training data;
A program characterized by causing the execution of
JP2022025618A 2022-02-22 2022-02-22 Teacher data generation device, teacher data generation method, and program Pending JP2023122140A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2022025618A JP2023122140A (en) 2022-02-22 2022-02-22 Teacher data generation device, teacher data generation method, and program
TW111142102A TW202334900A (en) 2022-02-22 2022-11-04 Training data generation apparatus, training data generation method, and program
KR1020220156345A KR20230126163A (en) 2022-02-22 2022-11-21 Training data generation apparatus, training data generation method, and program recorded on recording medium
CN202310108322.7A CN116645314A (en) 2022-02-22 2023-01-20 Teacher data generation device, teacher data generation method, and recording medium containing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022025618A JP2023122140A (en) 2022-02-22 2022-02-22 Teacher data generation device, teacher data generation method, and program

Publications (1)

Publication Number Publication Date
JP2023122140A true JP2023122140A (en) 2023-09-01

Family

ID=87614097

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022025618A Pending JP2023122140A (en) 2022-02-22 2022-02-22 Teacher data generation device, teacher data generation method, and program

Country Status (4)

Country Link
JP (1) JP2023122140A (en)
KR (1) KR20230126163A (en)
CN (1) CN116645314A (en)
TW (1) TW202334900A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7510132B1 (en) 2023-11-22 2024-07-03 株式会社デンケン Visual inspection device, machine learning model learning method, teaching image generation method and program

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220067434A1 (en) * 2018-10-01 2022-03-03 System Square Inc. Training data generation device and training data generation program
KR102693776B1 (en) * 2023-11-14 2024-08-09 주식회사 파이비스 Apparatus and method for detecting defects in objects based on deep learning model
CN118169144B (en) * 2024-04-29 2024-08-23 苏州赫芯科技有限公司 Defect detection method, system and medium based on multistage matching and AI recheck

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7510132B1 (en) 2023-11-22 2024-07-03 株式会社デンケン Visual inspection device, machine learning model learning method, teaching image generation method and program

Also Published As

Publication number Publication date
TW202334900A (en) 2023-09-01
KR20230126163A (en) 2023-08-29
CN116645314A (en) 2023-08-25

Similar Documents

Publication Publication Date Title
JP2023122140A (en) Teacher data generation device, teacher data generation method, and program
JP4014379B2 (en) Defect review apparatus and method
US20060133660A1 (en) Apparatus and method for detecting defect existing in pattern on object
JP2006098151A (en) Pattern inspection device and pattern inspection method
JP2003100826A (en) Inspecting data analyzing program and inspecting apparatus and inspecting system
TWI837934B (en) Inspection system, training data generation apparatus, training data generation method, and program
JP4479999B2 (en) Graphic selection support apparatus, graphic selection support method and program for pattern matching
CN116091503B (en) Method, device, equipment and medium for discriminating panel foreign matter defects
JP2018091771A (en) Method for inspection, preliminary image selection device, and inspection system
JP2021056004A (en) Image determination device and image determination method
CN112702905B (en) Method and system for tracing yield and error rate of printed circuit board
JP7423368B2 (en) Defect detection device and method
JP4102976B2 (en) Pattern defect analysis support device and pattern defect analysis support program
TWI745131B (en) Printed circuit board yield rate and production equipment error rate backtracking method and system thereof
JP2006049348A (en) Method, program, and apparatus for appearance inspection of printed circuit board
JP3106370B2 (en) Defect detection and type recognition of printed circuit boards using graph information
JPH06201603A (en) Method for generating inspection data in missing inspection of electronic component and method for detecting missing of the component
JPH04184244A (en) Method for inspecting pattern of printed circuit board
WO2024095721A1 (en) Image processing device and image processing method
RU2424570C1 (en) Method of detecting differences in like digital graphic images
JP4205137B2 (en) Appearance inspection apparatus and inspection region extraction method for inspection object
JP3199175B2 (en) Stamped character inspection method and device
JP2023183761A (en) Inspection device, inspection method and program
JP3575551B2 (en) Residue inspection method
JP6280760B2 (en) Inspection apparatus and inspection method