WO2020189044A1 - 検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデル - Google Patents

検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデル Download PDF

Info

Publication number
WO2020189044A1
WO2020189044A1 PCT/JP2020/003347 JP2020003347W WO2020189044A1 WO 2020189044 A1 WO2020189044 A1 WO 2020189044A1 JP 2020003347 W JP2020003347 W JP 2020003347W WO 2020189044 A1 WO2020189044 A1 WO 2020189044A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
abnormality
inspection
inspection object
absence
Prior art date
Application number
PCT/JP2020/003347
Other languages
English (en)
French (fr)
Inventor
幸寛 中川
Original Assignee
株式会社システムスクエア
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社システムスクエア filed Critical 株式会社システムスクエア
Publication of WO2020189044A1 publication Critical patent/WO2020189044A1/ja

Links

Images

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

Definitions

  • the present invention relates to an inspection device for detecting an abnormality in an inspection object such as food, an abnormality detection method, a computer program, a learning model generation method, and a learning model.
  • Inspection waves such as X-rays, terahertz waves, infrared rays, and visible light are used 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. Inspection equipment is used.
  • the inspection object is irradiated with the inspection wave, the inspection wave that has passed through the inspection object is detected, and the inspection image of the inspection object is acquired.
  • the inspection object When the inspection object has a foreign substance, there is a dark part exceeding the threshold value in the inspection image.
  • the presence or absence of foreign matter has been determined based on the area and shape of the dark portion.
  • the presence or absence of abnormalities in the shape of the inspection object was determined based on the area and peripheral length of the blobs (lumps) in the inspection image.
  • the area of the blob is calculated by counting the pixels constituting the blob, and the peripheral length of the blob is calculated based on the arrangement of the background pixels forming the periphery of the blob (for example, Patent Document 1 and the like).
  • the presence or absence of an abnormality is determined by comparing the inspection image of the inspection object acquired based on the predetermined image processing algorithm with the threshold value, but depending on the type of the inspection object and the foreign matter, The difference in pixel value between the normal part and the foreign matter may be 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 detected accurately.
  • the present invention has been made in view of such circumstances, and an inspection device capable of accurately detecting an abnormality in an inspection object, an abnormality detection method, a computer program, a learning model generation method, and the like. And to provide a learning model.
  • the inspection device includes an acquisition unit that acquires an image obtained by irradiating an inspection object placed on a conveyor with an electromagnetic wave, and the image.
  • a judgment unit that determines the presence or absence of an abnormality in the inspection object based on the judgment value and the threshold value calculated based on the above, and an image obtained by irradiating the inspection object with electromagnetic waves according to the judgment result of the judgment unit are input.
  • a learning inspection unit that acquires information on the presence or absence of the abnormality by inputting an image obtained by irradiating the inspection object with electromagnetic waves into a learning model that outputs information on the presence or absence of the abnormality of the inspection object, and the abnormality. It is provided with an output unit that outputs information regarding the presence or absence of.
  • the "image obtained by irradiation with electromagnetic waves” includes an image based on electromagnetic waves and an image obtained by image processing the image.
  • an image obtained by irradiating an inspection object placed on a conveyor with an electromagnetic wave is acquired, and the inspection is performed based on a judgment value and a threshold value calculated based on the image.
  • a computer is made to execute a process of inputting the acquired image into the model and outputting information indicating the presence or absence of abnormality of the inspection object.
  • the computer program acquires an image obtained by irradiating an inspection object placed on a conveyor with electromagnetic waves, and the inspection object is based on a judgment value and a threshold value calculated based on the image.
  • a learning model that determines the presence or absence of abnormalities in the above, and outputs information on the presence or absence of abnormalities in the inspection object when an image obtained by irradiating the inspection object with electromagnetic waves is input according to the determination result of the presence or absence of the abnormality.
  • the computer is made to execute a process of inputting the acquired image and outputting information indicating the presence or absence of abnormality of the inspection object.
  • an image obtained by irradiating an inspection object placed on a conveyor with an electromagnetic wave is acquired, and the image and information indicating the presence or absence of abnormality of the inspection object are obtained.
  • the teacher data recorded in association with and is acquired and the image obtained by irradiating the inspection object placed on the conveyor with electromagnetic waves is input based on the teacher data, the abnormality of the inspection object is abnormal.
  • the learning model has an input layer into which an image obtained by irradiating an inspection object placed on a conveyor with an electromagnetic wave is input, and an output for outputting information regarding the presence or absence of abnormality in the inspection object.
  • An intermediate in which parameters are learned using teacher data recorded by associating an image obtained by irradiating a layer and an inspection object placed on a conveyor with an electromagnetic wave and information indicating the presence or absence of an abnormality in the inspection object.
  • an image is input to a learning model according to the presence or absence of an abnormality in the inspection object determined based on a judgment value and a threshold value.
  • a learning model According to the present invention, with respect to an image based on an image obtained by irradiating an inspection object with electromagnetic waves, an image is input to a learning model according to the presence or absence of an abnormality in the inspection object determined based on a judgment value and a threshold value.
  • the presence or absence of abnormality For example, when it is uncertain whether or not there is an abnormality in the inspection object determined based on the threshold value, by inputting an image into the learning model and acquiring the presence or absence of the abnormality, the presence or absence of foreign matter, the presence or absence of the shape abnormality, etc. can be accurately determined. The presence or absence of abnormality can be detected.
  • FIG. It is a perspective view which shows the structure of the abnormality detection system which concerns on Embodiment 1.
  • FIG. It is a block diagram which shows the structure of an abnormality detection system. It is explanatory drawing which shows the state which blob was extracted about the inspection object which is a fish meat. It is explanatory drawing which shows the state which cut out each blob. It is explanatory drawing which shows the state which the blob is surrounded by the bounding box. It is explanatory drawing of the process of resizing. It is explanatory drawing which shows the inspection image including the blob which was judged that the abnormality value is 0.5 or more by the abnormality detection model. It is explanatory drawing which shows an example of the record layout of the inspection image DB.
  • FIG. 1 It is explanatory drawing about the generation processing of an abnormality detection model. It is a flowchart which shows an example of the processing procedure of the generation processing of the abnormality detection model by a control unit. It is a flowchart which shows an example of the processing procedure of the abnormality detection processing by a control unit. It is explanatory drawing which shows an example of the display screen in a display. It is a flowchart which shows an example of the processing procedure of the relearning process by the control part of a PC. It is a flowchart which shows an example of the processing procedure of the relearning process of the modification by the control part of a PC. It is a block diagram which shows the structure of the abnormality detection system which concerns on Embodiment 2. FIG.
  • FIG. 1 is a plan view showing the configuration of the abnormality detection system 10 according to the first embodiment
  • 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.
  • the inspection object 4 is placed on the transfer belt 61 of the transfer unit (conveyor) 6 of the X-ray inspection machine 2, and the inspection object 4 is abnormal based on the image captured by using X-rays.
  • the abnormality detection system 10 for detecting the above will be described.
  • the abnormality detection system 10 determines the presence or absence of an abnormality in the inspection object 4 based on a predetermined image processing algorithm, and estimates the presence or absence of an abnormality based on the abnormality detection model 152 according to the result.
  • An example of the inspection product 4 is food such as raw meat and fish meat.
  • the X-ray inspection machine 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.
  • a transport unit 6 is provided in the lower housing 23.
  • the transport portion 6 is provided with an upstream roller 63 outside one end in the longitudinal direction of the lower housing 23, and a downstream roller 62 outside the other end.
  • Two lower rollers 64, 65 are provided between the upstream roller 63 and the downstream roller 62 below the upstream roller 63 and the downstream roller 62, and the conveyor belt 61 is attached to these rollers. It has been bridged.
  • a driving force from a transfer motor (not shown) is applied to either the upstream roller 63 or the downstream roller 62, and when the object to be inspected is inspected, the transfer belt 61 rotates clockwise at a constant speed V. Go around.
  • the upper housing 21 houses an X-ray irradiation unit 3 that irradiates X-rays as electromagnetic waves.
  • 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).
  • An 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 detector 7 is called a TDI (Time Delay Integration) camera or TDI sensor, and includes a scintillator that emits fluorescence according to the intensity of X-rays and a large number of photodiodes that detect the fluorescence emitted by the scintillator. have.
  • TDI Time Delay Integration
  • one detection line 71 is configured by arranging photodiodes linearly in the X direction orthogonal to the Y direction, which is the moving direction of the object to be inspected, and a plurality of these detection lines are provided.
  • the plurality of detection lines 71 are arranged side by side in parallel in the Y direction, which is the moving direction of the object to be inspected.
  • 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 detection line 71 is composed of photodiodes arranged side by side and arranged in the X direction.
  • An X-ray image is composed of the data of each line received and output by each detection line 71.
  • the information processing device 1 is an information processing device capable of transmitting and receiving various types of information processing and information, 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 device 1 via a network N such as a LAN.
  • the network N may be the Internet.
  • a cloud computer connected so as to be communicable via a network N such as the Internet may execute the processing of the information processing device 1.
  • the information processing device 1 is a personal computer, and in the following description, it is read as PC1 for the sake of brevity.
  • the PC 1 acquires an image obtained by capturing an image of the inspection object 4, and performs a process of detecting the presence or absence of an abnormality in the inspection object 4 based on the image.
  • the PC 1 has been trained to detect (identify) an 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 or absence of abnormality is detected using 152.
  • the PC 1 obtained an image obtained by irradiating the inspection object 4 with X-rays using an X-ray inspection machine 2 (a region surrounding the blob 41 was cut out as described later, and the region was subjected to predetermined image processing.
  • the inspection image is input to the abnormality detection model 152, and the identification result indicating the presence or absence of the abnormality of the blob 41 is acquired as an output.
  • the type of abnormality of the inspection object 4 is the presence or absence of foreign matter
  • the PC1 inputs the inspection image to the abnormality detection model 152, and the probability of normality (without foreign matter) and the probability of abnormality (with foreign matter) are output by the softmax function. The case where the probability of abnormality is acquired as an abnormal value will be described.
  • the PC 1 selects whether or not to discard the inspection object 4 according to the acquired abnormal value.
  • 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 one or more CPUs (Central Processing Units), MPUs (Micro-Processing Units), GPUs (Graphics Processing Units), and other arithmetic processing units, and stores the program P stored in the auxiliary storage unit 15. By reading and executing, various information processing, control processing, and the like related to the PC1 are performed.
  • Each functional unit of FIG. 2 is executed by the control unit 11 operating based on the program P.
  • control unit 11 includes an image generation unit 111, an image processing unit (acquisition unit) 112, a target identification unit (specific unit) 113, an abnormality determination unit (determination unit) 114, a cutting unit 115, and an image processing unit 116. It has a learning inspection unit 117, a display unit (output unit) 118, a sorting unit (output unit) 119, a pass / fail judgment reception unit (second reception unit) 122, and a re-learning unit 123.
  • the image generation unit 111 passes through the inspection object 4 and generates an X-ray image based on the X-rays detected by the X-ray detection unit 7.
  • the image processing unit 112 performs image processing on the X-ray image by a smoothing filter, a feature extraction filter, or the like.
  • the target identification unit 113 analyzes the blob 41 and identifies the blob (region).
  • the target identification unit 113 extracts, for example, an emphasis line obtained by enhancing the brightness change (edge detection) of each pixel, and specifies a portion including the emphasis line as a blob.
  • the target identification unit 113 may specify a blob whose brightness change rate is equal to or higher than a predetermined value as compared with the peripheral region.
  • the target identification unit 113 may obtain a standard deviation of the brightness and specify a set of pixels having a portion where the brightness changes by a predetermined level or more as compared with the standard deviation as a blob, and a singular part having a different brightness.
  • the portion containing the blob may be specified as a blob.
  • the abnormality determination unit 114 determines whether or not the blob is a foreign substance based on the determination value and the threshold value for the blob specified by the target identification unit 113. Examples of the judgment value include the number of images of the blob surrounded by the emphasized line, the area, and the like.
  • the normal side threshold value (first threshold value) a and the abnormal side threshold value (second threshold value) b are set as the judgment values. Every time (a ⁇ b), if the calculated judgment value is less than the threshold value a, it is determined that the singular portion is not a foreign substance and is normal, and if the judgment value exceeds the threshold value b, it is determined that the blob is a foreign substance.
  • FIG. 3 shows, as an example, a state in which a blob 41 having a judgment value of a or more and b or less is extracted from the inspection object 4 which is fish meat. The blobs are highlighted and filled by image processing.
  • the cutout unit 115 cuts out the blob 41 having a determination value of a or more and b or less so that it fits within a rectangle of a predetermined size, surrounds it with a bounding box 81, and generates a cutout image.
  • the image surrounding the blob 41 is an image before the enhancement process.
  • the image surrounding the blob 41 may be an image after enhancement processing.
  • 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 cutout image to generate an inspection area (inspection image) 8 to be input to the abnormality detection model 152.
  • FIG. 5 is an explanatory diagram showing a state in which the blob specified by the target specifying unit 113 is cut out by the cutting unit 115, and the inspection image 8 formed by surrounding the blob 41 with the bounding box 81 is generated.
  • the target identification unit 113 of the control unit 11 detects the blob 41 as described above.
  • each inspection image 8 each blob 41 is surrounded by a bounding box 81 of the same size.
  • FIG. 6 is an explanatory diagram of the resizing process by the cutout portion 115.
  • the cutout portion 114 of the control unit 11 is resized so that the blob 41 fits in the bounding box 81.
  • a complementary process is performed.
  • the learning inspection unit 117 inputs each inspection image into the abnormality detection model 152 and acquires an abnormality value.
  • the display unit 118 outputs an abnormal value to the display 22, and displays the presence or absence of an abnormality in the inspection image on the display 22.
  • FIG. 7 shows an inspection image including a blob whose outlier is determined to be 0.5 or more by the anomaly detection model 152.
  • the sorting unit 119 compares the abnormal value of the inspection image 8 with the threshold value, selects whether or not to discard the inspection object 4 including the blob 41 showing the abnormal value, stops the transport unit 6, and inspects. Mark the object 4. For example, when the abnormal value of one blob 41 is 0.5 or more, the sorting unit 119 considers the inspection object 4 containing the blob 41 as an abnormal product and sorts it when it is discarded.
  • the outlier threshold is not limited to 0.5. It should be noted that the present invention is not limited to the case where the inspection object 4 is discarded when one blob 41 having an abnormal value equal to or higher than the threshold value is included. When a predetermined number or more of blobs 41 show an abnormal value equal to or more than a threshold value, the inspection object 4 may be discarded.
  • the pass / fail judgment reception unit 122 receives the pass / fail judgment of the judgment 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 and the above-mentioned good / bad judgment input from the operator are associated with each other.
  • the main storage unit 12 is a temporary storage area for SRAM (Static Random Access Memory), DRAM (Dynamic Random Access Memory), flash memory, etc., and temporarily stores data necessary for the control unit 11 to execute arithmetic processing.
  • the communication unit 13 is a communication module for performing processing related to communication, and transmits / receives information to / from the outside.
  • the auxiliary storage unit 15 is a large-capacity memory, a hard disk, or the like, and stores the program P and other data required for the control unit 11 to execute processing.
  • the auxiliary storage unit 15 stores the inspection image DB 151 and the abnormality detection model 152.
  • the inspection image DB 151 is a database that stores history information of inspection results of the inspection object 4 that is an abnormality detection target.
  • the program P stored in the auxiliary storage unit 15 may be provided by a recording medium 156 in which the program P is readablely 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, and a compact flash (registered trademark).
  • the program P recorded on 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.
  • the information processing device 1 includes a communication unit capable of communicating 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 PC1.
  • the PC 1 may be a multi-computer composed of a plurality of computers, or may be a virtual machine virtually constructed by software.
  • the input unit 16 receives an input such as a threshold value of a judgment value described later by an operator.
  • 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 string, an inspection image string, a coordinate information string, an abnormal value string, a judgment value string, and a pass / fail result column.
  • the inspection image ID column stores an inspection image ID for identifying each inspection image 8.
  • the inspection image string stores the inspection image of the corresponding ID.
  • the coordinate information sequence stores coordinate information indicating the position of the blob 41 in the X-ray irradiation region on the transport 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 center in the X direction and the Y direction is the origin between the upstream roller 63 and the downstream roller 62 in FIG.
  • Outliers are the probabilities of anomalies, as described above.
  • the determination value is a determination value calculated by the abnormality determination unit 114.
  • the pass / fail result column stores the result (correct: OK, incorrect: NG) when the operator accepts the judgment of the control unit 11.
  • the pass / fail result column is provided for re-learning, which will be described later, and it is not necessary to acquire pass / fail results in all the tests.
  • FIG. 9 is an explanatory diagram relating to the generation process of the abnormality detection model 152.
  • FIG. 9 conceptually shows a process of performing machine learning to generate an abnormality detection model 152.
  • 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 the abnormality in the blob 41.
  • a neural network is constructed (generated).
  • the neural network is a CNN (Convolution Neural Network), which includes an input layer that accepts the input of the inspection image 8, an output layer that outputs the identification result of the presence or absence of an abnormality, and an intermediate layer that extracts the image feature amount of the inspection image 8.
  • CNN Convolution Neural Network
  • the input layer has a plurality of neurons that accept the input of the pixel value of each pixel included in the inspection image 8, and passes the input pixel to the intermediate layer.
  • the intermediate layer has a plurality of neurons for extracting the image features of the inspection image, and the extracted image features are passed to the output layer.
  • the number of layers of the intermediate layer is set to 3, but the number of layers is not limited to this.
  • the abnormality detection model 152 is CNN
  • the intermediate layer alternates between a convolution layer that convolves the pixel values of each pixel input from the input layer and a pooling layer that maps the pixel values convoluted by the convolution layer.
  • the feature amount of the image is finally extracted while compressing the pixel information of the inspection image 8.
  • the output layer has two neurons that output the identification result of identifying the abnormality in the blob 41, and identifies the presence or absence of the abnormality in the blob 41 based on the image feature amount output from the intermediate layer.
  • One neuron outputs the probability of normal (without foreign matter) in blob 41, and the other neuron outputs the probability of abnormality (with foreign matter) in blob 41.
  • the abnormality detection model 152 will be described as being a CNN, but the abnormality detection model 152 is not limited to the CNN, and is a neural network other than the CNN, an SVM (Support Vector Machine), a Bayesian network, and a regression tree. It may be a trained model constructed by another learning algorithm.
  • the control unit 11 has a teacher data (whether it has a foreign substance or does not have a foreign substance and is normal) in which a plurality of inspection images 8 and information indicating an abnormality of the blob 41 in each inspection image 8 are associated with each other. Learning is performed using (abnormal data, normal data).
  • the teacher data is data in which the type of abnormality (presence or absence of foreign matter) and rank (1: abnormality, 0: normal) are labeled with respect to the inspection image 8 of the blob 41.
  • the control unit 11 may store a database of teacher data in the auxiliary storage unit 15, or may acquire teacher data from an external device.
  • the control unit 11 inputs the inspection image 8 which is the teacher data to the input layer, performs arithmetic processing in the intermediate layer, and acquires an identification result indicating the presence or absence of an abnormality in the blob 41 from the output layer.
  • the identification result output from the output layer is a continuous probability (for example, a value in the range of "0" to "1") when the softmax function is used.
  • the identification result may be a value that discretely indicates the presence or absence of an abnormality (for example, a value of "0" or "1").
  • the control unit 11 compares the identification result output from the output layer with the information labeled for the inspection image 8 in the teacher data, that is, the correct answer value, so that the output value from the output layer approaches the correct answer value.
  • the parameters include, for example, the weight between neurons (coupling coefficient), the coefficient of the 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 by using the backpropagation method.
  • the control unit 11 performs the above processing on each inspection image 8 included in the teacher data to generate the abnormality detection model 152.
  • the control unit 11 acquires the inspection image 8 of the blob 41
  • the control unit 11 detects the presence or absence of foreign matter in the blob 41 by using the abnormality detection model 152.
  • FIG. 10 is a flowchart showing an example of a processing procedure of the generation processing of the abnormality detection model 152 by the control unit 11.
  • the control unit 11 acquires teacher data in which the inspection images 8 of the plurality of blobs 41 and the information indicating the abnormality of the blobs 41 in each inspection image 8 are associated with each other (S11).
  • the control unit 11 uses the teacher data to generate an 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 into the input layer of the neural network, and acquires the identification result of identifying the presence / absence of foreign matter in the inspection image 8 from the output layer. The control unit 11 compares the acquired identification result with the correct answer value of the teacher data (information labeled for the inspection image 8), and in the intermediate layer, the identification result output from the output layer approaches the correct answer value. Optimize the parameters (weights, etc.) used in the arithmetic processing of. The control unit 11 stores the generated abnormality detection model 152 in the auxiliary storage unit 15 and ends a series of processes.
  • an 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
  • FIG. 11 is a flowchart showing an example of the processing procedure of the abnormality detection process by the control unit 11.
  • the control unit 11 of the PC 1 passes through the inspection object 4 and generates an X-ray image based on the X-rays detected by the X-ray detection unit 7 (S21).
  • the control unit 11 performs image processing on the X-ray image by a smoothing filter, a feature extraction filter, or the like (S22).
  • the control unit 11 performs blob analysis as described above to identify the blob (S23).
  • the control unit 11 extracts an emphasis line obtained by enhancing the brightness change of each pixel (edge detection), and identifies a portion including the emphasis line as a blob.
  • the control unit 11 determines whether or not the blob is a foreign substance (S24).
  • the control unit 11 calculates, for example, a determination value such as the number of images and an area of the blob surrounded by the highlighted line, and makes a determination based on the calculated determination value and the 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 intermediate (a ⁇ judgment value ⁇ b).
  • the control unit 11 determines in S24 whether or not it is determined to be NG (abnormal) or OK (normal) (S25). When the control unit 11 determines that it is NG or OK (S25: YES), it determines whether or not it is OK (S26). When the control unit 11 determines that the result is OK (S26: YES), the learning test is skipped and the process ends. When the control unit 11 determines that it is not OK, that is, NG (S26: NO), the learning test is skipped and the process proceeds to S33.
  • the control unit 11 When the control unit 11 determines that it is not NG or OK (S25: NO), the control unit 11 cuts out the blob 41 determined not to be NG or OK so as to be inside a rectangle of a predetermined size, and generates a cut-out image. (S27).
  • the cut-out image is, for example, an image of the blob 41 before the filling process.
  • the cropped image may be an image after the filling process.
  • the control unit 11 performs processing such as normalization on the cut-out image to generate an inspection image (S28).
  • the control unit 11 inputs the inspection image 8 into the abnormality detection model 152, outputs the normal probability and the abnormality probability, and acquires the abnormal value (S29).
  • the control unit 11 determines whether or not the abnormal value is equal to or greater than the threshold value (S30).
  • the control unit 11 determines that the abnormal value is equal to or higher than the threshold value (S30: YES)
  • the control unit 11 outputs the abnormal value to the display 22 and displays the inspection image 8 in a state of being surrounded by the red bounding box (BB) 82 (S30: YES). S31).
  • the control unit 11 determines that the abnormal value is not equal to or higher than the threshold value (S30: NO)
  • the control unit 11 displays the inspection image 8 in a state where it is not surrounded by the red bounding box (BB) 82 (S32).
  • the control unit 11 identifies the inspection object 4 based on the abnormal value of the inspection image 8 and the inspection image ID, and if it is determined to be NG in S26, selects whether or not to discard the inspection object 4 ( S33), the process is terminated.
  • the present embodiment even when the difference between the pixel values of the foreign matter and the other part 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.
  • the abnormality detection model 152 foreign matter can be discriminated with high accuracy.
  • the determination value and the determination result of whether or not the blob 41 is a foreign substance acquired based on the threshold values a and b are accurate. If this is not the case, the presence or absence of foreign matter can be detected with high accuracy by inputting the inspection image 8 into the abnormality detection model 152 and acquiring the abnormality value.
  • the present invention is not limited to this, and other abnormalities such as an abnormality in shape may be detected.
  • the judgment value 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 test is not limited to the case where the judgment value is a or more and b or less, and the learning test may be performed when the judgment value is a or more and the learning test is performed when the judgment value is b or less. May be done. The image processing of S28 can be omitted. The inspection image 8 may be an image after the blob 41 has been enhanced.
  • FIG. 12 is an explanatory diagram showing an example of a display screen 5 on the display 22.
  • the display screen has a first screen 51 on the left side in FIG. 12 and a second screen 52 on the right side.
  • the control unit 11 displays the inspection image 8 on the first screen 51 in association with the inspection object 4 mounted on the transport belt 61 in association with the position of the transport belt 61.
  • the control unit 11 displays the inspection images 8 corresponding to the blobs 41 in the order of the inspection image IDs, and the abnormal inspection image 8 is surrounded by the red bounding box 82.
  • 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.
  • the operator can select any of the inspection images 8 on the second screen 52 by the selection button 56 consisting of ">" and " ⁇ " for sequentially moving in the row direction of the inspection image 8.
  • the inspection image 8 may be selected by a pointing device such as a mouse.
  • the second screen 52 also includes an OK button 53 that is pressed when the operator determines that the estimation result (judgment) of the abnormality detection model 152 is correct, and an NG button 54 that is pressed when the determination is incorrect. It also has the Other button 55, which is used when inputting an instruction for selecting the level of presence / absence of abnormality, which will be described later.
  • the control unit 11 receives input from the operator as to whether or not the judgment of the abnormality detection model 152 is good or bad by the OK button 53 or the NG button 54, and when a predetermined number or more of data are collected, the control unit 11 ,
  • the inspection image 8 and the quality of the judgment input from the operator can be used as teacher data to relearn the abnormality detection model 152.
  • FIG. 13 is a flowchart showing an example of the processing procedure of the above-mentioned re-learning process by the control unit 11 of the PC1.
  • the control unit 11 accepts the determination of the quality of the determination of the abnormality detection model 152 based on the pressing of the OK button 53 or the NG button 54 on the second screen 52 by the operator for the selected inspection image 8 (S41).
  • the control unit 11 determines that the quality determination is not accepted (S41: NO)
  • the determination process is repeated.
  • the inspection image 8 of the blob 41 that has detected the abnormality corresponds to the good / bad judgment of the control unit 11 input from the operator. Acquire the attached teacher data (S42).
  • the control unit 11 uses the teacher data to generate an 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). With the above, it is relearned. As a result, the abnormality detection model 152 is updated as the abnormality detection process is continued, and more accurate abnormality detection can be performed. The judgment of the quality of the abnormality detection model 152 by the operator may be performed based on the X-ray image instead of the inspection image 8.
  • FIG. 14 is a flowchart showing an example of the processing procedure of the re-learning process of the modified example by the control unit 11 of the PC1.
  • the control unit 11 accepts the determination of the quality of the determination of the abnormality detection model 152 based on the pressing of the OK button 53 or the NG button 54 on the second screen 52 by the operator for the selected inspection image 8 (S51).
  • the control unit 11 determines that the quality determination is not accepted (S51: NO)
  • the determination process is repeated.
  • the control unit 11 determines whether or not the determination has been accepted (S52).
  • the process ends.
  • the teacher who associates the inspection image 8 of the blob 41 that detected the abnormality with the determination result when a predetermined number of the results of the determination of no are obtained.
  • Acquire data (S53).
  • the control unit 11 uses the teacher data to generate an 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). With the above, it is relearned. This makes it possible to perform accurate abnormality detection with a smaller amount of teacher data.
  • the control unit 11 detects the presence or absence of foreign matter based on four image processing algorithms, and the auxiliary storage unit 15 stores the program P corresponding to each image processing algorithm.
  • 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 substances detected based on the four image processing algorithms may be all the same, some may be the same, or all may be different. Examples of the type of foreign matter include bone, metal, wood, synthetic resin and the like. When the types of foreign substances are the same, the method of calculating the judgment value is different.
  • the image processing algorithm may be used to detect different types of abnormalities in the inspection object 4. Types of anomalies include the presence or absence of foreign matter, abnormal shape, and the like. The number of image processing algorithms is not limited to four.
  • the target identification unit 113 specifies the portion including the highlighted line extracted by highlighting the brightness change (edge detection) of each pixel as the blob 41. ..
  • the abnormality determination unit 114 makes a determination based on, for example, determination values such as the number of images and the area of the blob 41 surrounded by the highlighted line.
  • the threshold values a and b are set as the judgment values, and if the judgment value is less than the threshold value, for example, it is determined that the singular portion is not a foreign substance.
  • the target identification unit 113 extracts a singular portion whose brightness change rate is equal to or higher than a predetermined value as the blob 41 as compared with the peripheral region.
  • the abnormality determination unit 114 makes a determination based on, for example, a determination value such as the number of pixels whose rate of change is equal to or greater than a predetermined value.
  • the standard deviation of the brightness is obtained, and the singular portion where the brightness changes by a predetermined level or more as compared with the standard deviation is specified as the blob 41.
  • the singular portion having different brightness is specified as the blob 41.
  • the abnormality determination unit 114 determines whether or not the shape of these peculiar portions can be, for example, the shape of a bone by an image matching process.
  • FIG. 15 is a block diagram showing the configuration of the abnormality detection system 10.
  • the same parts as those in FIG. 2 are designated by the same reference numerals, and detailed description thereof will be omitted.
  • the control unit 11 has a level reception unit (first reception unit) 120.
  • the level corresponds to the image processing algorithm for detecting the presence or absence of foreign matter, and here, it is assumed that there are four types of levels 1 to 4.
  • the level reception unit 120 accepts the selection of the level by the worker.
  • 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 desired level of buttons.
  • the target identification unit 113 Based on the image processing algorithm corresponding to the selected level, the target identification unit 113 identifies the blob 41, and the abnormality determination unit 114 determines whether the blob 41 is abnormal or normal. Depending on the image processing algorithm, not only the processing of the target identification unit 113 and the abnormality determination unit 114 may be different, but also the processing of the image processing unit 112 and the image processing unit 116 may be different.
  • the abnormality determination unit 114 calculates a determination value for the blob 41 specified by the target identification unit 113 based on the image processing algorithm.
  • the target identification unit 113 specifies as the blob 41 the portion including the emphasis line extracted by emphasizing the brightness change of each pixel
  • the abnormality determination unit 114 is the blob 41 surrounded by the emphasis line. Judgment values such as the number of images and area are calculated, and the judgment is made based on the calculated judgment values.
  • a threshold value a on the normal side and a 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 and not a foreign substance, and the judgment value is determined. If is greater than or equal to the threshold value b, it is determined that the singular portion is a foreign substance and the blob 41 is abnormal.
  • the control unit 11 displays the threshold values a and the threshold values b of "level 1" to "level 4" on the first screen 51. indicate.
  • the judgment value of each level is calculated based on each image processing algorithm, the content differs depending on the level, each threshold value a and threshold value b also differ, and the range of normal and abnormal is also different.
  • the control unit 11 inspects the abnormality 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 level 1 as the abnormality detection model 152.
  • a neural network is generated in which image 8 is input and information indicating the presence or absence of foreign matter is output.
  • the neural network is a CNN, and has an input layer that accepts the input of the inspection image 8, an output layer that outputs the identification result of the presence or absence of an abnormality, and an intermediate layer that extracts the image feature amount of the inspection image 8.
  • the control unit 11 performs learning by using the teacher data in which the plurality of inspection images 8 and the information indicating the abnormality of the blob 41 in each inspection image 8 (whether it has a foreign substance or is normal) are associated with each other.
  • the teacher data is data in which the inspection image 8 of the blob 41 is labeled with the type of abnormality (presence or absence of foreign matter) and rank (1: abnormal, 0: normal).
  • the control unit 11 inputs the inspection image 8 which is the teacher data to the input layer, and after the arithmetic processing in the intermediate layer, the identification result indicating the presence or absence of the abnormality of the blob 41 from the output layer (normal probability and abnormality (foreign matter)). ) Probability) is output, and the probability of abnormality is acquired as an abnormal value.
  • the identification result output from the output layer is a continuous probability (for example, a value in the range of "0" to "1") when the softmax function is used.
  • the control unit 11 compares the identification result output from the output layer with the information labeled for the inspection image 8 in the teacher data, that is, the correct answer value, so that the output value from the output layer approaches the correct answer value.
  • the parameters include, for example, the weight between neurons (coupling coefficient), the coefficient of the 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 by using the backpropagation method.
  • the control unit 11 performs the above processing on each inspection image 8 included in the teacher data to generate the abnormality detection model 152.
  • the control unit 11 acquires the inspection image 8 of the blob 41
  • the control unit 11 detects the presence or absence of an abnormality in the blob 41 by using the abnormality detection model 152.
  • the inspection image 8 is input 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 to 4.
  • the learning inspection unit 117 inputs the inspection image 8 to any of the abnormality detection models 152 to 155 according to the selected level, outputs the above two probabilities, and acquires the probability of having a foreign substance (outlier value). ..
  • FIG. 18 is a flowchart showing an example of the processing procedure of the abnormality detection process by the control unit 11.
  • the control unit 11 of the PC 1 passes through the inspection object 4 and generates an X-ray image based on the X-rays detected by the X-ray detection unit 7 (S61).
  • the control unit 11 determines whether or not the operator has accepted the level as described above (S62). When the control unit 11 determines that the level is not accepted (S62: NO), the determination is repeated.
  • the control unit 11 determines that the level has been accepted (S62: YES)
  • the control unit 11 reads the program P of the corresponding level from the auxiliary storage unit 15 (S63).
  • the control unit 11 performs image processing on the X-ray image by 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 blob analysis and identifies the blob 41 based on the image processing algorithm corresponding to the received level (S65).
  • the control unit 11 calculates a determination value (S66).
  • the control unit 11 determines whether or not a ⁇ determination value ⁇ b (S67).
  • the determination value is less than a or exceeds b, and therefore determines whether or not the determination value ⁇ a (S68).
  • the control unit 11 determines that the determination value ⁇ a (S68: YES)
  • the control unit 11 has no foreign matter and is normal, so the learning test is skipped and the process ends.
  • the control unit 11 has a determination value ⁇ a, that is, a determination value> b, has a foreign substance, and definitely determines that the abnormality is abnormal (S68: NO)
  • the learning test is skipped and the process proceeds to S76.
  • the control unit 11 When the control unit 11 determines that a ⁇ judgment value ⁇ b (S67: YES), the control unit 11 cuts out the blob 41 having a ⁇ judgment value ⁇ b so as to be inside a rectangle of a predetermined size, and generates a cut-out image. (S69).
  • the control unit 11 performs processing such as normalization on the cut-out 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 into the abnormality detection model 152, outputs the normal probability and the abnormal probability, and acquires the abnormal value (S72).
  • the control unit 11 determines whether or not the abnormal value is equal to or greater than the threshold value (S73).
  • the control unit 11 determines that the abnormal value is equal to or higher than the threshold value (S73: YES).
  • the control unit 11 outputs the abnormal value to the display 22 and displays the inspection image 8 in a state of being surrounded by the red bounding box (BB) 82 (S73: YES).
  • the control unit 11 determines that the abnormal value is not equal to or higher than the threshold value (S73: NO)
  • the control unit 11 displays the inspection image 8 in a state where it is not surrounded by the red bounding box (BB) 82 (S75).
  • the control unit 11 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).
  • an image processing algorithm can be selected to detect the presence or absence of anomalies for a desired type of anomaly at a desired level. Further, when the target identification of S65 is performed based on the X-ray image, the image processing using the filter of S64 or the like can be omitted. The image processing of S70 can also be omitted.
  • 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. When the operator accepts the setting of the threshold value a and the threshold value b for any of the levels by the input unit 16, the threshold value setting unit 121 sets (updates) the threshold value.
  • FIG. 20 is a flowchart showing an example of a processing procedure of the threshold value setting process 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 operator presses the Other button 55 once, the control unit 11 displays the first screen 51 shown in FIG. 16 described above, and the operator selects a level. When the control unit 11 determines that the level is not accepted (S81: NO), the control unit 11 repeats this determination process. When the control unit 11 determines that the selection of the level has been accepted (S81: YES), the control unit 11 determines whether or not the threshold value a and the threshold value b have been accepted for this level (S82). As shown in FIG.
  • the control unit 11 displays the threshold value a and the threshold value b of the level on the first screen 51.
  • the screen when level 1 is selected is displayed.
  • the operator inputs the threshold a and the threshold b of the selected level.
  • 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.
  • the control unit 11 receives the threshold values a and b (S82: YES)
  • the control unit 11 sets the threshold values a and b, displays the threshold values a and b of levels 1 to 4 in FIG. 17 (S83), and ends the process. To do.
  • the detection result by the abnormality determination unit 114 is estimated to be uncertain based on the set threshold value, the presence or absence of an abnormality can be satisfactorily determined using the learning model.
  • the inspection device includes an acquisition unit that acquires an image obtained by irradiating an inspection object placed on a conveyor with electromagnetic waves, and a determination value calculated based on the image.
  • the determination unit that determines the presence or absence of abnormality of the inspection object based on the threshold value and the image obtained by irradiating the inspection object with electromagnetic waves according to the determination result of the determination unit are input, the abnormality of the inspection object
  • the learning inspection unit that acquires the information on the presence or absence of the abnormality by inputting the image obtained by irradiating the inspection object with electromagnetic waves into the learning model that outputs the information on the presence or absence of the abnormality, and outputs the information on the presence or absence of the abnormality. It is provided with an output unit.
  • the image is input to the learning model according to the presence or absence of the abnormality of the inspection object judged based on the judgment value and the threshold value, and the abnormality is found. Get the presence or absence. For example, when it is uncertain whether or not there is an abnormality in the inspection object determined based on the threshold value, by inputting an image into the learning model and acquiring the presence or absence of the abnormality, the presence or absence of foreign matter, the presence or absence of an abnormality in the shape, etc. can be accurately determined. The presence or absence of abnormality can be detected.
  • the determination unit may apply an image processing algorithm to the image to calculate a determination value and determine the presence or absence of an abnormality in the inspection object.
  • the detection result is estimated to be uncertain based on the judgment value and the threshold value calculated by applying a predetermined image processing algorithm, the presence or absence of an abnormality can be detected with high accuracy.
  • an image processing algorithm is applied to an image obtained by irradiating an inspection object with an electromagnetic wave to provide a specific portion for specifying a region for determining the presence or absence of an abnormality in the inspection object.
  • the unit determines the presence or absence of an abnormality in the inspection object based on the determination value and the threshold value calculated based on the image of the region to which the image processing algorithm is applied, and the learning inspection unit determines the determination result of the determination unit.
  • the region for determining the presence or absence of an abnormality is specified, the presence or absence of an abnormality is determined for the specified region, and the learning model is applied according to the determination result, so that the detection of the presence or absence of an abnormality can be made more efficient.
  • the above-mentioned inspection device may include a first reception unit that accepts selection of an image processing algorithm.
  • 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.
  • the above-mentioned inspection device may include a setting unit for setting the threshold value.
  • the learning model is used to satisfactorily determine the presence or absence of abnormality. You can judge.
  • the learning inspection unit may input the image into the learning model.
  • the judgment value when it is presumed that the judgment value is definitely normal when the judgment value is less than the first threshold value and abnormal when the judgment value exceeds the second threshold value, the judgment value is the first.
  • the learning model can be applied to satisfactorily acquire the presence / absence information of abnormality.
  • the determination unit determines that the region is normal, and when the determination value exceeds the second threshold value, the determination unit determines.
  • the region may be determined to be abnormal, and the learning inspection unit may not input an image into the learning model.
  • the presence / absence information of abnormality can be obtained satisfactorily and efficiently by applying the learning model, except when the inspection object is surely normal or abnormal.
  • the output unit may include a second reception unit that displays the image and accepts the quality of the output result of the output unit with respect to the displayed image.
  • the worker can acquire the quality of the judgment result of the learning model and relearn the image.
  • the above-mentioned inspection device may include a re-learning unit that relearns the learning model based on the image and information on the quality.
  • the re-learning unit may re-learn when the second reception unit accepts a rejection.
  • the second reception unit accepts a rejection
  • the image is relearned from the teacher data in which the judgment of the output result is good or bad, so that the accuracy can be improved with a smaller amount of teacher data.
  • a learning model that is good can be generated.
  • an image obtained by irradiating an inspection object placed on a conveyor with an electromagnetic wave is acquired, and the inspection is performed based on a judgment value and a threshold value calculated based on the image.
  • a computer is made to execute a process of inputting the acquired image into the model and outputting information indicating the presence or absence of abnormality of the inspection object.
  • information on the presence or absence of abnormality is acquired using the learning model according to the judgment result. Therefore, for example, when the judgment result is estimated to be uncertain, an image is input to the learning model to obtain the presence or absence of abnormality. By acquiring, it is possible to accurately detect the presence or absence of foreign matter, the presence or absence of abnormalities such as shape abnormalities.
  • the computer program acquires an image obtained by irradiating an inspection object placed on a conveyor with electromagnetic waves, and the inspection object is based on a judgment value and a threshold value calculated based on the image.
  • a learning model that determines the presence or absence of abnormalities in the above, and outputs information on the presence or absence of abnormalities in the inspection object when an image obtained by irradiating the inspection object with electromagnetic waves is input according to the determination result of the presence or absence of the abnormality.
  • the computer is made to execute a process of inputting the acquired image and outputting information indicating the presence or absence of abnormality of the inspection object.
  • information on the presence or absence of abnormality is acquired using the learning model according to the judgment result. Therefore, for example, when the judgment result is estimated to be uncertain, an image is input to the learning model to obtain the presence or absence of abnormality. By acquiring, it is possible to accurately detect the presence or absence of foreign matter, the presence or absence of abnormalities such as shape abnormalities.
  • an image obtained by irradiating an inspection object placed on a conveyor with an electromagnetic wave is acquired, and the image and information indicating the presence or absence of abnormality of the inspection object are obtained.
  • the teacher data recorded in association with and is acquired and the image obtained by irradiating the inspection object placed on the conveyor with electromagnetic waves is input based on the teacher data, the abnormality of the inspection object is abnormal.
  • the presence or absence of the abnormality can be accurately acquired when an image acquired by applying a predetermined image processing algorithm corresponding to the content of the abnormality of the inspection object is input.
  • the learning model has an input layer into which an image obtained by irradiating an inspection object placed on a conveyor with an electromagnetic wave is input, and an output for outputting information regarding the presence or absence of abnormality in the inspection object.
  • An intermediate in which parameters are learned using teacher data recorded by associating an image obtained by irradiating a layer and an inspection object placed on a conveyor with an electromagnetic wave and information indicating the presence or absence of an abnormality in the inspection object.
  • the presence or absence of the abnormality can be accurately acquired when an image acquired by applying a predetermined image processing algorithm corresponding to the content of the abnormality of the inspection object is input.
  • the inspection product is not limited to food, and may be a package, an industrial product, or the like.
  • the electromagnetic wave irradiating the inspection object 4 is not limited to X-rays, and may be terahertz waves, infrared rays, visible light, or the like.
  • the target specifying unit 113 may extract the blob 41 in which a ⁇ determination value ⁇ b.

