JP2023137057A - Method of generating defect prediction model, bottle appearance inspection method and bottle appearance inspection device - Google Patents

Method of generating defect prediction model, bottle appearance inspection method and bottle appearance inspection device Download PDF

Info

Publication number
JP2023137057A
JP2023137057A JP2022043054A JP2022043054A JP2023137057A JP 2023137057 A JP2023137057 A JP 2023137057A JP 2022043054 A JP2022043054 A JP 2022043054A JP 2022043054 A JP2022043054 A JP 2022043054A JP 2023137057 A JP2023137057 A JP 2023137057A
Authority
JP
Japan
Prior art keywords
defect
bottle
image
inspected
prediction model
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
JP2022043054A
Other languages
Japanese (ja)
Inventor
直広 田中
Naohiro Tanaka
大輔 小林
Daisuke Kobayashi
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.)
Nihon Yamamura Glass Co Ltd
Original Assignee
Nihon Yamamura Glass 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 Nihon Yamamura Glass Co Ltd filed Critical Nihon Yamamura Glass Co Ltd
Priority to JP2022043054A priority Critical patent/JP2023137057A/en
Publication of JP2023137057A publication Critical patent/JP2023137057A/en
Pending legal-status Critical Current

Links

Images

Abstract

To provide a method for generating a defect prediction model for performing highly accurate appearance inspection, a bottle appearance inspection method, and a bottle appearance inspection device.SOLUTION: A method for generating a defect prediction model includes: a learning image acquisition step of acquiring an image for learning which predicts the presence or absence of a defect appearing in the appearance of a bottle; a generation step of generating the teacher data by adding the defect information to the image for learning, and a learning step of generating a defect prediction model for predicting the presence or absence of the defect in an inspection target image when the inspection target image is inputted by performing the machine learning using the teacher data.SELECTED DRAWING: Figure 9

Description

この発明は、種々の態様のガラスびんについて、びんを撮像して取得した画像により外観に現れるびんの欠陥の有無を検査するための欠陥予測モデルの生成方法、びん外観検査方法、およびびん外観検査装置に関する。 The present invention relates to a method for generating a defect prediction model for inspecting the presence or absence of defects that appear on the exterior of glass bottles of various embodiments using images obtained by imaging the bottles, a method for inspecting the appearance of bottles, and a method for inspecting the appearance of bottles. Regarding equipment.

びんの欠陥には、異物、泡、汚れなど、種々のものがあるが、これらのびんの欠陥を、カメラで撮像して取得したびんの画像によって検査することは公知である。従来、びんの欠陥を濃淡画像上で判別するのに、びんに対するカメラと照明装置との位置関係を、カメラがびんからの透過光を受けてびんの透過画像を取得できるように設定する。欠陥は、透過画像中に陰として出現するもので、明度の低い陰の領域の面積(画素数)を計測し、その面積の大きさの程度によってびんの欠陥を検出している。 BACKGROUND OF THE INVENTION There are various types of defects in bottles, such as foreign objects, bubbles, and dirt, and it is known to inspect these bottle defects using an image of the bottle captured by a camera. Conventionally, in order to identify bottle defects on a gray-scale image, the positional relationship between a camera and an illumination device with respect to the bottle is set so that the camera can receive transmitted light from the bottle and obtain a transmitted image of the bottle. Defects appear as shadows in the transmitted image, and the area (number of pixels) of the low-brightness shadow area is measured, and bottle defects are detected based on the size of the area.

びんの欠陥のうち、びんの表面近くに出現する泡(以下「表面泡」という。)については、透過画像から検出するのが難しい。そこで、表面泡を濃淡画像上で判別するのに、びんに対するカメラと照明装置との位置関係を、カメラがびんからの反射光を受けてびんの反射画像を取得できるように設定する。表面泡は、透過画像中で陰ではなく周囲より明るく映る部分として出現するもので、明度が所定の値より高い領域の面積(画素数)を計測し、その面積の大きさの程度により表面泡を検出している。 Among bottle defects, bubbles that appear near the surface of the bottle (hereinafter referred to as "surface bubbles") are difficult to detect from a transmitted image. Therefore, in order to identify surface bubbles on a gray-scale image, the positional relationship between the camera and the lighting device with respect to the bottle is set so that the camera can receive reflected light from the bottle and obtain a reflected image of the bottle. Surface bubbles appear in a transmitted image as an area that appears brighter than the surrounding area, rather than as a shadow.The area (number of pixels) of the area where the brightness is higher than a predetermined value is measured, and the surface bubbles are determined based on the size of the area. is being detected.

近年、AI関連技術の進歩が目覚ましく、外観に現れる物の傷や欠陥を人口知能により判別する外観検査装置が提案されている。特許文献1は、検査対象を走査して得られる画像信号を用いて欠陥の形状や等級を人工知能により判別する欠陥検査装置を開示している。また、特許文献2には、対象物の画像データを学習用データとして深層学習によって学習済モデルを作成し、その学習済モデルを用いて、検査対象を撮像して得られた画像データから、あらかじめ設定された形態の画像を示す画像データを識別する画像識別システムが開示されている。 In recent years, advances in AI-related technology have been remarkable, and visual inspection devices have been proposed that use artificial intelligence to identify scratches and defects on objects. Patent Document 1 discloses a defect inspection device that uses an image signal obtained by scanning an inspection target to determine the shape and grade of a defect using artificial intelligence. Furthermore, in Patent Document 2, a trained model is created by deep learning using image data of the object as learning data, and using the trained model, the image data obtained by imaging the inspection object is used to create a trained model in advance. An image identification system is disclosed that identifies image data representing an image in a set format.

特開平5-280960号公報Japanese Patent Application Publication No. 5-280960 特開2021-157735号公報Japanese Patent Application Publication No. 2021-157735

ところで、びんには、表面に凹凸状の変形部分を有するラムネびんのようなびんや、表面に社名、商品名、装飾などのレリーフ(浮彫)が施されたびんなど、種々の態様のびんがある。この種のびんについて、びんの外観に現れるびんの欠陥を画像上で判別してびんの良否を検査する場合、変形部分やレリーフの部分が画像上に陰として現れるため、欠陥による陰を変形部分やレリーフによる陰と区別して判別する必要がある。 By the way, there are various types of bottles, such as bottles with uneven deformed parts on the surface, such as ramune bottles, and bottles with reliefs such as company names, product names, decorations, etc. on the surface. be. For this type of bottle, when inspecting the quality of the bottle by identifying defects that appear on the bottle's appearance on an image, deformed parts and relief parts appear as shadows on the image, so the shadows caused by defects are It is necessary to distinguish it from shadows caused by relief or relief.

しかし、その種のびんについて、変形部分やレリーフの部分の影響を受けない高精度の外観検査は困難であり、良品を不良品と誤判定する結果、良品を破棄する数量が増すという問題がある。良品の破棄数を減らすために、検査精度を下げると、不良品を良品と誤判定する結果、不良品が市場に出回るという問題を生じさせる。 However, it is difficult to conduct a high-precision visual inspection of these types of bottles, which is not affected by deformed or relief parts, and the problem is that non-defective products are incorrectly judged as defective, resulting in an increase in the number of non-defective products that are discarded. . If the inspection accuracy is lowered in order to reduce the number of discarded non-defective products, defective products will be erroneously determined as non-defective products, resulting in the problem of defective products being put on the market.

従来、変形部分やレリーフの部分の影響を受けない高精度なびんの外観検査装置、さらには、外観に現れるびんの欠陥を人口知能により判別するびんの外観検査装置は提案されていない。 Hitherto, no high-precision bottle appearance inspection apparatus that is not affected by deformed parts or relief parts, and furthermore, a bottle appearance inspection apparatus that uses artificial intelligence to determine defects in bottles that appear on the outside, have not been proposed.

この発明は、上記の問題に着目してなされたもので、高精度の外観検査を行うための欠陥予測モデルの生成方法、びん外観検査方法、およびびん外観検査装置を提供することを目的とする。 The present invention has been made in view of the above-mentioned problems, and aims to provide a method for generating a defect prediction model, a bottle appearance inspection method, and a bottle appearance inspection device for performing highly accurate appearance inspection. .

本発明のびんの外観に現れる欠陥の有無を予測するための欠陥予測モデルを生成する方法は、学習用画像を取得する学習用画像取得ステップと、
前記学習用画像に欠陥情報を付与して教師データを生成する生成ステップと、
前記教師データを用いて機械学習を行うことにより、検査対象画像を入力した場合に、前記検査対象画像内の欠陥の有無を予測する欠陥予測モデルを生成する学習ステップとを備える。
A method for generating a defect prediction model for predicting the presence or absence of defects appearing on the appearance of a bottle according to the present invention includes a learning image acquisition step of acquiring a learning image;
a generation step of adding defect information to the learning image to generate teacher data;
and a learning step of generating a defect prediction model that predicts the presence or absence of a defect in the image to be inspected when the image to be inspected is input by performing machine learning using the teacher data.

上記の欠陥予測モデルを生成する方法によれば、学習用画像に欠陥情報を付与しているので、高精度の外観検査を行うことができる。 According to the method of generating the defect prediction model described above, since defect information is added to the learning image, highly accurate visual inspection can be performed.

前記欠陥情報は、前記学習用画像内の欠陥の位置を示す情報を含むことが好ましい。 Preferably, the defect information includes information indicating a position of a defect within the learning image.

前記欠陥情報は、欠陥の種類を示す情報を含み、前記欠陥の種類は、キズ、表面泡、しわ、異物、汚れ、内面泡および異質ガラスの少なくともいずれかであることが好ましい。 The defect information includes information indicating the type of defect, and the defect type is preferably at least one of scratches, surface bubbles, wrinkles, foreign matter, dirt, inner bubbles, and foreign glass.

本発明のびん外観検査方法は、検査対象のびんの検査対象画像を取得する取得ステップと、上記に記載の欠陥予測モデルの生成方法により生成された欠陥予測モデルを用いて、前記検査対象画像内の欠陥の有無を予測する欠陥予測ステップと、を備える。 The bottle visual inspection method of the present invention includes an acquisition step of acquiring an inspection target image of a bottle to be inspected, and a defect prediction model generated by the defect prediction model generation method described above. a defect prediction step of predicting the presence or absence of a defect.

上記のびん外観検査方法においては、前記欠陥予測ステップでは、前記欠陥予測モデルは、前記検査対象画像内に欠陥が含まれるか否かの可能性を示す信頼度を、予測結果として出力することが好ましい。 In the above-mentioned bottle visual inspection method, in the defect prediction step, the defect prediction model may output, as a prediction result, a degree of reliability indicating the possibility of whether or not a defect is included in the image to be inspected. preferable.

上記のびん外観検査方法においては、前記信頼度を閾値と比較することにより、前記検査対象画像の欠陥の有無を判定する第1判定ステップをさらに備えることが好ましい。 The above-mentioned bottle visual inspection method preferably further includes a first determination step of determining whether or not there is a defect in the image to be inspected by comparing the reliability with a threshold value.

