TW202334900A - Training data generation apparatus, training data generation method, and program - Google Patents

Training data generation apparatus, training data generation method, and program Download PDF

Info

Publication number
TW202334900A
TW202334900A TW111142102A TW111142102A TW202334900A TW 202334900 A TW202334900 A TW 202334900A TW 111142102 A TW111142102 A TW 111142102A TW 111142102 A TW111142102 A TW 111142102A TW 202334900 A TW202334900 A TW 202334900A
Authority
TW
Taiwan
Prior art keywords
area
defect
aforementioned
image
information
Prior art date
Application number
TW111142102A
Other languages
Chinese (zh)
Inventor
塩見順一
Original Assignee
日商斯庫林集團股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 日商斯庫林集團股份有限公司 filed Critical 日商斯庫林集團股份有限公司
Publication of TW202334900A publication Critical patent/TW202334900A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/001Industrial image inspection using an image reference approach
    • 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
    • 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)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

A training data generation apparatus 4 includes an image receiver 41 for receiving a defect image of a predetermined size and defect information from an inspection apparatus 2 that detects a defect by capturing images of objects, the defect image including a detection area of a defect, the defect information indicating a range of the detection area in the defect image, a cut-out image generator 42 for cutting out an area including the detection area from the defect image as a cut-out image based on the defect information, a display controller 43 for displaying at least a portion of the defect image on a display 35, a determination result receiver 44 for receiving an input of a determination result of a defect type by an operator for the defect image displayed on the display 35, and a training data generator 45 for generating training data by labeling the cut-out image with the determination result. This makes it possible to easily generate training data including an image in which unnecessary areas other than a defect area are reduced.

Description

教師資料生成裝置、教師資料生成方法以及程式Teacher data generation device, teacher data generation method and program

本發明係關於一種生成教師資料之技術。The present invention relates to a technology for generating teacher materials.

在用以拍攝對象物來檢測缺陷之檢查裝置中,當檢測到缺陷時,輸出包含缺陷區域且為預定尺寸的缺陷圖像。考慮到利用學習完畢模型(分類器)來對該缺陷圖像所表現的缺陷的類型進行分類。該情況下,由操作者對預先準備的缺陷圖像判定缺陷類型(亦即進行注解(annotation)),藉此生成在該缺陷圖像上標記著一個缺陷類型的教師資料,並使用複數個教師資料進行學習,藉此生成上述學習完畢模型。In an inspection device for detecting defects by photographing an object, when a defect is detected, a defect image of a predetermined size including a defect area is output. Consider using a learned model (classifier) to classify the types of defects represented by the defect image. In this case, the operator determines the defect type (that is, performs annotation) on the defect image prepared in advance, thereby generating teacher information that marks a defect type on the defect image, and uses a plurality of teachers Learn the data to generate the above-mentioned learned model.

再者,特開2019-87078號公報(文獻1)中揭示了如下方法:藉由操作者的輸入而獲得含有圖像的缺陷之區域,且進行校正來拓寬區域的外緣以使該區域的內部所含的像素多達預定量,並使經過校正的區域與該圖像相關聯,藉此生成學習完畢用資料。Furthermore, Japanese Patent Application Laid-Open No. 2019-87078 (Document 1) discloses a method of obtaining a region containing a defect in an image through an operator's input, and performing correction to widen the outer edge of the region so that the region is A predetermined number of pixels are included internally, and the corrected area is associated with the image, thereby generating learning completion data.

然而,從檢查裝置輸出的缺陷圖像係具有固定的尺寸,且含有大量的缺陷區域以外的多餘區域。因此,即使使用含有這種缺陷圖像的教師資料進行學習,亦難以獲得高精度的學習完畢模型。如文獻1中的方法所示,亦考慮到由操作者輸入包含缺陷的區域,來獲得減少了多餘區域的圖像,但這樣會增大操作負擔。因此,需要容易生成包含減少了缺陷區域以外的多餘區域的圖像之教師資料。However, the defect image output from the inspection device has a fixed size and contains a large amount of redundant areas other than the defective area. Therefore, even if teacher materials containing such defective images are used for learning, it is difficult to obtain a highly accurate learned model. As shown in the method in Document 1, it is also considered that the operator inputs the area containing the defect to obtain an image with reduced redundant areas, but this will increase the operational burden. Therefore, there is a need for teacher materials that can easily generate images containing redundant areas other than defective areas.

本發明係著眼於一種用以生成教師資料的教師資料生成裝置,目的在於容易生成包含減少了缺陷區域以外的多餘區域的圖像之教師資料。The present invention focuses on a teacher material generating device for generating teacher materials, and aims to easily generate teacher materials including images in which redundant areas other than defective areas are reduced.

本發明的教師資料生成裝置係具備:圖像接受部,係從用以拍攝對象物來檢測缺陷之檢查裝置接受:預定尺寸的缺陷圖像,係包含缺陷的檢測區域;以及缺陷資訊,係表示前述缺陷圖像中前述檢測區域的範圍;剪切圖像生成部,係基於前述缺陷資訊從前述缺陷圖像中剪切出包含前述檢測區域之區域作為剪切圖像;顯示控制部,係使顯示器上顯示前述缺陷圖像的至少一部分;判定結果接受部,係接受操作者針對前述顯示器上顯示的前述缺陷圖像所輸入的缺陷類型的判定結果;以及教師資料生成部,係對前述剪切圖像標記前述判定結果而生成教師資料。The teacher data generating device of the present invention is provided with: an image receiving unit that receives: a defect image of a predetermined size that includes a detection area of the defect from an inspection device for photographing an object to detect defects; and defect information that represents The range of the aforementioned detection area in the aforementioned defect image; the cutout image generating unit is configured to cut out the area including the aforementioned detection area from the aforementioned defective image as a cutout image based on the aforementioned defect information; and the display control unit is configured to use At least a part of the aforementioned defect image is displayed on the display; the determination result accepting unit is to accept the determination result of the defect type input by the operator for the aforementioned defect image displayed on the aforementioned display; and the teacher data generation unit is to perform the aforementioned cutting The image is marked with the aforementioned determination results to generate teacher information.

根據本發明,容易生成包含減少了缺陷區域以外的多餘區域的圖像之教師資料。According to the present invention, it is easy to generate teacher materials including images in which redundant areas other than defective areas are reduced.

較佳為,前述對象物的各個位置係隸屬於複數個區域類型中的一個區域類型;前述缺陷資訊係包含區域類型資訊,前述區域類型資訊係表示前述檢測區域所隸屬的區域類型;前述剪切圖像生成部係記憶針對各個區域類型設定的擴展量,並將按照利用前述區域類型資訊所特定的擴展量將前述檢測區域擴展後所得的區域包含於前述剪切圖像中。Preferably, each position of the object belongs to one of a plurality of area types; the defect information includes area type information, and the area type information represents the area type to which the detection area belongs; and the shearing The image generating unit memorizes the expansion amount set for each region type, and includes the region obtained by expanding the detection region according to the expansion amount specified using the region type information in the cutout image.

較佳為,前述對象物為印刷基板;複數個前述區域類型係至少包含鍍覆區域以及阻焊劑(solder resist)區域。Preferably, the aforementioned object is a printed circuit board; and the plurality of aforementioned region types include at least a plating region and a solder resist region.

較佳為,對於前述對象物的各個位置設定有複數個檢查感度中的一個檢查感度;前述缺陷資訊係包含檢查感度資訊,前述檢查感度資訊係表示前述檢測區域的檢測中所使用的檢查感度;前述剪切圖像生成部係記憶針對各個檢查感度所設定的擴展量,並將按照利用前述檢查感度資訊所特定的擴展量將前述檢測區域擴展後所得的區域包含於前述剪切圖像中。Preferably, one of a plurality of inspection sensitivities is set for each position of the object; the defect information includes inspection sensitivity information, and the inspection sensitivity information represents the inspection sensitivity used in the detection of the inspection area; The clipped image generating unit stores the expansion amount set for each inspection sensitivity, and includes in the clipped image a region obtained by expanding the detection area according to the expansion amount specified using the inspection sensitivity information.

較佳為,前述對象物的各個位置係隸屬於複數個區域類型中的一個區域類型;前述缺陷資訊係包含區域類型資訊,前述區域類型資訊係表示前述檢測區域所隸屬的區域類型;前述教師資料生成部係對前述剪切圖像不僅標記前述判定結果還標記前述檢測區域所隸屬的區域類型。Preferably, each position of the aforementioned object belongs to one area type among a plurality of area types; the aforementioned defect information includes area type information, and the aforementioned area type information represents the area type to which the aforementioned detection area belongs; and the aforementioned teacher information The generation unit marks not only the determination result but also the area type to which the detection area belongs to the cutout image.

本發明亦著眼於一種用以生成教師資料的教師資料生成方法。本發明的教師資料生成方法係具備:步驟a,係從用以拍攝對象物來檢測缺陷之檢查裝置接受:預定尺寸的缺陷圖像,係包含缺陷的檢測區域;以及缺陷資訊,係表示前述缺陷圖像中前述檢測區域的範圍;步驟b,係基於前述缺陷資訊從前述缺陷圖像中剪切出包含前述檢測區域之區域作為剪切圖像;步驟c,係使顯示器上顯示前述缺陷圖像的至少一部分;步驟d,係接受操作者針對前述顯示器上顯示的前述缺陷圖像所輸入的缺陷類型的判定結果;以及步驟e,係對前述剪切圖像標記前述判定結果而生成教師資料。The present invention also focuses on a teacher data generation method for generating teacher data. The teacher data generation method of the present invention includes: step a, receiving from an inspection device used to photograph objects to detect defects: a defect image of a predetermined size, which includes a detection area of defects; and defect information, which represents the aforementioned defects. The range of the aforementioned detection area in the image; step b is to cut out the area containing the aforementioned detection area from the aforementioned defect image based on the aforementioned defect information as a cut image; step c is to display the aforementioned defect image on the display At least a part of; step d, is to accept the determination result of the defect type input by the operator for the aforementioned defect image displayed on the aforementioned display; and step e, is to mark the aforementioned determination result on the aforementioned cut image to generate teacher materials.

較佳為,前述對象物的各個位置係隸屬於複數個區域類型中的一個區域類型;前述缺陷資訊係區域類型資訊,前述區域類型資訊係包含表示前述檢測區域所隸屬的區域類型;在前述步驟b中,準備針對各個區域類型所設定的擴展量,並將按照利用前述區域類型資訊所特定的擴展量將前述檢測區域擴展後所得的區域包含於前述剪切圖像中。Preferably, each position of the object belongs to one area type among a plurality of area types; the defect information is area type information, and the area type information includes the area type indicating the area type to which the detection area belongs; in the above step In step b, the expansion amount set for each area type is prepared, and the area obtained by expanding the detection area according to the expansion amount specified using the area type information is included in the cut image.