Abstract

精度良く検査物の異常を検出することができる検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデルを提供する。 検査装置は、コンベア(61)に載置された検査物への電磁波の照射により得られた画像を取得する取得部(112)と、前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定する判定部(114)と、判定部(114)の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、検査物の異常の有無に関する情報を出力する学習モデル(152)に、検査物への電磁波の照射により得られた画像を入力して、前記異常の有無に関する情報を取得する学習検査部(117)と、前記異常の有無に関する情報を出力する出力する出力部(118)とを備える。

Description

検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデル
 本発明は、食品等の検査物の異常を検出する検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデルに関する。
 食肉、豆類等の食品の検査、包装材に内容物が収納された包装体の検査、及び電子部品等の工業製品の検査に、X線、テラヘルツ波、赤外線及び可視光等の検査波を使用した検査装置が使用されている。この検査装置においては、検査物に検査波が照射され、検査物を通過した検査波が検知されて被検査物の検査画像が取得される。
 検査物が異物を有する場合、検査画像に閾値を超える濃い部分が存在する。従来、この濃い部分の面積及び形状等に基づいて、異物の有無の判定を行っていた。
 検査物の形状の異常の有無は、検査画像のブロブ(塊)の面積及び周囲長に基づいて行っていた。ブロブを構成する画素をカウントすることにより、ブロブの面積が算出され、ブロブの周囲を形成する背景画素の配列に基づき、ブロブの周囲長が算出される(例えば特許文献1等)。