前記第1判定ステップで欠陥が有ると判定された前記検査対象画像について、画像を構成する各画素の周辺画素との明度差に基づく処理によって前記検査対象画像に欠陥が有るか否かをさらに判定する第2判定ステップをさらに備えることが好ましい。 Regarding the inspection target image determined to have a defect in the first determination step, it is further determined whether or not the inspection target image has a defect by processing based on the brightness difference between each pixel constituting the image and surrounding pixels. It is preferable to further include a second determination step.

本発明を装置の観点から記載すると、びん外観検査装置は、検査対象のびんの検査対象画像を取得する検査対象画像取得部と、上記に記載の欠陥予測モデルの生成方法により生成された欠陥予測モデルを用いて、前記検査対象画像内の欠陥の有無を予測する欠陥予測部と、を含む。 Describing the present invention from an apparatus perspective, the bottle visual inspection apparatus includes an inspection target image acquisition unit that acquires an inspection target image of a bottle to be inspected, and a defect prediction model generated by the defect prediction model generation method described above. A defect prediction unit that uses a model to predict the presence or absence of a defect in the image to be inspected.

びん外観検査装置において、前記欠陥予測モデルは、前記検査対象画像内に欠陥が有るか否かの可能性を示す信頼度を、予測結果として出力することが好ましい。 In the bottle visual inspection apparatus, it is preferable that the defect prediction model outputs a degree of reliability indicating the possibility of whether or not there is a defect in the image to be inspected as a prediction result.

前記信頼度を閾値と比較することにより、前記検査対象画像の欠陥の有無を判定する第1判定部をさらに備えることが好ましい。 It is preferable that the image forming apparatus further includes a first determination unit that determines the presence or absence of a defect in the image to be inspected by comparing the reliability with a threshold value.

前記第1判定部において欠陥を有すると判定された前記検査対象画像において、着目画素とその周辺画素との明度差に基づいて前記検査対象画像に欠陥が有るか否かを判定する第2判定部をさらに含むことが好ましい。 a second determination unit that determines whether or not the inspection target image has a defect based on a brightness difference between a pixel of interest and its surrounding pixels in the inspection target image determined to have a defect by the first determination unit; It is preferable to further include.

本発明のびん外観検査装置は、前記検査対象画像を撮像するための撮像装置をさらに備える。 The bottle visual inspection apparatus of the present invention further includes an imaging device for capturing the inspection target image.

前記撮像装置は、びんを直立姿勢で支持してびんを中心軸の周りに回転させるテーブルと、前記びんに照明光を照射する照明装置と、びんに向けて照射された照明光を受けて前記テーブル上のびんの前記検査対象画像を取得するカメラと、少なくとも前記カメラの撮像動作を制御する制御部とを含み、前記制御部は、びんの少なくとも全周にわたる画像を取得することが可能なシャッターのタイミングを与えるタイミング信号を生成して前記カメラへ出力することが好ましい。 The imaging device includes a table that supports the bottle in an upright position and rotates the bottle around a central axis, an illumination device that irradiates the bottle with illumination light, and a table that receives the illumination light that is irradiated toward the bottle. The camera includes a camera that captures the inspection target image of the bottle on the table, and a control unit that controls at least an imaging operation of the camera, and the control unit includes a shutter that is capable of capturing an image over at least the entire circumference of the bottle. It is preferable to generate a timing signal that provides the timing of and output it to the camera.

上記の構成によれば、高精度の外観検査を行うことができる。 According to the above configuration, highly accurate visual inspection can be performed.

この発明のびん外観検査装置を含むびん検査システムの概略構成を示す平面図である。1 is a plan view showing a schematic configuration of a bottle inspection system including a bottle appearance inspection device of the present invention. (A)は変形部分を有するびんの例を示す正面図、(B)はリレーフ部分を有するびんの例を示す正面図である。(A) is a front view showing an example of a bottle having a deformed portion, and (B) is a front view showing an example of a bottle having a relief portion. びん外観検査装置の概略構成の例を示し、(A)は平面図、(B)は正面図である。An example of a schematic configuration of a bottle visual inspection device is shown, with (A) being a plan view and (B) being a front view. びん外観検査装置の概略構成の他の例を示し、(A)は平面図、(B)は正面図である。Another example of the schematic configuration of the bottle visual inspection device is shown, in which (A) is a plan view and (B) is a front view. 図2(A)のびんの撮像画像の例である。This is an example of a captured image of the bottle in FIG. 2(A). 欠陥予測モデル生成装置の構成を示すブロック図である。FIG. 2 is a block diagram showing the configuration of a defect prediction model generation device. 欠陥検査装置の構成を示すブロック図である。FIG. 2 is a block diagram showing the configuration of a defect inspection device. (A)~(D)は第1判定部において欠陥と判定される撮像画像の例である。(A) to (D) are examples of captured images that are determined to be defective by the first determination section. 欠陥予測モデル生成の流れを示すフローチャートである。3 is a flowchart showing the flow of defect prediction model generation. 欠陥判定の流れを示すフローチャートである。It is a flowchart which shows the flow of defect determination. 欠陥予測モデルの判定性能の検証試験の結果を示す図である。It is a figure which shows the result of the verification test of the determination performance of a defect prediction model.

本発明の実施形態について添付図面を参照して説明する。なお、本発明は、下記の実施形態に限定されるものではない。 Embodiments of the present invention will be described with reference to the accompanying drawings. Note that the present invention is not limited to the embodiments described below.

(びん検査システム1の概略構成)
図1は、本発明のびん外観検査装置20が含まれるびん検査システム1の概略構成を示している。図示のびん検査システム1は、スターホイール2の周囲に複数個の検査ステーションが円陣に配置された構成のものである。なお、図1には、最終の検査ステーションTAとそれ以外のひとつの検査ステーションTBが示してあり、他の検査ステーションについての図示を省略している。スターホイール2の外周面には、検査対象のびん10が導入される複数個の凹部2aが等角度毎に設けられている。
(Schematic configuration of bottle inspection system 1)
FIG. 1 shows a schematic configuration of a bottle inspection system 1 including a bottle visual inspection apparatus 20 of the present invention. The illustrated bottle inspection system 1 has a configuration in which a plurality of inspection stations are arranged in a circle around a star wheel 2. Note that FIG. 1 shows the final inspection station TA and one other inspection station TB, and the illustration of the other inspection stations is omitted. A plurality of recesses 2a into which bottles 10 to be inspected are introduced are provided on the outer peripheral surface of the star wheel 2 at equal angles.

製びん機(図示せず)から搬送されてくるびん10は、びん供給機構3によりスターホイール2の凹部2aへ供給される。スターホイール2は、図示しない回転駆動機構により図中、矢印で示す方向へ所定の角度づつ間欠送りされるもので、これにより検査用のびん10は各検査ステーションに順次導かれる。各検査ステーションにおいて、検査用のびん10は決められた項目の検査が実行される。本発明のびん外観検査装置20は、上記の検査ステーションのいずれか(例えば検査ステーションTB)に配置されるものである。びん10に対して各種項目の検査が実行された後、検査対象のびん10は検査の結果に応じて弁別機構4により良品と不良品とに弁別される。弁別機構4が「良品」と弁別した検査対象のびん10は、搬出コンベヤ上へ送り出されて次工程へ送られる。弁別機構4が「不良品」と弁別した検査対象のびん10は、図示しないリジェクト機構によりリジェクトされ、廃棄のためのテーブル上に回収される。 Bottles 10 conveyed from a bottle making machine (not shown) are supplied to the recess 2a of the star wheel 2 by the bottle supply mechanism 3. The star wheel 2 is intermittently fed at a predetermined angle in the direction indicated by the arrow in the figure by a rotational drive mechanism (not shown), whereby the bottles 10 for inspection are sequentially guided to each inspection station. At each inspection station, the inspection bottle 10 is inspected for predetermined items. The bottle visual inspection apparatus 20 of the present invention is placed at any of the above-mentioned inspection stations (for example, inspection station TB). After the bottles 10 are inspected for various items, the bottles 10 to be inspected are discriminated into good and defective by the discrimination mechanism 4 according to the inspection results. The bottles 10 to be inspected that the discrimination mechanism 4 discriminates as "good" are sent onto the carry-out conveyor and sent to the next process. Bottles 10 to be inspected that are discriminated as "defective" by the discrimination mechanism 4 are rejected by a reject mechanism (not shown) and collected on a table for disposal.

(びん10)
図2(A)、図2(B)には、びん外観検査装置20の検査対象のびん10の一例が示されている。図2(A)のびん10は、胴部13、底部15、口部16を有し、胴部13の上部がくびれ、表面に凹凸形状をなす変形部分11を含んでいる。本実施形態では、この変形部分11とその近傍を検査対象領域に設定して欠陥の有無を検査するが、検査対象領域は胴部13の他の領域であってもよい。なお、びん外観検査装置20は、図2(B)に示すような、表面に社名、商品名、装飾などのレリーフ(浮彫)が施されたびん10を検査対象とすることもできる。レリーフ部分12は、びん10の胴部13の表面より傾斜して盛り上がるような突起物、すなわち、断面が山形形状の突起物によって表されている。なお、検査対象のびん10は図2の例に限定されず、変形部分11やレリーフ部分12を有しないびん10を検査対象としてもよい。
(bottle 10)
2(A) and 2(B) show an example of a bottle 10 to be inspected by the bottle visual inspection apparatus 20. The bottle 10 in FIG. 2(A) has a body 13, a bottom 15, and a mouth 16, and the upper part of the body 13 is constricted and includes a deformed portion 11 having an uneven surface. In the present embodiment, the deformed portion 11 and its vicinity are set as the inspection target area to inspect for defects, but the inspection target area may be other areas of the trunk 13. The bottle appearance inspection device 20 can also inspect a bottle 10 whose surface is embossed with a company name, product name, decoration, etc., as shown in FIG. 2(B). The relief portion 12 is represented by a protrusion that slopes upward from the surface of the body 13 of the bottle 10, that is, a protrusion that has a chevron-shaped cross section. Note that the bottle 10 to be inspected is not limited to the example shown in FIG. 2, and a bottle 10 that does not have the deformed portion 11 or the relief portion 12 may be inspected.

びん10に現れる欠陥には、びん10の表面のキズ、びん10の表面に近い箇所に現れる泡(「表面泡」ともいう。)、しわ、たとえば金属や陶磁器片などの未溶解物(「異物」ともいう。)、製びんの過程などでびん10の表面に付着した汚れ、びん10の内壁内部に現れる泡(表面泡以外の泡であり、「内面泡」ともいう。)、ガラスびん10の原料として用いられる成分とは異なる成分を有するガラスであり、市中から回収される再利用ガラス中に含まれており、再利用ガラスを利用したガラスびん製造時に混入したもの(「異質ガラス」ともいう。)が含まれる。表面泡および内面泡を区別しない場合には「泡」ともいう。なお、本明細書において、びん10の欠陥とは、びん10の使用上問題となるキズ、表面泡、しわ、異物、汚れ、内面泡、異質ガラスをいい、びん10の使用に問題がないものは欠陥には含まれない。 Defects that appear on the bottle 10 include scratches on the surface of the bottle 10, bubbles that appear near the surface of the bottle 10 (also called "surface bubbles"), wrinkles, and undissolved objects such as metal or ceramic pieces ("foreign objects"). ), dirt adhering to the surface of the bottle 10 during the bottle making process, bubbles appearing inside the inner wall of the bottle 10 (bubbles other than surface bubbles, also referred to as "inner bubbles"), glass bottle 10 It is glass that has different components from those used as raw materials for glass, and is contained in recycled glass collected from the market, and is contaminated during the manufacturing of glass bottles using recycled glass ("foreign glass"). ) is included. When surface foam and internal foam are not distinguished, they are also referred to as "foam." In this specification, defects in the bottle 10 refer to scratches, surface bubbles, wrinkles, foreign matter, dirt, inner bubbles, and foreign glass that cause problems when using the bottle 10, and defects that do not cause problems when using the bottle 10. are not included in defects.