較佳為,前述對象物為印刷基板;複數個前述區域類型係至少包含鍍覆區域以及阻焊劑區域。Preferably, the aforementioned object is a printed circuit board; and the plurality of aforementioned area types include at least a plating area and a solder resist area.

較佳為,對於前述對象物的各個位置設定有複數個檢查感度中的一個檢查感度;前述缺陷資訊係包含檢查感度資訊,前述檢查感度資訊係表示前述檢測區域的檢測中所使用的檢查感度;在前述步驟b中,準備針對各個檢查感度所設定的擴展量,並將按照利用前述檢查感度資訊所特定的擴展量將前述檢測區域擴展後所得的區域包含於前述剪切圖像中。Preferably, one of a plurality of inspection sensitivities is set for each position of the object; the defect information includes inspection sensitivity information, and the inspection sensitivity information represents the inspection sensitivity used in the detection of the inspection area; In the aforementioned step b, an expansion amount set for each inspection sensitivity is prepared, and an area obtained by expanding the detection area according to the expansion amount specified using the inspection sensitivity information is included in the cutout image.

較佳為,前述對象物的各個位置係隸屬於複數個區域類型中的一個區域類型;前述缺陷資訊係包含區域類型資訊,前述區域類型資訊係表示前述檢測區域所隸屬的區域類型;在前述步驟e中,對前述剪切圖像不僅標記前述判定結果還標記前述檢測區域所隸屬的區域類型,利用標記著一個區域類型的複數個教師資料生成一個前述區域類型的缺陷分類用的學習完畢模型。Preferably, each position of the aforementioned object belongs to one area type among a plurality of area types; the aforementioned defect information includes area type information, and the aforementioned area type information represents the area type to which the aforementioned detection area belongs; in the aforementioned step In e, the cut image is marked with not only the judgment result but also the area type to which the detection area belongs, and a learned model for defect classification of the area type is generated using a plurality of teacher materials marked with one area type.

本發明亦著眼於一種用以使電腦生成教師資料的程式。藉由使電腦執行本發明的程式而使前述電腦執行:步驟a,係從用以拍攝對象物來檢測缺陷之檢查裝置接受:預定尺寸的缺陷圖像,係包含缺陷的檢測區域;以及缺陷資訊,係表示前述缺陷圖像中前述檢測區域的範圍;步驟b,係基於前述缺陷資訊從前述缺陷圖像中剪切出包含前述檢測區域之區域作為剪切圖像;步驟c,係使顯示器上顯示前述缺陷圖像的至少一部分;步驟d,係接受操作者針對前述顯示器上顯示的前述缺陷圖像所輸入的缺陷類型的判定結果;以及步驟e,係對前述剪切圖像標記前述判定結果而生成教師資料。The present invention also focuses on a program for causing a computer to generate teacher information. By causing the computer to execute the program of the present invention, the aforementioned computer executes: step a, receiving from an inspection device used to photograph an object to detect defects: a defect image of a predetermined size, which contains the detection area of the defect; and defect information , represents the range of the aforementioned detection area in the aforementioned defect image; step b, based on the aforementioned defect information, cuts out the area containing the aforementioned detection area from the aforementioned defect image as a cut image; step c, involves making the display Display at least a part of the aforementioned defect image; step d is to accept the determination result of the defect type input by the operator for the aforementioned defect image displayed on the aforementioned display; and step e is to mark the aforementioned determination result on the aforementioned cutout image And generate teacher information.

關於上述目的、其他目的、特徵、形態以及優點,係藉由根據以下參照隨附圖式對本發明所作的詳細說明而明瞭。The above objects, other objects, features, forms, and advantages will become clear from the following detailed description of the present invention with reference to the accompanying drawings.

(第一實施形態) 圖1係表示本發明的第一實施形態中的檢查系統1的構成的圖。檢查系統1係檢查作為對象物的印刷基板。檢查系統1係具備檢查裝置2以及電腦3。在圖1中,電腦3所實現的功能性構成係被虛線矩形包圍。檢查裝置2係具備省略圖示的拍攝部、移動機構以及缺陷檢測部。拍攝部係拍攝印刷基板。移動機構係使印刷基板相對於拍攝部進行相對移動。缺陷檢測部係從拍攝部所輸出的圖像中檢測缺陷。缺陷檢測部係在檢測到缺陷時,將包含缺陷區域之預定尺寸(亦稱為缺陷區塊尺寸)的缺陷圖像輸出至電腦3。 (First Embodiment) FIG. 1 is a diagram showing the structure of the inspection system 1 in the first embodiment of the present invention. The inspection system 1 inspects a printed circuit board as a target object. The inspection system 1 includes an inspection device 2 and a computer 3 . In Figure 1, the functional configuration implemented by the computer 3 is surrounded by a dotted rectangle. The inspection device 2 includes an imaging unit (not shown), a moving mechanism, and a defect detection unit. The photography department takes photos of printed circuit boards. The moving mechanism moves the printed circuit board relative to the imaging unit. The defect detection unit detects defects from the image output by the imaging unit. When a defect is detected, the defect detection unit outputs a defect image of a predetermined size (also called defect block size) including the defect area to the computer 3 .

圖2係表示電腦3的構成的圖。電腦3係具備一般電腦系統的構成,包含CPU(Central Processing Unit;中央處理單元)31、ROM(Read-Only Memory;唯讀記憶體)32、RAM(Random Access Memory;隨機存取記憶體 )33、硬碟34、顯示器35、輸入部36、讀取裝置37、通訊部38、GPU(Graphics Processing Unit;圖形處理單元)39以及匯流排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 structure of the computer 3 . Computer 3 series has the composition of a general computer system, including CPU (Central Processing Unit; central processing unit) 31, ROM (Read-Only Memory; read-only memory) 32, RAM (Random Access Memory; random access memory) 33 , hard disk 34, display 35, input unit 36, reading device 37, communication unit 38, GPU (Graphics Processing Unit; graphics processing unit) 39 and bus 30. The CPU31 performs various calculation processes. The GPU39 performs various operations related to image processing. ROM32 is the basic memory program. RAM33 stores various information. The hard disk 34 performs information storage. The display 35 displays various information such as images. The input unit 36 includes a keyboard 36a and a mouse 36b that accept input from the operator. The reading device 37 reads information from computer-readable recording media 81 such as optical disks, magnetic disks, optical disks, and memory cards. The communication unit 38 sends and receives signals to and from other components of the inspection system 1 and external devices. The bus 30 is a signal circuit for connecting the CPU 31 , the GPU 39 , the ROM 32 , the RAM 33 , the hard disk 34 , the display 35 , the input unit 36 , the reading device 37 and the communication unit 38 .

在電腦3中,預先經由讀取裝置37從作為程式產品的記錄媒體81讀出程式811並將程式811記憶於硬碟34中。程式811亦可經由網路記憶於硬碟34中。CPU31以及GPU39係根據程式811並利用RAM33、硬碟34來執行運算處理。CPU31以及GPU39係於電腦3中發揮運算部之作用。除CPU31以及GPU39以外,亦可採用發揮運算部作用的其他構成。In the computer 3 , the program 811 is previously read from the recording medium 81 as a program product via the reading device 37 and the program 811 is stored in the hard disk 34 . The program 811 can also be stored in the hard disk 34 via the network. The CPU 31 and the GPU 39 use the RAM 33 and the hard disk 34 to perform calculation processing according to the program 811. The CPU 31 and the GPU 39 function as a computing unit in the computer 3 . In addition to the CPU 31 and the GPU 39, other structures that function as a computing unit may be adopted.

在檢查系統1中,電腦3係根據程式811執行運算處理等,藉此實現圖1中之虛線所包圍之功能性構成。亦即,電腦3的CPU31、GPU39、ROM32、RAM33、硬碟34以及這些構件的周邊構成係實現教師資料生成裝置4、學習部51以及分類器52。這些功能之全部或者一部分亦可藉由專用的電子電路所實現。而且,亦可由複數個電腦實現這些功能。In the inspection system 1, the computer 3 executes calculation processing according to the program 811, thereby realizing the functional configuration surrounded by the dotted line in Fig. 1 . That is, the CPU 31 , GPU 39 , ROM 32 , RAM 33 , hard disk 34 and peripheral components of these components of the computer 3 realize the teacher material generating device 4 , the learning unit 51 and the classifier 52 . All or part of these functions can also be realized by dedicated electronic circuits. Moreover, these functions can also be implemented by multiple computers.

分類器52為學習完畢模型,用以將從檢查裝置2輸入的缺陷圖像所表現的缺陷分類為真缺陷或者偽缺陷。學習部51係藉由使用後述的複數個教師資料進行學習而生成學習完畢模型(分類器52)。教師資料生成裝置4係生成供學習部51中所使用的教師資料。The classifier 52 is a learned model and is used to classify defects represented by the defect image input from the inspection device 2 into real defects or pseudo defects. The learning unit 51 performs learning using a plurality of teacher data described below to generate a learned model (classifier 52). The teacher material generating device 4 generates teacher materials used in the learning unit 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 structure of the teacher material generating device 4. The teacher material generating device 4 includes an image receiving unit 41 , a cutout image generating unit 42 , a display control unit 43 , a determination result accepting unit 44 , and a teacher material generating unit 45 . The image receiving unit 41 is connected to the inspection device 2 and receives defect images and the like input from the inspection device 2 . The cutout image generating unit 42 cuts out a cutout image described below 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 receiving unit 44 is connected to the input unit 36 and accepts input from the operator via the input unit 36 . The teacher material generating unit 45 adds a mark to the cutout image to generate teacher material.

圖4係表示教師資料生成裝置4生成教師資料的處理流程的圖。首先,在圖像接受部41中,從檢查裝置2接受缺陷圖像以及後述的缺陷資訊(步驟S11)。FIG. 4 is a diagram showing the processing flow of the teacher material generating device 4 for generating teacher materials. First, the image receiving unit 41 receives a defect image and defect information described below from the inspection device 2 (step S11).