特開2005-31069号公報
 所定の画像処理アルゴリズムに基づいて取得した検査物の検査画像に対し、従来の異常検出方法では、閾値と比較することにより異常の有無を判定していたが、検査物及び異物の種類によっては、正常な部分と異物との画素値の差異が小さい場合があり、検出の精度が良くないという問題があった。
 検査物の形状の異常を検出する場合においても、同様に、ブロブの画素と背景画素との画素値の差異が小さく、エッジが明瞭でなく、正確に検出できない場合があった。
 本発明は斯かる事情に鑑みてなされたものであり、精度良く検査物の異常を検出することができる検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、
及び学習モデルを提供することを目的とする。
 本発明の一態様に係る検査装置は、本発明の一態様に係る検査装置は、コンベアに載置された検査物への電磁波の照射により得られた画像を取得する取得部と、前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定する判定部と、前記判定部の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、検査物の異常の有無に関する情報を出力する学習モデルに、検査物への電磁波の照射により得られた画像を入力して、前記異常の有無に関する情報を取得する学習検査部と、前記異常の有無に関する情報を出力する出力部とを備える。
 ここで、「電磁波の照射により得られた画像」とは、電磁波に基づく画像、及び該画像を画像処理して得られた画像を含む。
 本発明の一態様に係る異常検出方法は、コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定し、前記異常の有無の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、前記検査物の異常の有無に関する情報を出力する学習モデルに、取得した画像を入力して、前記検査物の異常の有無を示す情報を出力する、処理をコンピュータに実行させる。
 本発明の一態様に係るコンピュータプログラムは、コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定し、前記異常の有無の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、前記検査物の異常の有無に関する情報を出力する学習モデルに、取得した画像を入力して、前記検査物の異常の有無を示す情報を出力する、処理をコンピュータに実行させる。
 本発明の一態様に係る学習モデルの生成方法は、コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを取得し、前記教師データに基づいて、コンベアに載置された検査物への電磁波の照射により得られた画像が入力された場合に、前記検査物の異常の有無に関する情報を出力する学習モデルを生成する。
 本発明の一態様に係る学習モデルは、コンベアに載置された検査物への電磁波の照射により得られた画像が入力される入力層と、前記検査物の異常の有無に関する情報を出力する出力層と、コンベアに載置された検査物への電磁波の照射により得られた画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを用いてパラメータが学習された中間層とを備え、検査物への電磁波の照射により得られた画像が前記入力層に入力された場合に、前記中間層による演算を経て前記検査物の異常の有無に関する情報を前記出力層から出力するようにコンピュータを機能させる。
 本発明によれば、検査物に電磁波を照射して取得した画像に基づく画像に対し、判断値と閾値とに基づいて判定した検査物の異常の有無に応じて、学習モデルに画像を入力して異常の有無を取得する。例えば閾値に基づいて判定した検査物の異常の有無が不確実である場合に、学習モデルに画像を入力して異常の有無を取得することで、精度良く、異物の有無、形状の異常等の異常の有無を検出できる。
