JP6749655B1 - Inspection device, abnormality detection method, computer program, learning model generation method, and learning model - Google Patents

Inspection device, abnormality detection method, computer program, learning model generation method, and learning model Download PDF

Info

Publication number
JP6749655B1
JP6749655B1 JP2019051401A JP2019051401A JP6749655B1 JP 6749655 B1 JP6749655 B1 JP 6749655B1 JP 2019051401 A JP2019051401 A JP 2019051401A JP 2019051401 A JP2019051401 A JP 2019051401A JP 6749655 B1 JP6749655 B1 JP 6749655B1
Authority
JP
Japan
Prior art keywords
abnormality
blob
image
absence
inspection
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.)
Active
Application number
JP2019051401A
Other languages
Japanese (ja)
Other versions
JP2020153765A (en
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 株式会社 システムスクエア
Priority to JP2019051401A priority Critical patent/JP6749655B1/en
Priority to PCT/JP2020/003347 priority patent/WO2020189044A1/en
Application granted granted Critical
Publication of JP6749655B1 publication Critical patent/JP6749655B1/en
Publication of JP2020153765A publication Critical patent/JP2020153765A/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N23/00Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00
    • G01N23/02Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material
    • G01N23/04Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and forming images of the material
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N23/00Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00
    • G01N23/02Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material
    • G01N23/06Investigating or analysing materials by the use of wave or particle radiation, e.g. X-rays or neutrons, not covered by groups G01N3/00 – G01N17/00, G01N21/00 or G01N22/00 by transmitting the radiation through the material and measuring the absorption
    • G01N23/18Investigating the presence of flaws defects or foreign matter
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Abstract

【課題】精度良く検査物の異常を検出することができる検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデルを提供する。【解決手段】検査装置は、コンベア61に載置された検査物への電磁波の照射により得られた画像を取得する取得部112と、前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定する判定部114と、判定部114の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、検査物の異常の有無に関する情報を出力する学習モデル152に、検査物への電磁波の照射により得られた画像を入力して、前記異常の有無に関する情報を取得する学習検査部117と、前記異常の有無に関する情報を出力する出力する出力部118とを備える。【選択図】図2PROBLEM TO BE SOLVED: To provide an inspection device capable of accurately detecting an abnormality of an inspection object, an abnormality detection method, a computer program, a learning model generation method, and a learning model. An inspection device is based on an acquisition unit 112 that acquires an image obtained by irradiating an inspection object placed on a conveyor 61 with an electromagnetic wave, and a determination value and a threshold value calculated based on the image. When the judgment unit 114 that determines the presence or absence of abnormality in the inspection object and the image obtained by irradiating the inspection object with electromagnetic waves are input according to the judgment result of the judgment unit 114, information regarding the presence or absence of abnormality in the inspection object is input. An image obtained by irradiating an inspection object with an electromagnetic wave is input to the output learning model 152, and the learning inspection unit 117 that acquires information on the presence or absence of the abnormality and an output that outputs information on the presence or absence of the abnormality. It includes an output unit 118. [Selection diagram] Fig. 2

Description

本発明は、食品等の検査物の異常を検出する検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデルに関する。 The present invention relates to an inspection device for detecting an abnormality of an inspection object such as food, an abnormality detection method, a computer program, a learning model generation method, and a learning model.

食肉、豆類等の食品の検査、包装材に内容物が収納された包装体の検査、及び電子部品等の工業製品の検査に、X線、テラヘルツ波、赤外線及び可視光等の検査波を使用した検査装置が使用されている。この検査装置においては、検査物に検査波が照射され、検査物を通過した検査波が検知されて被検査物の検査画像が取得される。 Uses inspection waves such as X-rays, terahertz waves, infrared rays and visible light for inspection of foods such as meat and beans, inspection of packages containing contents in packaging materials, and inspection of industrial products such as electronic parts The inspection device is used. In this inspection apparatus, the inspection wave is irradiated to the inspection object, the inspection wave passing through the inspection object is detected, and the inspection image of the inspection object is acquired.

検査物が異物を有する場合、検査画像に閾値を超える濃い部分が存在する。従来、この濃い部分の面積及び形状等に基づいて、異物の有無の判定を行っていた。
検査物の形状の異常の有無は、検査画像のブロブ(塊)の面積及び周囲長に基づいて行っていた。ブロブを構成する画素をカウントすることにより、ブロブの面積が算出され、ブロブの周囲を形成する背景画素の配列に基づき、ブロブの周囲長が算出される(例えば特許文献1等)。
When the inspection object has a foreign substance, the inspection image has a dark portion exceeding the threshold value. Conventionally, the presence or absence of foreign matter has been determined based on the area and shape of this dark portion.
The presence or absence of abnormality in the shape of the inspection object was determined based on the area and perimeter of the blob (lump) in the inspection image. By counting the pixels forming the blob, the area of the blob is calculated, and the perimeter of the blob is calculated based on the arrangement of the background pixels forming the periphery of the blob (for example, Patent Document 1).

特開2005−31069号公報JP, 2005-31069, A

所定の画像処理アルゴリズムに基づいて取得した検査物の検査画像に対し、従来の異常検出方法では、閾値と比較することにより異常の有無を判定していたが、検査物及び異物の種類によっては、正常な部分と異物との画素値の差異が小さい場合があり、検出の精度が良くないという問題があった。
検査物の形状の異常を検出する場合においても、同様に、ブロブの画素と背景画素との画素値の差異が小さく、エッジが明瞭でなく、正確に検出できない場合があった。
For the inspection image of the inspection object acquired based on a predetermined image processing algorithm, in the conventional abnormality detection method, the presence or absence of abnormality was determined by comparing with a threshold, depending on the type of inspection object and foreign matter, In some cases, the difference in pixel value between the normal portion and the foreign matter is small, and there is a problem that the detection accuracy is not good.
Similarly, when detecting an abnormality in the shape of the inspection object, the difference between the pixel values of the blob pixel and the background pixel is small, the edge is not clear, and it may not be accurately detected.

本発明は斯かる事情に鑑みてなされたものであり、精度良く検査物の異常を検出することができる検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデルを提供することを目的とする。 The present invention has been made in view of such circumstances, and provides an inspection apparatus, an abnormality detection method, a computer program, a learning model generation method, and a learning model that can accurately detect an abnormality of an inspection object. With the goal.

発明の一態様に係る検査装置は、コンベアに載置された検査物への電磁波の照射により得られた画像を取得する取得部と、前記画像のうち、各画素の輝度に基づいて、前記検査物の異常の有無を判定するブロブを特定する特定部と、前記特定部で特定したブロブに基づき判断値を算出し、算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間の値であるか否かを判定する判定部と、前記判定部が前記中間の値であると判定した場合、特定されたブロブを含む画像を入力したときに、検査物の異常の有無に関する情報を出力する学習モデルに、特定されたブロブを含む画像を入力して、前記異常の有無に関する情報を取得する学習検査部と、前記異常の有無に関する情報を出力する出力部とを備える。
ここで、「電磁波の照射により得られた画像」とは、電磁波に基づく画像、及び該画像を画像処理して得られた画像を含む。
An inspection apparatus according to one aspect of the present invention, an acquisition unit that acquires an image obtained by irradiating an electromagnetic wave to an inspection object placed on a conveyor, and, based on the brightness of each pixel of the image, A specification unit that specifies a blob for determining whether there is an abnormality in the inspection object, and a judgment value is calculated based on the blob specified by the specification unit, and the calculated judgment values are the first threshold value on the normal side and the second threshold value on the abnormal side. and whether a determination unit whether the intermediate value between the threshold value, if the determination section determines that the is an intermediate value, when input images including the identified blobs, the inspected anomaly In the learning model that outputs the information regarding the presence or absence of the input, the learning inspection unit that inputs the image including the specified blob and acquires the information regarding the presence or absence of the abnormality, and the output unit that outputs the information regarding the presence or absence of the abnormality. Prepare
Here, the “image obtained by irradiation with electromagnetic waves” includes an image based on electromagnetic waves and an image obtained by performing image processing on the image.

本発明の一態様に係る異常検出方法は、コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像のうち、各画素の輝度に基づいて、前記検査物の異常の有無を判定するブロブを特定し、特定したブロブに基づき算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間の値であるか否かを判定し、前記中間の値であると判定した場合、特定されたブロブを含む画像を入力したときに、前記検査物の異常の有無に関する情報を出力する学習モデルに、特定されたブロブを含む画像を入力して、前記異常の有無に関する情報を出力する、処理をコンピュータに実行させる。 The abnormality detection method according to one aspect of the present invention acquires an image obtained by irradiating an electromagnetic wave to an inspection object placed on a conveyor, and based on the brightness of each pixel in the image, the inspection object The blob for determining the presence or absence of abnormality is specified, and the determination value calculated based on the specified blob is determined whether it is an intermediate value between the first threshold value on the normal side and the second threshold value on the abnormal side , When it is determined that the value is the intermediate value, when the image including the specified blob is input, the learning model that outputs information regarding the presence or absence of abnormality of the inspection object is input the image including the specified blob. Then, the computer is caused to execute a process of outputting information regarding the presence or absence of the abnormality.

本発明の一態様に係るコンピュータプログラムは、コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像のうち、各画素の輝度に基づいて、前記検査物の異常の有無を判定するブロブを特定し、特定したブロブに基づき算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間の値であるか否かを判定し、前記中間の値であると判定した場合、特定されたブロブを含む画像を入力したときに、前記検査物の異常の有無に関する情報を出力する学習モデルに、特定されたブロブを含む画像を入力して、前記異常の有無に関する情報を出力する、処理をコンピュータに実行させる。 A computer program according to an aspect of the present invention acquires an image obtained by irradiating an electromagnetic wave to an inspection object placed on a conveyor, and based on the brightness of each pixel in the image, the inspection object. identify determining blob the presence or absence of an abnormality, the determination value calculated based on the identified blob, it is determined whether the intermediate value between the second threshold value of the first threshold and the abnormal side of the normal side, the If it is determined that the intermediate value, when entering an image including a blob identified, the learning model for outputting information about the presence or absence of abnormality of the inspected object, and enter the image containing the identified blobs , Causing the computer to execute a process of outputting information regarding the presence or absence of the abnormality.

本発明の一態様に係る学習モデルの生成方法は、コンベアに載置された検査物への電磁波の照射により得られた画像のうち、各画素の輝度に基づいて特定した、前記検査物の異常の有無を判定するブロブを含む画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを取得し、前記教師データに基づいて、特定したブロブに基づき算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間であると判定した場合、特定されたブロブを含む画像が入力されたときに、前記検査物の異常の有無に関する情報を出力する学習モデルを生成する。 A method for generating a learning model according to an aspect of the present invention is, in an image obtained by irradiating an electromagnetic wave to an inspection object placed on a conveyor, specified based on the brightness of each pixel, the abnormality of the inspection object. An image including a blob for determining the presence or absence of the test data is acquired by associating the recorded teacher data with information indicating the presence or absence of abnormality of the inspection object, and based on the teacher data, the judgment value calculated based on the specified blob is If it is determined that the intermediate the second threshold value of the first threshold and the abnormal side of the normal side, when the image including the blobs identified is input, outputs the information about the presence or absence of abnormality of the inspected Generate a learning model.

本発明の一態様に係る学習モデルは、コンベアに載置された検査物への電磁波の照射により得られた画像のうち、各画素の輝度に基づいて特定した、前記検査物の異常の有無を判定するブロブに基づき算出した判断値が、正常側の第1閾値と、異常側の第2閾値との中間であると判定した場合に、特定されたブロブを含む画像が入力される入力層と、前記検査物の異常の有無に関する情報を出力する出力層と、特定されたブロブを含む画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを用いてパラメータが学習された中間層とを備え、特定されたブロブを含む画像が前記入力層に入力された場合に、前記中間層による演算を経て前記検査物の異常の有無に関する情報を前記出力層から出力するようにコンピュータを機能させる。 The learning model according to one aspect of the present invention, among the images obtained by irradiating electromagnetic waves to the inspection object placed on the conveyor, identified based on the brightness of each pixel, the presence or absence of abnormality of the inspection object When the judgment value calculated based on the judgment blob is intermediate between the first threshold value on the normal side and the second threshold value on the abnormal side, an input layer to which an image including the specified blob is input. , A parameter is learned using teacher data recorded by associating an output layer that outputs information regarding whether or not there is an abnormality in the inspection object, an image including the specified blob, and information that indicates whether or not there is an abnormality in the inspection object. When an image including a specified blob is input to the input layer, the output layer outputs information regarding the presence or absence of abnormality of the inspection object through an operation by the intermediate layer. Make the computer work.

本発明によれば、検査物に電磁波を照射して取得した画像に基づく画像に対し、判断値と閾値とに基づいて判定した検査物の異常の有無に応じて、学習モデルに画像を入力して異常の有無を取得する。例えば閾値に基づいて判定した検査物の異常の有無が不確実である場合に、学習モデルに画像を入力して異常の有無を取得することで、精度良く、異物の有無、形状の異常等の異常の有無を検出できる。 According to the present invention, with respect to an image based on an image obtained by irradiating an electromagnetic wave to a test object, an image is input to a learning model according to whether there is an abnormality in the test object determined based on a judgment value and a threshold value. To acquire the presence or absence of abnormality. For example, when it is uncertain whether or not there is an abnormality in the inspection object that is determined based on the threshold value, by inputting an image into the learning model and acquiring the presence or absence of abnormality, it is possible to accurately detect the presence or absence of foreign matter, the abnormality in shape, etc. The presence or absence of abnormality can be detected.

実施の形態1に係る異常検出システムの構成を示す斜視図である。FIG. 3 is a perspective view showing the configuration of the abnormality detection system according to the first embodiment. 異常検出システムの構成を示すブロック図である。It is a block diagram which shows the structure of an abnormality detection system. 魚肉である検査物につき、ブロブを抽出した状態を示す説明図である。It is explanatory drawing which shows the state which extracted the blob about the test object which is fish meat. 各ブロブを切り出した状態を示す説明図である。It is explanatory drawing which shows the state which cut out each blob. ブロブをバウンディングボックスにより包囲した状態を示す説明図である。It is explanatory drawing which shows the state which enclosed the blob by the bounding box. リサイズの処理の説明図である。It is explanatory drawing of the process of resizing. 異常検出モデルにより異常値が0.5以上であると判断されたブロブを含む検査画像を示す説明図である。It is explanatory drawing which shows the test|inspection image containing the blob with which the abnormal value was determined by the abnormality detection model to be 0.5 or more. 検査画像DBのレコードレイアウトの一例を示す説明図である。It is explanatory drawing which shows an example of the record layout of inspection image DB. 異常検出モデルの生成処理に関する説明図である。It is explanatory drawing regarding the production|generation process of an abnormality detection model. 制御部による異常検出モデルの生成処理の処理手順の一例を示すフローチャートである。6 is a flowchart showing an example of a processing procedure of an abnormality detection model generation processing by a control unit. 制御部による異常検出処理の処理手順の一例を示すフローチャートである。6 is a flowchart illustrating an example of a processing procedure of abnormality detection processing by a control unit. ディスプレイにおける表示画面の一例を示す説明図である。It is explanatory drawing which shows an example of the display screen in a display. PCの制御部による再学習処理の処理手順の一例を示すフローチャートである。It is a flow chart which shows an example of a processing procedure of re-learning processing by a control part of PC. PCの制御部による変形例の再学習処理の処理手順の一例を示すフローチャートである。It is a flow chart which shows an example of a processing procedure of re-learning processing of a modification by a control part of PC. 実施の形態2に係る異常検出システムの構成を示すブロック図である。5 is a block diagram showing a configuration of an abnormality detection system according to Embodiment 2. FIG. レベル1〜4の選択ボタンを表示する表示画面の一例を示す説明図である。It is explanatory drawing which shows an example of the display screen which displays the selection button of levels 1-4. レベル1〜4の閾値a及びbを表示する表示画面の一例を示す説明図である。It is explanatory drawing which shows an example of the display screen which displays the thresholds a and b of levels 1-4. 制御部による異常検出処理の処理手順の一例を示すフローチャートである。6 is a flowchart illustrating an example of a processing procedure of abnormality detection processing by a control unit. 実施の形態3に係る異常検出システムの構成を示すブロック図である。FIG. 9 is a block diagram showing a configuration of an abnormality detection system according to a third embodiment. 制御部による閾値の設定の処理の処理手順の一例を示すフローチャートである。7 is a flowchart illustrating an example of a processing procedure of threshold value setting processing by a control unit. レベルの閾値を入力するための表示画面の一例を示す説明図である。It is explanatory drawing which shows an example of the display screen for inputting the threshold value of a level.

以下、本発明をその実施の形態を示す図面に基づいて詳述する。
(実施の形態1)
図1は実施の形態1に係る異常検出システム10の構成を示す平面図、図2は異常検出システム10の構成を示すブロック図である。
異常検出システム10は、検査装置としての情報処理装置1と、X線検査機2とを備える。情報処理装置1とX線検査機2とは、一体化されていてもよい。本実施の形態においては、X線検査機2の搬送部(コンベア)6の搬送ベルト61上に検査物4を載置し、検査物4に対しX線を用いて撮像した画像に基づいて異常を検出する異常検出システム10について説明する。異常検出システム10においては、所定の画像処理アルゴリズムに基づいて、検査物4の異常の有無を判定し、この結果に応じ、異常検出モデル152に基づいて、異常の有無を推定する。検査物4の一例として、生肉、魚肉等の食品が挙げられる。
Hereinafter, the present invention will be described in detail with reference to the drawings showing an embodiment thereof.
(Embodiment 1)
FIG. 1 is a plan view showing the configuration of an abnormality detection system 10 according to the first embodiment, and FIG. 2 is a block diagram showing the configuration of the abnormality detection system 10.
The abnormality detection system 10 includes an information processing device 1 as an inspection device and an X-ray inspection machine 2. The information processing device 1 and the X-ray inspection machine 2 may be integrated. In the present embodiment, the inspection object 4 is placed on the conveyor belt 61 of the conveyor unit (conveyor) 6 of the X-ray inspection machine 2, and the abnormality is detected on the basis of the image of the inspection object 4 captured by using X-rays. The abnormality detection system 10 for detecting the will be described. In the abnormality detection system 10, the presence/absence of abnormality of the inspection object 4 is determined based on a predetermined image processing algorithm, and the presence/absence of abnormality is estimated based on the result, based on the abnormality detection model 152. Examples of the inspection object 4 include foods such as raw meat and fish meat.

X線検査機2は、横長の直方体状をなす下側筐体23と、下側筐体23上に設けられ、下側筐体23より小さい上側筐体21とを備える。
下側筐体23内に搬送部6が設けられている。搬送部6は、下側筐体23の長手方向の一端部の外側に上流側ローラ63が設けられ、他端部の外側に下流側ローラ62が設けられている。上流側ローラ63と下流側ローラ62の間には、上流側ローラ63及び下流側ローラ62よりも下側に、2つの下段ローラ64,65が設けられており、これらのローラに搬送ベルト61が架け渡されている。上流側ローラ63と下流側ローラ62のいずれか一方に、搬送モータ(不図示)からの駆動力が与えられ、被検査物を検査するときに、搬送ベルト61が時計周りに一定の速度Vで周回する。
The X-ray inspector 2 includes a horizontally-long rectangular parallelepiped lower housing 23 and an upper housing 21 provided on the lower housing 23 and smaller than the lower housing 23.
The transport unit 6 is provided in the lower housing 23. The transport unit 6 is provided with an upstream roller 63 on the outer side of one end in the longitudinal direction of the lower housing 23 and a downstream roller 62 on the outer side of the other end. Between the upstream roller 63 and the downstream roller 62, two lower rollers 64 and 65 are provided below the upstream roller 63 and the downstream roller 62, and the conveyor belt 61 is provided between these rollers. Has been bridged. A driving force from a conveyance motor (not shown) is applied to one of the upstream roller 63 and the downstream roller 62, and when the inspection object is inspected, the conveyance belt 61 rotates clockwise at a constant speed V. Orbit.

上側筐体21に、電磁波としてのX線を照射する、X線照射部3が収納されている。X線照射部3はX線管31を有する。X線以外の電磁波としては、テラヘルツ波、赤外線及び可視光等が挙げられる。
上側筐体21の正面には、ディスプレイ22が設けられている。ディスプレイ22は、例えばLCD(Liquid Crystal Display)等の表示装置である。
上流側ローラ63と下流側ローラ62との間を移動する搬送ベルト61の下側にX線検知部7が設けられている。X線検知部7は、TDI(Time Delay Integration)カメラまたはTDIセンサと呼ばれるものであり、X線の強度に応じて蛍光を発するシンチレータと、シンチレータで発せられた蛍光を検知する多数のフォトダイオードとを有している。
An X-ray irradiation unit 3 that irradiates X-rays as electromagnetic waves is housed in the upper housing 21. The X-ray irradiation unit 3 has an X-ray tube 31. Examples of electromagnetic waves other than X-rays include terahertz waves, infrared rays and visible light.
A display 22 is provided on the front surface of the upper housing 21. The display 22 is a display device such as an LCD (Liquid Crystal Display).
The X-ray detection unit 7 is provided below the transport belt 61 that moves between the upstream roller 63 and the downstream roller 62. The X-ray detection unit 7 is called a TDI (Time Delay Integration) camera or a TDI sensor, and includes a scintillator that emits fluorescence according to the intensity of X-rays, and many photodiodes that detect the fluorescence emitted by the scintillator. have.

TDIカメラでは、フォトダイオードが、被検査物の移動方向であるY方向と直交するX方向に直線的に並んで1つの検知ライン71が構成され、この検知ラインが複数ライン設けられている。複数の検知ライン71は被検査物の移動方向であるY方向へ向けて平行に並んで配置されている。図1においては、個々の検知ライン71を独立したラインセンサ素子として図示しているが、実際には、1つのTDIカメラの筐体内に、複数のフォトダイオードがX方向とY方向に規則的に並んで配置され、X方向に並ぶフォトダイオードで1ラインの検知ライン71が構成されている。各検知ライン71が受光し、出力した各ラインのデータにより、X線画像が構成される。 In the TDI camera, the photodiodes are linearly arranged in the X direction orthogonal to the Y direction, which is the moving direction of the object to be inspected, to form one detection line 71, and a plurality of detection lines are provided. The plurality of detection lines 71 are arranged in parallel in the Y direction, which is the moving direction of the inspection object. In FIG. 1, each detection line 71 is shown as an independent line sensor element, but in reality, a plurality of photodiodes are regularly arranged in the X direction and the Y direction in the housing of one TDI camera. One line of the detection line 71 is configured by the photodiodes arranged side by side and arranged in the X direction. An X-ray image is formed by the data of each line received and output by each detection line 71.

情報処理装置1は、種々の情報処理、情報の送受信が可能な情報処理装置であり、例えばパーソナルコンピュータ、サーバ装置等である。X線検査機2はLAN等のネットワークNを介して情報処理装置1に通信接続されている。情報処理装置1がサーバ装置である場合、ネットワークNはインターネットであってもよい。また、インターネット等のネットワークNを介して通信可能に接続されたクラウドコンピュータが、情報処理装置1の処理を実行することにしてもよい。
本実施の形態では情報処理装置1がパーソナルコンピュータであるものとし、以下の説明では簡潔のためPC1と読み替える。
The information processing device 1 is an information processing device capable of various information processing and information transmission/reception, and is, for example, a personal computer, a server device, or the like. The X-ray inspection machine 2 is communicatively connected to the information processing apparatus 1 via a network N such as a LAN. When the information processing device 1 is a server device, the network N may be the Internet. Alternatively, a cloud computer communicatively connected via the network N such as the Internet may execute the process of the information processing device 1.
In the present embodiment, the information processing device 1 is assumed to be a personal computer, and will be read as PC1 for simplicity in the following description.

PC1は、検査物4を撮像した画像を取得し、該画像に基づき検査物4の異常の有無を検出する処理を行う。本実施の形態でPC1は、後述する異常判定部(判定部)114の判定結果に応じ、機械学習により画像内から検査物4の異常を検出(識別)するよう学習済みの後述する異常検出モデル152を用いて異常の有無の検出を行う。
PC1は、X線検査機2を用いて検査物4へのX線の照射により得られた画像(後述するようにブロブ41を囲む領域を切り出し、該領域に所定の画像処理を施して得た検査画像)を異常検出モデル152に入力し、ブロブ41の異常の有無を示す識別結果を出力として取得する。
以下、検査物4の異常の種類が異物の有無であり、PC1が異常検出モデル152に検査画像を入力し、ソフトマックス関数により正常(異物なし)の確率値及び異常(異物あり)の確率値を出力させ、異常の確率値を異常値として取得する場合につき説明する。
PC1は、取得した異常値に応じ、検査物4を廃棄するか否か等の選別を行う。
The PC 1 acquires an image of the inspection object 4 and performs a process of detecting the presence or absence of abnormality of the inspection object 4 based on the image. In the present embodiment, the PC 1 has already learned the abnormality detection model described later to detect (identify) the abnormality of the inspection object 4 from the image by machine learning according to the determination result of the abnormality determination unit (determination unit) 114 described later. The presence/absence of abnormality is detected using 152.
The PC 1 obtains an image obtained by irradiating the inspection object 4 with X-rays using the X-ray inspection machine 2 (a region surrounding the blob 41 is cut out as described later, and a predetermined image processing is performed on the region. (Inspection image) is input to the abnormality detection model 152, and an identification result indicating whether there is an abnormality in the blob 41 is acquired as an output.
Hereinafter, the type of abnormality of the inspection object 4 is presence/absence of foreign matter, the PC 1 inputs the inspection image to the abnormality detection model 152, and the probability value of normal (absence of foreign matter) and the probability value of abnormality (presence of foreign matter) by the softmax function Will be output and the probability value of abnormality will be acquired as an abnormal value.
The PC 1 sorts out whether or not to discard the inspection object 4 according to the acquired abnormal value.

PC1は、制御部11、主記憶部12、通信部13、表示部14、補助記憶部15、及び入力部16を備える。
制御部11は、一又は複数のCPU(Central Processing Unit)、MPU(Micro-Processing Unit)、GPU(Graphics Processing Unit)等の演算処理装置を有し、補助記憶部15に記憶されたプログラムPを読み出して実行することにより、PC1に係る種々の情報処理、制御処理等を行う。図2の各機能部は、制御部11がプログラムPに基づいて動作することにより実行される。
The PC 1 includes a control unit 11, a main storage unit 12, a communication unit 13, a display unit 14, an auxiliary storage unit 15, and an input unit 16.
The control unit 11 has an arithmetic processing unit such as one or more CPUs (Central Processing Units), MPUs (Micro-Processing Units), and GPUs (Graphics Processing Units), and stores the programs P stored in the auxiliary storage unit 15. By reading and executing, various information processing, control processing, and the like related to the PC 1 are performed. Each functional unit in FIG. 2 is executed by the control unit 11 operating based on the program P.

制御部11は、機能部として、画像生成部111、画像処理部(取得部)112、対象特定部(特定部)113、異常判定部(判定部)114、切り出し部115、画像処理部116、学習検査部117、表示部(出力部)118、選別部(出力部)119、良否判定受付部(第2受付部)122、及び再学習部123を有する。 The control unit 11 includes, as functional units, an image generation unit 111, an image processing unit (acquisition unit) 112, a target identification unit (identification unit) 113, an abnormality determination unit (determination unit) 114, a cutout unit 115, an image processing unit 116, and The learning inspection unit 117, a display unit (output unit) 118, a selection unit (output unit) 119, a pass/fail judgment acceptance unit (second acceptance unit) 122, and a re-learning unit 123 are included.

画像生成部111は、検査物4を透過し、X線検知部7により検知されたX線に基づき、X線画像を生成する。
画像処理部112は、X線画像に対し平滑化フィルタ、特徴抽出フィルタ等により画像処理を行う。
The image generation unit 111 transmits an inspection object 4 and generates an X-ray image based on the X-ray detected by the X-ray detection unit 7.
The image processing unit 112 performs image processing on the X-ray image using a smoothing filter, a feature extraction filter, or the like.

対象特定部113はブロブ41解析を行い、ブロブ(領域)を特定する。対象特定部113は、例えば、各画素の輝度変化を強調処理(エッジ検出)した強調線を抽出し、強調線を含む部分をブロブとして特定する。
対象特定部113は、周辺の領域に比べて輝度の変化率が所定値以上となっているブロブを特定してもよい。
対象特定部113は、輝度の標準偏差を求め、この標準偏差と比較して輝度が所定レベル以上変化する部分を有する画素の集合をブロブとして特定してもよく、輝度が相違している特異部を含む部分をブロブとして特定してもよい。
The target identifying unit 113 performs the blob 41 analysis and identifies the blob (area). The target specifying unit 113 extracts, for example, an emphasis line in which the brightness change of each pixel is emphasized (edge detection), and specifies a portion including the emphasis line as a blob.
The target identifying unit 113 may identify a blob whose luminance change rate is equal to or higher than a predetermined value as compared with the surrounding area.
The target specifying unit 113 may determine a standard deviation of the brightness and specify a set of pixels having a part in which the brightness changes by a predetermined level or more as a blob by comparing with the standard deviation. You may specify the part containing a as a blob.

異常判定部114は、対象特定部113が特定したブロブにつき、判断値及び閾値に基づいて、ブロブが異物か否かを判定する。判断値として、例えば強調線に囲まれたブロブの画像数、面積等が挙げられ、判断値に正常側の閾値(第1閾値)a及び異常側の閾値(第2閾値)bを設定しておき(a<b)、算出した判断値が閾値a未満であれば、特異部は異物でなく、正常と判定し、判断値が閾値b超過であれば、ブロブは異物であると判定する。判断値がa以上b以下である場合、後述する学習検査部117により異常値を取得する。
図3に、一例として、魚肉である検査物4につき、判断値がa以上b以下であるブロブ41を抽出した状態を示す。ブロブは画像処理により強調処理され、塗りつぶされている。
The abnormality determination unit 114 determines whether or not the blob identified by the target identification unit 113 is a foreign substance based on the determination value and the threshold value. As the judgment value, for example, the number of images of blobs surrounded by the emphasis line, the area, and the like can be cited. By setting the threshold value on the normal side (first threshold value) a and the threshold value on the abnormal side (second threshold value) b as the judgment value. Every other time (a<b), if the calculated determination value is less than the threshold value a, it is determined that the unique portion is not a foreign substance and is normal, and if the determination value exceeds the threshold value b, the blob is determined to be a foreign substance. When the determination value is a or more and b or less, the learning inspection unit 117, which will be described later, acquires an abnormal value.
FIG. 3 shows, as an example, a state in which blobs 41 having a judgment value of a or more and b or less are extracted from the inspection object 4 which is fish meat. The blob is emphasized by image processing and is filled.

切り出し部115は、判断値がa以上b以下であるブロブ41が所定の大きさの矩形内に入るように切り出し、バウンディングボックス81により包囲し、切り出し画像を生成する。ここで、ブロブ41を囲む画像は、強調処理前の画像である。なお、ブロブ41を囲む画像は、強調処理後の画像でもよい。
図4に、各ブロブ41を切り出した状態を示す。
画像処理部116は、切り出し画像に対し、正規化等の処理を行い、異常検出モデル152に入力する検査領域(検査画像)8を生成する。
The cutout unit 115 cuts out the blob 41 having a judgment value of a or more and b or less so as to be within a rectangle of a predetermined size, surrounds it with the bounding box 81, and generates a cutout image. Here, the image surrounding the blob 41 is an image before the emphasis process. The image surrounding the blob 41 may be an image after the emphasis process.
FIG. 4 shows a state in which each blob 41 is cut out.
The image processing unit 116 performs processing such as normalization on the cut-out image and generates the inspection area (inspection image) 8 to be input to the abnormality detection model 152.

図5は、対象特定部113が特定したブロブを切り出し部115により切り出し、ブロブ41をバウンディングボックス81により包囲してなる検査画像8を生成した状態を示す説明図である。制御部11の対象特定部113は、上述のようにしてブロブ41の検出を行う。各検査画像8は、各ブロブ41が同じ大きさのバウンディングボックス81により包囲されている。
図6は、切り出し部115によるリサイズの処理の説明図である。
検査物4がバウンディングボックス81からはみ出ている場合は、制御部11の切り出し部114はリサイズを行い、ブロブ41がバウンディングボックス81内に収まるようにする。ブロブ41を大きくする場合は、補完処理を行う。
FIG. 5 is an explanatory diagram illustrating a state in which the blob identified by the target identifying unit 113 is cut out by the cutout unit 115 and the inspection image 8 in which the blob 41 is surrounded by the bounding box 81 is generated. The target specifying unit 113 of the control unit 11 detects the blob 41 as described above. In each inspection image 8, each blob 41 is surrounded by a bounding box 81 having the same size.
FIG. 6 is an explanatory diagram of the resizing process performed by the clipping unit 115.
When the inspection object 4 protrudes from the bounding box 81, the cutout portion 114 of the control unit 11 resizes the blob 41 so that the blob 41 fits inside the bounding box 81. When enlarging the blob 41, a complementary process is performed.

学習検査部117は、異常検出モデル152に各検査画像を入力し、異常値を取得する。 The learning inspection unit 117 inputs each inspection image to the abnormality detection model 152 and acquires an abnormal value.

表示部118は、異常値をディスプレイ22へ出力し、検査画像の異常の有無をディスプレイ22において表示する。
図7に、異常検出モデル152により異常値が0.5以上であると判断されたブロブを含む検査画像を示す。
The display unit 118 outputs the abnormal value to the display 22 and displays the presence/absence of abnormality in the inspection image on the display 22.
FIG. 7 shows an inspection image including a blob whose abnormal value is determined to be 0.5 or more by the abnormality detection model 152.

選別部119は、検査画像8の異常値を閾値と比較し、異常値を示したブロブ41を含む検査物4を廃棄するか否かの選別を行ったり、搬送部6を停止させたり、検査物4をマーキングしたりする。選別部119は、例えば一のブロブ41の異常値が0.5以上である場合、該ブロブ41を含む検査物4を異常品とみなし、廃棄すると選別する。異常値の閾値は0.5である場合に限定されない。なお、異常値が閾値以上であるブロブ41を一つ含む場合に検査物4を廃棄する場合に限定されない。所定数以上のブロブ41が閾値以上の異常値を示す場合に、検査物4を廃棄することにしてもよい。 The sorting unit 119 compares the abnormal value of the inspection image 8 with a threshold value, performs sorting of whether or not to discard the inspection object 4 including the blob 41 having the abnormal value, stops the transport unit 6, and performs the inspection. Mark the object 4. For example, when the abnormal value of one blob 41 is 0.5 or more, the sorting unit 119 regards the inspection object 4 including the blob 41 as an abnormal item and sorts it if it is discarded. The threshold value of the abnormal value is not limited to 0.5. It is not limited to the case where the inspection object 4 is discarded when one blob 41 having an abnormal value equal to or greater than the threshold is included. The inspection object 4 may be discarded when a predetermined number or more of the blobs 41 show an abnormal value equal to or more than a threshold value.

良否判定受付部122は、作業者が入力部16により入力した、異常検出モデル152の判断の良否の判定を受け付ける。
再学習部123は、検査画像8と、作業者から入力された前記の良否の判定とを対応付けた教師データを用いて、異常検出モデル152を再学習する。
The acceptability determination accepting unit 122 accepts the acceptability determination of the abnormality detection model 152 input by the operator through the input unit 16.
The re-learning unit 123 re-learns the abnormality detection model 152 by using the teacher data in which the inspection image 8 is associated with the quality determination input by the operator.

主記憶部12は、SRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)、フラッシュメモリ等の一時記憶領域であり、制御部11が演算処理を実行するために必要なデータを一時的に記憶する。通信部13は、通信に関する処理を行うための通信モジュールであり、外部と情報の送受信を行う。 The main storage unit 12 is a temporary storage area such as an SRAM (Static Random Access Memory), a DRAM (Dynamic Random Access Memory), a flash memory, etc., and temporarily stores data necessary for the control unit 11 to execute arithmetic processing. Remember. The communication unit 13 is a communication module for performing processing relating to communication, and transmits/receives information to/from the outside.

補助記憶部15は大容量メモリ、ハードディスク等であり、制御部11が処理を実行するために必要なプログラムP、その他のデータを記憶している。また、補助記憶部15は、検査画像DB151及び前記異常検出モデル152を記憶している。検査画像DB151は、異常検出対象である検査物4の情報を格納したデータベースである。 The auxiliary storage unit 15 is a large-capacity memory, a hard disk, or the like, and stores the program P and other data necessary for the control unit 11 to execute processing. The auxiliary storage unit 15 also stores an inspection image DB 151 and the abnormality detection model 152. The inspection image DB 151 is a database that stores information about the inspection object 4 that is an abnormality detection target.

補助記憶部15に記憶されるプログラムPは、プログラムPを読み取り可能に記録した記録媒体156により提供されてもよい。記録媒体156は、例えば、USB(Universal Serial Bus)メモリ、SD(Secure Digital)カード、マイクロSDカード、コンパクトフラッシュ(登録商標)等の可搬型のメモリである。記録媒体156に記録されるプログラムPは、図に示していない読取装置を用いて記録媒体156から読み取られ、補助記憶部15にインストールされる。また、情報処理装置1が外部通信装置と通信可能な通信部を備える場合、補助記憶部15に記憶されるプログラムPは、通信部を介した通信により提供されてもよい。
なお、補助記憶部15はPC1に接続された外部記憶装置であってもよい。また、PC1は複数のコンピュータからなるマルチコンピュータであってもよく、ソフトウェアによって仮想的に構築された仮想マシンであってもよい。
The program P stored in the auxiliary storage unit 15 may be provided by the recording medium 156 in which the program P is readably recorded. The recording medium 156 is, for example, a portable memory such as a USB (Universal Serial Bus) memory, an SD (Secure Digital) card, a micro SD card, or a compact flash (registered trademark). The program P recorded in the recording medium 156 is read from the recording medium 156 using a reading device (not shown) and installed in the auxiliary storage unit 15. When the information processing device 1 includes a communication unit that can communicate with an external communication device, the program P stored in the auxiliary storage unit 15 may be provided by communication via the communication unit.
The auxiliary storage unit 15 may be an external storage device connected to the PC 1. Further, the PC 1 may be a multi-computer including a plurality of computers, or may be a virtual machine virtually constructed by software.

入力部16は、作業者による、後述する判断値の閾値等の入力を受け付ける。 The input unit 16 receives an input by a worker such as a threshold value of a determination value described later.

図8は検査画像DB151のレコードレイアウトの一例を示す説明図である。検査画像DB151は、検査画像ID列、座標情報列、異常値列、判断値列を含む。検査画像ID列は、各検査画像8を識別するための検査画像IDを記憶している。座標情報列は、検査画像IDと対応付けて、搬送ベルト61上のX線照射領域における、ブロブ41の位置を示す座標情報を記憶している。座標情報は、図1の上流側ローラ63及び下流側ローラ62間における、X方向及びY方向の中心を原点としたときのバウンディングボックス81の四隅におけるX座標、及びY座標である。異常値は上述したように、異常の確率値である。判断値は、異常判定部114により算出された判断値である。 FIG. 8 is an explanatory diagram showing an example of the record layout of the inspection image DB 151. The inspection image DB 151 includes an inspection image ID sequence, a coordinate information sequence, an abnormal value sequence, and a judgment value sequence. The inspection image ID column stores inspection image IDs for identifying each inspection image 8. The coordinate information sequence stores coordinate information indicating the position of the blob 41 in the X-ray irradiation area on the conveyor belt 61 in association with the inspection image ID. The coordinate information is the X coordinate and the Y coordinate at the four corners of the bounding box 81 when the origins are the centers in the X direction and the Y direction between the upstream roller 63 and the downstream roller 62 in FIG. The abnormal value is the probability value of abnormality as described above. The judgment value is a judgment value calculated by the abnormality judgment unit 114.

図9は、異常検出モデル152の生成処理に関する説明図である。図9では、機械学習を行って異常検出モデル152を生成する処理を概念的に示している。 FIG. 9 is an explanatory diagram related to generation processing of the abnormality detection model 152. FIG. 9 conceptually shows a process of performing the machine learning to generate the abnormality detection model 152.

PC1の制御部11は、異常検出モデル152として、ブロブ41の検査画像8内における異常の画像特徴量を学習することで、検査画像8を入力とし、ブロブ41における異常の有無を示す情報を出力とするニューラルネットワークを構築(生成)する。例えばニューラルネットワークはCNN(Convolution Neural Network)であり、検査画像8の入力を受け付ける入力層と、異常の有無の識別結果を出力する出力層と、検査画像8の画像特徴量を抽出する中間層とを有する。 The control unit 11 of the PC 1 inputs the inspection image 8 as an abnormality detection model 152 by learning the image feature amount of the abnormality in the inspection image 8 of the blob 41, and outputs information indicating the presence or absence of abnormality in the blob 41. Constructs (generates) a neural network. For example, the neural network is a CNN (Convolution Neural Network), and has an input layer that receives an input of the inspection image 8, an output layer that outputs a discrimination result of presence/absence of an abnormality, and an intermediate layer that extracts an image feature amount of the inspection image 8. Have.

入力層は、検査画像8に含まれる各画素の画素値の入力を受け付ける複数のニューロンを有し、入力された画素を中間層に受け渡す。中間層は、検査画像の画像特徴量を抽出する複数のニューロンを有し、抽出した画像特徴量を出力層に受け渡す。図9において、中間層の層数は3とされているが、これに限定されない。例えば異常検出モデル152がCNNである場合、中間層は、入力層から入力された各画素の画素値を畳み込むコンボリューション層と、コンボリューション層で畳み込んだ画素値をマッピングするプーリング層とが交互に連結された構成を有し、検査画像8の画素情報を圧縮しながら最終的に画像の特徴量を抽出する。図9において、コンボリューション層、及びプーリング層の記載は省略している。出力層は、ブロブ41における異常を識別した識別結果を出力する二つのニューロンを有し、中間層から出力された画像特徴量に基づいてブロブ41における異常の有無を識別する。一方のニューロンはブロブ41における正常(異物なし)の確率値を出力し、他方のニューロンはブロブ41における異常(異物あり)の確率値を出力する。 The input layer has a plurality of neurons that receive the input of the pixel value of each pixel included in the inspection image 8, and transfers the input pixels to the intermediate layer. The intermediate layer has a plurality of neurons for extracting the image feature amount of the inspection image, and transfers the extracted image feature amount to the output layer. In FIG. 9, the number of intermediate layers is three, but the number is not limited to this. For example, when the abnormality detection model 152 is CNN, the convolution layer that convolves the pixel value of each pixel input from the input layer and the pooling layer that maps the pixel value that is convoluted by the convolution layer alternate in the intermediate layer. The feature amount of the image is finally extracted while the pixel information of the inspection image 8 is compressed. In FIG. 9, the description of the convolution layer and the pooling layer is omitted. The output layer has two neurons that output an identification result that identifies an abnormality in the blob 41, and identifies the presence or absence of abnormality in the blob 41 based on the image feature amount output from the intermediate layer. One neuron outputs a probability value of normal (absence of foreign substance) in the blob 41, and another neuron outputs a probability value of abnormality (existence of foreign substance) in the blob 41.

なお、本実施の形態では異常検出モデル152がCNNであるものとして説明するが、異常検出モデル152はCNNに限定されず、CNN以外のニューラルネットワーク、SVM(Support Vector Machine)、ベイジアンネットワーク、回帰木など、他の学習アルゴリズムで構築された学習済みモデルであってよい。 In the present embodiment, the abnormality detection model 152 is described as being CNN, but the abnormality detection model 152 is not limited to CNN, and a neural network other than CNN, SVM (Support Vector Machine), Bayesian network, regression tree It may be a trained model constructed by another learning algorithm.

制御部11は、複数の検査画像8と、各検査画像8におけるブロブ41の異常を示す情報(異物を有するか、異物を有さず、正常であるか)とが対応付けられた教師データ(異常データ、正常データ)を用いて学習を行う。例えば図9に示すように、教師データは、ブロブ41の検査画像8に対し、検査画像8のIDと、異常の種類(異物の有無)、ランク(1:異常、0:正常)とがラベル付けされたデータである。 The control unit 11 associates the plurality of inspection images 8 with the information indicating whether or not the blob 41 in each inspection image 8 is abnormal (whether or not the foreign object is present, or is normal without the foreign object) ( Learning is performed using abnormal data and normal data. For example, as shown in FIG. 9, the teaching data is labeled with respect to the inspection image 8 of the blob 41, the ID of the inspection image 8, the type of abnormality (presence/absence of foreign matter), and the rank (1: abnormal, 0: normal). It is the attached data.

制御部11は、教師データである検査画像8を入力層に入力し、中間層での演算処理を経て、出力層からブロブ41における異常の有無を示す識別結果を取得する。なお、出力層から出力される識別結果は、ソフトマックス関数を用いた場合、連続的な確率値(例えば「0」から「1」までの範囲の値)である。識別結果は、異常の有無を離散的に示す値(例えば「0」又は「1」の値)であってもよい。 The control unit 11 inputs the inspection image 8 that is the teacher data to the input layer, obtains the identification result indicating the presence or absence of abnormality in the blob 41 from the output layer through the arithmetic processing in the intermediate layer. The identification result output from the output layer is a continuous probability value (for example, a value in the range from “0” to “1”) when the softmax function is used. The identification result may be a value (for example, a value of “0” or “1”) that discretely indicates the presence or absence of abnormality.

制御部11は、出力層から出力された識別結果を、教師データにおいて検査画像8に対しラベル付けされた情報、すなわち正解値と比較し、出力層からの出力値が正解値に近づくように、中間層での演算処理に用いるパラメータを最適化する。該パラメータは、例えばニューロン間の重み(結合係数)、各ニューロンで用いられる活性化関数の係数などである。パラメータの最適化の方法は特に限定されないが、例えば制御部11は誤差逆伝播法を用いて各種パラメータの最適化を行う。 The control unit 11 compares the identification result output from the output layer with the information labeled on the inspection image 8 in the teacher data, that is, the correct value, so that the output value from the output layer approaches the correct value. The parameters used for the arithmetic processing in the intermediate layer are optimized. The parameters are, for example, weights between neurons (coupling coefficient), coefficients of an activation function used in each neuron, and the like. The method of optimizing the parameters is not particularly limited, but for example, the control unit 11 optimizes various parameters using the error back propagation method.

制御部11は、教師データに含まれる各検査画像8について上記の処理を行い、異常検出モデル152を生成する。制御部11はブロブ41の検査画像8を取得した場合、異常検出モデル152を用いてブロブ41における異物の有無を検出する。 The control unit 11 performs the above process on each inspection image 8 included in the teacher data to generate the abnormality detection model 152. When the control unit 11 acquires the inspection image 8 of the blob 41, the control unit 11 uses the abnormality detection model 152 to detect the presence/absence of foreign matter in the blob 41.

図10は、制御部11による異常検出モデル152の生成処理の処理手順の一例を示すフローチャートである。
制御部11は、複数のブロブ41の検査画像8と、各検査画像8内におけるブロブ41の前記異常を示す情報とを対応付けた教師データを取得する(S11)。
FIG. 10 is a flowchart illustrating an example of a processing procedure of generation processing of the abnormality detection model 152 by the control unit 11.
The control unit 11 acquires the teacher data in which the inspection images 8 of the plurality of blobs 41 are associated with the information indicating the abnormality of the blobs 41 in each inspection image 8 (S11).

制御部11は教師データを用いて、ブロブ41の検査画像8を入力した場合にブロブ41の異常有無情報を出力する異常検出モデル152(学習済みモデル)を生成する(S12)。具体的には、制御部11は、教師データである検査画像8をニューラルネットワークの入力層に入力し、検査画像8内の異物の有無を識別した識別結果を出力層から取得する。制御部11は、取得した識別結果を教師データの正解値(検査画像8に対してラベル付けられた情報)と比較し、出力層から出力される識別結果が正解値に近づくよう、中間層での演算処理に用いるパラメータ(重み等)を最適化する。制御部11は、生成した異常検出モデル152を補助記憶部15に格納し、一連の処理を終了する。 The control unit 11 uses the teacher data to generate the abnormality detection model 152 (learned model) that outputs the abnormality presence/absence information of the blob 41 when the inspection image 8 of the blob 41 is input (S12). Specifically, the control unit 11 inputs the inspection image 8 which is the teacher data to the input layer of the neural network, and acquires the identification result for identifying the presence or absence of the foreign matter in the inspection image 8 from the output layer. The control unit 11 compares the acquired identification result with the correct value of the teacher data (information labeled on the inspection image 8), and in the intermediate layer so that the identification result output from the output layer approaches the correct value. The parameters (weight, etc.) used in the calculation processing of are optimized. The control unit 11 stores the generated abnormality detection model 152 in the auxiliary storage unit 15 and ends the series of processes.

図11は、制御部11による異常検出処理の処理手順の一例を示すフローチャートである。
PC1の制御部11は、検査物4を透過し、X線検知部7により検知されたX線に基づき、X線画像を生成する(S21)。
制御部11は、X線画像に対し平滑化フィルタ、特徴抽出フィルタ等により画像処理を行う(S22)。
制御部11は、上述のようにしてブロブ解析を行い、ブロブを特定する(S23)。制御部11は、各画素の輝度変化を強調処理(エッジ検出)した強調線を抽出し、強調線を含む部分をブロブとして特定する。
FIG. 11 is a flowchart showing an example of a processing procedure of abnormality detection processing by the control unit 11.
The control unit 11 of the PC 1 transmits an inspection object 4 and generates an X-ray image based on the X-ray detected by the X-ray detection unit 7 (S21).
The control unit 11 performs image processing on the X-ray image using a smoothing filter, a feature extraction filter, etc. (S22).
The control unit 11 performs the blob analysis as described above and identifies the blob (S23). The control unit 11 extracts an emphasis line in which the luminance change of each pixel is emphasized (edge detection), and identifies a portion including the emphasis line as a blob.

制御部11は、ブロブが異物であるか否かを判定する(S24)。制御部11は、例えば強調線に囲まれたブロブの画像数、面積等の判断値を算出し、算出した判断値及び閾値に基づいて判定を行う。制御部11は、異常(NG:判断値>閾値b)、正常(OK:判断値<閾値a)、その中間(a≦判断値≦b)のいずれであるかを判定する。 The control unit 11 determines whether or not the blob is a foreign substance (S24). The control unit 11 calculates a judgment value such as the number of blob images surrounded by an emphasis line, an area, and the like, and makes a judgment based on the calculated judgment value and a threshold value. The control unit 11 determines whether it is abnormal (NG: judgment value>threshold value b), normal (OK: judgment value<threshold value a), or in between (a≦judgment value≦b).

制御部11は、S24で、NG(異常)又はOK(正常)と判定されたか否かを判定する(S25)。制御部11はNG又はOKであると判定されたと判定した場合(S25:YES)、OKであるか否かを判定する(S26)。
制御部11はOKであると判定した場合(S26:YES)、学習検査をスキップして処理を終了する。
制御部11はOKでない、即ちNGであると判定した場合(S26:NO)、学習検査をスキップしてS33へ処理を進める。
The control unit 11 determines whether or not it is determined to be NG (abnormal) or OK (normal) in S24 (S25). When the control unit 11 determines that it is determined to be NG or OK (S25: YES), it determines whether it is OK (S26).
When the control unit 11 determines that the result is OK (S26: YES), the learning inspection is skipped and the process ends.
When it is determined that the control unit 11 is not OK, that is, NG (S26: NO), the learning inspection is skipped and the process proceeds to S33.

制御部11はNG又はOKでないと判定されたと判定した場合(S25:NO)、NG又はOKでないと判定されたブロブ41が所定の大きさの矩形内に入るように切り出し、切り出し画像を生成する(S27)。切り出し画像はブロブ41の塗りつぶし処理前の画像である。
制御部11は、切り出し画像に対し、正規化等の処理を行い、検査画像を生成する(S28)。
When the control unit 11 determines that it is not NG or OK (S25: NO), the blob 41 determined to be not NG or OK is cut out so as to be in a rectangle of a predetermined size, and a cutout image is generated. (S27). The cut-out image is an image before the blob 41 is filled.
The control unit 11 performs processing such as normalization on the cutout image to generate an inspection image (S28).

制御部11は、異常検出モデル152に検査画像8を入力し、正常の確率値及び異常の確率値を出力させ、異常値を取得する(S29)。
制御部11は、異常値が閾値以上であるか否かを判定する(S30)。制御部11は異常値が閾値以上であると判定した場合(S30:YES)、異常値をディスプレイ22へ出力し、検査画像8を赤のバウンディングボックス(BB)82により包囲した状態で表示する(S31)。制御部11は異常値が閾値以上でないと判定した場合(S30:NO)、検査画像8を赤のバウンディングボックス(BB)82により包囲していない状態で表示する(S32)。
制御部11は、検査画像8の異常値及び検査画像IDに基づき、またS26でNGと判定された場合はその検査物4を特定し、検査物4を廃棄するか否かの選別を行い(S33)、処理を終了する。
The control unit 11 inputs the inspection image 8 to the abnormality detection model 152, outputs the probability value of normality and the probability value of abnormality, and acquires the abnormality value (S29).
The control unit 11 determines whether or not the abnormal value is greater than or equal to the threshold value (S30). When the control unit 11 determines that the abnormal value is equal to or larger than the threshold value (S30: YES), the abnormal value is output to the display 22 and the inspection image 8 is displayed in a state of being surrounded by the red bounding box (BB) 82 ( S31). When the control unit 11 determines that the abnormal value is not greater than or equal to the threshold value (S30: NO), the inspection image 8 is displayed in a state where it is not surrounded by the red bounding box (BB) 82 (S32).
The control unit 11 specifies the inspection object 4 based on the abnormal value of the inspection image 8 and the inspection image ID, and when it is determined to be NG in S26, selects whether or not to discard the inspection object 4 ( S33), the process ends.

以上のように、本実施の形態によれば、検査画像8において、異物と他部との画素値の差異が小さく、従来の画像処理の手法では異物の有無の判断が困難である場合においても、異常検出モデル152を使用することにより、精度良く、異物を判別できる。
本実施の形態によれば、所定の画像処理アルゴリズムに基づいて取得したブロブ41に対し、判断値並びに閾値a及びbに基づいて取得した、ブロブ41が異物であるか否かの判定結果が正確でない場合に、異常検出モデル152に検査画像8を入力して異常値を取得することで、精度良く、異物の有無を検出できる。
作業者が目視による異常の検出を行う必要がなくなり、異常検出作業の効率化を図ることができる。
上述の実施の形態においては、異常の種類として異物の有無を挙げているが、これに限定されず、形状の異常等、他の異常を検出してもよい。
As described above, according to the present embodiment, even in the case where the difference in pixel value between the foreign matter and the other portion is small in the inspection image 8 and it is difficult to determine the presence or absence of the foreign matter by the conventional image processing method. By using the abnormality detection model 152, it is possible to accurately determine the foreign matter.
According to the present embodiment, with respect to the blob 41 acquired based on a predetermined image processing algorithm, the determination result whether the blob 41 is a foreign matter acquired based on the determination value and the threshold values a and b is accurate. If not, by inputting the inspection image 8 to the abnormality detection model 152 and acquiring the abnormal value, it is possible to detect the presence or absence of a foreign object with high accuracy.
It is not necessary for the operator to visually detect the abnormality, and the efficiency of the abnormality detection work can be improved.
In the above-described embodiment, the presence/absence of foreign matter is mentioned as the type of abnormality, but the present invention is not limited to this, and other abnormality such as a shape abnormality may be detected.

なお、判断値が例えば0から1の数値で表される場合、0が閾値aであり、1が閾値bであってもよく、この場合、判断値が0のとき正常であり、1のとき異常である。
また、判断値がa以上b以下の場合に学習検査を行う場合に限定されず、判断値がa以上の場合に学習検査を行うことにしてもよく、判断値がb以下の場合、学習検査を行うことにしてもよい。
S28の画像処理は省略できる。検査画像8は、ブロブ41の強調処理を行った後の画像でもよい。
When the judgment value is represented by a numerical value from 0 to 1, for example, 0 may be the threshold value a and 1 may be the threshold value b. In this case, when the judgment value is 0, it is normal, and when it is 1, It is abnormal.
Further, the learning inspection is not limited to the case where the judgment value is a or more and b or less, and the learning inspection may be performed when the judgment value is a or more. When the judgment value is b or less, the learning inspection is performed. May be performed.
The image processing in S28 can be omitted. The inspection image 8 may be an image after the blob 41 is emphasized.

図12は、ディスプレイ22における表示画面5の一例を示す説明図である。
表示画面は、図12における左側の第1画面51と、右側の第2画面52とを有する。
制御部11は、第1画面51において、検査画像8を、搬送ベルト61に載置された検査物4を搬送ベルト61の位置に対応付けて表示する。制御部11は、第2画面52において、各ブロブ41に対応する各検査画像8を前記検査画像ID順に並べて表示し、異常の検査画像8は赤色のバウンディングボックス82により包囲する。図12の場合、ブロブ41に係る検査画像8がバウンディングボックス82により包囲されているとき、ブロブ41は異物であり、ブロブ41を含む検査物4は異常品であることになる。
FIG. 12 is an explanatory diagram showing an example of the display screen 5 on the display 22.
The display screen has a first screen 51 on the left side and a second screen 52 on the right side in FIG.
The control unit 11 displays the inspection image 8 on the first screen 51 in association with the inspection object 4 placed on the conveyor belt 61 to the position of the conveyor belt 61. The control unit 11 displays the inspection images 8 corresponding to the blobs 41 on the second screen 52 side by side in the order of the inspection image IDs, and the abnormal inspection image 8 is surrounded by the red bounding box 82. In the case of FIG. 12, when the inspection image 8 related to the blob 41 is surrounded by the bounding box 82, the blob 41 is a foreign substance, and the inspection object 4 including the blob 41 is an abnormal product.

作業者は、検査画像8の行方向に順に移動するための「>」及び「<」からなる選択ボタン56により第2画面52のいずれかの検査画像8を選択できる。検査画像8はマウス等のポインティングデバイスにより選択してもよい。
第2画面52は、他に、作業者により異常検出モデル152の推定結果(判断)が正しいと判定したときに押圧するOKボタン53、判断は正しくないと判定したときに押圧するNGボタン54、及び後述する異常有無のレベルの選択の指示を入力するとき等に使用するOtherボタン55を有する。
The operator can select one of the inspection images 8 on the second screen 52 by the selection button 56 including “>” and “<” for moving in the row direction of the inspection image 8 in order. The inspection image 8 may be selected by a pointing device such as a mouse.
On the second screen 52, an OK button 53 that is pressed when the operator determines that the estimation result (judgment) of the abnormality detection model 152 is correct, an NG button 54 that is pressed when it is determined that the judgment is not correct, And an Other button 55 which is used when inputting an instruction for selecting a level of presence or absence of abnormality described later.

選択ボタン56により選択された検査画像8につき、作業者からOKボタン53又はNGボタン54による異常検出モデル152の判断の良否の入力を受け付け、所定数以上のデータが集まった場合、制御部11は、検査画像8と、作業者から入力された判断の良否とを教師データとして、異常検出モデル152の再学習を行うことができる。 For the inspection image 8 selected by the selection button 56, when the operator accepts the input of the judgment of the abnormality detection model 152 by the OK button 53 or the NG button 54 and the data of a predetermined number or more is collected, the control unit 11 The abnormality detection model 152 can be re-learned using the inspection image 8 and the quality of the judgment input by the operator as teacher data.

図13は、PC1の制御部11による上述の再学習処理の処理手順の一例を示すフローチャートである。 FIG. 13 is a flowchart showing an example of the processing procedure of the above-mentioned re-learning processing by the control unit 11 of the PC 1.

制御部11は、選択された検査画像8につき、作業者による第2画面52のOKボタン53又はNGボタン54の押圧に基づき、異常検出モデル152の判断の良否の判定を受け付ける(S41)。制御部11は良否の判定を受け付けていないと判定した場合(S41:NO)、判定の処理を繰り返す。
制御部11は所定数の良否の判定を受け付けたと判定した場合(S41:YES)、異常を検出したブロブ41の検査画像8と、作業者から入力された制御部11の判断の良否とを対応付けた教師データを取得する(S42)。
制御部11は教師データを用いて、ブロブ41の検査画像を入力した場合にブロブ41の異常有無情報を出力する異常検出モデル152を生成する(S43)。
以上により、再学習される。これにより、異常検出処理を継続するほど異常検出モデル152がアップデートされ、より正確な異常検出を行うことができるようになる。
なお、作業者による異常検出モデル152の判断の良否の判定は、検査画像8ではなく、X線画像に基づいて行ってもよい。
The control unit 11 accepts whether the abnormality detection model 152 is good or bad for the selected inspection image 8 based on the operator pressing the OK button 53 or the NG button 54 on the second screen 52 (S41). When the control unit 11 determines that the determination of acceptability is not accepted (S41: NO), the determination process is repeated.
When it is determined that the control unit 11 has accepted the predetermined number of pass/fail determinations (S41: YES), the inspection image 8 of the blob 41 in which the abnormality is detected is associated with the pass/fail determination of the control unit 11 input by the operator. The attached teacher data is acquired (S42).
The control unit 11 uses the teacher data to generate the abnormality detection model 152 that outputs the abnormality presence/absence information of the blob 41 when the inspection image of the blob 41 is input (S43).
By the above, it is relearned. As a result, the abnormality detection model 152 is updated as the abnormality detection processing is continued, and more accurate abnormality detection can be performed.
In addition, the quality of the determination of the abnormality detection model 152 by the operator may be determined based on the X-ray image instead of the inspection image 8.

図14は、PC1の制御部11による変形例の再学習処理の処理手順の一例を示すフローチャートである。 FIG. 14 is a flowchart showing an example of a processing procedure of a re-learning process of a modified example by the control unit 11 of the PC 1.

制御部11は、選択された検査画像8につき、作業者による第2画面52のOKボタン53又はNGボタン54の押圧に基づき、異常検出モデル152の判断の良否の判定を受け付ける(S51)。制御部11は良否の判定を受け付けていないと判定した場合(S51:NO)、判定の処理を繰り返す。
制御部11は良否の判定を受け付けたと判定した場合(S51:YES)、否と受け付けたか否かを判定する(S52)。制御部11は否と受け付けていないと判定した場合(S52:NO)、処理をS51へ戻す。
制御部11は否と受け付けたと判定した場合(S52:YES)、否と判定した結果を所定数入手したときに、異常を検出したブロブ41の検査画像8と、判定結果とを対応付けた教師データを取得する(S53)。
制御部11は教師データを用いて、ブロブ41の検査画像を入力した場合にブロブ41の異常有無情報を出力する異常検出モデル152を生成する(S54)。
以上により、再学習される。これにより、より少ない教師データ量で、正確な異常検出を行うことができるようになる。
The control unit 11 accepts whether the abnormality detection model 152 is good or bad for the selected inspection image 8 based on the operator pressing the OK button 53 or the NG button 54 on the second screen 52 (S51). When the control unit 11 determines that the determination of acceptability is not accepted (S51: NO), the determination process is repeated.
When the control unit 11 determines that the acceptance/rejection determination is accepted (S51: YES), it determines whether or not the acceptance is accepted (S52). When it is determined that the control unit 11 has not accepted the request (S52: NO), the process returns to S51.
When the control unit 11 determines that the answer is NO (S52: YES), when a predetermined number of the results of the NO determination are acquired, the teacher associates the inspection image 8 of the blob 41 that has detected an abnormality with the determination result. Data is acquired (S53).
The control unit 11 uses the teacher data to generate the abnormality detection model 152 that outputs the abnormality presence/absence information of the blob 41 when the inspection image of the blob 41 is input (S54).
By the above, re-learning is performed. As a result, it becomes possible to perform accurate abnormality detection with a smaller amount of teacher data.

(実施の形態2)
実施の形態2に係る異常検出システム10のPC1は、制御部11が4つの画像処理アルゴリズムに基づいて、異物の有無を検知し、補助記憶部15に各画像処理アルゴリズムに対応するプログラムPを記憶し、複数の異常検出モデル152〜155を記憶してあること以外は、実施の形態1に係るPC1と同様の処理を行う。4つの画像処理アルゴリズムに基づいて検知される異物の種類は、全て同じであってもよく、一部が同じであってもよく、全て異なっていてもよい。異物の種類としては、骨、金属、木材、合成樹脂等が挙げられる。異物の種類が同一である場合、判断値の算出方法が異なる。
また、画像処理アルゴリズムにより、検査物4の異なる種類の異常を検出することにしてもよい。異常の種類として、異物の有無、形状の異常等が挙げられる。
画像処理アルゴリズムの数は4つの場合に限定されない。
(Embodiment 2)
In the PC 1 of the abnormality detection system 10 according to the second embodiment, the control unit 11 detects the presence or absence of foreign matter based on the four image processing algorithms, and stores the program P corresponding to each image processing algorithm in the auxiliary storage unit 15. Then, the same processing as that of the PC 1 according to the first embodiment is performed except that a plurality of abnormality detection models 152 to 155 are stored. The types of foreign matter detected based on the four image processing algorithms may be all the same, some of them may be the same, or all of them may be different. Examples of the type of foreign matter include bone, metal, wood, and synthetic resin. When the type of foreign matter is the same, the calculation method of the judgment value is different.
Further, different types of abnormalities in the inspection object 4 may be detected by the image processing algorithm. The types of abnormality include presence/absence of foreign matter, shape abnormality, and the like.
The number of image processing algorithms is not limited to four.

例えばレベル1の画像処理アルゴリズムは、実施の形態1と同様に、対象特定部113は、各画素の輝度変化を強調処理(エッジ検出)して抽出した強調線を含む部分をブロブ41として特定する。異常判定部114は、例えば強調線に囲まれたブロブ41の画像数、面積等の判断値に基づいて、判定を行う。判断値に閾値a及びbを設定し、例えば判断値が閾値未満であれば、特異部は異物でないと判定する。
レベル2の画像処理アルゴリズムにおいては、対象特定部113は、周辺の領域に比べて輝度の変化率が所定値以上となっている特異部をブロブ41として抽出する。異常判定部114は、例えば前記変化率が所定値以上となっている画素数等の判断値に基づいて、判定を行う。
レベル3の画像処理アルゴリズムにおいては、輝度の標準偏差を求め、この標準偏差と比較して輝度が所定レベル以上変化する特異部をブロブ41として特定する。レベル4の画像処理アルゴリズムにおいては、輝度が相違している特異部をブロブ41として特定する。異常判定部114は、これらの特異部の形状が、例えば骨の形状としてあり得るか否かの判断を、画像マッチング処理により行なったりする。
For example, in the image processing algorithm of level 1, as in the first embodiment, the target identifying unit 113 identifies, as the blob 41, the portion including the enhancement line extracted by performing the enhancement processing (edge detection) on the luminance change of each pixel. .. The abnormality determination unit 114 makes the determination based on the determination values such as the number of images and the area of the blob 41 surrounded by the emphasis line, for example. Threshold values a and b are set as the judgment value, and if the judgment value is less than the threshold value, it is determined that the unique portion is not a foreign substance.
In the level 2 image processing algorithm, the target identifying unit 113 extracts, as the blob 41, a peculiar portion in which the rate of change in luminance is equal to or higher than a predetermined value as compared with the surrounding area. The abnormality determination unit 114 makes the determination based on, for example, a determination value such as the number of pixels whose change rate is equal to or greater than a predetermined value.
In the level 3 image processing algorithm, the standard deviation of the luminance is calculated, and compared with this standard deviation, the unique portion where the luminance changes by a predetermined level or more is specified as the blob 41. In the level 4 image processing algorithm, a peculiar portion having different brightness is specified as the blob 41. The abnormality determination unit 114 performs image matching processing to determine whether or not the shape of these unique portions may be, for example, the shape of bone.

図15は、異常検出システム10の構成を示すブロック図である。図2と同一部分は同一符号を付して詳細な説明を省略する。
制御部11は、レベル受付部(第1受付部)120を有する。レベルは、異物の有無の検知のための画像処理アルゴリズムに対応し、ここで、レベルは1〜4の4種類あるとする。
レベル受付部120は、作業者によるレベルの選択を受け付ける。図16に示すように作業者が前記Otherボタン55を押圧した場合、制御部11は、第1画面51に、「レベル1」〜「レベル4」までのボタン57a〜57dを表示する。作業者は所望するレベルのボタンを選択する。
選択されたレベルに対応する画像処理アルゴリズムに基づき、対象特定部113はブロブ41を特定し、異常判定部114はブロブ41が異常か正常かを判定する。なお、画像処理アルゴリズムによって、対象特定部113及び異常判定部114の処理が異なるのみでなく、画像処理部112及び画像処理部116の処理も異ならせてもよい。
FIG. 15 is a block diagram showing the configuration of the abnormality detection system 10. The same parts as those in FIG. 2 are denoted by the same reference numerals and detailed description thereof will be omitted.
The control unit 11 includes a level receiving unit (first receiving unit) 120. The level corresponds to an image processing algorithm for detecting the presence/absence of foreign matter, and it is assumed here that there are four types of levels 1 to 4.
The level receiving unit 120 receives the selection of the level by the worker. When the operator presses the Other button 55 as shown in FIG. 16, the control unit 11 displays the buttons 57a to 57d of "level 1" to "level 4" on the first screen 51. The operator selects the button of the desired level.
The target identifying unit 113 identifies the blob 41 based on the image processing algorithm corresponding to the selected level, and the abnormality determining unit 114 determines whether the blob 41 is abnormal or normal. It should be noted that depending on the image processing algorithm, not only the processing of the target specifying unit 113 and the abnormality determining unit 114 may be different, but the processing of the image processing unit 112 and the image processing unit 116 may be different.

異常判定部114は、対象特定部113により特定したブロブ41に対し、画像処理アルゴリズムに基づいて、判断値を算出する。レベル1において、例えば対象特定部113が、各画素の輝度変化を強調処理して抽出した強調線を含む部分をブロブ41として特定する場合、異常判定部114は強調線に囲まれたブロブ41の画像数、面積等の判断値を算出し、算出した判断値に基づいて判定を行う。判断値に対し正常側の閾値a及び異常側の閾値bを設定し(a<b)、算出した判断値が閾値a未満であれば、特異部は異物でなく、正常と判定し、判断値が閾値b以上であれば、特異部は異物であり、ブロブ41は異常であると判定する。 The abnormality determination unit 114 calculates a determination value for the blob 41 identified by the target identification unit 113 based on an image processing algorithm. In level 1, for example, when the target specifying unit 113 specifies the portion including the emphasis line extracted by performing the brightness change of each pixel as the blob 41, the abnormality determination unit 114 determines that the blob 41 surrounded by the emphasis line is A judgment value such as the number of images and the area is calculated, and the judgment is performed based on the calculated judgment value. The threshold value a on the normal side and the threshold value b on the abnormal side are set for the judgment value (a<b), and if the calculated judgment value is less than the threshold value a, the singular part is judged to be normal, not a foreign substance, and the judgment value Is greater than or equal to the threshold value b, it is determined that the unique portion is a foreign matter and the blob 41 is abnormal.

図17に示すように作業者が前記Otherボタン55を2回続けて押圧した場合、制御部11は、第1画面51に、「レベル1」〜「レベル4」の各閾値a及び閾値bを表示する。各レベルの判断値は各画像処理アルゴリズムに基づいて算出され、内容はレベルに応じて異なり、各閾値a及び閾値bも異なり、正常及び異常の範囲も異なる。 When the operator presses the Other button 55 twice in succession as shown in FIG. 17, the control unit 11 displays the threshold values a and b of “level 1” to “level 4” on the first screen 51. indicate. The judgment value at each level is calculated based on each image processing algorithm, and the contents differ depending on the level, the thresholds a and b are different, and the normal and abnormal ranges are also different.

制御部11は、上記と同様に、異常検出モデル152として、レベル1に対応する画像処理アルゴリズムにより生成された、ブロブ41に係る検査画像8内における異常の画像特徴量を学習することで、検査画像8を入力とし、異物の有無を示す情報を出力とするニューラルネットワークを生成する。ニューラルネットワークはCNNであり、検査画像8の入力を受け付ける入力層と、異常の有無の識別結果を出力する出力層と、検査画像8の画像特徴量を抽出する中間層とを有する。 Similarly to the above, the control unit 11 learns, as the abnormality detection model 152, the image feature amount of the abnormality in the inspection image 8 related to the blob 41 generated by the image processing algorithm corresponding to the level 1, thereby performing the inspection. A neural network is generated which receives the image 8 as an input and outputs information indicating the presence or absence of foreign matter. The neural network is a CNN, and has an input layer that receives the input of the inspection image 8, an output layer that outputs the identification result of the presence or absence of abnormality, and an intermediate layer that extracts the image feature amount of the inspection image 8.

制御部11は、複数の検査画像8と、各検査画像8におけるブロブ41の異常を示す情報(異物を有するか、正常であるか)とが対応付けられた教師データを用いて学習を行う。教師データは、ブロブ41の検査画像8に対し、検査画像8のIDと、異常の種類(異物の有無)、ランク(1:異常、0:正常)とがラベル付けされたデータである。
制御部11は、教師データである検査画像8を入力層に入力し、中間層での演算処理を経て、出力層からブロブ41の異常の有無を示す識別結果(正常の確率値及び異常(異物あり)の確率値)を出力させ、異常の確率値を異常値として取得する。なお、出力層から出力される識別結果は、ソフトマックス関数を用いた場合、連続的な確率値(例えば「0」から「1」までの範囲の値)である。
The control unit 11 performs learning using teacher data in which a plurality of inspection images 8 are associated with information indicating whether the blob 41 in each inspection image 8 is abnormal (whether a foreign object is present or normal). The teacher data is data in which the inspection image 8 of the blob 41 is labeled with the ID of the inspection image 8, the type of abnormality (presence/absence of foreign matter), and the rank (1: abnormal, 0: normal).
The control unit 11 inputs the inspection image 8 which is the teacher data to the input layer, and through the arithmetic processing in the intermediate layer, the identification result indicating the presence or absence of abnormality of the blob 41 from the output layer (probability value of normality and abnormality (foreign matter (Probability value of Yes) is output and the probability value of abnormality is acquired as an abnormal value. The identification result output from the output layer is a continuous probability value (for example, a value in the range from “0” to “1”) when the softmax function is used.

制御部11は、出力層から出力された識別結果を、教師データにおいて検査画像8に対しラベル付けされた情報、すなわち正解値と比較し、出力層からの出力値が正解値に近づくように、中間層での演算処理に用いるパラメータを最適化する。該パラメータは、例えばニューロン間の重み(結合係数)、各ニューロンで用いられる活性化関数の係数などである。パラメータの最適化の方法は特に限定されないが、例えば制御部11は誤差逆伝播法を用いて各種パラメータの最適化を行う。 The control unit 11 compares the identification result output from the output layer with the information labeled on the inspection image 8 in the teacher data, that is, the correct value, so that the output value from the output layer approaches the correct value. The parameters used for the arithmetic processing in the intermediate layer are optimized. The parameters are, for example, weights between neurons (coupling coefficient), coefficients of an activation function used in each neuron, and the like. The method of optimizing the parameters is not particularly limited, but for example, the control unit 11 optimizes various parameters using the error back propagation method.

制御部11は、教師データに含まれる各検査画像8について上記の処理を行い、異常検出モデル152を生成する。制御部11はブロブ41の検査画像8を取得した場合、異常検出モデル152を用いてブロブ41の異常の有無を検出する。
異常検出モデル153〜155も同様に、レベル2〜4に対応する画像処理アルゴリズムにより生成された、ブロブ41に係る検査画像8内における異常の画像特徴量を学習することで、検査画像8を入力とし、異物の有無を示す情報を出力とするニューラルネットワークを生成する。
The control unit 11 performs the above process on each inspection image 8 included in the teacher data to generate the abnormality detection model 152. When the control unit 11 acquires the inspection image 8 of the blob 41, the control unit 11 uses the abnormality detection model 152 to detect the presence or absence of abnormality of the blob 41.
Similarly, the abnormality detection models 153-155 input the inspection image 8 by learning the image feature amount of the abnormality in the inspection image 8 related to the blob 41 generated by the image processing algorithm corresponding to the levels 2-4. Then, a neural network that outputs information indicating the presence or absence of foreign matter is generated.

学習検査部117は、選択されたレベルに応じ、検査画像8を異常検出モデル152〜155のいずれかに入力し、上述の二つの確率値を出力させ、異物を有する確率値(異常値)を取得する。 The learning inspection unit 117 inputs the inspection image 8 into any of the abnormality detection models 152 to 155 in accordance with the selected level, outputs the above two probability values, and outputs the probability value (abnormal value) of having a foreign substance. get.

図18は、制御部11による異常検出処理の処理手順の一例を示すフローチャートである。
PC1の制御部11は、検査物4を透過し、X線検知部7により検知されたX線に基づき、X線画像を生成する(S61)。
制御部11は、作業者により上述のようにしてレベルを受け付けたか否かを判定する(S62)。制御部11はレベルを受け付けていないと判定した場合(S62:NO)、判定を繰り返す。
制御部11はレベルを受け付けたと判定した場合(S62:YES)、対応するレベルのプログラムPを補助記憶部15から読み出す(S63)。
制御部11は、受け付けたレベルに対応する画像処理アルゴリズムに基づいて、X線画像に対し平滑化フィルタ、特徴抽出フィルタ等により画像処理を行う(S64)。
制御部11は、受け付けたレベルに対応する画像処理アルゴリズムに基づいて、ブロブ解析を行い、ブロブ41を特定する(S65)。
FIG. 18 is a flowchart showing an example of a processing procedure of abnormality detection processing by the control unit 11.
The control unit 11 of the PC 1 transmits an inspection object 4 and generates an X-ray image based on the X-ray detected by the X-ray detection unit 7 (S61).
The control unit 11 determines whether or not the level has been accepted by the worker as described above (S62). When the control unit 11 determines that the level has not been received (S62: NO), the determination is repeated.
When the control unit 11 determines that the level is accepted (S62: YES), the program P of the corresponding level is read from the auxiliary storage unit 15 (S63).
The control unit 11 performs image processing on the X-ray image with a smoothing filter, a feature extraction filter, or the like based on the image processing algorithm corresponding to the received level (S64).
The control unit 11 performs the blob analysis based on the image processing algorithm corresponding to the received level, and identifies the blob 41 (S65).

制御部11は、判断値を算出する(S66)。
制御部11は、a≦判断値≦bであるか否かを判定する(S67)。制御部11はa≦判断値≦bでないと判定した場合(S67:NO)、判断値はa未満、又はb超過であるので、判断値<aであるか否かを判定する(S68)。
制御部11は判断値<aであると判定した場合(S68:YES)、異物を有さず、正常であるので、学習検査をスキップして処理を終了する。
制御部11は判断値<aでない、即ち判断値>bであり、異物を有し、確実に異常であると判定した場合(S68:NO)、学習検査をスキップしてS76へ処理を進める。
The control unit 11 calculates a judgment value (S66).
The control unit 11 determines whether or not a≦determination value≦b (S67). When the control unit 11 determines that a≦judgment value≦b is not satisfied (S67: NO), the judgment value is less than a or exceeds b, so it is determined whether or not the judgment value <a (S68).
When the control unit 11 determines that the determination value is <a (S68: YES), the control unit 11 skips the learning test and ends the process because it is normal and has no foreign matter.
When the determination value <a, that is, the determination value>b, the control unit 11 determines that there is a foreign substance and is definitely abnormal (S68: NO), the learning test is skipped and the process proceeds to S76.

制御部11はa≦判断値≦bであると判定した場合(S67:YES)、a≦判断値≦bであるブロブ41が所定の大きさの矩形内に入るように切り出し、切り出し画像を生成する(S69)。
制御部11は、切り出し画像に対し、正規化等の処理を行い、検査画像を生成する(S70)。
制御部11は受け付けたレベルに対応する異常検出モデル152を選択する(S71)。
制御部11は異常検出モデル152に検査画像8を入力し、正常の確率値及び異常の確率値を出力させ、異常値を取得する(S72)。
制御部11は、異常値が閾値以上であるか否かを判定する(S73)。制御部11は異常値が閾値以上であると判定した場合(S73:YES)、異常値をディスプレイ22へ出力し、検査画像8を赤のバウンディングボックス(BB)82により包囲した状態で表示する(S74)。制御部11は異常値が閾値以上でないと判定した場合(S73:NO)、検査画像8を赤のバウンディングボックス(BB)82により包囲していない状態で表示する(S75)。
制御部11は、ブロブ41の異常値及び検査画像IDに基づいて、S68でNGと判定された場合はその検査物4を特定し、検査物4を廃棄するか否かの選別を行い(S76)、処理を終了する。
本実施の形態においては、画像処理アルゴリズムを選択して、所望のレベルで所望の種類の異常について、異常の有無を検出できる。
さらに、S65の対象特定をX線画像に基づいて行う場合、S64の画像処理は省略できる。S70の画像処理も省略できる。
When the control unit 11 determines that a≦judgment value≦b (S67: YES), the blob 41 with a≦judgment value≦b is cut out so as to be within a rectangle of a predetermined size, and a cutout image is generated. Yes (S69).
The control unit 11 performs processing such as normalization on the cutout image to generate an inspection image (S70).
The control unit 11 selects the abnormality detection model 152 corresponding to the received level (S71).
The control unit 11 inputs the inspection image 8 to the abnormality detection model 152, outputs the probability value of normality and the probability value of abnormality, and acquires the abnormality value (S72).
The control unit 11 determines whether or not the abnormal value is greater than or equal to the threshold value (S73). When the control unit 11 determines that the abnormal value is equal to or greater than the threshold value (S73: YES), the abnormal value is output to the display 22, and the inspection image 8 is displayed in a state of being surrounded by the red bounding box (BB) 82 ( S74). When the control unit 11 determines that the abnormal value is not greater than or equal to the threshold value (S73: NO), the inspection image 8 is displayed without being surrounded by the red bounding box (BB) 82 (S75).
Based on the abnormal value of the blob 41 and the inspection image ID, the control unit 11 identifies the inspection object 4 when it is determined to be NG in S68, and selects whether to discard the inspection object 4 (S76). ), the processing ends.
In the present embodiment, it is possible to select the image processing algorithm and detect the presence or absence of abnormality for a desired type of abnormality at a desired level.
Furthermore, when the target identification in S65 is performed based on the X-ray image, the image processing in S64 can be omitted. The image processing of S70 can also be omitted.

(実施の形態3)
実施の形態3に係るPC1は、制御部11が閾値設定部(設定部)121を有すること以外は、実施の形態1に係るPCと同様の処理を行う。
図19は、異常検出システム10の構成を示すブロック図である。図15と同一部分は同一符号を付して詳細な説明を省略する。
制御部11は、閾値設定部121を有する。閾値設定部121は、作業者によりって入力部16によりいずれかのレベルにつき、閾値a及び閾値bの設定を受け付けた場合、閾値を設定(更新)する。
(Embodiment 3)
The PC 1 according to the third embodiment performs the same processing as the PC according to the first embodiment, except that the control unit 11 has the threshold setting unit (setting unit) 121.
FIG. 19 is a block diagram showing the configuration of the abnormality detection system 10. The same parts as those in FIG. 15 are designated by the same reference numerals, and detailed description thereof will be omitted.
The control unit 11 has a threshold value setting unit 121. The threshold value setting unit 121 sets (updates) the threshold value when the operator accepts the setting of the threshold value a and the threshold value b for any level by the input unit 16.

図20は、制御部11による閾値の設定処理の処理手順の一例を示すフローチャートである。
制御部11は、作業者によりレベルの選択を受け付けたか否かを判定する(S81)。作業者はOtherボタン55を1回押圧した場合、制御部11は上述の図16に示す第1画面51を表示し、作業者はレベルを選択する。制御部11はレベルを受け付けていないと判定した場合(S81:NO)、この判定の処理を繰り返す。
制御部11は、レベルの選択を受け付けたと判定した場合(S81:YES)、このレベルにつき、閾値a及び閾値bを受け付けたか否かを判定する(S82)。図21に示すように、レベルが選択された場合、制御部11は、第1画面51に、レベルの閾値a及び閾値bを表示する。図21ではレベル1が選択された場合の画面を表示している。作業者は、選択したレベルの閾値a及び閾値bを入力する。制御部11は閾値a及び閾値bを受け付けていないと判定した場合(S82:NO)、この判定処理を繰り返す。
制御部11は閾値a及び閾値bを受け付けた場合(S82:YES)、閾値a及び閾値bを設定して図17のレベル1〜4の閾値a及びbを表示し(S83)、処理を終了する。
FIG. 20 is a flowchart showing an example of a processing procedure of threshold setting processing by the control unit 11.
The control unit 11 determines whether or not the operator has accepted the selection of the level (S81). When the worker presses the Other button 55 once, the control unit 11 displays the above-described first screen 51 shown in FIG. 16, and the worker selects the level. When the control unit 11 determines that the level is not accepted (S81: NO), this determination process is repeated.
When determining that the selection of the level has been accepted (S81: YES), the control unit 11 determines whether or not the threshold a and the threshold b have been accepted for this level (S82). As shown in FIG. 21, when the level is selected, the control unit 11 displays the level threshold value a and the threshold value b on the first screen 51. In FIG. 21, the screen when level 1 is selected is displayed. The operator inputs the threshold value a and the threshold value b of the selected level. When the control unit 11 determines that the threshold value a and the threshold value b are not accepted (S82: NO), this determination process is repeated.
When the control unit 11 receives the thresholds a and b (S82: YES), the thresholds a and b are set and the thresholds a and b of levels 1 to 4 in FIG. 17 are displayed (S83), and the process ends. To do.

本実施の形態によれば、設定した閾値に基づき、異常判定部114による検出結果が不確実と推定される場合に、学習モデルを用いて良好に異常の有無を判断することができる。 According to the present embodiment, when the detection result by the abnormality determination unit 114 is estimated to be uncertain based on the set threshold value, it is possible to properly determine the presence or absence of abnormality using the learning model.

以上のように、本発明の一態様に係る検査装置は、コンベアに載置された検査物への電磁波の照射により得られた画像を取得する取得部と、前記画像のうち、各画素の輝度に基づいて、前記検査物の異常の有無を判定するブロブを特定する特定部と、前記特定部で特定したブロブに基づき判断値を算出し、算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間の値であるか否かを判定する判定部と、前記判定部が前記中間の値であると判定した場合、特定されたブロブを含む画像を入力したときに、検査物の異常の有無に関する情報を出力する学習モデルに、特定されたブロブを含む画像を入力して、前記異常の有無に関する情報を取得する学習検査部と、前記異常の有無に関する情報を出力する出力部とを備える。 As described above, the inspection device according to one aspect of the present invention is an acquisition unit that acquires an image obtained by irradiating an electromagnetic wave to the inspection object placed on the conveyor, and the brightness of each pixel in the image. On the basis of the specification part for specifying a blob for determining whether there is an abnormality in the inspection object, and a judgment value is calculated based on the blob specified by the specification part, and the calculated judgment value is the normal first threshold value. an intermediate of whether the determination unit is a value of the second threshold value of the abnormal side, if the determination section determines that the is an intermediate value, when input images including the identified blobs , A learning inspection unit for inputting an image including the specified blob to a learning model for outputting information regarding presence/absence of abnormality of the inspection object, and outputting information regarding presence/absence of abnormality of the learning inspection unit And an output unit for

上記構成によれば、検査物への電磁波の照射により得られた画像に対し、判断値と閾値とに基づいて判定した検査物の異常の有無に応じ、学習モデルに画像を入力して異常の有無を取得する。例えば閾値に基づいて判定した検査物の異常の有無が不確実である場合に、学習モデルに画像を入力して異常の有無を取得することで、精度良く、異物の有無、形状の異常等の異常の有無を検出できる。
上記構成によれば、所定の画像処理アルゴリズムを適用して算出した判断値と閾値とに基づいて検出した結果が不確実と推定される場合に、異常の有無を精度良く検出できる。
上記構成によれば、異常の有無を判定するブロブを特定し、特定したブロブについて異常の有無を判定し、判定結果に応じて学習モデルを適用するので、異常の有無の検出を効率化できる。
According to the above configuration, with respect to the image obtained by irradiating the inspection object with the electromagnetic wave, the image is input to the learning model according to the presence or absence of the abnormality of the inspection object determined based on the determination value and the threshold, and Get presence or absence. For example, when it is uncertain whether or not there is an abnormality in the inspection object that is determined based on the threshold value, by inputting an image into the learning model and acquiring the presence or absence of abnormality, it is possible to accurately detect the presence or absence of foreign matter, the abnormality in shape, etc. The presence or absence of abnormality can be detected.
According to the above configuration, it is possible to accurately detect the presence or absence of abnormality when the result detected based on the determination value calculated by applying the predetermined image processing algorithm and the threshold value is estimated to be uncertain.
According to the above configuration, the blob for determining the presence/absence of abnormality is identified, the presence/absence of abnormality is determined for the identified blob, and the learning model is applied according to the determination result, so that the presence/absence of abnormality can be detected efficiently.

上述の検査装置において、前記特定部、画像処理アルゴリズムを適用して、前記ブロブを特定する。 In the above inspection device, the specifying unit applies the images processing algorithms, identifying the blob.

上述の検査装置において、画像処理アルゴリズムの選択を受け付ける第1受付部を備えてもよい。 The above-described inspection device may include a first reception unit that receives the selection of the image processing algorithm.

上記構成によれば、異常の内容に応じて画像処理アルゴリズムを選択し、精度良く検査物の異常の有無に関する情報を取得できる。 According to the above configuration, the image processing algorithm can be selected according to the content of the abnormality, and the information regarding the presence or absence of the abnormality of the inspection object can be acquired with high accuracy.

上述の検査装置において、前記第1閾値及び第2閾値を設定する設定部を備えてもよい。 The above-described inspection device may include a setting unit that sets the first threshold value and the second threshold value .

上記構成によれば、閾値に基づき、学習モデルを適用するか否かが判定されるので、判定部による判定結果が不確実と推定される場合に、学習モデルを用いて良好に異常の有無を判断することができる。 According to the above configuration, whether or not to apply the learning model is determined based on the threshold value. Therefore, when the determination result by the determination unit is estimated to be uncertain, the learning model is used to determine whether or not there is an abnormality. You can judge.

上述の検査装置において、前記出力部は、前記画像を表示し、表示された画像に対し前記出力部の出力結果の良否を受け付ける第2受付部を備えてもよい。 In the above-described inspection apparatus, the output unit may include a second reception unit that displays the image and receives the quality of the output result of the output unit with respect to the displayed image.

上記構成によれば、作業者により、画像に対し、学習モデルの判断結果の良否を取得して再学習することができる。 According to the above configuration, the operator can acquire the quality of the determination result of the learning model and re-learn the image.

上述の検査装置において、前記画像と、前記良否に関する情報とに基づき、前記学習モデルを再学習する再学習部を備えてもよい。 The above-described inspection device may include a re-learning unit that re-learns the learning model based on the image and the information regarding the quality.

上記構成によれば、作業者により受け付けた、出力結果の判断の良否を教師データとして再学習し、より精度が良好である学習モデルを生成できる。 According to the above configuration, it is possible to re-learn the quality of the determination of the output result received by the operator as teacher data, and generate a learning model with higher accuracy.

上述の検査装置において、前記再学習部は、前記第2受付部により否と受け付けた場合に再学習してもよい。 In the above-described inspection apparatus, the re-learning unit may re-learn when the second receiving unit accepts no.

上記構成によれば、第2受付部により否と受け付けた場合に、画像と、出力結果の判断の良否とを対応付けた教師データにより再学習するので、より少ない教師データ量で、より精度が良好である学習モデルを生成できる。 According to the above configuration, when the second accepting unit accepts no, re-learning is performed with the teacher data in which the image and the quality of the determination of the output result are associated with each other. A learning model that is good can be generated.

本発明の一態様に係る異常検出方法は、コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像のうち、各画素の輝度に基づいて、前記検査物の異常の有無を判定するブロブを特定し、特定したブロブに基づき算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間の値であるか否かを判定し、前記中間の値であると判定した場合、特定されたブロブを含む画像を入力したときに、前記検査物の異常の有無に関する情報を出力する学習モデルに、特定されたブロブを含む画像を入力して、前記異常の有無に関する情報を出力する、処理をコンピュータに実行させる。 The abnormality detection method according to one aspect of the present invention acquires an image obtained by irradiating an electromagnetic wave to an inspection object placed on a conveyor, and based on the brightness of each pixel in the image, the inspection object The blob for determining the presence or absence of abnormality is specified, and the determination value calculated based on the specified blob is determined whether it is an intermediate value between the first threshold value on the normal side and the second threshold value on the abnormal side , When it is determined that the value is the intermediate value, when the image including the specified blob is input, the learning model that outputs information regarding the presence or absence of abnormality of the inspection object is input the image including the specified blob. Te, before outputting the information as to whether or not Kikoto normal to execute the process to the computer.

上記構成によれば、判定結果に応じ、学習モデルを用いて異常の有無に関する情報を取得するので、例えば判定結果が不確実と推定される場合に、学習モデルに画像を入力して異常の有無を取得することで、精度良く、異物の有無、形状の異常等の異常の有無を検出できる。 According to the above configuration, the learning model is used to acquire information regarding the presence/absence of abnormality according to the determination result. For example, when the determination result is estimated to be uncertain, an image is input to the learning model to determine whether there is abnormality. By acquiring, it is possible to accurately detect the presence/absence of a foreign matter, the presence/absence of an abnormality such as a shape abnormality.

本発明の一態様に係るコンピュータプログラムは、コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像のうち、各画素の輝度に基づいて、前記検査物の異常の有無を判定するブロブを特定し、特定したブロブに基づき算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間の値であるか否かを判定し、前記中間の値であると判定した場合、特定されたブロブを含む画像を入力したときに、前記検査物の異常の有無に関する情報を出力する学習モデルに、特定されたブロブを含む画像を入力して、前記異常の有無に関する情報を出力する、処理をコンピュータに実行させる。 A computer program according to an aspect of the present invention acquires an image obtained by irradiating an electromagnetic wave to an inspection object placed on a conveyor, and based on the brightness of each pixel in the image, the inspection object. identify determining blob the presence or absence of an abnormality, the determination value calculated based on the identified blob, it is determined whether the intermediate value between the second threshold value of the first threshold and the abnormal side of the normal side, the If it is determined that the intermediate value, when entering an image including a blob identified, the learning model for outputting information about the presence or absence of abnormality of the inspected object, and enter the image containing the identified blobs , before outputting the information as to whether or not Kikoto normal to execute the process to the computer.

上記構成によれば、判定結果に応じ、学習モデルを用いて異常の有無に関する情報を取得するので、例えば判定結果が不確実と推定される場合に、学習モデルに画像を入力して異常の有無を取得することで、精度良く、異物の有無、形状の異常等の異常の有無を検出できる。 According to the above configuration, the learning model is used to acquire information regarding the presence/absence of abnormality according to the determination result. For example, when the determination result is estimated to be uncertain, an image is input to the learning model to determine whether there is abnormality. By acquiring, it is possible to accurately detect the presence/absence of a foreign matter, the presence/absence of an abnormality such as a shape abnormality.

本発明の一態様に係る学習モデルの生成方法は、コンベアに載置された検査物への電磁波の照射により得られた画像のうち、各画素の輝度に基づいて特定した、前記検査物の異常の有無を判定するブロブを含む画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを取得し、前記教師データに基づいて、特定したブロブに基づき算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間であると判定した場合、特定されたブロブを含む画像が入力されたときに、前記検査物の異常の有無に関する情報を出力する学習モデルを生成する。 A method for generating a learning model according to an aspect of the present invention is, in an image obtained by irradiating an electromagnetic wave to an inspection object placed on a conveyor, specified based on the brightness of each pixel, the abnormality of the inspection object. An image including a blob for determining the presence or absence of the test data is acquired by associating the recorded teacher data with information indicating the presence or absence of abnormality of the inspection object, and based on the teacher data, the judgment value calculated based on the specified blob is If it is determined that the intermediate the second threshold value of the first threshold and the abnormal side of the normal side, when the image including the blobs identified is input, outputs the information about the presence or absence of abnormality of the inspected Generate a learning model.

上記構成によれば、検査物の異常の内容に対応する、所定の画像処理アルゴリズムを適用して取得した画像を入力した場合等に、前記異常の有無を精度良く取得できる。 According to the above configuration, the presence or absence of the abnormality can be accurately obtained when an image obtained by applying a predetermined image processing algorithm corresponding to the abnormality content of the inspection object is input.

本発明の一態様に係る学習モデルは、コンベアに載置された検査物への電磁波の照射により得られた画像のうち、各画素の輝度に基づいて特定した、前記検査物の異常の有無を判定するブロブに基づき算出した判断値が、正常側の第1閾値と、異常側の第2閾値との中間であると判定した場合に、特定されたブロブを含む画像が入力される入力層と、前記検査物の異常の有無に関する情報を出力する出力層と、特定されたブロブを含む画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを用いてパラメータが学習された中間層とを備え、特定されたブロブを含む画像が前記入力層に入力された場合に、前記中間層による演算を経て前記検査物の異常の有無に関する情報を前記出力層から出力するようにコンピュータを機能させる。 The learning model according to one aspect of the present invention, among the images obtained by irradiating electromagnetic waves to the inspection object placed on the conveyor, identified based on the brightness of each pixel, the presence or absence of abnormality of the inspection object When the judgment value calculated based on the judgment blob is intermediate between the first threshold value on the normal side and the second threshold value on the abnormal side, an input layer to which an image including the specified blob is input. , A parameter is learned using teacher data recorded by associating an output layer that outputs information regarding whether or not there is an abnormality in the inspection object, an image including the specified blob, and information that indicates whether or not there is an abnormality in the inspection object. When an image including a specified blob is input to the input layer, the output layer outputs information regarding the presence or absence of abnormality of the inspection object through an operation by the intermediate layer. Make the computer work.

上記構成によれば、検査物の異常の内容に対応する、所定の画像処理アルゴリズムを適用して取得した画像を入力した場合等に、前記異常の有無を精度良く取得できる。 According to the above configuration, the presence or absence of the abnormality can be accurately obtained when an image obtained by applying a predetermined image processing algorithm corresponding to the abnormality content of the inspection object is input.

今回開示された実施の形態はすべての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上記した意味ではなく、特許請求の範囲によって示され、特許請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。
例えば、検査物は食品に限定されず、包装体、工業製品等であってもよい。
検査物4に照射する電磁波はX線に限定されず、テラヘルツ波、赤外線及び可視光等であってもよい。
また、対象特定部113が、a≦判断値≦bであるブロブ41を抽出することにしてもよい。
The embodiments disclosed this time are to be considered as illustrative in all points and not restrictive. The scope of the present invention is shown not by the above meaning but by the scope of the claims, and is intended to include meanings equivalent to the scope of the claims and all modifications within the scope.
For example, the inspection item is not limited to food, and may be a package, an industrial product, or the like.
The electromagnetic waves with which the inspection object 4 is irradiated are not limited to X-rays, and may be terahertz waves, infrared rays, visible light, or the like.
Further, the target specifying unit 113 may extract the blobs 41 for which a≦judgment value≦b.

1 PC(検査装置)
10 異常検出システム
11 制御部
12 主記憶部
13 通信部
14 表示部
15 補助記憶部
P プログラム
151 検査画像DB
152〜155 異常検出モデル
156 記録媒体
2 X線検査機
22 ディスプレイ
3 X線照射部
4 検査物
8 検査画像
81、82 バウンディングボックス
5 表示画面
6 搬送部
61 搬送ベルト
7 X線検知部
71 検知ライン
1 PC (inspection device)
10 Abnormality Detection System 11 Control Section 12 Main Storage Section 13 Communication Section 14 Display Section 15 Auxiliary Storage Section P Program 151 Inspection Image DB
152 to 155 Abnormality detection model 156 Recording medium 2 X-ray inspection machine 22 Display 3 X-ray irradiation part 4 Inspection object 8 Inspection image 81, 82 Bounding box 5 Display screen 6 Conveying part 61 Conveying belt 7 X-ray detecting part 71 Detection line

Claims (11)

コンベアに載置された検査物への電磁波の照射により得られた画像を取得する取得部と、
前記画像のうち、各画素の輝度に基づいて、前記検査物の異常の有無を判定するブロブを特定する特定部と、
前記特定部で特定したブロブに基づき判断値を算出し、算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間の値であるか否かを判定する判定部と、
前記判定部が前記中間の値であると判定した場合、特定されたブロブを含む画像を入力したときに、検査物の異常の有無に関する情報を出力する学習モデルに、特定されたブロブを含む画像を入力して、前記異常の有無に関する情報を取得する学習検査部と、
前記異常の有無に関する情報を出力する出力部と
を備える検査装置。
An acquisition unit that acquires an image obtained by irradiating an electromagnetic wave to the inspection object placed on the conveyor,
Of the image, based on the brightness of each pixel, a specifying unit for specifying a blob for determining the presence or absence of abnormality of the inspection object,
A judgment unit for calculating a judgment value based on the blob specified by the specifying unit, and for judging whether the calculated judgment value is an intermediate value between the first threshold value on the normal side and the second threshold value on the abnormal side ; ,
If the determination unit determines that the value is the intermediate value, when the image including the specified blob is input, the learning model that outputs information regarding the presence or absence of abnormality of the inspection object, the image including the specified blob. And a learning inspection unit that acquires information regarding the presence or absence of the abnormality,
And an output unit that outputs information regarding the presence or absence of the abnormality.
前記特定部、画像処理アルゴリズムを適用して、前記ブロブを特定する、請求項1に記載の検査装置。 The specifying unit applies the images processing algorithms, identifying the blob, inspection apparatus according to claim 1. 画像処理アルゴリズムの選択を受け付ける第1受付部を備える、請求項に記載の検査装置。 The inspection apparatus according to claim 2 , further comprising a first reception unit that receives selection of an image processing algorithm. 前記第1閾値及び第2閾値を設定する設定部を備える、請求項1からまのでいずれか1項に記載の検査装置。 The inspection apparatus according to any one of claims 1 to 3, further comprising a setting unit that sets the first threshold value and the second threshold value . 前記出力部は、前記画像を表示し、
表示された画像に対し前記出力部の出力結果の良否を受け付ける第2受付部を備える、請求項1からまのでいずれか1項に記載の検査装置。
The output unit displays the image,
The inspection apparatus according to any one of claims 1 to 4, further comprising a second reception unit that receives the quality of the output result of the output unit with respect to the displayed image.
前記画像と、前記良否に関する情報とに基づき、前記学習モデルを再学習する再学習部を備える、請求項に記載の検査装置。 The inspection apparatus according to claim 5 , further comprising a re-learning unit that re-learns the learning model based on the image and the information regarding the quality. 前記再学習部は、前記第2受付部により否と受け付けた場合に再学習する、請求項に記載の検査装置。 7. The inspection apparatus according to claim 6 , wherein the re-learning unit re-learns when the second receiving unit receives “no”. コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、
前記画像のうち、各画素の輝度に基づいて、前記検査物の異常の有無を判定するブロブを特定し、
特定したブロブに基づき算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間の値であるか否かを判定し、
前記中間の値であると判定した場合、特定されたブロブを含む画像を入力したときに、前記検査物の異常の有無に関する情報を出力する学習モデルに、特定されたブロブを含む画像を入力して、前記異常の有無に関する情報を出力する、
処理をコンピュータに実行させる、異常検出方法。
Acquire the image obtained by irradiation of electromagnetic waves to the inspection object placed on the conveyor,
Of the image, based on the brightness of each pixel, to identify the blob to determine the presence or absence of abnormality of the inspection object,
It is determined whether the determination value calculated based on the specified blob is an intermediate value between the first threshold value on the normal side and the second threshold value on the abnormal side ,
When it is determined that the value is the intermediate value, when the image including the specified blob is input, the learning model that outputs information regarding the presence or absence of abnormality of the inspection object is input the image including the specified blob. Te, before outputting the information about the presence or absence of Kikoto normal,
An anomaly detection method that causes a computer to perform processing.
コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、
前記画像のうち、各画素の輝度に基づいて、前記検査物の異常の有無を判定するブロブを特定し、
特定したブロブに基づき算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間の値であるか否かを判定し、
前記中間の値であると判定した場合、特定されたブロブを含む画像を入力したときに、前記検査物の異常の有無に関する情報を出力する学習モデルに、特定されたブロブを含む画像を入力して、前記異常の有無に関する情報を出力する、
処理をコンピュータに実行させる、コンピュータプログラム。
Acquire the image obtained by irradiation of electromagnetic waves to the inspection object placed on the conveyor,
Of the image, based on the brightness of each pixel, to identify the blob to determine the presence or absence of abnormality of the inspection object,
It is determined whether the determination value calculated based on the specified blob is an intermediate value between the first threshold value on the normal side and the second threshold value on the abnormal side ,
When it is determined that the value is the intermediate value, when the image including the specified blob is input, the learning model that outputs information regarding the presence or absence of abnormality of the inspection object is input the image including the specified blob. Te, before outputting the information about the presence or absence of Kikoto normal,
A computer program that causes a computer to perform processing.
コンベアに載置された検査物への電磁波の照射により得られた画像のうち、各画素の輝度に基づいて特定した、前記検査物の異常の有無を判定するブロブを含む画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを取得し、
前記教師データに基づいて、特定したブロブに基づき算出した判断値が、正常側の第1閾値と異常側の第2閾値との中間であると判定した場合、特定されたブロブを含む画像が入力されたときに、前記検査物の異常の有無に関する情報を出力する学習モデルを生成する
学習モデルの生成方法。
Among the images obtained by irradiating the inspection object placed on the conveyor with electromagnetic waves, the image including the blob for determining the presence or absence of abnormality of the inspection object specified based on the brightness of each pixel, and the inspection object The teacher data recorded in association with the information indicating the presence or absence of
When it is determined that the judgment value calculated based on the specified blob based on the teacher data is between the first threshold value on the normal side and the second threshold value on the abnormal side, an image including the specified blob is input. when it is, the method of generating the learning model for generating a learning model that outputs information about the presence or absence of abnormality of the inspected object.
コンベアに載置された検査物への電磁波の照射により得られた画像のうち、各画素の輝度に基づいて特定した、前記検査物の異常の有無を判定するブロブに基づき算出した判断値が、正常側の第1閾値と、異常側の第2閾値との中間であると判定した場合に、特定されたブロブを含む画像が入力される入力層と、
前記検査物の異常の有無に関する情報を出力する出力層と、
特定されたブロブを含む画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを用いてパラメータが学習された中間層と
を備え、
特定されたブロブを含む画像が前記入力層に入力された場合に、前記中間層による演算を経て前記検査物の異常の有無に関する情報を前記出力層から出力するように
コンピュータを機能させる学習モデル。
Of the image obtained by irradiation of electromagnetic waves to the inspection object placed on the conveyor, specified based on the brightness of each pixel, the judgment value calculated based on the blob to determine the presence or absence of abnormality of the inspection object, An input layer to which an image including the identified blob is input when it is determined that the first threshold value on the normal side and the second threshold value on the abnormal side are intermediate .
An output layer that outputs information regarding the presence or absence of abnormality of the inspection object,
An image including the identified blob and an intermediate layer in which parameters are learned using teacher data recorded by associating information indicating whether or not there is an abnormality in the inspection object,
A learning model that causes a computer to output, when an image including the identified blob is input to the input layer, information from the output layer regarding whether or not there is an abnormality in the inspection object through an operation by the intermediate layer.
JP2019051401A 2019-03-19 2019-03-19 Inspection device, abnormality detection method, computer program, learning model generation method, and learning model Active JP6749655B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2019051401A JP6749655B1 (en) 2019-03-19 2019-03-19 Inspection device, abnormality detection method, computer program, learning model generation method, and learning model
PCT/JP2020/003347 WO2020189044A1 (en) 2019-03-19 2020-01-30 Inspection device, abnormality detection method, computer program, learning model generation method, and learning model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019051401A JP6749655B1 (en) 2019-03-19 2019-03-19 Inspection device, abnormality detection method, computer program, learning model generation method, and learning model

Publications (2)

Publication Number Publication Date
JP6749655B1 true JP6749655B1 (en) 2020-09-02
JP2020153765A JP2020153765A (en) 2020-09-24

Family

ID=72276733

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019051401A Active JP6749655B1 (en) 2019-03-19 2019-03-19 Inspection device, abnormality detection method, computer program, learning model generation method, and learning model

Country Status (2)

Country Link
JP (1) JP6749655B1 (en)
WO (1) WO2020189044A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220180495A1 (en) * 2019-03-27 2022-06-09 Nec Corporation Abnormality detection apparatus, control method, and program

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102456491B1 (en) * 2020-11-06 2022-10-20 한국생산기술연구원 Deep learning-based can welding defect detection system and defect detection method using the same
CN112487973B (en) * 2020-11-30 2023-09-12 阿波罗智联(北京)科技有限公司 Updating method and device for user image recognition model
JP2023000672A (en) * 2021-06-18 2023-01-04 株式会社サタケ Sorting machine, method for discriminating defective article, and sorting method
JP7034529B1 (en) * 2021-08-13 2022-03-14 株式会社ハシマ Training model generation method, learning model, checking device, checking method and computer program
CN114937028B (en) * 2022-06-21 2023-12-08 苏州上舜精密工业科技有限公司 Intelligent identification and recognition linear sliding table module quality detection method and system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4684928B2 (en) * 2006-03-29 2011-05-18 アンリツ産機システム株式会社 X-ray inspection system
JP5156546B2 (en) * 2008-08-28 2013-03-06 株式会社イシダ X-ray inspection equipment
JP2010198476A (en) * 2009-02-26 2010-09-09 Omron Corp Defect detecting apparatus, defect detecting method and defect detecting program
JP5635903B2 (en) * 2010-12-27 2014-12-03 アンリツ産機システム株式会社 X-ray inspection equipment
JP6061713B2 (en) * 2013-02-08 2017-01-18 本田技研工業株式会社 Inspection apparatus, inspection method and program
JP2016156647A (en) * 2015-02-23 2016-09-01 株式会社 システムスクエア Inspection device using electromagnetic wave
WO2016152485A1 (en) * 2015-03-20 2016-09-29 株式会社イシダ Inspection apparatus
EP3378222A4 (en) * 2015-11-16 2019-07-03 Orbital Insight, Inc. Moving vehicle detection and analysis using low resolution remote sensing imagery
JP6893676B2 (en) * 2016-09-20 2021-06-23 株式会社イシダ Optical inspection equipment
US11580398B2 (en) * 2016-10-14 2023-02-14 KLA-Tenor Corp. Diagnostic systems and methods for deep learning models configured for semiconductor applications
JP6629455B2 (en) * 2017-02-20 2020-01-15 Serendipity株式会社 Appearance inspection equipment, lighting equipment, photography lighting equipment
JPWO2019151393A1 (en) * 2018-01-31 2020-12-03 株式会社ニチレイフーズ Food inspection system, food inspection program, food inspection method and food production method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220180495A1 (en) * 2019-03-27 2022-06-09 Nec Corporation Abnormality detection apparatus, control method, and program

Also Published As

Publication number Publication date
JP2020153765A (en) 2020-09-24
WO2020189044A1 (en) 2020-09-24

Similar Documents

Publication Publication Date Title
JP6749655B1 (en) Inspection device, abnormality detection method, computer program, learning model generation method, and learning model
JP5546317B2 (en) Visual inspection device, visual inspection discriminator generation device, visual inspection discriminator generation method, and visual inspection discriminator generation computer program
JP2021140739A (en) Program, method for creating learned model, information processing method and information processing device
KR20210008352A (en) System and method for detecting defects in imaged items
CN107004265A (en) Information processor, the method for processing information, discriminator generating means, the method and program for generating discriminator
JP2019211288A (en) Food testing system and program
JPS63503332A (en) Inspection equipment
Eshkevari et al. Automatic dimensional defect detection for glass vials based on machine vision: A heuristic segmentation method
Zhang et al. Computer vision estimation of the volume and weight of apples by using 3d reconstruction and noncontact measuring methods
US20230222645A1 (en) Inspection apparatus, unit selection apparatus, inspection method, and computer-readable storage medium storing an inspection program
WO2023084543A1 (en) System and method for leveraging neural network based hybrid feature extraction model for grain quality analysis
TW202242390A (en) Defect inspection device, defect inspection method, and manufacturing method
TWI694250B (en) Surface defect detection system and method thereof
JP2021143884A (en) Inspection device, inspection method, program, learning device, learning method, and trained dataset
JP6742037B1 (en) Learning model generation method, learning model, inspection device, abnormality detection method, and computer program
KR102269741B1 (en) X-ray inspection method for overlap pattern using machine learning
CN114303157A (en) Training data generation device, inspection device, and program
Mizuno et al. Development of visual egg inspection system for poultry farmer using CNN with deep learning
Shi et al. Nondestructive discrimination of analogous density foreign matter inside soy protein meat semi-finished products based on transmission hyperspectral imaging
CN116245882A (en) Circuit board electronic element detection method and device and computer equipment
WO2021119946A1 (en) Food inspection solution
WO2023017611A1 (en) Learning model generation method, learning model, inspection device, inspection method, and computer program
JP7198438B2 (en) OBJECT DETECTION METHOD, OBJECT DETECTION DEVICE AND COMPUTER PROGRAM
JP2021174194A (en) Learning data processing device, learning device, learning data processing method, and program
JP6763569B2 (en) Optical inspection equipment and optical inspection system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191225

A871 Explanation of circumstances concerning accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A871

Effective date: 20191226

A975 Report on accelerated examination

Free format text: JAPANESE INTERMEDIATE CODE: A971005

Effective date: 20200205

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200310

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200403

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200501

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200728

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200805

R150 Certificate of patent or registration of utility model

Ref document number: 6749655

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250