此處,對於檢查裝置2檢測缺陷的處理的一例進行說明。圖5係拍攝有印刷基板的一部分之多色調的拍攝圖像的圖。例如,拍攝圖像為彩色圖像。拍攝圖像亦可為灰階圖像。於印刷基板的主表面上設有複數種區域。具體而言,設有鍍覆有銅等金屬的鍍覆區域、於表面設有阻焊劑的阻焊劑區域(以下亦稱為「SR區域」)、印刷在阻焊劑上的文字或者符號等絲網(silk)區域、作為貫通孔的開口的通孔(through hole)區域等。而且,SR區域係可區分為阻焊劑的下層為銅箔之第一SR區域以及阻焊劑的下層為印刷基板的基材之第二SR區域,兩者的顏色不同。如上所述,印刷基板的主表面上的各個位置係隸屬於包括鍍覆區域、第一SR區域、第二SR區域以及絲網區域等的複數個區域類型中的任一個區域。Here, an example of the process of detecting defects by the inspection device 2 will be described. FIG. 5 is a diagram showing a multi-tone photographic image of a part of the printed circuit board. For example, the captured image is a color image. The captured image can also be a grayscale image. A plurality of areas are provided on the main surface of the printed circuit board. Specifically, there are a plating area plated with metal such as copper, a solder resist area (hereinafter also referred to as "SR area") with solder resist on the surface, and screens such as characters or symbols printed on the solder resist. (silk) area, a through hole area which is an opening of a through hole, etc. Moreover, the SR region can be divided into a first SR region in which the lower layer of the solder resist is a copper foil and a second SR region in which the lower layer of the solder resist is the base material of the printed circuit board, and the colors of the two are different. As described above, each position on the main surface of the printed circuit board belongs to any one of a plurality of area types including the plating area, the first SR area, the second SR area, the screen area, and the like.

圖5的例子係包含表示鍍覆區域之區域61以及表示SR區域之區域62,區域62係包含表示第一SR區域之區域621以及表示第二SR區域之區域622。以下的說明中,區域61、62、621、622同樣稱為「鍍覆區域61」、「SR區域62」、「第一SR區域621」以及「第二SR區域622」。對於印刷基板的其他種類的區域亦利用相同的名稱來稱呼拍攝圖像的對應區域。The example of FIG. 5 includes an area 61 representing a plating area and an area 62 representing an SR area. The area 62 includes an area 621 representing a first SR area and an area 622 representing a second SR area. In the following description, the regions 61, 62, 621, and 622 are also referred to as the "plating region 61", the "SR region 62", the "first SR region 621", and the "second SR region 622". The same names are also used for other types of areas on the printed circuit board to refer to the corresponding areas of the captured image.

在檢查裝置2的缺陷檢測部中,例如藉由參照設計資料(CAM(computer-aided manufacturing;電腦輔助製造)資料等),特定出拍攝圖像的各個位置所隸屬的區域類型。而且,於各個區域類型設定了各個顏色成分的色調值的正常範圍。在拍攝圖像中,對於各個位置的色調值按照每種顏色成分來與正常範圍進行比較,檢測出正常範圍以外的像素的集合作為缺陷區域。在圖5的例子中,第一SR區域621中存在比周圍暗的區域71,該區域71即為觀察拍攝圖像的操作者所識別出的缺陷區域71。在圖6中以虛線表示被檢查裝置2作為缺陷檢測出的區域72(以下稱為「檢測區域72」)的外緣。在圖6的例子中,檢測區域72係與缺陷區域71大致一致。In the defect detection unit of the inspection device 2, the area type to which each position of the captured image belongs is specified by referring to design data (CAM (computer-aided manufacturing) data, etc.), for example. Furthermore, the normal range of the hue value of each color component is set for each area type. In the captured image, the hue 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 defective area. In the example of FIG. 5 , there is an area 71 darker than the surrounding area in the first SR area 621 , and this area 71 is the defective area 71 recognized by the operator who observes the captured image. In FIG. 6 , the outer edge of the area 72 (hereinafter referred to as the “detection area 72”) detected as a defect by the inspection device 2 is indicated by a dotted line. In the example of FIG. 6 , the detection area 72 substantially coincides with the defective area 71 .

檢查裝置2中,當檢測到缺陷時,獲得包含檢測區域72之預定尺寸的圖像作為缺陷圖像。而且,獲得表示缺陷圖像中之檢測區域72的位置以及形狀(包括大小)的缺陷資訊。再者,在缺陷的檢測中,可使用各種周知的方法(檢查邏輯等),亦可根據各種區域類型使用不同方法。In the inspection device 2, when a defect is detected, an image of a predetermined size including the detection area 72 is obtained as a defect image. Furthermore, defect information indicating the position and shape (including size) of the detection area 72 in the defect image is obtained. Furthermore, in the detection of defects, various well-known methods (inspection logic, etc.) can be used, and different methods can also be used according to various area types.

開始生成教師資料時,預先藉由檢查裝置2從複數個印刷基板所對應的複數個拍攝圖像獲得複數個缺陷圖像。該複數個缺陷圖像為相同的的尺寸(缺陷塊尺寸),且表示印刷基板中大小相同的區域。而且,各個缺陷圖像與表示檢測區域72的位置以及形狀之缺陷資訊相關聯。在圖4的步驟S11中,圖像接受部41係接受複數個缺陷圖像以及該複數個缺陷圖像的缺陷資訊。例如,複數個缺陷圖像的缺陷資訊係以與複數個缺陷圖像分別相關聯的狀態而包含在一個清單中。When starting to generate the teaching data, the inspection device 2 obtains a plurality of defect images from a plurality of photographed images corresponding to a plurality of printed circuit boards in advance. The plurality of defect images have the same size (defect block size) and represent areas of the same size in the printed circuit board. Furthermore, 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 receiving unit 41 receives a plurality of defect images and defect information of the plurality of defect images. For example, the defect information of a plurality of defect images is included in a list in a state of being respectively associated with the plurality of defect images.

接著,在剪切圖像生成部42中,從各個缺陷圖像中剪切出包含檢測區域72的區域作為剪切圖像(步驟S12)。在圖6的例子中,如圖7所示,剪切出檢測區域72的外接矩形73(圖7中以虛線表示)的區域作為剪切圖像。外接矩形73的各個邊係與缺陷圖像的上下方向(行(column)方向)或者左右方向(列(row)方向)平行。藉由剪切圖像生成部42的設計,亦可剪切出針對檢測區域72可設定的最小外接矩形(各個邊亦可傾斜於上下方向以及左右方向)的區域作為剪切圖像。Next, in the cutout image generating unit 42, a region including the detection region 72 is cut out from each defect image as a cutout image (step S12). In the example of FIG. 6 , as shown in FIG. 7 , the area surrounding the rectangle 73 (indicated by a dotted line in FIG. 7 ) of the detection area 72 is cut out as a cutout image. Each side of the circumscribed rectangle 73 is parallel to the up-down direction (column direction) or the left-right direction (row direction) of the defect image. Through the design of the cutout image generating unit 42, an area of the minimum circumscribed rectangle that can be set for the detection area 72 (each side may be inclined in the up-down direction and the left-right direction) can be cut out as a cutout image.

而且,藉由顯示控制部43使顯示器35上顯示缺陷圖像(步驟S13)。顯示器35上顯示的圖像亦可為缺陷圖像的整體或者一部分的任一種。例如,可顯示缺陷圖像的剪切圖像,亦可顯示使剪切圖像以預定的像素數擴大後的圖像,亦即亦可顯示包含檢測區域72以及檢測區域72的周圍的圖像。如此,顯示控制部43係使顯示器35上顯示缺陷圖像的至少一部分。在一例中,在顯示器35上的視窗內排列顯示出複數個缺陷圖像的縮圖(thumbnail),當操作者經由輸入部36選擇一個缺陷圖像的縮圖後,顯示器35上顯示出該缺陷圖像(以下稱為「選擇缺陷圖像」)的至少一部分。顯示器35上顯示的缺陷圖像亦可採用各種周知的方法來選擇。Then, the display control unit 43 displays the defect image on the display 35 (step S13). The image displayed on the display 35 may be the entire defect image or a part thereof. For example, a cropped image of the defect image may be displayed, an image in which the cropped image is enlarged by a predetermined number of pixels may be displayed, that is, an image including the detection area 72 and the surroundings of the detection area 72 may be displayed. . In this way, the display control unit 43 causes the display 35 to display at least a part of the defect image. In one example, a plurality of thumbnails of defect images are arranged and displayed in a window on the display 35. When the operator selects a thumbnail of a defect image through the input unit 36, the defect is displayed on the display 35. At least a portion of the image (hereinafter referred to as the "selected defect image"). The defect image displayed on the display 35 can also be selected using various well-known methods.

在判定結果接受部44中,接受操作者針對顯示器35上顯示的選擇缺陷圖像所輸入的真缺陷或者偽缺陷的判定結果(步驟S14)。在一例中,在顯示器35上的視窗內除了選擇缺陷圖像之外,還設有表示「真缺陷」的按鈕以及表示「偽缺陷」的按鈕。操作者係對選擇缺陷圖像進行確認,並經由輸入部36選擇任一個按鈕,藉此輸入表示選擇缺陷圖像所表現的缺陷為真缺陷還是偽缺陷的判定結果。該判定結果的輸入係被判定結果接受部44接受。操作者輸入判定結果時,可採用各種周知的方法。The determination result accepting unit 44 accepts the determination result of a real defect or a pseudo defect input by the operator with respect to the selected defect image displayed on the display 35 (step S14). In one example, in addition to selecting the defect image, the window on the display 35 is also provided with a button indicating "real defect" and a button indicating "pseudo defect". The operator confirms the selected defect image and selects any button through the input unit 36 to input a determination result indicating whether the defect represented by the selected defect image is a real defect or a pseudo defect. The input of the determination result is accepted by the determination result accepting unit 44 . When the operator inputs the judgment result, various well-known methods can be used.

在教師資料生成部45中,對剪切圖像標記判定結果,藉此生成教師資料(步驟S15)。教師資料為包含從缺陷圖像所得的剪切圖像以及操作者對該缺陷圖像的判定結果之資料。教師資料亦可包含缺陷圖像。實際上,由操作者輸入對於複數個缺陷圖像的判定結果並生成複數個教師資料。藉由以上操作,完成教師資料生成處理,獲得複數個教師資料(學習用資料組)。In the teacher material generation unit 45, the cut image is marked with the determination result, thereby generating teacher materials (step S15). The teacher data is data including a cutout image obtained from the defect image and the operator's judgment result of the defect image. Teacher materials may also contain images of defects. In fact, the operator inputs the judgment results for a plurality of defect images and generates a plurality of teacher materials. Through the above operations, the teacher data generation process is completed, and a plurality of teacher data (learning data sets) are obtained.

生成複數個教師資料後,在圖1的學習部51中進行機械學習以使分類器對於複數個教師資料中的剪切圖像的輸入所作的輸出與複數個教師資料所顯示的判定結果(真缺陷或者偽缺陷)大致相同,並生成分類器。分類器為學習完畢模型,用以將圖像所表現的缺陷分類為真缺陷或者偽缺陷;在分類器的生成過程中,決定分類器包含的參數值、分類器的構造。機械學習係例如藉由利用類神經網路(neural network)的深度學習(deep learning)而進行。該機械學習亦可藉由深度學習以外的周知的方法而進行。分類器(實際上為參數值或者表示分類器構造的資訊)係被傳輸並導入至分類器52。After the plurality of teacher materials are generated, mechanical learning is performed in the learning unit 51 in FIG. defects or pseudo-defects) and generate a classifier. The classifier is a learned model that is used to classify the defects represented by the image into real defects or pseudo defects; in the generation process of the classifier, the parameter values contained in the classifier and the structure of the classifier are determined. Machine learning is performed, for example, by deep learning using a neural network. This machine learning can also be performed by well-known methods other than deep learning. The classifier (actually parameter values or information representing the construction of the classifier) is transferred and imported into the classifier 52 .