実施の形態1に係る異常検出システムの構成を示す斜視図である。 異常検出システムの構成を示すブロック図である。 魚肉である検査物につき、ブロブを抽出した状態を示す説明図である。 各ブロブを切り出した状態を示す説明図である。 ブロブをバウンディングボックスにより包囲した状態を示す説明図である。 リサイズの処理の説明図である。 異常検出モデルにより異常値が0.5以上であると判断されたブロブを含む検査画像を示す説明図である。 検査画像DBのレコードレイアウトの一例を示す説明図である。 異常検出モデルの生成処理に関する説明図である。 制御部による異常検出モデルの生成処理の処理手順の一例を示すフローチャートである。 制御部による異常検出処理の処理手順の一例を示すフローチャートである。 ディスプレイにおける表示画面の一例を示す説明図である。 PCの制御部による再学習処理の処理手順の一例を示すフローチャートである。 PCの制御部による変形例の再学習処理の処理手順の一例を示すフローチャートである。 実施の形態2に係る異常検出システムの構成を示すブロック図である。 レベル1~4の選択ボタンを表示する表示画面の一例を示す説明図である。 レベル1~4の閾値a及びbを表示する表示画面の一例を示す説明図である。 制御部による異常検出処理の処理手順の一例を示すフローチャートである。 実施の形態3に係る異常検出システムの構成を示すブロック図である。 制御部による閾値の設定の処理の処理手順の一例を示すフローチャートである。 レベルの閾値を入力するための表示画面の一例を示す説明図である。
 以下、本発明をその実施の形態を示す図面に基づいて詳述する。