図2(A)、図2(B)に示すびん10は、検査対象のガラスびん10の例であるが、学習対象として用いられるガラスびん10の例であってもよい。検査対象のガラスびん10を「検査用のびん10」といい、学習対象として用いられるガラスびん10を「学習用のびん10」という。学習用のびん10と検査用のびん10を総称して単に「びん10」ということもある。 The bottle 10 shown in FIGS. 2(A) and 2(B) is an example of a glass bottle 10 to be inspected, but it may also be an example of a glass bottle 10 used as a learning object. The glass bottle 10 to be inspected is referred to as a "test bottle 10", and the glass bottle 10 used as a learning target is referred to as a "learning bottle 10". The learning bottle 10 and the testing bottle 10 may be collectively referred to simply as "bottle 10."

(びん外観検査装置20)
本発明のびん外観検査装置20は、図3、図4に示すように、びん10の画像を撮像するための撮像装置30と、撮像装置30により撮像された前記検査対象画像内の欠陥の有無を検査するための欠陥検査装置50とを備えている。
(Bottle appearance inspection device 20)
As shown in FIGS. 3 and 4, the bottle visual inspection device 20 of the present invention includes an imaging device 30 for capturing an image of the bottle 10, and the presence or absence of defects in the inspection target image captured by the imaging device 30. It also includes a defect inspection device 50 for inspecting.

(撮像装置30)
図3に示すように、撮像装置30は、びん10を直立姿勢で支持してびん10を中心軸Xの周りに回転させるテーブル31と、びん10に照明光を照射する照明装置32と、びん10に向けて照射された照明光を受けてテーブル31上のびん10の画像を取得するカメラ33と、カメラ33の撮像動作、照明装置32の点灯、消灯の各動作、テーブル31の動作などを制御する制御部34とを含んでいる。
(Imaging device 30)
As shown in FIG. 3, the imaging device 30 includes a table 31 that supports the bottle 10 in an upright position and rotates the bottle 10 around a central axis X, an illumination device 32 that irradiates the bottle 10 with illumination light, and The camera 33 captures an image of the bottle 10 on the table 31 by receiving illumination light directed toward the bottle 10 , the imaging operation of the camera 33 , the lighting and extinguishing operations of the illumination device 32 , the operation of the table 31 , etc. It also includes a control section 34 for controlling.

撮像装置30は、びん外観検査装置20による検査用びん10の検査の際に検査用びん10の画像(「検査対象画像」ともいう。)を撮像する。また、検査を実施していないときに、後述する欠陥予測モデル生成装置40で用いる学習用びん10の画像(「学習用画像」ともいう。)を撮像することもできる。学習用画像または検査対象画像を区別しない場合には単に「撮像画像」ともいう。 The imaging device 30 captures an image of the test bottle 10 (also referred to as an "inspection target image") when the test bottle 10 is inspected by the bottle visual inspection device 20. Furthermore, when an inspection is not being performed, it is also possible to capture an image of the learning bottle 10 (also referred to as a "learning image") for use in a defect prediction model generation device 40, which will be described later. When the learning image or the inspection target image is not distinguished, it is also simply referred to as a "captured image."

テーブル31は検査ステーションTBの位置に水平に設けられており、駆動機構31aにより中心軸X(軸芯)の周りに回転が可能になっている。テーブル31はスターホイール2とともにびん10の位置決め機構を構成する。照明装置32は、検査位置に定位したびん10の胴部13の撮像対象領域14に対して拡散光を照射する。 The table 31 is provided horizontally at the position of the inspection station TB, and can be rotated around a central axis X (axis) by a drive mechanism 31a. The table 31 and the star wheel 2 constitute a positioning mechanism for the bottle 10. The illumination device 32 irradiates the imaging target region 14 of the body 13 of the bottle 10 positioned at the inspection position with diffused light.

カメラ33は、びん10と対面する位置であって、びん10からの透過光を受けてびん10の撮像対象領域14の撮像画像を取得することが可能な位置に配置される。撮像対象領域14とは、びん10の胴部13の所定の高さ領域であって、びん10の全周(びん10の回転角度が360度)以上、2周(びん10の回転角度が720度)以下、より好ましくは、全周以上、全周半(びん10の回転角度が540度)以下にわたる領域であり、カメラ33によりの撮像画像として取得される領域である。びん10の回転の開始時および終了時には後述するテーブル31上のびん10に揺れ等が生じてびん10が安定せず、欠陥が鮮明に撮像されない可能性がある。びん10の全周の画像を確実に取得するために、びん10の少なくとも全周以上にわたる領域を撮像することが好ましく、全周半程度にわたる領域を撮像することがより好ましい。 The camera 33 is disposed at a position facing the bottle 10 and at a position where it can receive transmitted light from the bottle 10 and obtain a captured image of the imaging target area 14 of the bottle 10. The imaging target area 14 is an area of a predetermined height of the body 13 of the bottle 10, and is a region of the entire circumference of the bottle 10 (the rotation angle of the bottle 10 is 360 degrees) and more than two circumferences (the rotation angle of the bottle 10 is 720 degrees). degree), more preferably an area that spans more than the entire circumference and less than a half of the entire circumference (the rotation angle of the bottle 10 is 540 degrees), and is an area that is acquired as an image captured by the camera 33. At the start and end of the rotation of the bottle 10, the bottle 10 on the table 31 (described later) shakes, etc., making the bottle 10 unstable, and defects may not be clearly imaged. In order to reliably obtain an image of the entire circumference of the bottle 10, it is preferable to image an area that spans at least the entire circumference of the bottle 10, and more preferably an area that spans about half the circumference of the bottle 10.

カメラ33として、一例では、複数の画素が縦一列に並べられたCCDラインセンサが用いられている。なお、カメラ33はラインセンサに限定されない。例えば、カメラ33としてエリアカメラを用い、撮像対象領域14を複数回に分けて撮像し、撮像した画像をつなぎ合わせて撮像対象領域14を含む撮像画像としてもよい。 As the camera 33, in one example, a CCD line sensor in which a plurality of pixels are arranged in a vertical line is used. Note that the camera 33 is not limited to a line sensor. For example, an area camera may be used as the camera 33, the image capturing target area 14 may be imaged multiple times, and the captured images may be stitched together to form a captured image including the image capturing target area 14.

カメラ33は、びん10の少なくとも全周、好ましくは全周半にわたる画像データを取得するために、びん10が少なくとも1回転、好ましくは1回転半する間、シャッターが開状態となるように制御される。制御部34は、シャッターの開閉タイミングを与えるタイミング信号を生成してカメラ33へ出力する。 The camera 33 is controlled such that the shutter remains open during at least one revolution, preferably one and a half revolutions of the bottle 10, in order to obtain image data over at least the entire circumference, preferably the entire circumference and a half of the bottle 10. Ru. The control unit 34 generates a timing signal that provides timing for opening and closing the shutter, and outputs it to the camera 33.

図5は、図2(A)に示すびん10について、カメラ33による撮像画像を展開して示したものであり、濃淡画像を構成する各画素は明度が256階調で表されている。図5の展開された撮像画像には、びん10の全周半(540度)にわたって展開された撮像領域が示されており、欠陥としての異物の画像C1~C3が3箇所に現れているが、実際にはびん10に含まれる異物は1つである。図5の撮像画像に現れた異物の画像C1~C3は、びん10の同じ異物が3度撮像されて現れたものである。図5の撮像画像において、左端は撮像開始位置、右端は撮像終了位置であり、左端および右端に現れている異物の画像C1、C3は、びん10が1周回転して異物が同じ回転角度位置にきたときに撮像されて現れたものである。異物の画像C2は、左端の異物の画像C1が取得された位置からびん10が半周回転したときに、同じ異物がびん10の裏側から撮像されて現れたものである。 FIG. 5 shows an expanded image taken by the camera 33 of the bottle 10 shown in FIG. The expanded captured image in FIG. 5 shows an expanded imaging area over the entire circumference (540 degrees) of the bottle 10, and images C1 to C3 of foreign objects as defects appear in three locations. In reality, only one foreign object is contained in the bottle 10. Images C1 to C3 of the foreign object appearing in the captured image of FIG. 5 are images of the same foreign object in the bottle 10 that was imaged three times. In the captured image of FIG. 5, the left end is the imaging start position and the right end is the imaging end position, and images C1 and C3 of the foreign object appearing at the left end and right end are the same rotation angle position of the foreign object after the bottle 10 rotates once. This is what appeared when the image was taken when I arrived. The foreign object image C2 is an image of the same foreign object captured from the back side of the bottle 10 when the bottle 10 rotates half a revolution from the position where the leftmost foreign object image C1 was acquired.

欠陥として異物、汚れ、内面泡、異質ガラスを検査する場合には、カメラ33はびん10と対面する位置であってびん10からの透過光を受けてびん10の画像を取得することが可能な位置に配置される。本実施形態では、図3(A)、図3(B)に示すように、カメラ33と照明装置32とは、びん10を挟んで対向する位置に直線上に配置される。異物、汚れ、内面泡、異質ガラスの欠陥の画像は、透過光を用いることで撮像画像に現れやすい。特に、照明装置32は拡散光源と偏光板を含み、直線偏光の照明光をびん10に照射することで、異質ガラスの画像が撮像画像に現れやすくなる。なお、透過光を用いることで、比較的大きい表面泡、比較的大きいキズ等の欠陥の画像も撮像画像に現れることがある。 When inspecting defects such as foreign matter, dirt, inner bubbles, or foreign glass, the camera 33 is located at a position facing the bottle 10 and can receive transmitted light from the bottle 10 to obtain an image of the bottle 10. placed in position. In this embodiment, as shown in FIGS. 3(A) and 3(B), the camera 33 and the illumination device 32 are arranged on a straight line at opposing positions with the bottle 10 in between. Images of foreign objects, dirt, internal bubbles, and foreign glass defects are more likely to appear in captured images when transmitted light is used. In particular, the illumination device 32 includes a diffused light source and a polarizing plate, and by irradiating the bottle 10 with linearly polarized illumination light, images of foreign glass tend to appear in the captured image. Note that by using transmitted light, images of defects such as relatively large surface bubbles and relatively large scratches may also appear in the captured image.