當檢查系統1檢查印刷基板時,在檢查裝置2中獲得表示印刷基板的複數個位置的複數個拍攝圖像,並檢查複數個拍攝圖像中有無缺陷。當檢測到缺陷時,將包含檢測區域72之預定尺寸的圖像作為缺陷圖像輸出至分類器52。在分類器52中,缺陷圖像所表現的缺陷被分類為真缺陷或者偽缺陷,且分類結果被記憶或者輸出至外部。在較佳的檢查系統1中,在電腦3的剪切圖像生成部42中,與生成教師資料時同樣地將缺陷圖像中之檢測區域72的外接矩形73的區域剪切為剪切圖像,且該剪切圖像被輸入至分類器52。藉此,在分類器52中能以更高的精度對於缺陷圖像所表現的缺陷為真缺陷還是偽缺陷進行分類。When the inspection system 1 inspects a printed circuit board, the inspection device 2 obtains a plurality of photographed images representing a plurality of positions of the printed circuit board, and inspects the plurality of photographed images for defects. 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. In the classifier 52, the defects represented by the defect images are classified as real defects or pseudo defects, and the classification results are memorized or output to the outside. In the preferred inspection system 1, in the cutout image generating unit 42 of the computer 3, the area of the circumscribed rectangle 73 of the detection area 72 in the defect image is cut into a cutout image in the same manner as when the teacher material is generated. image, and the cropped image is input to the classifier 52. Thereby, the classifier 52 can classify whether the defect represented by the defect image is a real defect or a pseudo defect with higher accuracy.

此處,對於生成教師資料的比較例的處理進行說明。圖8A以及圖8B係表示缺陷圖像的圖,包含缺陷區域71。在圖8A以及圖8B中,對於缺陷區域71標注著間隔比SR區域62中的間隔還窄的平行斜線,缺陷區域71係與由檢查裝置2獲得的檢測區域大致一致。再者,在圖8B的例子中,檢測到複數個缺陷部分區域711的集合作為一個缺陷區域71。Here, a comparative example of processing for generating teacher data will be described. 8A and 8B are diagrams showing defective images, including the defective area 71. In FIGS. 8A and 8B , the defective region 71 is marked with parallel diagonal lines having a narrower interval than the intervals in the SR region 62 , and the defective region 71 substantially coincides with the detection region obtained by the inspection device 2 . Furthermore, in the example of FIG. 8B , a set of a plurality of defective partial areas 711 is detected as one defective area 71 .

在第一比較例的處理中,使用整個缺陷圖像作為教師資料的圖像。如圖8A以及圖8B所示,由於通常缺陷圖像係表示明顯大於缺陷區域71的區域,因此在第一比較例中缺陷區域71以外的多餘區域的特徵亦用於學習部51的學習中。換而言之,由於教師資料的圖像並未有效地表示缺陷區域71(檢測區域)的特徵,故而分類器的分類精度降低。In the processing of the first comparative example, the entire defect image is used as the image of the teacher's material. As shown in FIGS. 8A and 8B , since the defect image usually represents an area significantly larger than the defective area 71 , in the first comparative example, the features of the extra area other than the defective area 71 are also used in the learning of the learning unit 51 . In other words, since the image of the teacher's material does not effectively represent the characteristics of the defective area 71 (detection area), the classification accuracy of the classifier is reduced.

在第二比較例的處理中,缺陷圖像中的包含缺陷區域71之固定尺寸的區域被剪切並用作教師資料的圖像。在圖8A以及圖8B中,以二點鏈線表示第二比較例中從缺陷圖像中剪切出的剪切區域A1。剪切區域A1的尺寸係例如憑經驗而決定。在第二比較例中,雖然教師資料的圖像(剪切區域A1的圖像)中的缺陷區域71以外的多餘區域係比第一比較例中減少,但仍存在一定程度。而且,如圖8B的例子所示,由於缺陷區域71較大時會從剪切區域A1伸出,因此教師資料的圖像無法表示缺陷區域71(檢測區域)的全部特徵。In the process of the second comparative example, a fixed-size area including the defect area 71 in the defect image is cut out and used as an image of the teacher material. In FIGS. 8A and 8B , the clipping area A1 clipped from the defect image in the second comparative example is represented by a two-dot chain line. The size of the shearing area A1 is determined empirically, for example. In the second comparative example, although the redundant area other than the defective area 71 in the image of the teacher material (image of the cropping area A1) is smaller than in the first comparative example, it still exists to a certain extent. Furthermore, as shown in the example of FIG. 8B , since the defective area 71 protrudes from the cropping area A1 if it is large, the image of the teacher's material cannot express all the features of the defective area 71 (detection area).

進一步地,在第一比較例以及第二比較例中,當要提高分類器的分類精度時需要大量教師資料,從而操作者對缺陷圖像的判定結果的輸入次數(注解次數)會增加。有時,即便使用大量教師資料亦無法生成高精度的分類器。Furthermore, in the first comparative example and the second comparative example, a large amount of teacher materials are required to improve the classification accuracy of the classifier, so the number of times the operator inputs the judgment results of the defect image (the number of annotations) increases. Sometimes it is not possible to generate a highly accurate classifier even with large amounts of teacher data.

相對於此,在圖3的教師資料生成裝置4中,由檢查裝置2輸入包含缺陷的檢測區域72之預定尺寸的缺陷圖像以及表示該缺陷圖像中檢測區域72的位置以及形狀的缺陷資訊,且由圖像接受部41接受該缺陷圖像以及該缺陷資訊。在剪切圖像生成部42中,基於缺陷資訊從缺陷圖像中剪切出包含檢測區域72的區域作為剪切圖像。而且,藉由顯示控制部43使顯示器35上顯示缺陷圖像的至少一部分,且由判定結果接受部44接受操作者針對顯示的缺陷圖像所輸入的真缺陷或者偽缺陷的判定結果。並且,藉由教師資料生成部45對剪切圖像標記該判定結果並生成教師資料。In contrast, in the teaching material generating device 4 of FIG. 3 , the inspection device 2 inputs a defect image of a predetermined size including the detection area 72 of the defect and defect information indicating the position and shape of the detection area 72 in the defect image. , and the image receiving unit 41 receives the defect image and the defect information. In the cutout image generating unit 42, a region including the detection area 72 is cut out from the defect image as a cutout image based on the defect information. Then, the display control unit 43 displays at least part of the defect image on the display 35 , and the determination result accepting unit 44 accepts a determination result of a real defect or a pseudo defect input by the operator with respect to the displayed defect image. Then, the teacher material generating unit 45 marks the judgment result on the cutout image and generates teacher material.

藉此,能容易生成包含減少了缺陷區域71以外的多餘區域的圖像(剪切圖像)之教師資料。而且,在該圖像中表現出缺陷區域71的大致全部特徵。如此,藉由使用有效表示缺陷區域71的特徵的教師資料,能利用較少的教師資料生成高精度的學習完畢模型(分類器52),且亦能減少操作者的注解次數。再者,在圖8A以及圖8B中以虛線表示作為剪切圖像剪切出的檢測區域的外接矩形73。This makes it possible to easily generate teacher materials including an image (cropped image) in which redundant areas other than the defective area 71 are reduced. Furthermore, substantially all the characteristics of the defective area 71 are expressed in this image. In this way, by using teacher data that effectively expresses the characteristics of the defect area 71, a highly accurate learned model (classifier 52) can be generated using less teacher data, and the number of annotations by the operator can also be reduced. In addition, in FIGS. 8A and 8B , the circumscribed rectangle 73 of the detection area cut out as the cutout image is indicated by a dotted line.

(第二實施形態) 接著,對本發明的第二實施形態中的教師資料生成處理進行說明。圖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, the teacher material generation process in the second embodiment of the present invention will be described. FIG. 9 is a diagram showing a defect image, and shows an example in which the defective area 71 exists on the plating area 61 . In FIG. 9 , the defective region 71 is marked with parallel diagonal lines whose intervals are narrower than the intervals of the SR regions 62 (the same applies to FIGS. 11 to 14 to be described later). FIG. 10 is an enlarged view showing the vicinity of the defective area 71, and the detection area 72 obtained by the inspection device 2 is completely blackened (the same applies to FIGS. 12 to 14 to be described later). When there is a defective area 71 on the plating area 61, the outer edge of the detection area 72 is often roughly consistent with the outer edge of the defective area 71 identified by the operator observing the defect image. In Figure 10, the entire detection area 72 system It substantially overlaps with the entire defective area 71 .

圖11係表示缺陷圖像的圖,表示於SR區域62上存在缺陷區域71的例子。圖12係將缺陷區域71附近放大表示的圖,圖中檢測到複數個檢測部分區域721的集合作為一個檢測區域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 defective area 71 exists on the SR area 62 . FIG. 12 is an enlarged view showing the vicinity of the defective area 71. In the figure, a set of a plurality of detection partial areas 721 is detected as one detection area 72. In FIGS. 11 and 12 , the outer edge of the defective region 71 is indicated by a dotted line, and the outer edge of the defective region 71 (that is, the boundary with the surroundings) is not clear (the same applies to FIG. 14 to be described later). When there is a defective area 71 on the SR area 62, the outer edge of the detection area 72 is often smaller than the outer edge of the defective area 71 recognized by the operator observing the defect image. In FIG. 12, the detection area 72 is different from the defective area 71. parts overlap. Furthermore, the defect detection methods in the plating area 61 and the SR area 62 may also be different.

如上文所述,印刷基板的主表面上的各個位置係隸屬於複數個區域類型中的一個區域類型,檢查裝置2中亦指定了拍攝圖像中的各個位置所隸屬的區域類型。在本處理例中的檢查裝置2中,當檢測到缺陷時生成表示檢測區域72所隸屬的區域類型之區域類型資訊,且將該區域類型資訊包含於缺陷資訊中。As described above, each position on the main surface of the printed circuit board belongs to one of a plurality of area types, and the inspection device 2 also specifies the area type to which each position in the captured image belongs. In the inspection device 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 the area type information is included in the defect information.

在教師資料生成裝置4生成教師資料的過程中,在圖像接受部41中從檢查裝置2接受缺陷圖像以及缺陷資訊(圖4:步驟S11)。如上文所述,缺陷資訊係不僅包含缺陷圖像中之檢測區域72的位置以及形狀,還包含區域類型資訊。在剪切圖像生成部42中,根據檢測區域72所隸屬的區域類型,剪切出使該檢測區域72的外接矩形向上下左右擴展後所得的區域作為剪切圖像(步驟S12)。While the teacher material generating device 4 is generating the teacher material, the image receiving unit 41 receives the defect image and defect information from the inspection device 2 (Fig. 4: step S11). As mentioned above, the defect information not only includes the position and shape of the detection area 72 in the defect image, but also includes area type information. In the cutout image generating unit 42, based on the area type to which the detection area 72 belongs, a region obtained by extending the circumscribed rectangle of the detection area 72 up, down, left, and right is cut out as a cutout image (step S12).