(実施の形態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の一例として、生肉、魚肉等の食品が挙げられる。
 X線検査機2は、横長の直方体状をなす下側筐体23と、下側筐体23上に設けられ、下側筐体23より小さい上側筐体21とを備える。
 下側筐体23内に搬送部6が設けられている。搬送部6は、下側筐体23の長手方向の一端部の外側に上流側ローラ63が設けられ、他端部の外側に下流側ローラ62が設けられている。上流側ローラ63と下流側ローラ62の間には、上流側ローラ63及び下流側ローラ62よりも下側に、2つの下段ローラ64,65が設けられており、これらのローラに搬送ベルト61が架け渡されている。上流側ローラ63と下流側ローラ62のいずれか一方に、搬送モータ(不図示)からの駆動力が与えられ、被検査物を検査するときに、搬送ベルト61が時計周りに一定の速度Vで周回する。
 上側筐体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線の強度に応じて蛍光を発するシンチレータと、シンチレータで発せられた蛍光を検知する多数のフォトダイオードとを有している。
 TDIカメラでは、フォトダイオードが、被検査物の移動方向であるY方向と直交するX方向に直線的に並んで1つの検知ライン71が構成され、この検知ラインが複数ライン設けられている。複数の検知ライン71は被検査物の移動方向であるY方向へ向けて平行に並んで配置されている。図1においては、個々の検知ライン71を独立したラインセンサ素子として図示しているが、実際には、1つのTDIカメラの筐体内に、複数のフォトダイオードがX方向とY方向に規則的に並んで配置され、X方向に並ぶフォトダイオードで1ラインの検知ライン71が構成されている。各検知ライン71が受光し、出力した各ラインのデータにより、X線画像が構成される。
 情報処理装置1は、種々の情報処理、情報の送受信が可能な情報処理装置であり、例えばパーソナルコンピュータ、サーバ装置等である。X線検査機2はLAN等のネットワークNを介して情報処理装置1に通信接続されている。情報処理装置1がサーバ装置である場合、ネットワークNはインターネットであってもよい。また、インターネット等のネットワークNを介して通信可能に接続されたクラウドコンピュータが、情報処理装置1の処理を実行することにしてもよい。
 本実施の形態では情報処理装置1がパーソナルコンピュータであるものとし、以下の説明では簡潔のためPC1と読み替える。
 PC1は、検査物4を撮像した画像を取得し、該画像に基づき検査物4の異常の有無を検出する処理を行う。本実施の形態でPC1は、後述する異常判定部(判定部)114の判定結果に応じ、機械学習により画像内から検査物4の異常を検出(識別)するよう学習済みの後述する異常検出モデル152を用いて異常の有無の検出を行う。
 PC1は、X線検査機2を用いて検査物4へのX線の照射により得られた画像(後述するようにブロブ41を囲む領域を切り出し、該領域に所定の画像処理を施して得た検査画像)を異常検出モデル152に入力し、ブロブ41の異常の有無を示す識別結果を出力として取得する。
 以下、検査物4の異常の種類が異物の有無であり、PC1が異常検出モデル152に検査画像を入力し、ソフトマックス関数により正常(異物なし)の確率及び異常(異物あり)の確率を出力させ、異常の確率を異常値として取得する場合につき説明する。
 PC1は、取得した異常値に応じ、検査物4を廃棄するか否か等の選別を行う。
 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に基づいて動作することにより実行される。
 制御部11は、機能部として、画像生成部111、画像処理部(取得部)112、対象特定部(特定部)113、異常判定部(判定部)114、切り出し部115、画像処理部116、学習検査部117、表示部(出力部)118、選別部(出力部)119、良否判定受付部(第2受付部)122、及び再学習部123を有する。
 画像生成部111は、検査物4を透過し、X線検知部7により検知されたX線に基づき、X線画像を生成する。
 画像処理部112は、X線画像に対し平滑化フィルタ、特徴抽出フィルタ等により画像処理を行う。
 対象特定部113はブロブ41解析を行い、ブロブ(領域)を特定する。対象特定部113は、例えば、各画素の輝度変化を強調処理(エッジ検出)した強調線を抽出し、強調線を含む部分をブロブとして特定する。
 対象特定部113は、周辺の領域に比べて輝度の変化率が所定値以上となっているブロブを特定してもよい。
 対象特定部113は、輝度の標準偏差を求め、この標準偏差と比較して輝度が所定レベル以上変化する部分を有する画素の集合をブロブとして特定してもよく、輝度が相違している特異部を含む部分をブロブとして特定してもよい。
 異常判定部114は、対象特定部113が特定したブロブにつき、判断値及び閾値に基づいて、ブロブが異物か否かを判定する。判断値として、例えば強調線に囲まれたブロブの画像数、面積等が挙げられ、判断値に正常側の閾値(第1閾値)a及び異常側の閾値(第2閾値)bを設定しておき(a<b)、算出した判断値が閾値a未満であれば、特異部は異物でなく、正常と判定し、判断値が閾値b超過であれば、ブロブは異物であると判定する。判断値がa以上b以下である場合、後述する学習検査部117により異常値を取得する。
 図3に、一例として、魚肉である検査物4につき、判断値がa以上b以下であるブロブ41を抽出した状態を示す。ブロブは画像処理により強調処理され、塗りつぶされている。
 切り出し部115は、判断値がa以上b以下であるブロブ41が所定の大きさの矩形内に入るように切り出し、バウンディングボックス81により包囲し、切り出し画像を生成する。ここで、ブロブ41を囲む画像は、強調処理前の画像である。なお、ブロブ41を囲む画像は、強調処理後の画像でもよい。
 図4に、各ブロブ41を切り出した状態を示す。
 画像処理部116は、切り出し画像に対し、正規化等の処理を行い、異常検出モデル152に入力する検査領域(検査画像)8を生成する。
 図5は、対象特定部113が特定したブロブを切り出し部115により切り出し、ブロブ41をバウンディングボックス81により包囲してなる検査画像8を生成した状態を示す説明図である。制御部11の対象特定部113は、上述のようにしてブロブ41の検出を行う。各検査画像8は、各ブロブ41が同じ大きさのバウンディングボックス81により包囲されている。
 図6は、切り出し部115によるリサイズの処理の説明図である。
 検査物4がバウンディングボックス81からはみ出ている場合は、制御部11の切り出し部114はリサイズを行い、ブロブ41がバウンディングボックス81内に収まるようにする。ブロブ41を大きくする場合は、補完処理を行う。
 学習検査部117は、異常検出モデル152に各検査画像を入力し、異常値を取得する。
 表示部118は、異常値をディスプレイ22へ出力し、検査画像の異常の有無をディスプレイ22において表示する。
 図7に、異常検出モデル152により異常値が0.5以上であると判断されたブロブを含む検査画像を示す。
 選別部119は、検査画像8の異常値を閾値と比較し、異常値を示したブロブ41を含む検査物4を廃棄するか否かの選別を行ったり、搬送部6を停止させたり、検査物4をマーキングしたりする。選別部119は、例えば一のブロブ41の異常値が0.5以上である場合、該ブロブ41を含む検査物4を異常品とみなし、廃棄すると選別する。異常値の閾値は0.5である場合に限定されない。なお、異常値が閾値以上であるブロブ41を一つ含む場合に検査物4を廃棄する場合に限定されない。所定数以上のブロブ41が閾値以上の異常値を示す場合に、検査物4を廃棄することにしてもよい。
 良否判定受付部122は、作業者が入力部16により入力した、異常検出モデル152の判断の良否の判定を受け付ける。
 再学習部123は、検査画像8と、作業者から入力された前記の良否の判定とを対応付けた教師データを用いて、異常検出モデル152を再学習する。
 主記憶部12は、SRAM(Static Random Access Memory)、DRAM(Dynamic Random Access Memory)、フラッシュメモリ等の一時記憶領域であり、制御部11が演算処理を実行するために必要なデータを一時的に記憶する。通信部13は、通信に関する処理を行うための通信モジュールであり、外部と情報の送受信を行う。
 補助記憶部15は大容量メモリ、ハードディスク等であり、制御部11が処理を実行するために必要なプログラムP、その他のデータを記憶している。また、補助記憶部15は、検査画像DB151及び前記異常検出モデル152を記憶している。検査画像DB151は、異常検出対象である検査物4の検査結果の履歴情報を格納したデータベースである。
 補助記憶部15に記憶されるプログラムPは、プログラムPを読み取り可能に記録した記録媒体156により提供されてもよい。記録媒体156は、例えば、USB(Universal Serial Bus)メモリ、SD(Secure Digital)カード、マイクロSDカード、コンパクトフラッシュ(登録商標)等の可搬型のメモリである。記録媒体156に記録されるプログラムPは、図に示していない読取装置を用いて記録媒体156から読み取られ、補助記憶部15にインストールされる。また、情報処理装置1が外部通信装置と通信可能な通信部を備える場合、補助記憶部15に記憶されるプログラムPは、通信部を介した通信により提供されてもよい。
 なお、補助記憶部15はPC1に接続された外部記憶装置であってもよい。また、PC1は複数のコンピュータからなるマルチコンピュータであってもよく、ソフトウェアによって仮想的に構築された仮想マシンであってもよい。
 入力部16は、作業者による、後述する判断値の閾値等の入力を受け付ける。
 図8は検査画像DB151のレコードレイアウトの一例を示す説明図である。検査画像DB151は、検査画像ID列、検査画像列、座標情報列、異常値列、判断値列、及び良否結果列を含む。検査画像ID列は、各検査画像8を識別するための検査画像IDを記憶している。検査画像列は、対応するIDの検査画像を記憶している。座標情報列は、検査画像IDと対応付けて、搬送ベルト61上のX線照射領域における、ブロブ41の位置を示す座標情報を記憶している。座標情報は、図1の上流側ローラ63及び下流側ローラ62間における、X方向及びY方向の中心を原点としたときのバウンディングボックス81の四隅におけるX座標、及びY座標である。異常値は上述したように、異常の確率である。判断値は、異常判定部114により算出された判断値である。良否結果列は、後述するようにして、作業者による制御部11の判断の良否の判定を受け付けた場合の結果(正しい:OK、正しくない:NG)を記憶している。良否結果列は、後述する再学習を行うために設けてあり、全ての検査において良否結果を取得する必要はない。
 図9は、異常検出モデル152の生成処理に関する説明図である。図9では、機械学習を行って異常検出モデル152を生成する処理を概念的に示している。
 PC1の制御部11は、異常検出モデル152として、ブロブ41の検査画像8内における異常の画像特徴量を学習することで、検査画像8を入力とし、ブロブ41における異常の有無を示す情報を出力とするニューラルネットワークを構築(生成)する。例えばニューラルネットワークはCNN(Convolution Neural Network)であり、検査画像8の入力を受け付ける入力層と、異常の有無の識別結果を出力する出力層と、検査画像8の画像特徴量を抽出する中間層とを有する。
 入力層は、検査画像8に含まれる各画素の画素値の入力を受け付ける複数のニューロンを有し、入力された画素を中間層に受け渡す。中間層は、検査画像の画像特徴量を抽出する複数のニューロンを有し、抽出した画像特徴量を出力層に受け渡す。図9において、中間層の層数は3とされているが、これに限定されない。例えば異常検出モデル152がCNNである場合、中間層は、入力層から入力された各画素の画素値を畳み込むコンボリューション層と、コンボリューション層で畳み込んだ画素値をマッピングするプーリング層とが交互に連結された構成を有し、検査画像8の画素情報を圧縮しながら最終的に画像の特徴量を抽出する。図9において、コンボリューション層、及びプーリング層の記載は省略している。出力層は、ブロブ41における異常を識別した識別結果を出力する二つのニューロンを有し、中間層から出力された画像特徴量に基づいてブロブ41における異常の有無を識別する。一方のニューロンはブロブ41における正常(異物なし)の確率を出力し、他方のニューロンはブロブ41における異常(異物あり)の確率を出力する。
 なお、本実施の形態では異常検出モデル152がCNNであるものとして説明するが、異常検出モデル152はCNNに限定されず、CNN以外のニューラルネットワーク、SVM(Support Vector Machine)、ベイジアンネットワーク、回帰木など、他の学習アルゴリズムで構築された学習済みモデルであってよい。
 制御部11は、複数の検査画像8と、各検査画像8におけるブロブ41の異常を示す情報(異物を有するか、異物を有さず、正常であるか)とが対応付けられた教師データ(異常データ、正常データ)を用いて学習を行う。例えば図9に示すように、教師データは、ブロブ41の検査画像8に対し、異常の種類(異物の有無)、ランク(1:異常、0:正常)がラベル付けされたデータである。制御部11は補助記憶部15に教師データのデータベースを記憶しておいてもよく、外部装置から教師データを取得してもよい。
 制御部11は、教師データである検査画像8を入力層に入力し、中間層での演算処理を経て、出力層からブロブ41における異常の有無を示す識別結果を取得する。なお、出力層から出力される識別結果は、ソフトマックス関数を用いた場合、連続的な確率(例えば「0」から「1」までの範囲の値)である。識別結果は、異常の有無を離散的に示す値(例えば「0」又は「1」の値)であってもよい。
 制御部11は、出力層から出力された識別結果を、教師データにおいて検査画像8に対しラベル付けされた情報、すなわち正解値と比較し、出力層からの出力値が正解値に近づくように、中間層での演算処理に用いるパラメータを最適化する。該パラメータは、例えばニューロン間の重み(結合係数)、各ニューロンで用いられる活性化関数の係数などである。パラメータの最適化の方法は特に限定されないが、例えば制御部11は誤差逆伝播法を用いて各種パラメータの最適化を行う。
 制御部11は、教師データに含まれる各検査画像8について上記の処理を行い、異常検出モデル152を生成する。制御部11はブロブ41の検査画像8を取得した場合、異常検出モデル152を用いてブロブ41における異物の有無を検出する。
 図10は、制御部11による異常検出モデル152の生成処理の処理手順の一例を示すフローチャートである。
 制御部11は、複数のブロブ41の検査画像8と、各検査画像8内におけるブロブ41の前記異常を示す情報とを対応付けた教師データを取得する(S11)。
 制御部11は教師データを用いて、ブロブ41の検査画像8を入力した場合にブロブ41の異常有無情報を出力する異常検出モデル152(学習済みモデル)を生成する(S12)。具体的には、制御部11は、教師データである検査画像8をニューラルネットワークの入力層に入力し、検査画像8内の異物の有無を識別した識別結果を出力層から取得する。制御部11は、取得した識別結果を教師データの正解値(検査画像8に対してラベル付けられた情報)と比較し、出力層から出力される識別結果が正解値に近づくよう、中間層での演算処理に用いるパラメータ(重み等)を最適化する。制御部11は、生成した異常検出モデル152を補助記憶部15に格納し、一連の処理を終了する。
 図11は、制御部11による異常検出処理の処理手順の一例を示すフローチャートである。
 PC1の制御部11は、検査物4を透過し、X線検知部7により検知されたX線に基づき、X線画像を生成する(S21)。
 制御部11は、X線画像に対し平滑化フィルタ、特徴抽出フィルタ等により画像処理を行う(S22)。
 制御部11は、上述のようにしてブロブ解析を行い、ブロブを特定する(S23)。制御部11は、各画素の輝度変化を強調処理(エッジ検出)した強調線を抽出し、強調線を含む部分をブロブとして特定する。
 制御部11は、ブロブが異物であるか否かを判定する(S24)。制御部11は、例えば強調線に囲まれたブロブの画像数、面積等の判断値を算出し、算出した判断値及び閾値に基づいて判定を行う。制御部11は、異常(NG:判断値>閾値b)、正常(OK:判断値<閾値a)、その中間(a≦判断値≦b)のいずれであるかを判定する。
 制御部11は、S24で、NG(異常)又はOK(正常)と判定されたか否かを判定する(S25)。制御部11はNG又はOKであると判定されたと判定した場合(S25:YES)、OKであるか否かを判定する(S26)。
 制御部11はOKであると判定した場合(S26:YES)、学習検査をスキップして処理を終了する。
 制御部11はOKでない、即ちNGであると判定した場合(S26:NO)、学習検査をスキップしてS33へ処理を進める。
 制御部11はNG又はOKでないと判定されたと判定した場合(S25:NO)、NG又はOKでないと判定されたブロブ41が所定の大きさの矩形内に入るように切り出し、切り出し画像を生成する(S27)。切り出し画像は、例えばブロブ41の塗りつぶし処理前の画像である。切り出し画像は、塗りつぶし処理後の画像でもよい。
 制御部11は、切り出し画像に対し、正規化等の処理を行い、検査画像を生成する(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)、処理を終了する。
 以上のように、本実施の形態によれば、検査画像8において、異物と他部との画素値の差異が小さく、従来の画像処理の手法では異物の有無の判断が困難である場合においても、異常検出モデル152を使用することにより、精度良く、異物を判別できる。
 本実施の形態によれば、所定の画像処理アルゴリズムに基づいて取得したブロブ41に対し、判断値並びに閾値a及びbに基づいて取得した、ブロブ41が異物であるか否かの判定結果が正確でない場合に、異常検出モデル152に検査画像8を入力して異常値を取得することで、精度良く、異物の有無を検出できる。
 作業者が目視による異常の検出を行う必要がなくなり、異常検出作業の効率化を図ることができる。
 上述の実施の形態においては、異常の種類として異物の有無を挙げているが、これに限定されず、形状の異常等、他の異常を検出してもよい。
 なお、判断値が例えば0から1の数値で表される場合、0が閾値aであり、1が閾値bであってもよく、この場合、判断値が0のとき正常であり、1のとき異常である。
 また、判断値がa以上b以下の場合に学習検査を行う場合に限定されず、判断値がa以上の場合に学習検査を行うことにしてもよく、判断値がb以下の場合、学習検査を行うことにしてもよい。
 S28の画像処理は省略できる。検査画像8は、ブロブ41の強調処理を行った後の画像でもよい。
 図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は異常品であることになる。
 作業者は、検査画像8の行方向に順に移動するための「>」及び「<」からなる選択ボタン56により第2画面52のいずれかの検査画像8を選択できる。検査画像8はマウス等のポインティングデバイスにより選択してもよい。
 第2画面52は、他に、作業者により異常検出モデル152の推定結果(判断)が正しいと判定したときに押圧するOKボタン53、判断は正しくないと判定したときに押圧するNGボタン54、及び後述する異常有無のレベルの選択の指示を入力するとき等に使用するOtherボタン55を有する。
 選択ボタン56により選択された検査画像8につき、作業者からOKボタン53又はNGボタン54による異常検出モデル152の判断の良否の入力を受け付け、所定数以上のデータが集まった場合、制御部11は、検査画像8と、作業者から入力された判断の良否とを教師データとして、異常検出モデル152の再学習を行うことができる。
 図13は、PC1の制御部11による上述の再学習処理の処理手順の一例を示すフローチャートである。
 制御部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線画像に基づいて行ってもよい。
 図14は、PC1の制御部11による変形例の再学習処理の処理手順の一例を示すフローチャートである。
 制御部11は、選択された検査画像8につき、作業者による第2画面52のOKボタン53又はNGボタン54の押圧に基づき、異常検出モデル152の判断の良否の判定を受け付ける(S51)。制御部11は良否の判定を受け付けていないと判定した場合(S51:NO)、判定の処理を繰り返す。
 制御部11は良否の判定を受け付けたと判定した場合(S51:YES)、否と受け付けたか否かを判定する(S52)。制御部11は否と受け付けていないと判定した場合(S52:NO)、処理を終了する。
 制御部11は否と受け付けたと判定した場合(S52:YES)、否と判定した結果を所定数入手したときに、異常を検出したブロブ41の検査画像8と、判定結果とを対応付けた教師データを取得する(S53)。
 制御部11は教師データを用いて、ブロブ41の検査画像を入力した場合にブロブ41の異常有無情報を出力する異常検出モデル152を生成する(S54)。
 以上により、再学習される。これにより、より少ない教師データ量で、正確な異常検出を行うことができるようになる。
(実施の形態2)
 実施の形態2に係る異常検出システム10のPC1は、制御部11が4つの画像処理アルゴリズムに基づいて、異物の有無を検知し、補助記憶部15に各画像処理アルゴリズムに対応するプログラムPを記憶し、複数の異常検出モデル152~155を記憶してあること以外は、実施の形態1に係るPC1と同様の処理を行う。4つの画像処理アルゴリズムに基づいて検知される異物の種類は、全て同じであってもよく、一部が同じであってもよく、全て異なっていてもよい。異物の種類としては、骨、金属、木材、合成樹脂等が挙げられる。異物の種類が同一である場合、判断値の算出方法が異なる。
 また、画像処理アルゴリズムにより、検査物4の異なる種類の異常を検出することにしてもよい。異常の種類として、異物の有無、形状の異常等が挙げられる。
 画像処理アルゴリズムの数は4つの場合に限定されない。
 例えばレベル1の画像処理アルゴリズムは、実施の形態1と同様に、対象特定部113は、各画素の輝度変化を強調処理(エッジ検出)して抽出した強調線を含む部分をブロブ41として特定する。異常判定部114は、例えば強調線に囲まれたブロブ41の画像数、面積等の判断値に基づいて、判定を行う。判断値に閾値a及びbを設定し、例えば判断値が閾値未満であれば、特異部は異物でないと判定する。
 レベル2の画像処理アルゴリズムにおいては、対象特定部113は、周辺の領域に比べて輝度の変化率が所定値以上となっている特異部をブロブ41として抽出する。異常判定部114は、例えば前記変化率が所定値以上となっている画素数等の判断値に基づいて、判定を行う。
 レベル3の画像処理アルゴリズムにおいては、輝度の標準偏差を求め、この標準偏差と比較して輝度が所定レベル以上変化する特異部をブロブ41として特定する。
 レベル4の画像処理アルゴリズムにおいては、輝度が相違している特異部をブロブ41として特定する。異常判定部114は、これらの特異部の形状が、例えば骨の形状としてあり得るか否かの判断を、画像マッチング処理により行なったりする。
 図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の処理も異ならせてもよい。
 異常判定部114は、対象特定部113により特定したブロブ41に対し、画像処理アルゴリズムに基づいて、判断値を算出する。レベル1において、例えば対象特定部113が、各画素の輝度変化を強調処理して抽出した強調線を含む部分をブロブ41として特定する場合、異常判定部114は強調線に囲まれたブロブ41の画像数、面積等の判断値を算出し、算出した判断値に基づいて判定を行う。判断値に対し正常側の閾値a及び異常側の閾値bを設定し(a<b)、算出した判断値が閾値a未満であれば、特異部は異物でなく、正常と判定し、判断値が閾値b以上であれば、特異部は異物であり、ブロブ41は異常であると判定する。
 図17に示すように作業者が前記Otherボタン55を2回続けて押圧した場合、制御部11は、第1画面51に、「レベル1」~「レベル4」の各閾値a及び閾値bを表示する。各レベルの判断値は各画像処理アルゴリズムに基づいて算出され、内容はレベルに応じて異なり、各閾値a及び閾値bも異なり、正常及び異常の範囲も異なる。
 制御部11は、上記と同様に、異常検出モデル152として、レベル1に対応する画像処理アルゴリズムにより生成された、ブロブ41に係る検査画像8内における異常の画像特徴量を学習することで、検査画像8を入力とし、異物の有無を示す情報を出力とするニューラルネットワークを生成する。ニューラルネットワークはCNNであり、検査画像8の入力を受け付ける入力層と、異常の有無の識別結果を出力する出力層と、検査画像8の画像特徴量を抽出する中間層とを有する。
 制御部11は、複数の検査画像8と、各検査画像8におけるブロブ41の異常を示す情報(異物を有するか、正常であるか)とが対応付けられた教師データを用いて学習を行う。教師データは、ブロブ41の検査画像8に対し、異常の種類(異物の有無)、ランク(1:異常、0:正常)がラベル付けされたデータである。
 制御部11は、教師データである検査画像8を入力層に入力し、中間層での演算処理を経て、出力層からブロブ41の異常の有無を示す識別結果(正常の確率及び異常(異物あり)の確率)を出力させ、異常の確率を異常値として取得する。なお、出力層から出力される識別結果は、ソフトマックス関数を用いた場合、連続的な確率(例えば「0」から「1」までの範囲の値)である。
 制御部11は、出力層から出力された識別結果を、教師データにおいて検査画像8に対しラベル付けされた情報、すなわち正解値と比較し、出力層からの出力値が正解値に近づくように、中間層での演算処理に用いるパラメータを最適化する。該パラメータは、例えばニューロン間の重み(結合係数)、各ニューロンで用いられる活性化関数の係数などである。パラメータの最適化の方法は特に限定されないが、例えば制御部11は誤差逆伝播法を用いて各種パラメータの最適化を行う。
 制御部11は、教師データに含まれる各検査画像8について上記の処理を行い、異常検出モデル152を生成する。制御部11はブロブ41の検査画像8を取得した場合、異常検出モデル152を用いてブロブ41の異常の有無を検出する。
 異常検出モデル153~155も同様に、レベル2~4に対応する画像処理アルゴリズムにより生成された、ブロブ41に係る検査画像8内における異常の画像特徴量を学習することで、検査画像8を入力とし、異物の有無を示す情報を出力とするニューラルネットワークを生成する。
 学習検査部117は、選択されたレベルに応じ、検査画像8を異常検出モデル152~155のいずれかに入力し、上述の二つの確率を出力させ、異物を有する確率(異常値)を取得する。
 図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)。
 制御部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へ処理を進める。
 制御部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の画像処理も省略できる。