欠陥として表面泡、キズ、しわを検査する場合には、カメラ33はびん10と対面する位置であってびん10からの反射光を受けてびん10の画像を取得することが可能な位置に配置される。本実施形態では、図4(A)に示すように、カメラ33は、平面視において照明装置32に対してびん10の胴部13の表面の撮像箇所を含む一点10aを中心として中心角度が45度の位置に配置されている。なお、カメラ33の配置位置の中心角度は本実施形態には限定されず、例えば、中心角度は30度以上、60度以下であってよく、カメラ33がびん10の学習用画像および検査対象画像を撮像することが可能な程度の拡散光を得ることができればいずれの中心角度であってもよい。表面泡、キズ、しわの欠陥の画像は、反射光を用いることで撮像画像に現れやすい。なお、反射光を用いることで、欠陥が照明光を反射するような異物(例えば、びん表面に露出している金属等)、照明光を反射するような汚れ(例えば、白色の汚れ)、びん10表面に近い内面泡の欠陥も、撮像画像に現れることがある。なお、図4(A)、図4(B)においてはびん10、テーブル31、照明装置32、カメラ33のみを示し、他の構成の図示を省略している。 When inspecting surface bubbles, scratches, and wrinkles as defects, the camera 33 is placed at a position facing the bottle 10 and at a position where it can receive reflected light from the bottle 10 and obtain an image of the bottle 10. be done. In this embodiment, as shown in FIG. 4(A), the camera 33 has a central angle of 45 mm with respect to the illumination device 32 in a plan view about a point 10a that includes the imaging location on the surface of the body 13 of the bottle 10. It is placed in the position of degree. Note that the central angle of the arrangement position of the camera 33 is not limited to this embodiment; for example, the central angle may be greater than or equal to 30 degrees and less than or equal to 60 degrees, and the camera 33 may The center angle may be any center angle as long as it can obtain enough diffused light to capture an image. Images of defects such as surface bubbles, scratches, and wrinkles are more likely to appear in captured images when reflected light is used. In addition, by using reflected light, defects can be detected such as foreign objects that reflect illumination light (e.g. metal exposed on the bottle surface), dirt that reflects illumination light (e.g. white dirt), and defects on bottles that reflect illumination light. 10 Internal bubble defects near the surface may also appear in the captured image. In addition, in FIG. 4(A) and FIG. 4(B), only the bottle 10, the table 31, the lighting device 32, and the camera 33 are shown, and illustration of other components is omitted.

びん外観検査装置20の検査によって、撮像対象領域14に欠陥を有すると判断されるびん10を「不良品びん10」または「不良品」、撮像対象領域14に欠陥を有さないと判断されるびん10を「良品びん10」または「良品」ともいう。 A bottle 10 that is determined to have a defect in the imaging target area 14 by the inspection by the bottle appearance inspection device 20 is determined to be a "defective bottle 10" or a "defective product", and a bottle 10 that is determined to have no defect in the imaging target area 14 is determined to be a "defective bottle 10" or a "defective product". Bottle 10 is also referred to as "good bottle 10" or "good product."

びん検査システム1の検査ステーションの1つにカメラ33と照明装置32とを図3のように配置した第1のびん外観検査装置20を、他の検査ステーションにカメラ33と照明装置32とを図4のように配置した第2のびん外観検査装置20を、それぞれ設けることで、びん10は、透過光、反射光の両方により撮像され、キズ、表面泡、しわ、異物、汚れ、内面泡および異質ガラスの欠陥の有無を検査することができる。また、ひとつの検査ステーションが十分に広いスペースを有していれば、びん外観検査装置20において、1台のカメラ33に対して2つの照明装置32を図3及び図4に示すように配置してもよい。この場合、びん10を1回転以上させて透過光および反射光のうち一方の光による撮像を行い、さらにびん10を1回転以上させて透過光および反射光のうち他方の光による撮像を行う。 The first bottle visual inspection device 20, in which a camera 33 and a lighting device 32 are arranged as shown in FIG. By providing second bottle visual inspection devices 20 arranged as shown in FIG. 4, the bottle 10 is imaged using both transmitted light and reflected light, and is inspected for scratches, surface bubbles, wrinkles, foreign matter, dirt, inner bubbles, and It is possible to inspect foreign glass for defects. Furthermore, if one inspection station has a sufficiently large space, two lighting devices 32 can be arranged for one camera 33 in the bottle visual inspection device 20 as shown in FIGS. 3 and 4. It's okay. In this case, the bottle 10 is rotated one or more times to capture an image using one of the transmitted light and the reflected light, and the bottle 10 is further rotated one or more times to capture an image using the other of the transmitted light and the reflected light.

本実施形態では、制御部34は汎用のコンピュータから構成されており、図3に示すように欠陥検査装置50を構成する汎用コンピュータと兼ねてもよいが、欠陥検査装置50と別体の汎用コンピュータまたは専用コンピュータを用いてもよい。 In this embodiment, the control unit 34 is composed of a general-purpose computer, and may also serve as a general-purpose computer configuring the defect inspection apparatus 50 as shown in FIG. Alternatively, a dedicated computer may be used.

(欠陥予測モデル生成装置40)
欠陥検査装置50の具体的な機能を説明する前に、欠陥検査装置50で用いられる欠陥予測モデル生成装置40について説明する。図6は、欠陥予測モデル生成装置40の概略構成を示すブロック図である。欠陥予測モデル生成装置40は、検査用びん10の外観に現れる欠陥の有無を予測するための欠陥予測モデルMを生成するためのものである。欠陥予測モデル生成装置40は、汎用のコンピュータで構成することができ、ハードウェア構成として、CPUやGPUなどのプロセッサ、DRAMやSRAMなどの主記憶装置(図示省略)、および、HDDやSSDなどの記憶部44を備えている。記憶部44には、教師データ生成プログラム、学習用プログラム等の欠陥予測モデル生成装置40を動作させるための各種プログラム、パラメータ等が格納されている。
(Defect prediction model generation device 40)
Before explaining the specific functions of the defect inspection device 50, the defect prediction model generation device 40 used in the defect inspection device 50 will be explained. FIG. 6 is a block diagram showing a schematic configuration of the defect prediction model generation device 40. As shown in FIG. The defect prediction model generation device 40 is for generating a defect prediction model M for predicting the presence or absence of defects appearing on the appearance of the inspection bottle 10. The defect prediction model generation device 40 can be configured with a general-purpose computer, and its hardware configuration includes a processor such as a CPU or a GPU, a main storage device such as a DRAM or SRAM (not shown), and an HDD or SSD. A storage section 44 is provided. The storage unit 44 stores various programs, parameters, etc. for operating the defect prediction model generation device 40, such as a teacher data generation program and a learning program.

学習用画像は学習用びんを撮像することで取得される。学習用画像は、教師データを生成するための画像であり、学習用びん10の撮像対象領域14の画像データである。学習用画像には不良品びん10の画像が用いられる。なお、学習用画像には、良品びん10の画像のみが含まれていてもよく、良品のびん10の画像、不良品びん10の画像の両方が含まれていてもよい。学習用画像の数は特に限定されないが、機械学習が十分に実行可能な数であることが好ましい。学習用びんは、撮像装置30とは別途設けられた回転台やカメラ等により予め撮像され、学習用画像が後述する記憶部44に記憶されていてもよい。また、上述したようにびん外観検査装置20による検査が行われていない時に、撮像装置30を用いて撮像されてもよい。 The learning image is obtained by capturing an image of the learning bottle. The learning image is an image for generating teacher data, and is image data of the imaging target region 14 of the learning bottle 10. An image of the defective bottle 10 is used as the learning image. Note that the learning image may include only the image of the non-defective bottle 10, or may include both the image of the non-defective bottle 10 and the image of the defective bottle 10. The number of learning images is not particularly limited, but is preferably a number that allows machine learning to be performed sufficiently. The learning bottle may be imaged in advance by a turntable, a camera, or the like provided separately from the imaging device 30, and the learning image may be stored in the storage unit 44, which will be described later. Further, as described above, when the bottle visual inspection device 20 is not performing an inspection, the imaging device 30 may be used to capture an image.

欠陥予測モデル生成装置40は、図6に機能ブロックとして表された各構成を含むものであり、学習用画像取得部41と、欠陥情報付与部42と、学習部43とを備えている。本実施形態において、これらの各部は、欠陥予測モデル生成装置40のプロセッサが教師データ生成プログラムや学習用プログラムを主記憶装置に読み出して実行することによってソフトウェア的に実現される。 The defect prediction model generation device 40 includes the components shown as functional blocks in FIG. 6, and includes a learning image acquisition section 41, a defect information adding section 42, and a learning section 43. In this embodiment, each of these units is realized in software by the processor of the defect prediction model generation device 40 reading out the teacher data generation program and the learning program into the main storage and executing them.

学習用画像取得部41は、学習用画像を取得する。本実施形態では、撮像装置30から学習用びん10を撮像した学習用画像を取得する。なお、学習用画像が予め記憶部44に記憶されている場合には、学習用画像取得部41は記憶部44から学習用画像を読み出して取得する。また、学習用画像取得部41は外部との通信回線や記憶媒体を介して学習用画像を取得してもよい。 The learning image acquisition unit 41 acquires learning images. In this embodiment, a learning image of the learning bottle 10 is acquired from the imaging device 30. Note that if the learning image is stored in the storage section 44 in advance, the learning image acquisition section 41 reads out the learning image from the storage section 44 and acquires it. Further, the learning image acquisition unit 41 may acquire learning images via an external communication line or a storage medium.

欠陥情報付与部42は欠陥情報を付与して教師データを生成する。欠陥情報とは、欠陥に関する情報である。不良品の学習用画像においては、欠陥情報には学習用画像内の欠陥の位置を示す情報が含まれる。ユーザは、入力装置60であるマウス、タッチパネル、モニタ等を用いた操作により、目視で学習用画像内の欠陥が有る領域を指定する。例えば、図5において、ユーザは点線で囲まれた領域を指定する。欠陥情報付与部42はこの指定された領域の座標データを、学習用画像内の欠陥の位置を示す情報として学習用画像に付与する。また、学習用画像に現れた欠陥ではない小さいキズ、表面泡、しわ、異物、汚れ、内面泡および異質ガラスに対しては、ユーザは欠陥として領域を指定しないか、または、位置を示す情報と欠陥なしという情報を付与し、後述する学習部43に欠陥ではない小さい異物や泡、薄い汚れ等を欠陥と認識しないように学習させる。 The defect information adding unit 42 adds defect information to generate teacher data. Defect information is information regarding defects. In the learning image of a defective product, the defect information includes information indicating the position of the defect within the learning image. The user visually specifies the defective area in the learning image by operating the input device 60, such as a mouse, touch panel, or monitor. For example, in FIG. 5, the user specifies an area surrounded by dotted lines. The defect information adding unit 42 adds the coordinate data of the designated area to the learning image as information indicating the position of the defect within the learning image. In addition, for small scratches, surface bubbles, wrinkles, foreign objects, dirt, inner bubbles, and foreign glass that appear in the training images and are not defects, the user should not specify the area as a defect or provide information indicating the position. Information indicating that there is no defect is given to the learning unit 43, which will be described later, to learn not to recognize small foreign objects, bubbles, thin dirt, etc. that are not defects as defects.