具體而言,將使外接矩形向上下左右擴展的像素數(為自然數,以下同樣)作為擴展量,且預先對複數個區域類型分別設定擴展量,且將該擴展量記憶於剪切圖像生成部42中作準備。如上文所述,由於鍍覆區域61上的檢測區域72的外緣係往往與缺陷區域71的外緣大致一致,因此鍍覆區域61的擴展量被設為較小的像素數(例如,0像素至5像素)。因此,在檢測區域72隸屬於鍍覆區域61的圖10的例子中,如圖13所示剪切出檢測區域72的外接矩形73(圖13中以虛線表示)的區域或者使該區域略微擴展後所得的區域作為剪切圖像。該剪切圖像係包含大致整個缺陷區域71。Specifically, the number of pixels (which is a natural number, the same applies below) that will expand the circumscribed rectangle up, down, left, and right is used as the expansion amount, and the expansion amount is set in advance for each of the plurality of area types, and the expansion amount is stored in the cutout image. Prepared in the generation unit 42. As mentioned above, since the outer edge of the detection area 72 on the plating area 61 is often substantially consistent with the outer edge of the defect area 71, the expansion amount of the plating area 61 is set to a smaller number of pixels (for example, 0 pixels to 5 pixels). Therefore, in the example of FIG. 10 in which the detection area 72 belongs to the plating area 61 , as shown in FIG. 13 , the area of the circumscribing rectangle 73 (indicated by a dotted line in FIG. 13 ) of the detection area 72 is cut out or slightly expanded. The resulting area is used as a cropped image. This cropped image includes substantially the entire defective 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以擴展量擴展後所得的區域的外接矩形相同。Furthermore, since the outer edge of the detection area 72 on the SR area 62 is often smaller than the outer edge of the defect area 71, the expansion amount of the SR area 62 is set to a smaller number of pixels (for example, 10 to 20 pixels). Therefore, in the example of FIG. 12 in which the detection area 72 belongs to the SR area 62, the area 74 obtained by expanding the circumscribing rectangle 73 of the detection area 72 by the expansion amount is cut out as a cutout image as shown in FIG. 14 . In FIG. 14 , the enclosing rectangle 73 and the area 74 are represented by dotted lines. The cropped image (ie, area 74 ) includes substantially the entire defective area 71 . Furthermore, the area 74 obtained by expanding the circumscribed rectangle 73 of the detection area 72 by the expansion amount is the same as the area 74 obtained by expanding the detection area 72 by the expansion amount.

在教師資料生成裝置4中,當顯示器35上顯示選擇缺陷圖像後(步驟S13),由操作者針對選擇缺陷圖像輸入真缺陷或者偽缺陷的判定結果且接受該輸入(步驟S14)。並且,對剪切圖像標記判定結果,藉此生成教師資料(步驟S15)。之後,與上述的處理例同樣地,利用複數個教師資料生成分類器52。In the teaching material generating device 4, after the selected defect image is displayed on the display 35 (step S13), the operator inputs a determination result of a true defect or a pseudo defect with respect to the selected defect image and accepts the input (step S14). Then, the cut image is marked with the judgment result, thereby generating teacher materials (step S15). Thereafter, a classifier 52 is generated using a plurality of teacher materials, in the same manner as in the above-described processing example.

在檢查系統1對印刷基板的檢查中,當檢查裝置2檢測到缺陷時,將包含檢測區域72之預定尺寸的圖像作為缺陷圖像輸出至電腦3,且獲得分類器52的分類結果。在較佳的檢查系統1中,與生成教師資料時同樣,根據檢測區域72所隸屬的區域類型剪切出使該檢測區域72的外接矩形73向上下左右擴展後所得的區域作為剪切圖像,且將該剪切圖像輸入至分類器52。藉此,在分類器52中能以更高的精度對於缺陷圖像所表現的缺陷為真缺陷還是偽缺陷進行分類。When the inspection device 2 detects a defect during the inspection of the printed circuit board by the inspection system 1, 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 of the classifier 52 is obtained. In the preferred inspection system 1, similarly to the generation of teacher materials, an area obtained by extending the circumscribed rectangle 73 of the detection area 72 up, down, left, and right is cut out according to the area type to which the detection area 72 belongs as a cutout image. , and input the cut image to the classifier 52. Thereby, the classifier 52 can classify whether the defect represented by the defect image is a real defect or a pseudo defect with higher accuracy.

如上所述,在本處理例中,表示檢測區域72所隸屬的區域類型的區域類型資訊係包含於缺陷資訊中。在剪切圖像生成部42中,記憶有針對各個區域類型所設定的擴展量,並將按照利用區域類型資訊所特定的擴展量使檢測區域72擴展後所得的區域包含於剪切圖像中。藉此,能獲得表示大致整個缺陷區域71的較佳的剪切圖像,能生成高精度的學習完畢模型(分類器52)。在印刷基板中,由於鍍覆區域以及SR區域佔據了大部分,因此從獲得較佳的剪切圖像的觀點出發,較佳為上述複數個區域類型係至少包含鍍覆區域以及阻焊劑區域。As described above, in this processing example, the area type information indicating the area type to which the detection area 72 belongs is included in the defect information. The cutout image generating unit 42 stores the expansion amount set for each area type, and includes in the cutout image a region obtained by expanding the detection area 72 according to the expansion amount specified using the area type information. . Thereby, a preferable cropped image representing substantially the entire defect area 71 can be obtained, and a highly accurate learned model (classifier 52) can be generated. In the printed circuit board, since the plated area and the SR area occupy the majority, from the viewpoint of obtaining a better shear image, it is preferable that the plurality of area types include at least the plated area and the solder resist area.

(第三實施形態) 接著,對本發明的第三實施形態中的教師資料生成處理進行說明。圖15係表示整個印刷基板9的圖。在製造過程中的印刷基板9中包含有最終成品中會被除去的部分亦即廢棄基板區域92。在圖15中,對於廢棄基板區域92標注著平行斜線。圖16係將圖15的印刷基板9中以虛線包圍的部分B1放大表示的圖,且以粗虛線包圍廢棄基板區域92。如圖16所示,在印刷基板9中存在緊密地排列有小的鍍覆區域或者設有細的配線圖案的區域91(圖16中以細虛線包圍的區域)。 (Third embodiment) Next, the teacher material generation process in the third embodiment of the present invention will be described. FIG. 15 is a diagram showing the entire printed circuit board 9 . The printed circuit board 9 during the manufacturing process includes a portion that will be removed from the final product, that is, a waste substrate area 92 . In FIG. 15 , the discarded substrate area 92 is marked with parallel diagonal lines. FIG. 16 is an enlarged view of the portion B1 surrounded by a dotted line in the printed circuit board 9 of FIG. 15 , and the discarded substrate area 92 is surrounded by a thick dotted line. As shown in FIG. 16 , the printed circuit board 9 has a region 91 (a region surrounded by a thin dotted line in FIG. 16 ) in which small plating regions or fine wiring patterns are closely arranged.

由於區域91內存在的缺陷會大大影響印刷基板9的動作,因此在本處理例中的檢查裝置2中對區域91設定的檢查感度比其他區域嚴格。以下,將區域91稱為「第一感度設定區域91」。另一方面,由於上文所述的廢棄基板區域92中存在的缺陷幾乎不會影響印刷基板9的動作,因此對於廢棄基板區域92設定的檢查感度比其他區域寬鬆。以下,將廢棄基板區域92稱為「第二感度設定區域92」。而且,於第一感度設定區域91以及第二感度設定區域92以外的區域93中設定有中間檢查感度。以下,將區域93稱為「第三感度設定區域93」。Since defects present in the area 91 will greatly affect the operation of the printed circuit board 9 , the inspection sensitivity set for the area 91 in the inspection device 2 in this processing example is stricter than that for other areas. Hereinafter, the area 91 is referred to as the "first sensitivity setting area 91". On the other hand, since the defects existing in the waste substrate area 92 described above hardly affect the operation of the printed circuit board 9 , the inspection sensitivity set for the waste substrate area 92 is looser than that of other areas. Hereinafter, the discarded substrate area 92 is referred to as the "second sensitivity setting area 92". Furthermore, an intermediate inspection sensitivity is set in an area 93 other than the first sensitivity setting area 91 and the second sensitivity setting area 92 . Hereinafter, the area 93 is referred to as the "third sensitivity setting area 93".

如此,於印刷基板9的各個位置上設定有複數個檢查感度中的任一個檢查感度。在檢查裝置2中,在將拍攝圖像的各個位置的色調值與正常範圍相比較的上述例子中,檢查感度為正常範圍的寬度。在第一感度設定區域91中設定的正常範圍係比其他區域還窄,在第二感度設定區域92中設定的正常範圍係比其他區域還寬。如上文所述,在缺陷的檢測中可採用各種方法,檢查感度的設定方式係根據缺陷的檢測方法而適當變更。In this way, any one of the plurality of inspection sensitivities is set at each position of the printed circuit board 9 . In the inspection device 2 , in the above-described example in which the hue value at each position of the captured image is compared with the normal range, the inspection sensitivity is the width of the normal range. The normal range set in the first sensitivity setting area 91 is narrower than other areas, and the normal range set in the second sensitivity setting area 92 is wider than other areas. As mentioned above, various methods can be used for defect detection, and the setting method of the inspection sensitivity is appropriately changed according to the defect detection method.

在檢查裝置2中,例如藉由參照設計資料(CAM資料等)而特定拍攝圖像中的各個位置隸屬於第一感度設定區域91、第二感度設定區域92以及第三感度設定區域93中的哪一個區域,獲得應比較的正常範圍。並且,將該位置的色調值與該正常範圍進行比較,獲得正常範圍以外的像素的集合作為檢測區域72。在檢查裝置2中,檢查感度資訊係包含於上文所述的缺陷資訊中。檢查感度資訊為可特定出檢測區域72的檢測中所使用的檢查感度之資訊,本處理例中的檢查感度資訊為用以表示第一感度設定區域91、第二感度設定區域92以及第三感度設定區域93中之任一區域之資訊。In the inspection device 2, for example, by referring to design data (CAM data, etc.), it is specified that each position in the captured image belongs to the first sensitivity setting area 91, the second sensitivity setting area 92, and the third sensitivity setting area 93. Which area, to obtain the normal range should be compared. Then, the hue value at the position is compared with the normal range, and a set of pixels outside the normal range is obtained as the detection area 72 . In the inspection device 2, the inspection sensitivity information is included in the defect information described above. The inspection sensitivity information is information that can specify the inspection sensitivity used in the detection of the detection area 72. In this processing example, the inspection sensitivity information is used to indicate the first sensitivity setting area 91, the second sensitivity setting area 92, and the third sensitivity. Set the information of any area in area 93.