(実施の形態3)
 実施の形態3に係るPC1は、制御部11が閾値設定部(設定部)121を有すること以外は、実施の形態1に係るPCと同様の処理を行う。
 図19は、異常検出システム10の構成を示すブロック図である。図15と同一部分は同一符号を付して詳細な説明を省略する。
 制御部11は、閾値設定部121を有する。閾値設定部121は、作業者により入力部16によりいずれかのレベルにつき、閾値a及び閾値bの設定を受け付けた場合、閾値を設定(更新)する。
 図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)、処理を終了する。
 本実施の形態によれば、設定した閾値に基づき、異常判定部114による検出結果が不確実と推定される場合に、学習モデルを用いて良好に異常の有無を判断することができる。
 以上のように、本発明の一態様に係る検査装置は、コンベアに載置された検査物への電磁波の照射により得られた画像を取得する取得部と、前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定する判定部と、前記判定部の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、検査物の異常の有無に関する情報を出力する学習モデルに、検査物への電磁波の照射により得られた画像を入力して、前記異常の有無に関する情報を取得する学習検査部と、前記異常の有無に関する情報を出力する出力部とを備える。
 上記構成によれば、検査物への電磁波の照射により得られた画像に対し、判断値と閾値とに基づいて判定した検査物の異常の有無に応じ、学習モデルに画像を入力して異常の有無を取得する。例えば閾値に基づいて判定した検査物の異常の有無が不確実である場合に、学習モデルに画像を入力して異常の有無を取得することで、精度良く、異物の有無、形状の異常等の異常の有無を検出できる。
 上述の検査装置において、前記判定部は、前記画像に対し、画像処理アルゴリズムを適用して判断値を算出し、前記検査物の異常の有無を判定してもよい。
 上記構成によれば、所定の画像処理アルゴリズムを適用して算出した判断値と閾値とに基づいて検出した結果が不確実と推定される場合に、異常の有無を精度良く検出できる。
 上述の検査装置において、検査物への電磁波の照射により得られた画像に対し、画像処理アルゴリズムを適用して、前記検査物の異常の有無を判定する領域を特定する特定部を備え、前記判定部は、前記画像処理アルゴリズムが適用された前記領域の画像に基づき算出した判断値と閾値とに基づき、前記検査物の異常の有無を判定し、前記学習検査部は、前記判定部の判定結果に応じ、前記画像処理アルゴリズムが適用された前記領域の画像、又は検査物への電磁波の照射により得られた、前記領域の画像を入力した場合に、前記領域の異常の有無に関する情報を出力する学習モデルに、前記画像処理アルゴリズムが適用された前記領域の画像、又は検査物への電磁波の照射により得られた、前記領域の画像を入力して、前記異常の有無に関する情報を取得してもよい。
 上記構成によれば、異常の有無を判定する領域を特定し、特定した領域について異常の有無を判定し、判定結果に応じて学習モデルを適用するので、異常の有無の検出を効率化できる。
 上述の検査装置において、画像処理アルゴリズムの選択を受け付ける第1受付部を備えてもよい。
 上記構成によれば、異常の内容に応じて画像処理アルゴリズムを選択し、精度良く検査物の異常の有無に関する情報を取得できる。
 上述の検査装置において、前記閾値を設定する設定部を備えてもよい。
 上記構成によれば、閾値に基づき、学習モデルを適用するか否かが判定されるので、判定部による判定結果が不確実と推定される場合に、学習モデルを用いて良好に異常の有無を判断することができる。
 上述の検査装置において、前記判断値が第1閾値以上第2閾値以下である場合に、前記学習検査部は、前記画像を前記学習モデルに入力してもよい。
 上記構成によれば、例えば判断値が第1閾値未満である場合に確実に正常であり、判断値が第2閾値超過である場合に確実に異常であると推定されるとき、判断値が第1閾値以上第2閾値以下である場合に、学習モデルを適用して良好に異常の有無情報を取得できる。
 上述の検査装置において、前記判断値が第1閾値未満である場合、前記判定部は、前記領域は正常であると判定し、前記判断値が第2閾値超過である場合、前記判定部は、前記領域は異常であると判定し、前記学習検査部は画像を前記学習モデルに入力しないようにしてもよい。
 上記構成によれば、検査物が確実に正常又は異常である場合を除き、学習モデルを適用することで、良好に効率良く異常の有無情報を取得できる。
 上述の検査装置において、前記出力部は、前記画像を表示し、表示された画像に対し前記出力部の出力結果の良否を受け付ける第2受付部を備えてもよい。
 上記構成によれば、作業者により、画像に対し、学習モデルの判断結果の良否を取得して再学習することができる。
 上述の検査装置において、前記画像と、前記良否に関する情報とに基づき、前記学習モデルを再学習する再学習部を備えてもよい。
 上記構成によれば、作業者により受け付けた、出力結果の判断の良否を教師データとして再学習し、より精度が良好である学習モデルを生成できる。
 上述の検査装置において、前記再学習部は、前記第2受付部により否と受け付けた場合に再学習してもよい。
 上記構成によれば、第2受付部により否と受け付けた場合に、画像と、出力結果の判断の良否とを対応付けた教師データにより再学習するので、より少ない教師データ量で、より精度が良好である学習モデルを生成できる。
 本発明の一態様に係る異常検出方法は、コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定し、前記異常の有無の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、前記検査物の異常の有無に関する情報を出力する学習モデルに、取得した画像を入力して、前記検査物の異常の有無を示す情報を出力する、処理をコンピュータに実行させる。
 上記構成によれば、判定結果に応じ、学習モデルを用いて異常の有無に関する情報を取得するので、例えば判定結果が不確実と推定される場合に、学習モデルに画像を入力して異常の有無を取得することで、精度良く、異物の有無、形状の異常等の異常の有無を検出できる。
 本発明の一態様に係るコンピュータプログラムは、コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定し、前記異常の有無の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、前記検査物の異常の有無に関する情報を出力する学習モデルに、取得した画像を入力して、前記検査物の異常の有無を示す情報を出力する、処理をコンピュータに実行させる。
 上記構成によれば、判定結果に応じ、学習モデルを用いて異常の有無に関する情報を取得するので、例えば判定結果が不確実と推定される場合に、学習モデルに画像を入力して異常の有無を取得することで、精度良く、異物の有無、形状の異常等の異常の有無を検出できる。
 本発明の一態様に係る学習モデルの生成方法は、コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを取得し、前記教師データに基づいて、コンベアに載置された検査物への電磁波の照射により得られた画像が入力された場合に、前記検査物の異常の有無に関する情報を出力する学習モデルを生成する。
 上記構成によれば、検査物の異常の内容に対応する、所定の画像処理アルゴリズムを適用して取得した画像を入力した場合等に、前記異常の有無を精度良く取得できる。
 本発明の一態様に係る学習モデルは、コンベアに載置された検査物への電磁波の照射により得られた画像が入力される入力層と、前記検査物の異常の有無に関する情報を出力する出力層と、コンベアに載置された検査物への電磁波の照射により得られた画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを用いてパラメータが学習された中間層とを備え、検査物への電磁波の照射により得られた画像が前記入力層に入力された場合に、前記中間層による演算を経て前記検査物の異常の有無に関する情報を前記出力層から出力するようにコンピュータを機能させる。
 上記構成によれば、検査物の異常の内容に対応する、所定の画像処理アルゴリズムを適用して取得した画像を入力した場合等に、前記異常の有無を精度良く取得できる。
 今回開示された実施の形態はすべての点で例示であって、制限的なものではないと考えられるべきである。本発明の範囲は、上記した意味ではなく、請求の範囲によって示され、請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。
 例えば、検査物は食品に限定されず、包装体、工業製品等であってもよい。
 検査物4に照射する電磁波はX線に限定されず、テラヘルツ波、赤外線及び可視光等であってもよい。
 また、対象特定部113が、a≦判断値≦bであるブロブ41を抽出することにしてもよい。
 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 検知ライン
 