なお、学習用画像内の欠陥の位置を示す情報は、例えば、学習用画像内の欠陥を示す画素を色づけすることで付与されてもよく、欠陥が位置する座標データを入力装置60に入力することで付与されてもよい。また、欠陥情報として、欠陥の種類を示す情報を含んでいてもよい。欠陥の種類は、キズ、表面泡、しわ、異物、汚れ、内面泡および異質ガラスの少なくともいずれかである。さらに、欠陥情報は、学習用画像の欠陥の有無を示す情報であってもよい。 Note that the information indicating the position of the defect in the learning image may be provided by, for example, coloring pixels indicating the defect in the learning image, and inputting coordinate data where the defect is located into the input device 60. It may be given by Further, the defect information may include information indicating the type of defect. The types of defects are at least one of scratches, surface bubbles, wrinkles, foreign matter, dirt, inner bubbles, and foreign glass. Furthermore, the defect information may be information indicating the presence or absence of a defect in the learning image.

また、ユーザの操作により目視によりこれらの欠陥情報が付与されるのではなく、ユーザを介さずに欠陥情報を付与してもよい。例えば、画像上で欠陥を検出するプログラムや欠陥の種類を判別するプログラムを記憶部44に備え、これらのプログラムを動作させることにより欠陥情報が付与されてもよい。 In addition, instead of being visually provided with the defect information through a user's operation, the defect information may be provided without the user's intervention. For example, the storage unit 44 may include a program for detecting defects on an image and a program for determining the type of defect, and the defect information may be provided by operating these programs.

欠陥情報付与部42で欠陥情報が付与された学習用画像は、教師データとして記憶部44に格納される。 The learning image to which defect information has been added by the defect information adding unit 42 is stored in the storage unit 44 as teacher data.

学習部43は、教師データを用いて機械学習を行うことにより、検査対象画像を入力した場合に、検査対象画像内の欠陥の有無を予測する欠陥予測モデルMを生成する。また、欠陥予測モデルMが出力する予測の結果は、欠陥が有るか否かの可能性を示す信頼度であってもよく、欠陥の「有」「無」のみを示す情報であってもよく、検査対象画像内の欠陥の位置情報、および、欠陥の種類(キズ、表面泡、しわ、異物、汚れ、内面泡および異質ガラス)に関する情報であってもよい。学習法は特に限定されないが、例えば、ディープラーニング、サポートベクターマシン、ランダムフォレストなどを用いることができる。生成された欠陥予測モデルMは、記憶部44に格納され、その後、びん10の外観検査のために用いられる。 The learning unit 43 performs machine learning using teacher data to generate a defect prediction model M that predicts the presence or absence of a defect in the image to be inspected when the image to be inspected is input. Furthermore, the prediction result output by the defect prediction model M may be a reliability level that indicates the possibility of whether a defect exists or not, or may be information that only indicates whether a defect exists or not. , position information of the defect in the image to be inspected, and information regarding the type of defect (scratches, surface bubbles, wrinkles, foreign matter, dirt, internal bubbles, and foreign glass). Although the learning method is not particularly limited, for example, deep learning, support vector machine, random forest, etc. can be used. The generated defect prediction model M is stored in the storage unit 44 and then used for visual inspection of the bottle 10.

なお、学習用画像に良品びん10の画像のみが含まれる場合には、欠陥情報付与部42は、学習用画像に対して欠陥なしという欠陥情報を付与してもよい。 Note that when the learning image includes only images of non-defective bottles 10, the defect information adding unit 42 may add defect information indicating that there is no defect to the learning image.

本実施形態では、欠陥予測モデル生成装置40はクラウド上に設けられていてもよいし、汎用コンピュータにより構成されていてもよい。また、後述する欠陥検査装置50が欠陥予測モデル生成装置40の機能を有してもよい。 In this embodiment, the defect prediction model generation device 40 may be provided on the cloud or may be configured by a general-purpose computer. Further, the defect inspection device 50 described later may have the function of the defect prediction model generation device 40.

(欠陥検査装置50)
図7は、欠陥検査装置50の概略構成を示すブロック図である。欠陥検査装置50は、欠陥予測モデルMの生成方法によって生成された欠陥予測モデルMを用いて、撮像装置30により撮像されたびん10の検査対象画像に欠陥が有るか否かを判定する。欠陥検査装置50は、汎用のコンピュータで構成することができ、ハードウェア構成として、CPUやGPUなどのプロセッサ、DRAMやSRAMなどの主記憶装置(図示省略)、および、HDDやSSDなどの記憶部56を備えている。
(Defect inspection device 50)
FIG. 7 is a block diagram showing a schematic configuration of the defect inspection device 50. The defect inspection device 50 uses the defect prediction model M generated by the defect prediction model M generation method to determine whether or not there is a defect in the inspection target image of the bottle 10 captured by the imaging device 30. The defect inspection device 50 can be configured with a general-purpose computer, and has a hardware configuration including a processor such as a CPU or GPU, a main storage device (not shown) such as a DRAM or SRAM, and a storage unit such as an HDD or SSD. It is equipped with 56.

記憶部56には、欠陥予測モデル生成装置40および欠陥予測モデル生成方法によって生成された欠陥予測モデルMの他、欠陥予測プログラム、欠陥の判定プログラムなどの欠陥検査装置50を動作させるための各種プログラムやパラメータが格納されている。また、検査対象画像が撮像装置30により撮像されたのち、記憶部56に記憶されてもよい。 In addition to the defect prediction model M generated by the defect prediction model generation device 40 and the defect prediction model generation method, the storage unit 56 stores various programs for operating the defect inspection device 50 such as a defect prediction program and a defect determination program. and parameters are stored. Further, after the image to be inspected is captured by the imaging device 30, it may be stored in the storage unit 56.

欠陥検査装置50は、図7に機能ブロックとして表された各構成を含むものであり、検査対象画像取得部51と、欠陥予測部52と、第1判定部53と、第2判定部54と、出力部55とを備えている。本実施形態において、これらの各部は、欠陥検査装置50のプロセッサが各種プログラムを主記憶装置に読み出して実行することによってソフトウェア的に実現される。 The defect inspection apparatus 50 includes each component represented as a functional block in FIG. , and an output section 55. In this embodiment, each of these units is realized in software by the processor of the defect inspection device 50 reading various programs into the main storage device and executing them.

検査対象画像取得部51は、検査対象画像を取得する。本実施形態では、撮像装置30から検査用びん10を撮像した検査対象画像を取得する。なお、検査対象画像は予め撮像されて記憶部56に記憶されていてもよく、この場合、検査対象画像取得部51は記憶部56から検査対象画像を読み出して取得する。また、検査対象画像取得部51は外部との通信回線や記憶媒体を介して検査対象画像を取得してもよい。 The inspection target image acquisition unit 51 acquires an inspection target image. In this embodiment, an inspection target image obtained by capturing an image of the inspection bottle 10 from the imaging device 30 is acquired. Note that the inspection target image may be captured in advance and stored in the storage unit 56, and in this case, the inspection target image acquisition unit 51 reads the inspection target image from the storage unit 56 and acquires it. Further, the inspection target image acquisition unit 51 may acquire the inspection target image via an external communication line or a storage medium.

欠陥予測部52は、欠陥予測モデルMを用いて、検査対象画像内の欠陥の有無を予測する機能ブロックである。本実施形態では、欠陥予測部52は、記憶部56から欠陥予測モデルMを主記憶装置に読み出す。欠陥予測部52は、検査対象画像を欠陥予測モデルMに入力し、これに対して、欠陥予測モデルMは、検査対象画像内に欠陥が有るか否かの可能性を示す信頼度を、予測の結果として出力する。欠陥予測部52は欠陥予測モデルMが出力した信頼度のデータを予測の結果として第1判定部53に入力する。なお、欠陥予測モデルMは、欠陥の種類ごとに信頼度を出力してもよい。すなわち、検査対象画像に異物、表面泡、表面泡以外の泡、汚れがそれぞれ含まれるか否かの可能性を示す信頼度を出力する。また、欠陥予測モデルMは、検査対象画像上の欠陥の位置を示す情報を出力してもよい。さらに、欠陥予測モデルMは信頼度ではなく検査対象画像内の欠陥の「有」「無」の情報のみを出力してもよい。その場合、欠陥予測部52は、当該情報を第1判定部53に出力してもよいし、出力部55に出力してもよい。 The defect prediction unit 52 is a functional block that uses the defect prediction model M to predict the presence or absence of a defect in the image to be inspected. In this embodiment, the defect prediction unit 52 reads the defect prediction model M from the storage unit 56 into the main storage device. The defect prediction unit 52 inputs the image to be inspected to the defect prediction model M, and the defect prediction model M predicts the reliability indicating the possibility of whether or not there is a defect in the image to be inspected. output as the result. The defect prediction unit 52 inputs the reliability data output by the defect prediction model M to the first determination unit 53 as a prediction result. Note that the defect prediction model M may output reliability for each type of defect. That is, reliability levels are output that indicate whether or not the image to be inspected contains foreign matter, surface bubbles, bubbles other than surface bubbles, and dirt. Further, the defect prediction model M may output information indicating the position of the defect on the image to be inspected. Further, the defect prediction model M may output only the information of "presence" or "absence" of defects in the image to be inspected, instead of the reliability. In that case, the defect prediction unit 52 may output the information to the first determination unit 53 or the output unit 55.

第1判定部53は、欠陥予測部52から出力された信頼度を閾値と比較することにより、検査対象画像の欠陥の有無を判定する。第1判定部53は、記憶部56から閾値を読み出し、信頼度が閾値より高い場合に検査対象画像に欠陥が有ると判定し、閾値以下の場合に検査対象画像に欠陥が無いと判定する。第1判定部53は、検査対象画像に欠陥が有るか否かを判定結果として出力する。なお、欠陥予測モデルMが欠陥の種類ごとに信頼度を出力する場合には、第1判定部53は欠陥の種類ごとに判定を行い、異物、表面泡、表面泡以外の泡、汚れのいずれの欠陥が有るかを判定結果として出力する。欠陥が有る場合には、判定結果は第2判定部54に出力され、欠陥が無い場合には、判定結果は出力部55に出力される。 The first determination unit 53 determines whether or not there is a defect in the image to be inspected by comparing the reliability output from the defect prediction unit 52 with a threshold value. The first determination unit 53 reads the threshold value from the storage unit 56, and determines that there is a defect in the image to be inspected when the reliability is higher than the threshold value, and determines that there is no defect in the image to be inspected when it is less than or equal to the threshold value. The first determination unit 53 outputs as a determination result whether or not there is a defect in the image to be inspected. Note that when the defect prediction model M outputs reliability for each type of defect, the first determination unit 53 makes a determination for each type of defect, and determines whether foreign matter, surface bubbles, bubbles other than surface bubbles, or dirt. Outputs the determination result as to whether there is a defect. If there is a defect, the determination result is output to the second determination section 54, and if there is no defect, the determination result is output to the output section 55.