在教師資料生成裝置4生成教師資料的過程中,在圖像接受部41中從檢查裝置2接受缺陷圖像以及缺陷資訊(圖4:步驟S11)。如上文所述,缺陷資訊係不僅包含缺陷圖像中之檢測區域72的位置以及形狀,還包含檢查感度資訊。在剪切圖像生成部42中,根據檢測區域72的檢測中所使用的檢查感度,剪切出使該檢測區域72的外接矩形73向上下左右擴展後所得的區域作為剪切圖像(步驟S12)。While the teacher material generating device 4 is generating the teacher material, the image receiving unit 41 receives the defect image and defect information from the inspection device 2 (Fig. 4: step S11). As mentioned above, the defect information not only includes the position and shape of the detection area 72 in the defect image, but also includes inspection sensitivity information. In the cutout image generating unit 42 , based on the inspection sensitivity used for detecting the detection area 72 , an area in which the circumscribed rectangle 73 of the detection area 72 is expanded vertically, downwardly, leftward, and right is cut out as a cutout image (step S12).

具體而言,將使外接矩形73向上下左右擴展的像素數作為擴展量,預先對複數個檢查感度分別設定擴展量,且將該擴展量記憶於剪切圖像生成部42中作準備。在最寬鬆的檢查感度下(亦即檢測區域72位於第二感度設定區域92時),由於檢測區域72的外緣係往往小於缺陷區域71的外緣,因此擴展量被設為較大的像素數α(例如8像素至12像素)。在最嚴格的檢查感度下(亦即檢測區域72位於第一感度設定區域91時),由於檢測區域72的外緣係往往與缺陷區域71的外緣大致一致,因此擴展量設為較小的像素數β(例如0像素至3像素)。在中間檢查感度下(亦即,檢測區域72位於第三感度設定區域93時),由於檢測區域72的外緣係往往略小於缺陷區域71的外緣,因此擴展量被設為處於檢查感度最寬鬆時的像素數與檢查感度最嚴格時的像素數之間的像素數γ(例如4像素至7像素)。Specifically, the number of pixels by which the circumscribed rectangle 73 is expanded up, down, left, and right is used as the expansion amount. The expansion amount is set in advance for each of the plurality of inspection sensitivities, and the expansion amount is stored in the cutout image generating unit 42 for preparation. Under the loosest inspection sensitivity (that is, when the detection area 72 is located in the second sensitivity setting area 92), since the outer edge of the detection area 72 is often smaller than the outer edge of the defect area 71, the expansion amount is set to a larger pixel. number α (e.g. 8 pixels to 12 pixels). Under the most stringent inspection sensitivity (that is, when the detection area 72 is located in the first sensitivity setting area 91), since the outer edge of the detection area 72 is often roughly consistent with the outer edge of the defect area 71, the expansion amount is set to be small. Number of pixels β (e.g. 0 pixels to 3 pixels). At the intermediate inspection sensitivity (that is, when the detection area 72 is located in the third sensitivity setting area 93), since the outer edge of the detection area 72 is often slightly smaller than the outer edge of the defect area 71, the expansion amount is set to be at the maximum inspection sensitivity. The number of pixels γ between the number of pixels when the inspection sensitivity is relaxed and the number of pixels when the inspection sensitivity is the most stringent (for example, 4 pixels to 7 pixels).

如上所述,檢查感度最寬鬆時的擴展量最大,檢查感度最嚴格時的擴展量最小。換而言之,滿足α>γ>β。結果,檢測區域72的外接矩形73以擴展量擴展後所得的區域亦即剪切圖像係包含大致整個缺陷區域71。As mentioned 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 expanding the circumscribed rectangle 73 of the detection area 72 by the expansion amount, that is, the cropped image includes substantially the entire defect area 71 .

在教師資料生成裝置4中,在顯示器35上顯示選擇缺陷圖像之後(步驟S13),由操作者針對選擇缺陷圖像輸入真缺陷或者偽缺陷的判定結果且接受該輸入(步驟S14)。並且,藉由對於剪切圖像標記判定結果生成教師資料(步驟S15)。之後,與上述的處理例同樣地,利用複數個教師資料生成分類器52。In the teaching material generating device 4, after the selected defect image is displayed on the display 35 (step S13), the operator inputs a determination result of a true defect or a pseudo defect with respect to the selected defect image and accepts the input (step S14). Furthermore, teacher data is generated by marking the judgment result on the cut image (step S15). Thereafter, a classifier 52 is generated using a plurality of teacher materials, in the same manner as in the above-described processing example.

在檢查系統1對印刷基板進行檢查的過程中,當檢查裝置2檢測到缺陷時,將包含檢測區域72之預定尺寸的圖像作為缺陷圖像輸出至電腦3且獲得分類器52的分類結果。在較佳的檢查系統1中,與生成教師資料時同樣地,根據檢測區域72的檢測中所使用的檢查感度剪切出使該檢測區域72的外接矩形73向上下左右擴展後所得的區域作為剪切圖像,且將該剪切圖像輸入至分類器52。藉此,在分類器52中能以更高的精度對於缺陷圖像所表現的缺陷為真缺陷還是偽缺陷進行分類。When the inspection device 2 detects a defect while the inspection system 1 inspects the printed circuit board, an image of a predetermined size including the detection area 72 is output to the computer 3 as a defect image and a classification result of the classifier 52 is obtained. In the preferred inspection system 1, similarly to the generation of teacher materials, an area obtained by extending the circumscribed rectangle 73 of the detection area 72 up, down, left, and right is cut out based on the inspection sensitivity used for detection. The image is cropped, and the cropped image is input to the classifier 52 . Thereby, the classifier 52 can classify whether the defect represented by the defect image is a real defect or a pseudo defect with higher accuracy.

如上所述,本處理例中,對於印刷基板的各個位置設定有複數個檢查感度中的一個檢查感度,且表示檢測區域72的檢測中所使用的檢查感度的檢查感度資訊係包含於缺陷資訊中。在剪切圖像生成部42中,記憶著針對各個檢查感度設定的擴展量,並將按照利用檢查感度資訊所特定的擴展量使檢測區域72擴展後所得的區域包含於剪切圖像中。藉此,能獲得表示大致整個缺陷區域71的較佳的剪切圖像,能生成高精度的學習完畢模型(分類器52)。As described above, in this processing example, one of a plurality of inspection sensitivities is set for each position of the printed circuit board, and the inspection sensitivity information indicating the inspection sensitivity used for detection of the detection area 72 is included in the defect information. . The cutout image generating unit 42 memorizes the expansion amount set for each inspection sensitivity, and includes in the cutout image a region obtained by expanding the detection area 72 according to the expansion amount specified using the inspection sensitivity information. Thereby, a preferable cropped image representing substantially the entire defect area 71 can be obtained, and a highly accurate learned model (classifier 52) can be generated.

(第四實施形態) 接著,對本發明的第四實施形態中的教師資料生成處理進行說明。如上文所述,印刷基板的主表面上的各個位置係隸屬於複數個區域類型中的一個區域類型。在檢查裝置2中,當檢測到缺陷時,生成表示檢測區域72所隸屬的區域類型的區域類型資訊且將該區域類型資訊包含於該缺陷資訊中。 (Fourth Embodiment) Next, the teacher material generation process in the fourth embodiment of the present invention will be described. As mentioned above, each position on the main surface of the printed substrate belongs to one of a plurality of area types. In the inspection device 2, when a defect is detected, area type information indicating the area type to which the detection area 72 belongs is generated and the area type information is included in the defect information.

本處理例中的圖4的步驟S11至步驟S14係與上述第一實施形態相同。在步驟S12中,亦可與第二實施形態同樣地,根據檢測區域72所隸屬的區域類型剪切出使該檢測區域72的外接矩形73向上下左右擴展後所得的區域作為剪切圖像。而且,亦可與第三實施形態同樣地,根據檢測區域72的檢測中所使用的檢查感度,剪切出使該檢測區域72的外接矩形73向上下左右擴展後所得的區域作為剪切圖像。Steps S11 to S14 in FIG. 4 in this processing example are the same as those in the above-described first embodiment. In step S12 , similarly to the second embodiment, a region obtained by extending the circumscribed rectangle 73 of the detection region 72 up, down, left, and right may be cut out according to the region type to which the detection region 72 belongs as a cropped image. Furthermore, like the third embodiment, an area obtained by extending the circumscribed rectangle 73 of the detection area 72 vertically, downwardly, leftwardly, and vertically may be cut out as a cutout image based on the inspection sensitivity used for detection of the detection area 72 . .

在教師資料生成部45中,對於剪切圖像除了標記操作者對於選擇缺陷圖像的真缺陷或者偽缺陷的判定結果之外,還標記檢測區域72所隸屬的區域類型,藉此生成教師資料(步驟S15)。在教師資料生成處理中,根據複數個缺陷圖像生成對應於各個區域類型的複數個教師資料。在此,生成用於鍍覆區域的複數個教師資料以及用於SR區域的複數個教師資料。In the teacher material generation unit 45, in addition to marking the operator's judgment result of the selected defect image as a real defect or a pseudo defect, the cutout image is also marked with the area type to which the detection area 72 belongs, thereby generating teacher materials. (Step S15). In the teacher material generation process, a plurality of teacher materials corresponding to each area type are generated based on a plurality of defect images. Here, a plurality of teacher materials for the plating area and a plurality of teacher materials for the SR area are generated.

在學習部51中,利用鍍覆區域用的複數個教師資料進行機械學習,藉此,生成圖17所示的鍍覆區域用的學習完畢模型521。而且,利用SR區域用的複數個教師資料進行機械學習,藉此生成SR區域用的學習完畢模型522。The learning unit 51 performs mechanical learning using a plurality of teaching materials for the plating area, thereby generating a learned model 521 for the plating area shown in FIG. 17 . Furthermore, machine learning is performed using a plurality of teacher materials for the SR area, thereby generating a learned model 522 for the SR area.

當檢查系統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 obtains a plurality of photographed images showing a plurality of positions of the printed circuit board, and inspects the plurality of photographed images for defects. When a defect is detected, a defect image of a predetermined size including the detection area 72 is output to the classifier 52 together 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 defects represented by the defect image into real defects or pseudo defects. When the detection area 72 of the defect image belongs to the SR area, the learned model 522 for the SR area is used to classify the defects represented by the defect image into real defects or pseudo defects.