Claims (14)

  1.  コンベアに載置された検査物への電磁波の照射により得られた画像を取得する取得部と、
     前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定する判定部と、
     前記判定部の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、検査物の異常の有無に関する情報を出力する学習モデルに、検査物への電磁波の照射により得られた画像を入力して、前記異常の有無に関する情報を取得する学習検査部と、
     前記異常の有無に関する情報を出力する出力部と
     を備える検査装置。
  2.  前記判定部は、前記画像に対し、画像処理アルゴリズムを適用して判断値を算出し、前記検査物の異常の有無を判定する、請求項1に記載の検査装置。
  3.  検査物への電磁波の照射により得られた画像に対し、画像処理アルゴリズムを適用して、前記検査物の異常の有無を判定する領域を特定する特定部を備え、
     前記判定部は、
     前記画像処理アルゴリズムが適用された前記領域の画像に基づき算出した判断値と閾値とに基づき、前記検査物の異常の有無を判定し、
     前記学習検査部は、
     前記判定部の判定結果に応じ、前記画像処理アルゴリズムが適用された前記領域の画像、又は検査物への電磁波の照射により得られた、前記領域の画像を入力した場合に、前記領域の異常の有無に関する情報を出力する学習モデルに、前記画像処理アルゴリズムが適用された前記領域の画像、又は検査物への電磁波の照射により得られた、前記領域の画像を入力して、前記異常の有無に関する情報を取得する
     請求項1又は2に記載の検査装置。
  4.  画像処理アルゴリズムの選択を受け付ける第1受付部を備える、請求項3に記載の検査装置。
  5.  前記判断値が第1閾値以上第2閾値以下である場合に、前記学習検査部は、前記画像を前記学習モデルに入力する、請求項1から4までのいずれか1項に記載の検査装置。
  6.  前記判断値が第1閾値未満である場合、前記判定部は、前記領域は正常であると判定し、
     前記判断値が第2閾値超過である場合、前記判定部は、前記領域は異常であると判定し、
     前記学習検査部は画像を前記学習モデルに入力しない、請求項3又は4に記載の検査装置。
  7.  前記閾値を設定する設定部を備える、請求項1から6までのいずれか1項に記載の検査装置。
  8.  前記出力部は、前記画像を表示し、
     表示された画像に対し前記出力部の出力結果の良否を受け付ける第2受付部を備える、請求項1から7までのいずれか1項に記載の検査装置。
  9.  前記画像と、前記良否に関する情報とに基づき、前記学習モデルを再学習する再学習部を備える、請求項8に記載の検査装置。
  10.  前記再学習部は、前記第2受付部により否と受け付けた場合に再学習する、請求項9に記載の検査装置。
  11.  コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、
     前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定し、
     前記異常の有無の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、前記検査物の異常の有無に関する情報を出力する学習モデルに、取得した画像を入力して、前記検査物の異常の有無を示す情報を出力する、
     処理をコンピュータに実行させる、異常検出方法。
  12.  コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、
     前記画像に基づき算出した判断値と閾値とに基づいて前記検査物の異常の有無を判定し、
     前記異常の有無の判定結果に応じ、検査物への電磁波の照射により得られた画像を入力した場合に、前記検査物の異常の有無に関する情報を出力する学習モデルに、取得した画像を入力して、前記検査物の異常の有無を示す情報を出力する、
     処理をコンピュータに実行させる、コンピュータプログラム。
  13.  コンベアに載置された検査物への電磁波の照射により得られた画像を取得し、前記画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを取得し、
     前記教師データに基づいて、コンベアに載置された検査物への電磁波の照射により得られた画像が入力された場合に、前記検査物の異常の有無に関する情報を出力する学習モデルを生成する
     学習モデルの生成方法。
  14.  コンベアに載置された検査物への電磁波の照射により得られた画像が入力される入力層と、
     前記検査物の異常の有無に関する情報を出力する出力層と、
     コンベアに載置された検査物への電磁波の照射により得られた画像と、前記検査物の異常の有無を示す情報とを関連付けて記録した教師データを用いてパラメータが学習された中間層と
     を備え、
     検査物への電磁波の照射により得られた画像が前記入力層に入力された場合に、前記中間層による演算を経て前記検査物の異常の有無に関する情報を前記出力層から出力するように
     コンピュータを機能させる学習モデル。
     