図8(A)~図8(D)は第1判定部53において欠陥が有ると判定された検査対象画像の例である。なお、図8(A)~図8(D)は検査対象画像全体を示すものではなく、検査対象画像のうち、欠陥と判定された部分が現れた一部分のみを切り取った画像である。図中、点線で囲まれた領域内の暗く現れた部分または白く現れた部分が欠陥と判定された部分である。点線は説明のために付したものであり、実際の検査対象画像には含まれない。図8(A)の点線の領域には表面泡が現れ、図8(B)の点線の領域には異物が現れている。一方、図8(C)の点線の領域にはびん10の表面に付いた薄い汚れが現れ、図8(D)の点線の領域には小さな異物が現れている。図8(C)、図8(D)のような小さな異物や泡、薄い汚れ等は、欠陥予測部52、第1判定部53により欠陥と判定される場合があるが、要求される品質によっては欠陥と判定する必要のないものである。 FIGS. 8A to 8D are examples of images to be inspected that are determined to have defects by the first determination unit 53. Note that FIGS. 8A to 8D do not show the entire image to be inspected, but are images obtained by cutting out only a portion of the image to be inspected in which a portion determined to be a defect appears. In the figure, the dark or white parts within the area surrounded by dotted lines are parts determined to be defects. The dotted line is added for explanation and is not included in the actual image to be inspected. Surface bubbles appear in the region indicated by the dotted line in FIG. 8(A), and foreign matter appears in the region indicated by the dotted line in FIG. 8(B). On the other hand, light dirt on the surface of the bottle 10 appears in the dotted line area in FIG. 8(C), and small foreign matter appears in the dotted line area in FIG. 8(D). Small foreign objects, bubbles, thin stains, etc. as shown in FIGS. 8(C) and 8(D) may be determined as defects by the defect prediction unit 52 and the first determination unit 53, but depending on the quality required. There is no need to judge it as a defect.

なお、第1判定部53に検査対象画像内の欠陥の「有」「無」の情報のみが予測結果として入力された場合には、第1判定部53の判定結果は欠陥の「有」「無」の情報に沿ったものとなる。 Note that when only the information of "presence" or "absence" of a defect in the image to be inspected is inputted to the first judgment section 53 as a prediction result, the judgment result of the first judgment section 53 is "presence" or "absence" of a defect. It will be in line with the information "No."

第2判定部54は、第1判定部53で欠陥が有ると判定された検査対象画像をマスク走査し、マスク内の着目画素の周辺画素との明度差に基づく濃淡処理によって検査対象画像に欠陥が有るか否かを判定する。 The second determination unit 54 performs mask scanning on the inspection target image determined to have a defect by the first determination unit 53, and performs gradation processing based on the brightness difference between the pixel of interest and surrounding pixels in the mask to create a defect in the inspection target image. Determine whether or not there is.

検査対象画像は、濃淡画像であって各画素の明度が256階調で表されており、暗いほど明度の値は小さい。第2判定部54は、各画素について、所定の画素数だけ離れた近傍の他の画素との明度差を算出する処理(濃淡処理)を行う。続いて、第2判定部54は、記憶部56から濃淡閾値を主記憶装置に読み出し、濃淡画像において、明度差の値が濃淡閾値を超える画素を検出し、2値化処理により2値画像を生成する。この2値画像は、濃淡閾値を超えた画素を「1」、それ以外の画素を「0」とするものである。第2判定部54は、濃淡閾値を超えた画素のうち、連続している画素の数をカウントする。例えば、ある程度大きな異物は、異物の画像の輪郭を構成する画素が「1」、輪郭の内外の画素が「0」となり、輪郭を構成する「1」の画素が環状に連続するもので、輪郭追跡によって輪郭を構成する画素数(異物の周囲長に相当する)がカウントされる。なお、異物の輪郭ではなく、輪郭により囲まれる画素を異物を構成する画素としてその画素数(異物の面積に相当する)をカウントしてもよい。第2判定部54は、記憶部56から周囲長の閾値(サイズ閾値)を読み出し、カウントした画素数とサイズ閾値と比較する。カウントした画素数がサイズ閾値以上の場合には、検査対象画像は欠陥が有ると判定する。図8(C)、図8(D)に示される小さな異物や泡、薄い汚れ等は、第1判定部53において欠陥と判定された場合であっても、第2判定部54により欠陥ではないと判定される。 The image to be inspected is a grayscale image in which the brightness of each pixel is represented by 256 gradations, and the darker the image, the smaller the brightness value. The second determination unit 54 performs processing (gradation processing) for each pixel to calculate the brightness difference with other pixels in the vicinity separated by a predetermined number of pixels. Subsequently, the second determination unit 54 reads the grayscale threshold value from the storage unit 56 to the main storage device, detects pixels whose brightness difference value exceeds the grayscale threshold value in the grayscale image, and converts the binary image into a binary image by binarization processing. generate. In this binary image, pixels exceeding the grayscale threshold are set as "1", and other pixels are set as "0". The second determination unit 54 counts the number of consecutive pixels among the pixels that exceed the gray threshold. For example, for a somewhat large foreign object, the pixels that make up the outline of the image of the foreign object are "1", the pixels inside and outside the outline are "0", and the pixels that make up the outline are continuous in a ring, and the outline The number of pixels forming the contour (corresponding to the circumference of the foreign object) is counted by tracking. Note that instead of the outline of the foreign object, the pixels surrounded by the outline may be counted as pixels constituting the foreign object (corresponding to the area of the foreign object). The second determination unit 54 reads the perimeter threshold (size threshold) from the storage unit 56 and compares the counted number of pixels with the size threshold. If the counted number of pixels is equal to or greater than the size threshold, it is determined that the image to be inspected has a defect. Even if the small foreign matter, bubbles, thin dirt, etc. shown in FIGS. 8(C) and 8(D) are determined to be defects by the first determining unit 53, the second determining unit 54 determines that they are not defects. It is determined that

なお、第2判定部54は、第1判定部53で欠陥が有ると判定された検査対象画像全体を走査して欠陥の有無の判定を行うのではなく、欠陥および欠陥の周囲を含む領域のみを走査して欠陥の有無の判定を行ってもよい。この場合、欠陥予測部52は欠陥予測モデルMに検査対象画像内の欠陥の位置情報を出力させ、第2判定部54は第1判定部53からまたは欠陥予測部52から位置情報を取得する。これにより、第2判定部54の演算量を軽減することができる。また、欠陥予測モデルMが予測結果として検査対象画像内の欠陥の種類を出力する場合には、記憶部56に予め欠陥の種類に応じた濃淡閾値、サイズ閾値を記憶させ、第2判定部54は欠陥の種類に応じた濃淡閾値、サイズ閾値を用いて欠陥の有無を判定してもよい。 Note that the second determination unit 54 does not scan the entire image to be inspected that has been determined to have a defect by the first determination unit 53 to determine the presence or absence of a defect, but only the area including the defect and the area around the defect. The presence or absence of a defect may be determined by scanning. In this case, the defect prediction unit 52 causes the defect prediction model M to output position information of the defect in the image to be inspected, and the second determination unit 54 acquires the position information from the first determination unit 53 or from the defect prediction unit 52. Thereby, the amount of calculation by the second determination section 54 can be reduced. In addition, when the defect prediction model M outputs the type of defect in the image to be inspected as a prediction result, the storage unit 56 stores in advance a grayscale threshold value and a size threshold value according to the type of defect, and the second determination unit 54 The presence or absence of a defect may be determined using a shade threshold and a size threshold depending on the type of defect.

出力部55は第2判定部54による欠陥の有無の判定結果または第1判定部53による欠陥が無いとする判定結果を弁別機構4に出力する。また、出力部55は検査対象画像の欠陥の種類を出力してもよい。 The output unit 55 outputs the determination result of the presence or absence of a defect by the second determination unit 54 or the determination result of the absence of a defect by the first determination unit 53 to the discrimination mechanism 4 . Further, the output unit 55 may output the type of defect in the image to be inspected.

本実施形態では、欠陥検査装置50はクラウド上に設けられていてもよい。 In this embodiment, the defect inspection device 50 may be provided on the cloud.

(欠陥予測モデルMの生成方法)
本実施形態に係る欠陥予測モデルMの生成方法の処理手順について、図9に示すフローチャートを用いて説明する。欠陥予測モデルMの生成方法は欠陥予測モデル生成装置40によって実行される。
(Method for generating defect prediction model M)
The processing procedure of the method for generating the defect prediction model M according to this embodiment will be explained using the flowchart shown in FIG. The method for generating the defect prediction model M is executed by the defect prediction model generation device 40.

ステップS1の学習用画像取得ステップでは、学習用画像取得部41が撮像装置30から学習用画像を取得する。続いて、ステップS2の生成ステップにおいて、ユーザの入力装置60の操作により、欠陥情報付与部42が学習用画像に欠陥情報を付与し、教師データを生成する。 In the learning image acquisition step of step S1, the learning image acquisition unit 41 acquires a learning image from the imaging device 30. Subsequently, in the generation step of step S2, the defect information adding section 42 adds defect information to the learning image by the user's operation of the input device 60, and generates teacher data.

ステップS1、S2によって、1つの学習用画像から1つの教師データが生成される。予め定められた全ての学習用画像が処理されるまでステップS1、S2を繰り返し、全ての学習用画像が処理された場合には(ステップS3においてYES)、ステップS4の学習ステップへ移行する。ステップS4では、学習部43が教師データに基づいて機械学習を行うことにより、欠陥予測モデルMを生成する。 One piece of teacher data is generated from one learning image by steps S1 and S2. Steps S1 and S2 are repeated until all predetermined learning images have been processed, and when all the learning images have been processed (YES in step S3), the process moves to the learning step of step S4. In step S4, the learning unit 43 generates a defect prediction model M by performing machine learning based on the teacher data.

(びん10の外観検査方法)
本実施形態に係るびん10の外観検査方法の処理手順について、図10に示すフローチャートを用いて説明する。びん10の外観検査方法は、びん外観検査装置20の撮像装置30および欠陥検査装置50によって実行される。
(Appearance inspection method for bottle 10)
The processing procedure of the visual inspection method for the bottle 10 according to this embodiment will be explained using the flowchart shown in FIG. The visual inspection method for the bottle 10 is performed by the imaging device 30 and the defect inspection device 50 of the bottle visual inspection device 20.

ステップS11では、びん外観検査装置20の所定の検査ステーションTBに検査用びん10が導入され、撮像装置30のテーブル31上に検査用びん10が載置された否かを判断する。検査用びん10が導入されると(ステップS11でYES)、ステップS12において、撮像装置30の制御部34は照明装置32を点灯させ、ステップS13においてテーブル31を回転させ、ステップS14においてカメラ33に撮像を実行させる。撮像が終了すると、ステップS15において制御部34は照明を消灯させ、テーブル31の回転を停止させる。 In step S11, the test bottle 10 is introduced into a predetermined test station TB of the bottle visual inspection device 20, and it is determined whether the test bottle 10 is placed on the table 31 of the imaging device 30. When the test bottle 10 is introduced (YES in step S11), the control unit 34 of the imaging device 30 turns on the illumination device 32 in step S12, rotates the table 31 in step S13, and turns on the camera 33 in step S14. Execute imaging. When the imaging is completed, the control unit 34 turns off the illumination and stops the rotation of the table 31 in step S15.