如上所述,在本處理例中,表示檢測區域72所隸屬的區域類型之區域類型資訊係包含於缺陷資訊中。在教師資料生成部45中,對剪切圖像不僅標記操作者所作的真缺陷或者偽缺陷的判定結果,還標記檢測區域72所隸屬的區域類型。藉此,在學習部51中,可利用標記著一個區域類型的複數個教師資料生成該區域類型的缺陷分類用的學習完畢模型。如此,藉由生成每個區域類型的學習完畢模型,能進一步提高分類精度。As described above, in this processing example, the area type information indicating the area type to which the detection area 72 belongs is included in the defect information. In the teacher's material generating unit 45, not only the result of the operator's determination of a real defect or a pseudo defect is marked on the cutout image, but also the area type to which the detection area 72 belongs is marked. Thereby, the learning unit 51 can generate a learned model for defect classification of a region type using a plurality of teacher materials labeled with the region type. In this way, by generating a learned model for each region type, the classification accuracy can be further improved.

上述教師資料生成裝置4以及教師資料生成方法可進行各種變形。The above-described teacher material generating device 4 and teacher material generating method may be modified in various ways.

從檢查裝置2輸入至教師資料生成裝置4的缺陷資訊係只要表示缺陷圖像中之檢測區域72的範圍即可,並不限於表示檢測區域72的位置以及形狀。例如,缺陷資訊亦可表示缺陷圖像中之檢測區域72的外接矩形的範圍(亦即上下方向以及左右方向各自的範圍)。The defect information input from the inspection device 2 to the teaching material generating device 4 only needs to represent the range of the detection area 72 in the defect image, and is not limited to the position and shape of the detection area 72 . For example, the defect information may also represent the range of the circumscribed rectangle of the detection area 72 in the defect image (that is, the ranges in the up and down directions and the left and right directions).

作為剪切圖像而剪切的缺陷圖像的區域係只要基於缺陷資訊而決定且包含檢測區域72即可,較佳為大致外接於檢測區域72之區域。大致外接於檢測區域72之區域不僅包含外接於檢測區域72之區域,還包含外接於按照上文所述的擴展量使檢測區域72擴展後所得的區域之區域。The area of the defect image to be cut out as the cutout image is determined based on the defect information and includes the detection area 72 , and is preferably an area substantially circumscribing the detection area 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-described embodiment, in step S14 of FIG. 4 , the operator inputs the determination result of a true defect or a pseudo defect with respect to the defect image. However, defect types other than true defects and pseudo defects (such as foreign matter attachment, etc.) may also be input. film peeling, etc.). That is, the determination result accepting unit 44 accepts the determination result of the defect type (the determination result including a true defect or a pseudo defect) input by the operator with respect to the defect image displayed on the display 35 .

在第二實施形態中,當檢測區域72包含分別隸屬於不同的兩個以上的區域類型的部位時,在檢測區域72的擴展中亦可使用該兩個以上的區域類型中的任一個區域類型所對應的擴展量。從獲得表示大致整個缺陷區域71的較佳的剪切圖像的觀點出發,較佳為利用該兩個以上的區域類型所對應的擴展量中的最大的擴展量。In the second embodiment, when the detection area 72 includes parts belonging to two or more different area types, any one of the two or more area types may be used in the expansion of the detection area 72 The corresponding expansion amount. From the viewpoint of obtaining a suitable cropped image representing substantially the entire defect area 71, it is preferable to use the largest expansion amount among the expansion amounts corresponding to the two or more area types.

在第三實施形態中,當檢測區域72包含以不同的兩個以上的檢查感度分別檢測出的部位時,在檢測區域72的擴展中亦可使用該兩個以上的檢查感度中的任一個檢查感度所對應的擴展量。從獲得表示大致整個缺陷區域71的較佳的剪切圖像的觀點出發,較佳為利用該兩個以上的檢查感度所對應的擴展量中的最大的擴展量。In the third embodiment, when the detection area 72 includes parts detected with two or more different inspection sensitivities, any one of the two or more inspection sensitivities can be used for the expansion of the detection area 72 . The expansion corresponding to the gain. From the viewpoint of obtaining a preferable cropped image representing substantially the entire defect area 71 , it is preferable to use the largest expansion amount among the expansion amounts corresponding to the two or more inspection sensitivities.

檢查裝置2所檢查的對象物除了可為印刷基板以外,還可為半導體基板、玻璃基板等基板。而且,檢查裝置2亦可檢測機械零件等基板以外的對象物的缺陷。教師資料生成裝置4係容易生成較佳的教師資料,該教師資料係用於生成各種對象物的缺陷分類用的學習完畢模型。The object inspected by the inspection device 2 may be a substrate such as a semiconductor substrate or a glass substrate in addition to a printed circuit board. Furthermore, the inspection device 2 can also detect defects in objects other than substrates such as mechanical parts. The teacher data generating device 4 can easily generate better teacher data for generating a learned model for classifying defects of various objects.

上述實施形態以及各個變形例中的構成亦可在不相互矛盾的範疇內適當組合。The configurations in the above-described embodiments and modifications may be appropriately combined within the scope of not contradicting each other.

以上已詳細描述並說明了本發明,但所作的說明僅為例示,並不具限定性。因此,可在不脫離本發明範圍的情況下採用複數種變形或者形態。The present invention has been described and explained in detail above, but the description is only illustrative and not restrictive. Therefore, a plurality of modifications or forms may be adopted without departing from the scope of the present invention.

1:檢查系統 2:檢查裝置 3:電腦 4:教師資料生成裝置 9:印刷基板 30:匯流排 31:CPU 32:ROM 33:RAM 34:硬碟 35:顯示器 36:輸入部 36a:鍵盤 37:讀取裝置 38:通訊部 39:GPU 41:圖像接受部 42:剪切圖像生成部 43:顯示控制部 44:判定結果接受部 45:教師資料生成部 51:學習部 52:分類器 61:鍍覆區域 62:SR區域 71:缺陷區域 72:檢測區域 73:外接矩形 74:區域 81:記錄媒體 91:第一感度設定區域 92:第二感度設定區域 93:第三感度設定區域 521,522:學習完畢模型 621:第一SR區域 622:第二SR區域 711:缺陷部分區域 721:檢測部分區域 811:程式 S11至S15:步驟 1: Check the system 2: Check the device 3:Computer 4:Teacher data generation device 9:Printed substrate 30:Bus 31:CPU 32:ROM 33: RAM 34:Hard disk 35:Display 36:Input part 36a:Keyboard 37: Reading device 38: Ministry of Communications 39:GPU 41:Image receiving department 42:Cut image generation part 43: Display control part 44: Judgment Result Acceptance Department 45:Teacher Information Generation Department 51:Learning Department 52:Classifier 61: Plating area 62:SR area 71: Defect area 72:Detection area 73: Encircled rectangle 74:Area 81:Recording media 91: First gain setting area 92: Second gain setting area 93: The third gain setting area 521,522: Model learned 621: First SR area 622:Second SR area 711: Defect partial area 721: Detect some areas 811:Program S11 to S15: Steps

[圖1]係檢查系統的構成的圖。 [圖2]係表示電腦的構成的圖。 [圖3]係表示教師資料生成裝置的構成的圖。 [圖4]係表示生成教師資料的處理流程的圖。 [圖5]係表示拍攝圖像的圖。 [圖6]係表示拍攝圖像的圖。 [圖7]係表示拍攝圖像的圖。 [圖8A]係表示缺陷圖像的圖。 [圖8B]係表示缺陷圖像的圖。 [圖9]係表示缺陷圖像的圖。 [圖10]係表示缺陷區域附近的圖。 [圖11]係表示缺陷圖像的圖。 [圖12]係表示缺陷區域附近的圖。 [圖13]係表示缺陷區域附近的圖。 [圖14]係表示缺陷區域附近的圖。 [圖15]係表示印刷基板的圖。 [圖16]係將印刷基板的一部分放大表示的圖。 [圖17]係表示分類器的另一個例子的圖。 [Fig. 1] is a diagram showing the structure of the inspection system. [Fig. 2] is a diagram showing the structure of a computer. [Fig. 3] is a diagram showing the structure of a teacher material generating device. [Fig. 4] is a diagram showing the processing flow of generating teacher data. [Fig. 5] is a diagram showing a captured image. [Fig. 6] is a diagram showing a captured image. [Fig. 7] is a diagram showing a captured image. [Fig. 8A] is a diagram showing a defect image. [Fig. 8B] is a diagram showing a defect image. [Fig. 9] is a diagram showing a defect image. [Fig. 10] is a diagram showing the vicinity of a defective area. [Fig. 11] is a diagram showing a defect image. [Fig. 12] is a diagram showing the vicinity of a defective area. [Fig. 13] is a diagram showing the vicinity of a defective area. [Fig. 14] is a diagram showing the vicinity of a defective area. [Fig. 15] is a diagram showing a printed circuit board. [Fig. 16] is an enlarged view of a part of the printed circuit board. [Fig. 17] is a diagram showing another example of the classifier.

2:檢查裝置 2: Check the device

4:教師資料生成裝置 4:Teacher data generation device

35:顯示器 35:Display

36:輸入部 36:Input part

41:圖像接受部 41:Image receiving department

42:剪切圖像生成部 42:Cut image generation part

43:顯示控制部 43: Display control part

44:判定結果接受部 44: Judgment Result Acceptance Department

45:教師資料生成部 45:Teacher Information Generation Department

Claims (11)