PCT/JP2020/003347 2019-03-19 2020-01-30 検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデル WO2020189044A1 (ja)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2019051401A JP6749655B1 (ja) 2019-03-19 2019-03-19 検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデル
JP2019-051401 2019-03-19

Publications (1)

Publication Number Publication Date
WO2020189044A1 true WO2020189044A1 (ja) 2020-09-24

Family

ID=72276733

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/003347 WO2020189044A1 (ja) 2019-03-19 2020-01-30 検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデル

Country Status (2)

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

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022028667A (ja) * 2020-11-30 2022-02-16 アポロ インテリジェント コネクティビティ (ベイジン) テクノロジー カンパニー リミテッド ユーザ画像認識モデルの更新方法、装置、電子機器、コンピュータ可読記録媒体及びコンピュータプログラム
JP7034529B1 (ja) * 2021-08-13 2022-03-14 株式会社ハシマ 学習モデルの生成方法、学習モデル、検査装置、検査方法およびコンピュータプログラム
CN114937028A (zh) * 2022-06-21 2022-08-23 苏州上舜精密工业科技有限公司 一种智能标识识别的直线滑台模组质量检测方法及系统
WO2022264632A1 (ja) * 2021-06-18 2022-12-22 株式会社サタケ 選別機、不良品の判別方法、および、選別方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020194583A1 (ja) * 2019-03-27 2020-10-01 日本電気株式会社 異常検知装置、制御方法、及びプログラム
KR102456491B1 (ko) * 2020-11-06 2022-10-20 한국생산기술연구원 딥러닝 기반 깡통 용접 불량 검출 시스템과 이를 이용한 불량 검출 방법

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007263848A (ja) * 2006-03-29 2007-10-11 Anritsu Sanki System Co Ltd X線検査システム
JP2010054380A (ja) * 2008-08-28 2010-03-11 Ishida Co Ltd X線検査装置
JP2010198476A (ja) * 2009-02-26 2010-09-09 Omron Corp 欠陥検出装置、欠陥検出方法および欠陥検出プログラム
JP2012137387A (ja) * 2010-12-27 2012-07-19 Anritsu Sanki System Co Ltd X線検査装置
JP2014153906A (ja) * 2013-02-08 2014-08-25 Honda Motor Co Ltd 検査装置、検査方法及びプログラム
JP2016156647A (ja) * 2015-02-23 2016-09-01 株式会社 システムスクエア 電磁波を使用した検査装置
WO2016152485A1 (ja) * 2015-03-20 2016-09-29 株式会社イシダ 検査装置
JP2018048845A (ja) * 2016-09-20 2018-03-29 株式会社イシダ 光検査装置
WO2018150607A1 (ja) * 2017-02-20 2018-08-23 Serendipity株式会社 外観検査装置、照明装置、撮影照明装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3378222A4 (en) * 2015-11-16 2019-07-03 Orbital Insight, Inc. MOVING VEHICLE DETECTION AND ANALYSIS USING LOW RESOLUTION REMOTE DETECTION IMAGING
US11580398B2 (en) * 2016-10-14 2023-02-14 KLA-Tenor Corp. Diagnostic systems and methods for deep learning models configured for semiconductor applications
WO2019151393A1 (ja) * 2018-01-31 2019-08-08 株式会社ニチレイフーズ 食品検査システム、食品検査プログラム、食品検査方法および食品生産方法

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007263848A (ja) * 2006-03-29 2007-10-11 Anritsu Sanki System Co Ltd X線検査システム
JP2010054380A (ja) * 2008-08-28 2010-03-11 Ishida Co Ltd X線検査装置
JP2010198476A (ja) * 2009-02-26 2010-09-09 Omron Corp 欠陥検出装置、欠陥検出方法および欠陥検出プログラム
JP2012137387A (ja) * 2010-12-27 2012-07-19 Anritsu Sanki System Co Ltd X線検査装置
JP2014153906A (ja) * 2013-02-08 2014-08-25 Honda Motor Co Ltd 検査装置、検査方法及びプログラム
JP2016156647A (ja) * 2015-02-23 2016-09-01 株式会社 システムスクエア 電磁波を使用した検査装置
WO2016152485A1 (ja) * 2015-03-20 2016-09-29 株式会社イシダ 検査装置
JP2018048845A (ja) * 2016-09-20 2018-03-29 株式会社イシダ 光検査装置
WO2018150607A1 (ja) * 2017-02-20 2018-08-23 Serendipity株式会社 外観検査装置、照明装置、撮影照明装置

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022028667A (ja) * 2020-11-30 2022-02-16 アポロ インテリジェント コネクティビティ (ベイジン) テクノロジー カンパニー リミテッド ユーザ画像認識モデルの更新方法、装置、電子機器、コンピュータ可読記録媒体及びコンピュータプログラム
JP7285899B2 (ja) 2020-11-30 2023-06-02 阿波▲羅▼智▲聯▼(北京)科技有限公司 ユーザ画像認識モデルの更新方法、装置、電子機器、コンピュータ可読記録媒体及びコンピュータプログラム
WO2022264632A1 (ja) * 2021-06-18 2022-12-22 株式会社サタケ 選別機、不良品の判別方法、および、選別方法
JP7034529B1 (ja) * 2021-08-13 2022-03-14 株式会社ハシマ 学習モデルの生成方法、学習モデル、検査装置、検査方法およびコンピュータプログラム
WO2023017611A1 (ja) * 2021-08-13 2023-02-16 株式会社ハシマ 学習モデルの生成方法、学習モデル、検査装置、検査方法およびコンピュータプログラム
CN114937028A (zh) * 2022-06-21 2022-08-23 苏州上舜精密工业科技有限公司 一种智能标识识别的直线滑台模组质量检测方法及系统
CN114937028B (zh) * 2022-06-21 2023-12-08 苏州上舜精密工业科技有限公司 一种智能标识识别的直线滑台模组质量检测方法及系统

Also Published As

Publication number Publication date
JP2020153765A (ja) 2020-09-24
JP6749655B1 (ja) 2020-09-02

Similar Documents

Publication Publication Date Title
WO2020189044A1 (ja) 検査装置、異常検出方法、コンピュータプログラム、学習モデルの生成方法、及び学習モデル
JP5546317B2 (ja) 外観検査装置、外観検査用識別器の生成装置及び外観検査用識別器生成方法ならびに外観検査用識別器生成用コンピュータプログラム
CN106568783A (zh) 一种五金零件缺陷检测系统及方法
JP2021140739A (ja) プログラム、学習済みモデルの生成方法、情報処理方法及び情報処理装置
JP2019211288A (ja) 食品検査システムおよびプログラム
US11348349B2 (en) Training data increment method, electronic apparatus and computer-readable medium
WO2023084543A1 (en) System and method for leveraging neural network based hybrid feature extraction model for grain quality analysis
Zhang et al. Computer vision estimation of the volume and weight of apples by using 3d reconstruction and noncontact measuring methods
Huang et al. Smart agriculture: real‐time classification of green coffee beans by using a convolutional neural network
TW202242390A (zh) 缺陷檢查裝置、缺陷檢查方法以及製造方法
Jayasankar et al. Fruit freshness detection using raspberry pi
TWI694250B (zh) 表面缺陷偵測系統及其方法
CN116342525A (zh) 基于Lenet-5模型的SOP芯片引脚缺陷检测方法及系统
US11335153B1 (en) Fully autonomous system and method for grading, stamping and encapsulating a collectible object
Benouis et al. Food tray sealing fault detection using hyperspectral imaging and PCANet
CN114303157A (zh) 训练数据生成装置、检查装置和程序
WO2020189043A1 (ja) 学習モデルの生成方法、学習モデル、検査装置、異常検出方法、及びコンピュータプログラム
CN116245882A (zh) 电路板电子元件检测方法、装置及计算机设备
Shi et al. Nondestructive discrimination of analogous density foreign matter inside soy protein meat semi-finished products based on transmission hyperspectral imaging
WO2023017611A1 (ja) 学習モデルの生成方法、学習モデル、検査装置、検査方法およびコンピュータプログラム
WO2021119946A1 (en) Food inspection solution
JP2003076991A (ja) 自動検査装置及び方法並びに画像信号の処理方法
KR102542505B1 (ko) 학습데이터 생성 방법, 장치, 프로그램 및 이를 이용한 이물질 검출 방법
Bobulski et al. Deep Learning Method for Classifying Items into Categories for Dutch Auctions
Hasan et al. Framework for fish freshness detection and rotten fish removal in Bangladesh using mask R–CNN method with robotic arm and fisheye analysis

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20773036

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20773036

Country of ref document: EP

Kind code of ref document: A1