ステップS16の検査対象画像取得ステップにおいて、欠陥検査装置50の検査対象画像取得部51は検査対象画像を取得する。ステップS17の欠陥予測ステップにおいて、欠陥予測部52は、記憶部56から欠陥予測モデルMを主記憶装置に読み出し、欠陥予測モデルMを用いて、検査対象画像内の欠陥の有無を予測し、信頼度を予測の結果として出力する。ステップS18は第1判定ステップであり、第1判定部53は記憶部56から閾値を読み出し、信頼度が閾値より高い場合に検査対象画像に欠陥が有ると判定し、信頼度が閾値以下の場合には検査対象画像に欠陥が無いと判定し、判定結果を出力する。検査対象画像に欠陥が有ると判定された場合には、ステップS19へ移行する。検査対象画像に欠陥が無いと判定された場合には、ステップS22へ移行する。ステップS22では、出力部55は検査対象画像に係るびん10は良品であるという判定結果を弁別機構4に出力する。 In the inspection target image acquisition step of step S16, the inspection target image acquisition unit 51 of the defect inspection apparatus 50 acquires the inspection target image. In the defect prediction step of step S17, the defect prediction unit 52 reads the defect prediction model M from the storage unit 56 to the main storage device, uses the defect prediction model M to predict the presence or absence of defects in the image to be inspected, and Output the degree as the prediction result. Step S18 is a first determination step, and the first determination unit 53 reads the threshold value from the storage unit 56, and determines that there is a defect in the image to be inspected when the reliability is higher than the threshold, and when the reliability is less than or equal to the threshold. It is determined that there is no defect in the image to be inspected, and the determination result is output. If it is determined that there is a defect in the image to be inspected, the process moves to step S19. If it is determined that there is no defect in the image to be inspected, the process moves to step S22. In step S22, the output unit 55 outputs a determination result that the bottle 10 associated with the image to be inspected is a good product to the discrimination mechanism 4.

ステップS19において、第2判定部54は、欠陥が有ると判定された検査対象画像に対して、所定の画像処理を実行し、ステップS20の第2判定ステップにおいて、検査対象画像に欠陥が有るか否かを判定する。第2判定ステップにおいて欠陥が有るとの判定の場合には、ステップS21において、出力部55は検査対象画像に係る検査用びん10が不良品であるという判定結果を弁別機構4に出力する。欠陥が無いと判定の場合には、ステップS20からステップS22へ移行し、出力部55は検査対象画像に係る検査用びん10が良品であるという判定結果を弁別機構4に出力する。ステップS11~S22によって1つの検査用びん10の外観検査のステップが終了し、次の検査用びん10の検査のためにステップS11に戻る。検査済の検査用びん10がテーブル31上から送り出され、新たに検査用びん10がテーブル31上に導入されると、ステップS11~S22の外観検査が行われる。S11において検査用びん10が導入されず、検査が終了の場合には(S25においてYES)、びん10の外観検査の動作を終了する。 In step S19, the second determination unit 54 performs predetermined image processing on the inspection target image determined to have a defect, and in the second determination step of step S20, determines whether the inspection target image has a defect. Determine whether or not. If it is determined in the second determination step that there is a defect, the output unit 55 outputs a determination result that the inspection bottle 10 associated with the image to be inspected is defective to the discrimination mechanism 4 in step S21. If it is determined that there is no defect, the process moves from step S20 to step S22, and the output unit 55 outputs to the discrimination mechanism 4 the determination result that the inspection bottle 10 associated with the inspection target image is a non-defective product. The step of visual inspection of one test bottle 10 is completed through steps S11 to S22, and the process returns to step S11 to inspect the next test bottle 10. When the inspected test bottle 10 is sent out from the table 31 and a new test bottle 10 is introduced onto the table 31, the appearance inspection in steps S11 to S22 is performed. If the inspection bottle 10 is not introduced in S11 and the inspection is finished (YES in S25), the operation of visual inspection of the bottle 10 is finished.

本実施形態によれば、びん10の外観に現れる欠陥が有る学習用画像を用いてびん10の欠陥予測モデルMを生成しているので、高精度の外観検査が可能となる。特に、変形部分11を有するびん10やレリーフ部分12を有するびん10の画像を学習用画像として用いて欠陥予測モデルMを生成することで、それらのびん10に対して、変形部分11やレリーフ部分12の影響を受けない高精度の外観検査が可能となる。 According to this embodiment, the defect prediction model M of the bottle 10 is generated using a learning image in which defects appear on the appearance of the bottle 10, so that highly accurate appearance inspection is possible. In particular, by generating the defect prediction model M using images of the bottle 10 having the deformed part 11 and the bottle 10 having the relief part 12 as learning images, This enables highly accurate visual inspection that is not affected by 12.

また、本実施形態では、第1判定部53において欠陥予測モデルMを用いて検査対象画像内の欠陥の有無を予測し、欠陥が有ると判定された検査対象画像に対しては、さらに第2判定部54において濃淡画像を構成する各画素の周辺画素との明度差計測に基づいて検査対象画像に欠陥が有るか否かを判定している。第1判定部53において良品びんに係る検査対象画像を欠陥予測モデルが誤って不良品びんに係る検査対象画像として判定した場合であっても、第2判定部54で第1判定部53とは異なる判定方法で再度欠陥判定を行うため、誤って良品びんに係る検査対象画像を不良品に係る検査対象画像と判定することが防がれ、より高精度の外観検査が可能となる。 Further, in this embodiment, the first determination unit 53 uses the defect prediction model M to predict the presence or absence of a defect in the inspection target image, and for the inspection target image determined to have a defect, a second The determination unit 54 determines whether or not there is a defect in the image to be inspected based on the measurement of the brightness difference between each pixel constituting the grayscale image and surrounding pixels. Even if the defect prediction model erroneously determines the inspection target image related to a non-defective bottle in the first determination unit 53 as the inspection target image related to a defective bottle, the second determination unit 54 Since defect determination is performed again using a different determination method, it is possible to prevent an image to be inspected related to a good bottle from being mistakenly determined to be an image to be inspected related to a defective product, and a more highly accurate appearance inspection is possible.

(欠陥予測モデルMの判定性能の検証試験)
欠陥予測モデルMが検査対象画像を欠陥を有する画像として判定できるか否かの判定性能の検証試験を行った。まず、欠陥予測モデル生成装置40により欠陥予測モデルMを作成した。図2(A)に示す学習用びん10を300本用意した。学習用びん10は欠陥が有る不良品びん10が200本である。撮像装置30により各びん10の学習用画像を撮像し、欠陥情報を付与した。これら300枚の学習用画像を用いて、欠陥予測モデルMを作成した。
(Verification test of judgment performance of defect prediction model M)
A verification test was conducted to determine whether the defect prediction model M can determine an image to be inspected as having a defect. First, a defect prediction model M was created using the defect prediction model generation device 40. Three hundred learning bottles 10 shown in FIG. 2(A) were prepared. There are 200 defective learning bottles 10 with defects. A learning image of each bottle 10 was captured by the imaging device 30, and defect information was added. A defect prediction model M was created using these 300 learning images.

上記の欠陥予測モデルMの動作について試験を行った。検査用びん10として不良品びん10を75本、良品びん10を75本を用意した。これらの各検査用びん10を撮像装置30により撮像し、検査対象画像を得、欠陥予測モデルMに信頼度を出力させた。図11に試験結果を示す。図11のグラフの横軸は、検査対象の不良品びん10、良品びん10の各びん10に付されたびん番号であり、縦軸は信頼度である。信頼度が1に近づくほど、検査対象画像には欠陥が有る可能性が高いことを示している。 The operation of the defect prediction model M described above was tested. As bottles 10 for inspection, 75 defective bottles 10 and 75 good bottles 10 were prepared. Each of these inspection bottles 10 was imaged by the imaging device 30 to obtain an image to be inspected, and the defect prediction model M was caused to output reliability. Figure 11 shows the test results. The horizontal axis of the graph in FIG. 11 is the bottle number assigned to each of the defective bottles 10 and non-defective bottles 10 to be inspected, and the vertical axis is the reliability. The closer the reliability is to 1, the higher the possibility that the image to be inspected has a defect.

信頼度に基づき、検査対象画像に欠陥が有るか否かを判定した。閾値を0.45に設定し、信頼度が0.45以上である検査対象画像に係るびん10を不良品、信頼度が0.45より小さい検査対象画像に係るびん10を良品とした。判定結果を表1に示す。良品びん10の検査対象画像(「良品画像」ともいう。)の75枚は全て信頼度が0.45より低くなり、良品と判定された。また、不良品びん10の検査対象画像(「不良品画像」ともいう。)の75枚については、83%の画像が不良品、17%の画像が良品と判定された。このように欠陥予測モデルMによるびん10の欠陥の判定において、良品画像において誤って不良品として判定されることはなく、また、不良品画像においても83%を正しく不良品として判定できた。なお、17%の不良品が良品として判定されるが、誤って良品と判定されてもびん外観検査装置20による検査の後にさらに目視による検査がなされるため、不良品が市場に流出する恐れを確実に抑制することができる。 Based on the reliability, it was determined whether the image to be inspected had a defect. The threshold value was set to 0.45, and bottles 10 associated with images to be inspected with a reliability of 0.45 or higher were defined as defective products, and bottles 10 associated with images to be inspected with a reliability of less than 0.45 were defined as non-defective products. The determination results are shown in Table 1. All 75 of the inspection target images (also referred to as "non-defective images") of the non-defective bottle 10 had a reliability lower than 0.45 and were determined to be non-defective. Furthermore, of the 75 images to be inspected (also referred to as "defective product images") of the defective product bottles 10, 83% of the images were determined to be defective products and 17% of the images were determined to be non-defective products. In this way, in determining the defects of the bottles 10 using the defect prediction model M, no non-defective product images were erroneously determined as defective products, and 83% of the defective product images were correctly determined as defective products. Note that 17% of defective products are determined to be non-defective products, but even if they are incorrectly determined to be non-defective products, a further visual inspection is performed after the inspection by the bottle appearance inspection device 20, so there is a risk that defective products will flow into the market. It can be suppressed reliably.

また、閾値を0.4に設定した場合の判定結果を表2に示す。良品画像の75枚のうち、99%の画像が良品と判定され、1%のみが誤って不良品と判定された。また、不良品画像については、85%が不良品、15%が良品と判定された。このように良品画像であるにも関わらず誤って不良品として判定された画像は少なく、また、不良品画像においても85%を正しく不良品として判定できた。良品画像であるにも関わらず誤って不良品として判定された画像は、第2判定部54において再度の判定が行われ、良品と判断される。 Further, Table 2 shows the determination results when the threshold value was set to 0.4. Of the 75 non-defective images, 99% of the images were determined to be non-defective, and only 1% were erroneously determined to be defective. Furthermore, regarding images of defective products, 85% were determined to be defective products and 15% were determined to be non-defective products. As described above, there were few images that were incorrectly determined to be defective even though they were non-defective images, and 85% of the images of defective products were correctly determined to be defective. An image that is erroneously determined to be a defective product even though it is a non-defective image is judged again by the second determination unit 54 and is determined to be a non-defective product.

Figure 2023137057000002
Figure 2023137057000002

Figure 2023137057000003
Figure 2023137057000003