一種教師資料生成裝置,係生成教師資料,並具備: 圖像接受部,係從用以拍攝對象物來檢測缺陷之檢查裝置接受:預定尺寸的缺陷圖像,係包含缺陷的檢測區域;以及缺陷資訊,係表示前述缺陷圖像中前述檢測區域的範圍; 剪切圖像生成部,係基於前述缺陷資訊從前述缺陷圖像中剪切出包含前述檢測區域之區域作為剪切圖像; 顯示控制部,係使顯示器上顯示前述缺陷圖像的至少一部分; 判定結果接受部,係接受操作者針對前述顯示器上顯示的前述缺陷圖像所輸入的缺陷類型的判定結果;以及 教師資料生成部,係對前述剪切圖像標記前述判定結果而生成教師資料。 A teacher information generating device generates teacher information and has: The image receiving unit receives from an inspection device for photographing an object to detect defects: a defect image of a predetermined size, which is a detection area including the defect; and defect information, which indicates the range of the detection area in the defect image. ; The cutout image generation unit cuts out the area including the detection area from the aforementioned defect image as a cutout image based on the aforementioned defect information; The display control unit causes at least part of the aforementioned defective image to be displayed on the display; The determination result accepting unit accepts the determination result of the defect type input by the operator with respect to the defect image displayed on the display; and The teacher data generation unit marks the judgment result on the cut image to generate teacher data. 如請求項1所記載之教師資料生成裝置,其中前述對象物的各個位置係隸屬於複數個區域類型中的一個區域類型; 前述缺陷資訊係包含區域類型資訊,前述區域類型資訊係表示前述檢測區域所隸屬的區域類型; 前述剪切圖像生成部係記憶針對各個區域類型設定的擴展量,並將按照利用前述區域類型資訊所特定的擴展量將前述檢測區域擴展後所得的區域包含於前述剪切圖像中。 The teacher material generating device as described in claim 1, wherein each position of the aforementioned object belongs to one of a plurality of area types; The aforementioned defect information includes area type information, and the aforementioned area type information indicates the area type to which the aforementioned detection area belongs; The cropped image generating unit stores the expansion amount set for each region type, and includes in the cropped image a region obtained by expanding the detection region according to the expansion amount specified using the region type information. 如請求項2所記載之教師資料生成裝置,其中前述對象物為印刷基板; 複數個前述區域類型係至少包含鍍覆區域以及阻焊劑區域。 The teacher material generating device according to claim 2, wherein the object is a printed substrate; The plurality of aforementioned area types include at least a plating area and a solder resist area. 如請求項1至3中任一項所記載之教師資料生成裝置,其中對於前述對象物的各個位置設定有複數個檢查感度中的一個檢查感度; 前述缺陷資訊係包含檢查感度資訊,前述檢查感度資訊係表示前述檢測區域的檢測中所使用的檢查感度; 前述剪切圖像生成部係記憶針對各個檢查感度所設定的擴展量,並將按照利用前述檢查感度資訊所特定的擴展量將前述檢測區域擴展後所得的區域包含於前述剪切圖像中。 The teacher data generating device according to any one of claims 1 to 3, wherein one of a plurality of inspection sensitivities is set for each position of the aforementioned object; The aforementioned defect information includes inspection sensitivity information, and the aforementioned inspection sensitivity information represents the inspection sensitivity used in the inspection of the aforementioned inspection area; The clipped image generating unit stores the expansion amount set for each inspection sensitivity, and includes in the clipped image a region obtained by expanding the detection area according to the expansion amount specified using the inspection sensitivity information. 如請求項1至3中任一項所記載之教師資料生成裝置,其中前述對象物的各個位置係隸屬於複數個區域類型中的一個區域類型; 前述缺陷資訊係包含區域類型資訊,前述區域類型資訊係表示前述檢測區域所隸屬的區域類型; 前述教師資料生成部係對前述剪切圖像不僅標記前述判定結果還標記前述檢測區域所隸屬的區域類型。 The teacher material generating device as described in any one of claims 1 to 3, wherein each position of the aforementioned object belongs to one of a plurality of area types; The aforementioned defect information includes area type information, and the aforementioned area type information indicates the area type to which the aforementioned detection area belongs; The teacher information generating unit marks not only the judgment result but also the area type to which the detection area belongs to the cutout image. 一種教師資料生成方法,係生成教師資料,並具備: 步驟a,係從用以拍攝對象物來檢測缺陷之檢查裝置接受:預定尺寸的缺陷圖像,係包含缺陷的檢測區域;以及缺陷資訊,係表示前述缺陷圖像中前述檢測區域的範圍; 步驟b,係基於前述缺陷資訊從前述缺陷圖像中剪切出包含前述檢測區域之區域作為剪切圖像; 步驟c,係使顯示器上顯示前述缺陷圖像的至少一部分; 步驟d,係接受操作者針對前述顯示器上顯示的前述缺陷圖像所輸入的缺陷類型的判定結果;以及 步驟e,係對前述剪切圖像標記前述判定結果而生成教師資料。 A method for generating teacher information, which generates teacher information and has the following features: Step a is to receive from an inspection device used to photograph objects to detect defects: a defect image of a predetermined size, which contains the detection area of the defect; and defect information, which represents the range of the detection area in the aforementioned defect image; Step b is to cut out the area including the detection area from the aforementioned defect image as a cut image based on the aforementioned defect information; Step c is to display at least part of the aforementioned defect image on the display; Step d is to accept the determination result of the defect type input by the operator regarding the defect image displayed on the display; and Step e is to mark the aforementioned judgment result on the aforementioned cut image to generate teacher information. 如請求項6所記載之教師資料生成方法,其中前述對象物的各個位置係隸屬於複數個區域類型中的一個區域類型; 前述缺陷資訊係包含區域類型資訊,前述區域類型資訊係表示前述檢測區域所隸屬的區域類型; 在前述步驟b中,準備針對各個區域類型所設定的擴展量,並將按照利用前述區域類型資訊所特定的擴展量將前述檢測區域擴展後所得的區域包含於前述剪切圖像中。 The method for generating teacher data as described in claim 6, wherein each location of the aforementioned object belongs to one of a plurality of area types; The aforementioned defect information includes area type information, and the aforementioned area type information indicates the area type to which the aforementioned detection area belongs; In the aforementioned step b, the expansion amount set for each area type is prepared, and the area obtained by expanding the detection area according to the expansion amount specified using the area type information is included in the cutout image. 如請求項7所記載之教師資料生成方法,其中前述對象物為印刷基板; 複數個前述區域類型係至少包含鍍覆區域以及阻焊劑區域。 The method for generating teacher materials as described in claim 7, wherein the aforementioned object is a printed substrate; The plurality of aforementioned area types include at least a plating area and a solder resist area. 如請求項6至8中任一項所記載之教師資料生成方法,其中對前述對象物的各個位置設定有複數個檢查感度中的一個檢查感度; 前述缺陷資訊係包含檢查感度資訊,前述檢查感度資訊係表示前述檢測區域的檢測中所使用的檢查感度; 在前述步驟b中,準備針對各個檢查感度所設定的擴展量,並將按照利用前述檢查感度資訊所特定的擴展量將前述檢測區域擴展後所得的區域包含於前述剪切圖像中。 The method for generating teacher data as described in any one of claims 6 to 8, wherein one of a plurality of inspection sensitivities is set for each position of the aforementioned object; The aforementioned defect information includes inspection sensitivity information, and the aforementioned inspection sensitivity information represents the inspection sensitivity used in the inspection of the aforementioned inspection area; In the aforementioned step b, an expansion amount set for each inspection sensitivity is prepared, and an area obtained by expanding the detection area according to the expansion amount specified using the inspection sensitivity information is included in the cutout image. 如請求項6至8中任一項所記載之教師資料生成方法,其中前述對象物的各個位置係隸屬於複數個區域類型中的一個區域類型; 前述缺陷資訊係包含區域類型資訊,前述區域類型資訊係表示前述檢測區域所隸屬的區域類型; 在前述步驟e中,對前述剪切圖像不僅標記前述判定結果還標記前述檢測區域所隸屬的區域類型; 使用標記著一個區域類型的複數個教師資料,生成用於對一個前述區域類型的缺陷分類用的學習完畢模型。 The method for generating teacher materials as described in any one of claims 6 to 8, wherein each location of the aforementioned object belongs to one of a plurality of area types; The aforementioned defect information includes area type information, and the aforementioned area type information indicates the area type to which the aforementioned detection area belongs; In the aforementioned step e, the aforementioned cut image is marked with not only the aforementioned determination result but also the area type to which the aforementioned detection area belongs; Using a plurality of teacher data labeled with a region type, a learned model for classifying defects of the aforementioned region type is generated. 一種程式,係用以使電腦生成教師資料,並藉由使前述電腦執行前述程式而使前述電腦執行: 步驟a,係從用以拍攝對象物來檢測缺陷之檢查裝置接受:預定尺寸的缺陷圖像,係包含缺陷的檢測區域;以及缺陷資訊,係表示前述缺陷圖像中前述檢測區域的範圍; 步驟b,係基於前述缺陷資訊從前述缺陷圖像中剪切出包含前述檢測區域之區域作為剪切圖像; 步驟c,係使顯示器上顯示前述缺陷圖像的至少一部分; 步驟d,係接受操作者針對前述顯示器上顯示的前述缺陷圖像所輸入的缺陷類型的判定結果;以及 步驟e,係對前述剪切圖像標記前述判定結果而生成教師資料。 A program for causing a computer to generate teacher information, and causing the computer to execute the program by causing the computer to execute: Step a is to receive from an inspection device used to photograph objects to detect defects: a defect image of a predetermined size, which contains the detection area of the defect; and defect information, which represents the range of the detection area in the aforementioned defect image; Step b is to cut out the area including the detection area from the aforementioned defect image as a cut image based on the aforementioned defect information; Step c is to display at least part of the aforementioned defect image on the display; Step d is to accept the determination result of the defect type input by the operator regarding the defect image displayed on the display; and Step e is to mark the aforementioned judgment result on the aforementioned cut image to generate teacher information.
TW111142102A 2022-02-22 2022-11-04 Training data generation apparatus, training data generation method, and program TW202334900A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2022-025618 2022-02-22
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
TW202334900A true TW202334900A (en) 2023-09-01

Family

ID=87614097

Family Applications (1)

Application Number Title Priority Date Filing Date
TW111142102A TW202334900A (en) 2022-02-22 2022-11-04 Training data generation apparatus, training 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)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112789499A (en) * 2018-10-01 2021-05-11 世高株式会社 Teacher data generation device and teacher data generation program

Also Published As

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

Similar Documents

Publication Publication Date Title
JP4155496B2 (en) Classification support device, classification device, and program
JP4008291B2 (en) Pattern inspection apparatus, pattern inspection method, and program
TW202334900A (en) Training data generation apparatus, training data generation method, and program
JP2007163259A (en) Difference comparison inspection method and difference comparison inspection device
JP4841819B2 (en) Defect detection by color image of an object
JP7492240B2 (en) Analytical device and analytical method
JP6035157B2 (en) Image processing apparatus, image processing method, and image processing program
US11830232B2 (en) Image judgment apparatus and image judgment method
JP2008014717A (en) Flaw inspection system and flaw inspection method
JP4423130B2 (en) Printed circuit board visual inspection method, printed circuit board visual inspection program, and printed circuit board visual inspection apparatus
TW202338745A (en) Inspection system, training data generation apparatus, training data generation method, and program
TWI837934B (en) Inspection system, training data generation apparatus, training data generation method, and program
JP4745633B2 (en) Defect detection method and apparatus using color image of object
JPH06201603A (en) Method for generating inspection data in missing inspection of electronic component and method for detecting missing of the component
JP2008097319A (en) Inspection device for display image, and inspection method for display image
TWI773035B (en) System and method for image recognition
WO2024090054A1 (en) Image processing method, program, and image processing device
WO2024095721A1 (en) Image processing device and image processing method
JP4963284B2 (en) Standard data creation method
JP2008032532A (en) Defect detection device, defect detection method, and program
CN114894801A (en) Inspection system, inspection method, and inspection program
JP2023183761A (en) Inspection device, inspection method and program
KR20240037494A (en) Printed circuit board defect detection method using semi-supervised learning
KR100684186B1 (en) Detecting a defect of an object based on a color image of the object
JPH10141930A (en) Method and device for inspecting pattern