以上、本発明の一実施形態について説明したが、本発明は上記実施形態に限定されるものではなく、本発明の趣旨を逸脱しない限りにおいて種々の変更が可能である。実施形態として記載され又は図面に示されている構成部品の寸法、材質、形状、その相対的配置等は、本発明の範囲をこれに限定する趣旨ではなく、単なる説明例にすぎない。一つの構成要素を「備える」、「具える」、「具備する」、「含む」、又は「有する」という表現は、他の構成要素の存在を除外する排他的な表現ではない Although one embodiment of the present invention has been described above, the present invention is not limited to the above embodiment, and various changes can be made without departing from the spirit of the present invention. The dimensions, materials, shapes, relative arrangements, etc. of the components described in the embodiments or shown in the drawings are not intended to limit the scope of the invention thereto, and are merely illustrative examples. The expressions "comprising," "comprising," "comprising," "containing," or "having" one component are not exclusive expressions that exclude the presence of other components.

1 びん検査システム
2 スターホイール
4 弁別機構
10 びん
11 変形部分
12 レリーフ部分
14 撮像対象領域
20 びん外観検査装置
30 撮像装置
31 テーブル
32 照明装置
33 カメラ
34 制御部
40 欠陥予測モデル生成装置
41 学習用画像取得部
42 欠陥情報付与部
43 学習部
50 欠陥検査装置
51 検査対象画像取得部
52 欠陥予測部
53 第1判定部
54 第2判定部
1 Bottle inspection system 2 Star wheel 4 Discrimination mechanism 10 Bottle 11 Deformed portion 12 Relief portion 14 Imaging target area 20 Bottle visual inspection device 30 Imaging device 31 Table 32 Illumination device 33 Camera 34 Control unit 40 Defect prediction model generation device 41 Learning image Acquisition unit 42 Defect information provision unit 43 Learning unit 50 Defect inspection device 51 Inspection target image acquisition unit 52 Defect prediction unit 53 First determination unit 54 Second determination unit

Claims (13)

びんの外観に現れる欠陥の有無を予測するための欠陥予測モデルを生成する方法であって、
学習用画像を取得する学習用画像取得ステップと、
前記学習用画像に欠陥情報を付与して教師データを生成する生成ステップと、
前記教師データを用いて機械学習を行うことにより、検査対象画像を入力した場合に、前記検査対象画像内の欠陥の有無を予測する欠陥予測モデルを生成する学習ステップとを備える、欠陥予測モデルの生成方法。
A method for generating a defect prediction model for predicting the presence or absence of defects appearing on the appearance of a bottle, the method comprising:
a learning image acquisition step of acquiring a learning image;
a generation step of adding defect information to the learning image to generate teacher data;
a learning step of generating a defect prediction model that predicts the presence or absence of a defect in the image to be inspected when the image to be inspected is input by performing machine learning using the training data; Generation method.
前記欠陥情報は、前記学習用画像内の欠陥の位置を示す情報を含む、請求項1に記載の欠陥予測モデルの生成方法。 2. The defect prediction model generation method according to claim 1, wherein the defect information includes information indicating a position of a defect within the learning image. 前記欠陥情報は、欠陥の種類を示す情報を含み、前記欠陥の種類は、キズ、表面泡、しわ、異物、汚れ、内面泡および異質ガラスの少なくともいずれかである、請求項1または2に記載の欠陥予測モデルの生成方法。 3. The defect information includes information indicating the type of defect, and the type of defect is at least one of scratches, surface bubbles, wrinkles, foreign objects, dirt, inner bubbles, and foreign glass. How to generate a defect prediction model. 検査対象のびんの検査対象画像を取得する取得ステップと、
請求項1~3のいずれか一項に記載の欠陥予測モデルの生成方法により生成された欠陥予測モデルを用いて、前記検査対象画像内の欠陥の有無を予測する欠陥予測ステップと、を備えるびん外観検査方法。
an acquisition step of acquiring an image to be inspected of the bottle to be inspected;
A bottle comprising: a defect prediction step of predicting the presence or absence of a defect in the image to be inspected using the defect prediction model generated by the defect prediction model generation method according to any one of claims 1 to 3. Appearance inspection method.
前記欠陥予測ステップでは、前記欠陥予測モデルは、前記検査対象画像内に欠陥が有るか否かの可能性を示す信頼度を、予測結果として出力する、請求項4に記載のびん外観検査方法。 5. The bottle visual inspection method according to claim 4, wherein in the defect prediction step, the defect prediction model outputs a degree of reliability indicating the possibility of whether or not there is a defect in the image to be inspected as a prediction result. 前記信頼度を閾値と比較することにより、前記検査対象画像の欠陥の有無を判定する第1判定ステップをさらに備える、請求項5に記載のびん外観検査方法。 6. The bottle visual inspection method according to claim 5, further comprising a first determination step of determining whether or not there is a defect in the image to be inspected by comparing the reliability with a threshold value. 前記第1判定ステップで欠陥が有ると判定された前記検査対象画像について、画像を構成する各画素の周辺画素との明度差に基づく処理によって前記検査対象画像に欠陥が有るか否かをさらに判定する第2判定ステップをさらに備える、請求項6に記載のびん外観検査方法。 Regarding the inspection target image determined to have a defect in the first determination step, it is further determined whether or not the inspection target image has a defect by processing based on the brightness difference between each pixel constituting the image and surrounding pixels. The bottle visual inspection method according to claim 6, further comprising a second determination step. 検査対象のびんの検査対象画像を取得する検査対象画像取得部と、
請求項1~3のいずれか一項に記載の欠陥予測モデルの生成方法により生成された欠陥予測モデルを用いて、前記検査対象画像内の欠陥の有無を予測する欠陥予測部と、
を含むびん外観検査装置。
an inspection target image acquisition unit that acquires an inspection target image of a bottle to be inspected;
A defect prediction unit that predicts the presence or absence of a defect in the image to be inspected using the defect prediction model generated by the defect prediction model generation method according to any one of claims 1 to 3;
Bottle visual inspection equipment including:
前記欠陥予測モデルは、前記検査対象画像内に欠陥が有るか否かの可能性を示す信頼度を、予測結果として出力する、請求項8に記載のびん外観検査装置。 9. The bottle visual inspection apparatus according to claim 8, wherein the defect prediction model outputs a degree of reliability indicating the possibility of whether or not there is a defect in the image to be inspected as a prediction result. 前記信頼度を閾値と比較することにより、前記検査対象画像の欠陥の有無を判定する第1判定部をさらに備える、請求項9に記載のびん外観検査装置。 The bottle visual inspection device according to claim 9, further comprising a first determination unit that determines whether or not there is a defect in the image to be inspected by comparing the reliability with a threshold value. 前記第1判定部において欠陥を有すると判定された前記検査対象画像において、着目画素とその周辺画素との明度差に基づいて前記検査対象画像に欠陥が有るか否かを判定する第2判定部をさらに含む、請求項10に記載のびん外観検査装置。 a second determination unit that determines whether or not the inspection target image has a defect based on a brightness difference between a pixel of interest and its surrounding pixels in the inspection target image determined to have a defect by the first determination unit; The bottle visual inspection device according to claim 10, further comprising: 前記検査対象画像を撮像するための撮像装置をさらに備える、請求項8から11のいずれか一項に記載のびん外観検査装置。 The bottle visual inspection device according to any one of claims 8 to 11, further comprising an imaging device for capturing the inspection target image. 前記撮像装置は、びんを直立姿勢で支持してびんを中心軸の周りに回転させるテーブルと、前記びんに照明光を照射する照明装置と、びんに向けて照射された照明光を受けて前記テーブル上のびんの前記検査対象画像を取得するカメラと、少なくとも前記カメラの撮像動作を制御する制御部とを含み、
前記制御部は、びんの少なくとも全周にわたる画像を取得することが可能なシャッターのタイミングを与えるタイミング信号を生成して前記カメラへ出力する請求項12に記載のびん外観検査装置。
The imaging device includes a table that supports the bottle in an upright position and rotates the bottle around a central axis, an illumination device that irradiates the bottle with illumination light, and a table that receives the illumination light that is irradiated toward the bottle. including a camera that acquires the inspection target image of the bottle on the table, and a control unit that controls at least the imaging operation of the camera;
13. The bottle visual inspection apparatus according to claim 12, wherein the control unit generates a timing signal that provides timing for a shutter that can capture images over at least the entire circumference of the bottle, and outputs the generated timing signal to the camera.
JP2022043054A 2022-03-17 2022-03-17 Method of generating defect prediction model, bottle appearance inspection method and bottle appearance inspection device Pending JP2023137057A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022043054A JP2023137057A (en) 2022-03-17 2022-03-17 Method of generating defect prediction model, bottle appearance inspection method and bottle appearance inspection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022043054A JP2023137057A (en) 2022-03-17 2022-03-17 Method of generating defect prediction model, bottle appearance inspection method and bottle appearance inspection device

Publications (1)

Publication Number Publication Date
JP2023137057A true JP2023137057A (en) 2023-09-29

Family

ID=88145136

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022043054A Pending JP2023137057A (en) 2022-03-17 2022-03-17 Method of generating defect prediction model, bottle appearance inspection method and bottle appearance inspection device

Country Status (1)

Country Link
JP (1) JP2023137057A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117710366A (en) * 2024-02-02 2024-03-15 杭州百子尖科技股份有限公司 Quality inspection method and device for thermos cup and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117710366A (en) * 2024-02-02 2024-03-15 杭州百子尖科技股份有限公司 Quality inspection method and device for thermos cup and storage medium

Similar Documents

Publication Publication Date Title
US20230162347A1 (en) System and method for set up of production line inspection
JP6869490B2 (en) Defect inspection equipment, defect inspection methods, and their programs
CN112088387B (en) System and method for detecting defects in an imaged article
Eshkevari et al. Automatic dimensional defect detection for glass vials based on machine vision: A heuristic segmentation method
US20220020136A1 (en) Optimizing a set-up stage in an automatic visual inspection process
JP2004340770A (en) Imaging inspection system
CN111220581A (en) Fluorescence penetrant inspection system and method
JP2009097922A (en) Visual inspection method and apparatus
WO2020079694A1 (en) Optimizing defect detection in an automatic visual inspection process
CN112884743B (en) Detection method and device, detection equipment and storage medium
CN111239142A (en) Paste appearance defect detection device and method
JP2013186075A (en) Foreign matter inspection device and foreign matter inspection method
JP2023137057A (en) Method of generating defect prediction model, bottle appearance inspection method and bottle appearance inspection device
KR20220134019A (en) Systems and methods for imaging reflective objects
JP2010204051A (en) Inspection apparatus and inspection method
JP2005241304A (en) Appearance inspection method
WO2022119870A1 (en) Image augmentation techniques for automated visual inspection
JP2009236593A (en) Visual inspection supporting device
JP2004286708A (en) Defect detection apparatus, method, and program
JPH04270951A (en) Method for inspecting bottle
CN111183351A (en) Image sensor surface defect detection method and detection system
KR20190042180A (en) Cover-glass analyzing method
CN117495846B (en) Image detection method, device, electronic equipment and storage medium
CN116051541B (en) Bearing end face gentle abrasion detection method and device based on stroboscopic light source
RU2789786C2 (en) System and method for organization of control on production line

Legal Events

Date Code Title Description
A625 Written request for application examination (by other person)

Free format text: JAPANESE INTERMEDIATE CODE: A625

Effective date: 20240202