WO2024154379A1 - モデル生成方法、モデル生成システム、モデル生成プログラム、異物検出方法、異物検出システム、異物検出プログラム及び推論モデル - Google Patents
モデル生成方法、モデル生成システム、モデル生成プログラム、異物検出方法、異物検出システム、異物検出プログラム及び推論モデル Download PDFInfo
- Publication number
- WO2024154379A1 WO2024154379A1 PCT/JP2023/032684 JP2023032684W WO2024154379A1 WO 2024154379 A1 WO2024154379 A1 WO 2024154379A1 JP 2023032684 W JP2023032684 W JP 2023032684W WO 2024154379 A1 WO2024154379 A1 WO 2024154379A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- foreign object
- inference model
- training
- model
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N23/00—Investigating 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/02—Investigating 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/04—Investigating 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
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01N—INVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
- G01N23/00—Investigating 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/02—Investigating 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/06—Investigating 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/18—Investigating the presence of flaws defects or foreign matter
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
Definitions
- the present invention relates to a model generation method, a model generation system, and a model generation program for generating an inference model used to detect foreign objects contained in an image showing an object, a foreign object detection method, a foreign object detection system, and a foreign object detection program for detecting foreign objects contained in an image showing an object using the generated inference model, and the generated inference model.
- Patent Document 1 shows that an inference model generated by machine learning is used to generate a restored image from an inspection target image of the outer appearance of the inspection target, and the inspection target is inspected from the difference between the inspection target image and the restored image.
- the inference model used for inspection is generated from a good product image of the outer appearance of the inspection target that is judged to be a good product, and a pseudo-defect image that combines an image showing a defect with the good product image. This is said to improve inspection accuracy.
- the method shown in Patent Document 1 does not always perform appropriate detection of foreign objects, for example, when detecting foreign objects in images of packaged items captured by X-ray.
- the target object contains multiple objects such as pasta, and the foreign objects are small compared to the individual objects, even if the inference model generated by the method shown in Patent Document 1 is used, foreign objects cannot always be detected appropriately.
- One embodiment of the present invention has been made in consideration of the above, and aims to provide a model generation method, model generation system, model generation program, foreign object detection method, foreign object detection system, foreign object detection program, and inference model that can detect foreign objects with high accuracy.
- a model generation method for generating an inference model used to detect foreign objects contained in an image showing an object, and includes a training acquisition step of acquiring, as training images, a first normal image showing a training object, a second normal image showing the training object, a second foreign object image in which a foreign object expected to be detected has been added to the second normal image, a third normal image showing the training object, and a third foreign object image in which a foreign object not expected to be detected has been added to the third normal image, and a model generation step of performing training using the training images acquired in the training acquisition step to generate an inference model, and the training includes training in which information based on the first normal image is used as input to the inference model and information based on the first normal image is used as output from the inference model, training in which information based on the second foreign object image is used as input to the inference model and information based on the second normal image is used as output from the inference model, and
- a model generation method in addition to normal images, two different types of foreign object images are used for training to generate an inference model.
- the inference model generated in this manner reflects in the output the target object that appears in the input image, but does not reflect the foreign object. Therefore, by detecting foreign objects using the generated inference model, foreign objects can be detected with high accuracy.
- Foreign objects that are not expected to be detected may be natural images. With this configuration, an inference model can be generated more appropriately and reliably.
- the second normal image and the third normal image are the first normal image
- a foreign object expected to be detected is added to the first normal image to generate and acquire a second foreign object image
- a foreign object not expected to be detected is added to the first normal image to generate and acquire a third foreign object image.
- the target object may be a specific type of object
- the first normal image, the second normal image, the second foreign object image, the third normal image, and the third foreign object image acquired in the training acquisition step may be images in which the specific type of object is captured as the training target object.
- the ratio of the number of first normal images acquired in the training acquisition step, the number of combinations of the second normal images and the second foreign object images, and the number of combinations of the third normal images and the third foreign object images may be a preset ratio.
- Foreign objects that are not expected to be detected may be images drawn based on a formula. With this configuration, an inference model can be generated more appropriately and reliably.
- the third foreign object image may be an image in which a foreign object not expected to be detected is added to the third normal image by at least one of transparent addition and replacement addition.
- the inference model may include a neural network with multiple layers, have a structure that allows connections between layers, and is a model that adds together the image after the connections and the input image. With this configuration, it is possible to generate an inference model for detecting foreign objects with high accuracy.
- a new second inference model may be generated by performing new training, in which a part is added to the output side of the generated inference model that outputs information indicating the degree of foreign matter for each position of the image input to the inference model.
- model generation method invention in addition to being described as a model generation method invention as described above, one embodiment of the present invention can also be described as a model generation system and a model generation program invention as described below. These are essentially the same invention, just in different categories, and have similar functions and effects.
- the model generation system is a model generation system that generates an inference model used to detect foreign objects contained in an image showing an object, and includes an acquisition means that acquires as training images a first normal image showing a training object, a second normal image showing the training object, a second foreign object image in which a foreign object expected to be detected has been added to the second normal image, a third normal image showing the training object, and a third foreign object image in which a foreign object not expected to be detected has been added to the third normal image, and a model generation means that performs training using the training images acquired by the acquisition means to generate an inference model, and the training includes training in which information based on the first normal image is used as input to the inference model and information based on the first normal image is used as output from the inference model, training in which information based on the second foreign object image is used as input to the inference model and information based on the second normal image is used as output from the inference model, and training in which information based on the third
- a model generation program is a model generation program that causes a computer to operate as a model generation system that generates an inference model used to detect foreign objects contained in images showing objects, and causes the computer to generate training normal images including a first normal image showing a training object, a second normal image showing the training object, a second foreign object image in which a foreign object expected to be detected has been added to the second normal image, a third normal image showing the training object, and a third foreign object image in which a foreign object not expected to be detected has been added to the third normal image.
- the training including training in which information based on a first normal image is input to the inference model and information based on the first normal image is output from the inference model, training in which information based on a second foreign object image is input to the inference model and information based on the second normal image is output from the inference model, and training in which information based on a third foreign object image is input to the inference model and information based on the third normal image is output from the inference model.
- a foreign object detection method is a foreign object detection method that uses an inference model generated by a model generation method to detect foreign objects contained in an image showing an object, and includes a detection acquisition step of acquiring a target image that is to be detected for foreign objects, a calculation step of inputting information based on the target image acquired in the detection acquisition step into the inference model and performing a calculation to obtain an output from the inference model, and a detection step of calculating the difference between the information related to the input to the inference model in the calculation step and the information related to the output from the inference model, and detecting a foreign object contained in the target image from the calculated difference.
- the above-mentioned inference model is used to detect foreign objects. Therefore, according to the foreign object detection method according to one embodiment of the present invention, foreign objects can be detected with high accuracy.
- a foreign object detection method is a foreign object detection method that uses a second inference model generated by a model generation method to detect a foreign object contained in an image showing the object, and includes a detection acquisition step of acquiring a target image that is to be detected for foreign objects, a calculation step of inputting information based on the target image acquired in the detection acquisition step into the second inference model and performing a calculation to obtain an output from the second inference model, and a detection step of detecting a foreign object contained in the target image from the output from the second inference model obtained in the calculation step.
- the second inference model described above is used to detect foreign objects. Therefore, according to the foreign object detection method according to one embodiment of the present invention, foreign objects can be detected with high accuracy.
- one embodiment of the present invention can also be described as a foreign object detection system and a foreign object detection program invention as described below. These are essentially the same invention, just in different categories, and have similar functions and effects.
- a foreign object detection system is a foreign object detection system that uses an inference model generated by a model generation method to detect foreign objects contained in an image depicting an object, and includes a detection acquisition means that acquires a target image that is to be detected for foreign objects, a calculation means that inputs information based on the target image acquired by the detection acquisition means to the inference model, performs calculations, and obtains output from the inference model, and a detection means that calculates the difference between the information related to the input to the inference model by the calculation means and the information related to the output from the inference model, and detects foreign objects contained in the target image from the calculated difference.
- the foreign object detection system is a foreign object detection system that uses a second inference model generated by a model generation method to detect foreign objects contained in an image showing the object, and includes a detection acquisition means for acquiring a target image that is to be detected for foreign objects, a calculation means for inputting information based on the target image acquired by the detection acquisition means into the second inference model and performing a calculation to obtain an output from the second inference model, and a detection means for detecting foreign objects contained in the target image from the output from the second inference model obtained by the calculation means.
- a foreign object detection program is a foreign object detection program that causes a computer to operate as a foreign object detection system that uses an inference model generated by a model generation method to detect foreign objects contained in an image showing the target object, and causes the computer to function as: a detection acquisition means that acquires a target image that is to be detected for foreign objects; a calculation means that inputs information based on the target image acquired by the detection acquisition means to the inference model, performs calculations, and obtains output from the inference model; and a detection means that calculates the difference between the information related to the input to the inference model by the calculation means and the information related to the output from the inference model, and detects foreign objects contained in the target image from the calculated difference.
- a foreign object detection program is a foreign object detection program that causes a computer to operate as a foreign object detection system that uses an inference model generated by a model generation method to detect foreign objects contained in an image showing the object, and causes the computer to function as a detection acquisition means that acquires a target image that is to be detected for foreign objects, a calculation means that inputs information based on the target image acquired by the detection acquisition means into a second inference model to perform calculations and obtain output from the second inference model, and a detection means that detects foreign objects contained in the target image from the output from the second inference model obtained by the calculation means.
- the inference model generated by the model generation method according to one embodiment of the present invention is itself an invention with a novel configuration.
- the inference model according to one embodiment of the present invention is an inference model for inputting image-based information, performing calculations according to the input, and functioning a computer to output information, and is generated by the model generation method.
- foreign objects can be detected with high accuracy.
- FIG. 1 is a diagram illustrating a configuration of a model generation system and a foreign object detection system according to an embodiment of the present invention.
- FIG. 11 is a diagram showing an example of an abnormality degree map generated as a result of detection of a foreign object;
- FIG. 1 is a diagram illustrating an inference model.
- FIG. 2 is a diagram showing an example of a first normal image used for training.
- FIG. 13 is a diagram showing an example of a combination of a second normal image and a second foreign object image used for training.
- FIG. 13 is a diagram showing an example of a combination of a third normal image and a third foreign object image used for training.
- FIG. 13 is a diagram showing an example of an image used to generate a third foreign object image.
- 4 is a flowchart showing a model generation method which is a process executed in the model generation system according to the embodiment of the present invention.
- 4 is a flowchart showing a foreign object detection method which is a process executed in the foreign object detection system according to the embodiment of the present invention.
- 11A and 11B are diagrams showing examples of detection results according to a comparative example and an embodiment of the present invention. A figure showing examples of images used for training, and images and anomaly maps output from the inference model.
- FIG. 13 is an example of an image of a target object, granola.
- FIG. 2 is a diagram showing configurations of a model generation program and a foreign object detection program according to an embodiment of the present invention, together with a recording medium.
- FIG. 13 is a diagram showing an example of a combination of a third normal image and a third foreign object image used for training.
- FIG. 13 is a diagram showing an example of a combination of a third normal image and a third foreign object image used for training.
- FIG. 13 is a diagram showing an example of an image used to generate a third foreign object image.
- FIG. 13 is a diagram showing an example of an image used to generate a third foreign object image.
- FIG. 13 is a diagram showing an example of an image used to generate a third foreign object image.
- FIG. 13 is a diagram showing an example of an image used to generate a third foreign object image.
- 11A and 11B are diagrams showing examples of detection results according to a comparative example and an embodiment of the present invention.
- 11A and 11B are diagrams showing examples of detection results according to a comparative example and an embodiment of the present invention.
- FIG. 13 is a diagram showing an example of a third foreign object image used for training.
- FIG. 13 is a diagram showing an example of a combination of a third normal image and a third foreign object image used for training.
- FIG. 13 is a diagram showing an example of a combination of a third normal image and a third foreign object image used for training.
- FIG. 11 is a diagram showing an example of a detection result according to an embodiment of the present invention.
- FIG. 11 is a diagram showing an example of a detection result according to an embodiment of the present invention.
- FIG. 1 is a diagram illustrating an example of an inference model.
- FIG. 1(a) shows a model generation system 10 according to this embodiment.
- FIG. 1(b) shows a foreign object detection system 20 according to this embodiment.
- the model generation system 10 is a system (apparatus) that performs machine learning training to generate an inference model (learning model, trained model) used to detect foreign objects included in images showing objects.
- the foreign object detection system 20 is a system (apparatus) that uses the inference model generated by the model generation system 10 to detect (detect) foreign objects included in images showing objects.
- Figure 2 shows an example of a target image 30 used to detect foreign objects.
- foreign object detection is performed on food packaged as a product, for example food in a plastic packaging bag.
- Foreign object detection is performed, for example, during the manufacturing process of food products, to determine whether the manufactured product is of good quality or not. If no foreign object is detected in the image of the product to be detected, the product is deemed to be of good quality, and if a foreign object is detected in the image of the product to be detected, the product is deemed to be defective.
- the images used to detect foreign objects are captured using X-rays for each product to be detected.
- the areas surrounded by dashed lines in the figure are areas where foreign objects are present.
- the assumed foreign object is, for example, an object that may be included during the manufacturing process.
- a ball smaller than the food a SUS (Steel Use Stainless) ball, a glass ball
- the product to be detected for a foreign object is, for example, pasta such as penne.
- the product to be detected for a foreign object may also be something other than pasta, such as rice or granola.
- the foreign object does not have to be smaller than the target object such as food, and may be of the same size as the target object or larger than the target object.
- a single package of a product such as pasta usually contains many objects of similar shape. With conventional methods, it is difficult to accurately detect foreign objects in such cases, but with this embodiment, it is possible to accurately detect foreign objects.
- the object containing the foreign object (a food product in this embodiment), the foreign object, and the image (an X-ray image in this embodiment) are not limited to those in this embodiment, and may be any object to which this embodiment is applicable.
- the foreign object to be detected does not necessarily have to be something separate from the object (food in the above example), and may be a defect such as a flaw or flaw that appears on the object. In other words, detection of a foreign object may be detection of whether the object is defective.
- the model generation system 10 and the foreign object detection system 20 each include a conventional computer including a processor such as a CPU (Central Processing Unit), a memory, a communication module, and other hardware.
- the functions of the model generation system 10 and the foreign object detection system 20 described below are realized by these components operating through programs or the like.
- the model generation system 10 and the foreign object detection system 20 are shown as separate systems (devices), but they may be realized by the same system (device).
- the computer that constitutes the model generation system 10 and the foreign object detection system 20 may be a computer system including multiple computers.
- the computer may also be configured using cloud computing or edge computing.
- the model generation system 10 includes a training acquisition unit 11 and a model generation unit 12.
- the inference model is a model that inputs an image of a target for foreign object detection and outputs (infers) an image from which the foreign object portion of the input image has been removed (it is inferred).
- Figure 2 shows an example of a target image 30 that is input to the inference model and is the target for foreign object detection, and an example of an image 40 from which the foreign object portion has been removed (it is inferred) that is output when the target image 30 is input to the inference model.
- a foreign object is visible in the area surrounded by a dashed line in the target image 30, but no foreign object is visible in the same position in the image 40 output from the inference model.
- Figure 3 shows an anomaly map 50, which is an image of the difference between the target image 30 input to the inference model in Figure 2 and the image 40 output from the inference model.
- the anomaly map 50 makes it possible to grasp foreign objects. Detection of foreign objects by the foreign object detection system 20 using the inference model corresponds to, for example, the generation of an anomaly map.
- the inference model includes, for example, a neural network.
- the neural network may be multi-layered. In other words, the inference model may be generated by deep learning.
- the neural network may be a convolutional neural network (CNN).
- Figure 4 shows a schematic diagram of the inference model of this embodiment.
- the inference model includes an encoder that encodes an input image into features, and a decoder that decodes the features output from the encoder into an image.
- neurons are provided in the input layer of the encoder to input information based on an image.
- the information input to the inference model is the pixel value (brightness value) of each pixel of the image.
- the input layer is provided with neurons equal to the number of pixels in the image, and the pixel value of the corresponding pixel is input to each neuron.
- the information input to the inference model may be other than the pixel value of each pixel, as long as it is based on the image.
- the information output from the inference model is the pixel value of each pixel of the image.
- the output layer is provided with neurons equal to the number of pixels in the image, and each neuron outputs the pixel value of the corresponding pixel.
- the information output from the inference model may be something other than the pixel value of each pixel, as long as it is capable of generating the output image described above.
- the inference model may be constructed using something other than a neural network, so long as it is generated through machine learning training and performs the input and output described above.
- the inference model is expected to be used as a program module that is part of artificial intelligence software.
- the inference model is used, for example, in a computer equipped with a processor and memory, and the computer's processor operates according to instructions from the model stored in the memory.
- the computer's processor operates to input information to the model according to the instructions, perform calculations according to the model, and output results from the model.
- the computer's processor operates to input information to the input layer of the neural network according to the instructions, perform calculations based on parameters such as the learning weighting coefficients in the neural network, and output results from the output layer of the neural network.
- the training acquisition unit 11 is a training acquisition means for acquiring training images.
- the training images are a first normal image in which a training object is shown, a second normal image in which a training object is shown, a second foreign object image in which a foreign object expected to be a detection target is added to the second normal image, a third normal image in which a training object is shown, and a third foreign object image in which a foreign object not expected to be a detection target is added to the third normal image.
- the foreign object not expected to be a detection target may be a natural image.
- the second normal image and the third normal image may be the first normal image
- the training acquisition unit 11 may add a foreign object expected to be detected to the first normal image to generate and acquire a second foreign object image, and add a foreign object not expected to be detected to the first normal image to generate and acquire a third foreign object image.
- the object may be a specific type of object
- the first normal image, the second normal image, the second foreign object image, the third normal image, and the third foreign object image acquired by the training acquisition unit 11 may be images in which a specific type of object is shown as a training object.
- the ratio of the number of first normal images acquired by the training acquisition unit 11, the number of combinations of the second normal image and the second foreign object image, and the number of combinations of the third normal image and the third foreign object image may be a preset ratio.
- the inference model is generated by machine learning training using training images acquired by the training acquisition unit 11.
- the training of the inference model includes three types of training: training using a first normal image, training using a combination of a second normal image and a second foreign object image, and training using a combination of a third normal image and a third foreign object image.
- Figure 5 shows an example of the first normal image 61.
- the first normal image 61 is an image that contains a training object and no foreign object.
- the first normal image 61 is, for example, an image obtained by capturing an image of a product that has been confirmed to contain no foreign objects under the same conditions as those used to detect foreign objects. Products that have been confirmed to contain no foreign objects are training objects.
- the product in question is of the same type as the object being detected for foreign objects. That is, if the object being detected for foreign objects is a pasta product, the first normal image 61 is an image of the same type of pasta product.
- the second normal image 62 is an image in which a training object is captured and no foreign object is captured, and is the same as the first normal image 61.
- the first normal image 61 may be the second normal image 62.
- the second foreign object image 72 is an image in which a foreign object (e.g., the small ball described above) assumed to be a detection target is added to the second normal image 62.
- the second foreign object image 72 is, for example, an image obtained by superimposing an image obtained by capturing only the foreign object assumed to be a detection target on the second normal image 62.
- the second foreign object image 72 may be generated by performing image processing on the second normal image 62 assuming a foreign object assumed to be a detection target, without using an image obtained by capturing only the foreign object.
- the image processing may be performed using a simulation technique (e.g., a simulation related to image processing of an X-ray image).
- a simulation technique e.g., a simulation related to image processing of an X-ray image.
- a combination of the second foreign object image 72 and the second normal image 62 used to generate the second foreign object image 72 is used.
- FIG. 7 shows examples of a third normal image 63 and a third foreign object image 73.
- the third normal image 63 is an image that shows a training object and no foreign object, and is the same as the first normal image 61.
- the first normal image 61 may also be the third normal image 63.
- the third foreign object image 73 is an image in which a foreign object that is not expected to be a detection target has been added to the third normal image 63.
- the third foreign object image 73 is, for example, an image obtained by superimposing an image of a foreign object that is not expected to be a detection target on the third normal image 63.
- FIG. 8 shows an example of a foreign object image 80 used to generate the third foreign object image 73.
- the foreign object added to the third normal image 63 to generate the third foreign object image 73 is a natural image.
- the natural image here is an image of a landscape or a person, etc., that is completely different from the foreign object that is expected to be detected.
- the third foreign object image 73 shown in FIG. 7 is obtained by superimposing the image of the tank in the upper right of FIG. 8 on the third normal image 63.
- the third foreign object image 73 may be generated by performing image processing on the third normal image 63 without using an image of a foreign object that is expected to be detected, without considering foreign objects that are expected to be detected.
- the image processing may be performed using a simulation technique.
- a combination of the third foreign object image 73 and the third normal image 63 used to generate the third foreign object image 73 is used.
- the training acquisition unit 11 acquires a combination of a first normal image 61, a second normal image 62, and a second foreign object image 72, and a combination of a third normal image 63 and a third foreign object image 73.
- the training acquisition unit 11 acquires each image by accepting each image input to the model generation system 10 by a user of the model generation system 10.
- the training acquisition unit 11 may also acquire each image by any other method.
- the training acquisition unit 11 acquires only the first normal image 61 from among the above images in the same manner as described above.
- the first normal image 61 may be acquired by receiving an image transmitted from an imaging device that acquires an image by imaging (for example, an X-ray imaging device that acquires an X-ray image).
- the training acquisition unit 11 sets the acquired first normal image 61 as the second normal image 62 and the third normal image 63.
- the training acquisition unit 11 generates and acquires the second foreign object image 72 from the second normal image 62 (first normal image 61).
- the training acquisition unit 11 acquires an image obtained by imaging only a foreign object expected to be detected, and generates the second foreign object image 72 by superimposing the acquired image and the second normal image 62.
- the training acquisition unit 11 also generates and acquires a third foreign object image 73 from a third normal image 63 (first normal image 61). For example, the training acquisition unit 11 acquires an image 80 of a foreign object not expected to be detected (for example, a natural image shown in FIG. 8 ), and generates the third foreign object image 73 by superimposing the acquired image and the third normal image 63.
- the images used to generate the second foreign object image 72 and the third foreign object image 73 may be acquired by the same method as the first normal image 61, or by any other method.
- the training acquisition unit 11 may store in advance a method of image processing by simulation for generating the second foreign object image 72 and the third foreign object image 73, and may perform image processing on the second normal image 62 and the third normal image 63 by the method to generate the second foreign object image 72 and the third foreign object image 73.
- image processing by simulation for example, processing may be performed to change the shape and contrast of the foreign object, or to add blurring related to the scintillator and blurring related to the afterglow.
- image processing may be performed according to changes in the imaging conditions.
- the image processing by simulation can be realized by a conventional method.
- the method used to generate the second foreign object image 72 and the third foreign object image 73 may be a combination of the image superimposition method and the image processing by simulation method.
- the training acquisition unit 11 acquires a number of training images that allows the model generation unit 12 to perform training appropriately.
- the training acquisition unit 11 acquires training images so that the ratio between the number of first normal images 61, the number of combinations of second normal images 62 and second foreign object images 72, and the number of combinations of third normal images 63 and third foreign object images 73 is a preset ratio.
- the training acquisition unit 11 acquires training images so that the numbers are the same, that is, so that each number is 1/3 of the total number. This is because the images output by the inference model correspond to this ratio.
- the training acquisition unit 11 outputs the acquired training images 61, 62, 63, 72, and 73 to the model generation unit 12.
- the model generation unit 12 is a model generation means that generates an inference model by performing training using training images acquired by the training acquisition unit 11.
- Training for generating an inference model includes training in which information based on the first normal image 61 is input to the inference model and information based on the first normal image 61 is output from the inference model, training in which information based on the second foreign object image 72 is input to the inference model and information based on the second normal image 62 is output from the inference model, and training in which information based on the third foreign object image 73 is input to the inference model and information based on the third normal image 63 is output from the inference model.
- the model generation unit 12 generates an inference model, for example, as follows.
- the model generation unit 12 inputs training images 61, 62, 63, 72, and 73 from the training acquisition unit 11.
- the model generation unit 12 performs training to generate an inference model for each first normal image 61, each combination of a corresponding second normal image 62 and a corresponding second foreign object image 72, and each combination of a corresponding third normal image 63 and a corresponding third foreign object image 73.
- the model generation unit 12 performs training with the first normal image 61 as an input to the inference model and the first normal image 61 as an output from the inference model, as shown in FIG. 5.
- the model generation unit 12 performs training with the second foreign object image 72 as an input to the inference model and the second normal image 62 that corresponds to the second foreign object image 72 as an output from the inference model, as shown in FIG. 6.
- the model generation unit 12 When training is performed using a combination of a third normal image 63 and a third foreign object image 73 that correspond to each other, the model generation unit 12 performs training with the third foreign object image 73 as an input to the inference model and the third normal image 63 that corresponds to the third foreign object image 73 as an output from the inference model, as shown in FIG. 7.
- the above-mentioned training i.e., the updating of the parameters of the inference model, may be performed in the same manner as conventional machine learning training. Furthermore, training may be performed collectively for each type of image (first normal image 61, the combination of corresponding second normal image 62 and second foreign object image 72, and the combination of corresponding third normal image 63 and third foreign object image 73), or may be performed by changing the type of image each time.
- the model generation unit 12 If the inference model is one that inputs information based on images other than the images themselves, the model generation unit 12 generates information based on images 61, 72, and 73 from each of the images 61, 72, and 73 that correspond to the input to the inference model among the training images, and performs training using the generated information as an input to the inference model. Also, if the inference model outputs information corresponding to images other than the images themselves, the model generation unit 12 generates information corresponding to images 61, 62, and 63 (information based on images 61, 62, and 63) from each of the images 61, 62, and 63 that correspond to the output from the inference model among the training images, and performs training using the generated information as an output from the inference model.
- the model generation unit 12 generates an inference model, for example, by using all of the training images 61, 62, 63, 72, and 73 input from the training acquisition unit 11 for training. Alternatively, the model generation unit 12 may generate an inference model by performing training until a preset condition for the end of training other than the above is satisfied. The generated inference model is used in the foreign object detection system 20. The model generation unit 12 outputs the generated inference model. For example, the model generation unit 12 transmits the inference model to the foreign object detection system 20.
- the inference model may be input to the foreign object detection system 20 by a method other than the output from the model generation unit 12.
- the inference model may be input to the foreign object detection system 20 by operating the model generation system 10 or the foreign object detection system 20. The above is the function of the model generation system 10 according to this embodiment.
- the foreign object detection system 20 is configured with a detection acquisition unit 21, a calculation unit 22, and a detection unit 23.
- the detection acquisition unit 21 is a detection acquisition means for acquiring a target image 30 that is to be detected for foreign objects.
- the detection acquisition unit 21 receives and acquires, for example, an image transmitted from an imaging device that acquires an image by imaging (for example, an X-ray imaging device that acquires X-ray images) as the target image 30.
- the training acquisition unit 11 may also acquire the target image 30 by any other method.
- the detection acquisition unit 21 outputs the acquired target image 30 to the calculation unit 22.
- the calculation unit 22 is a calculation unit that inputs information based on the target image 30 acquired by the detection acquisition unit 21 into an inference model, performs calculations, and obtains output from the inference model.
- the calculation unit 22 inputs and stores the inference model generated by the model generation system 10.
- the calculation unit 22 inputs the target image 30 from the detection acquisition unit 21.
- the calculation unit 22 inputs information based on the input target image 30 into the stored inference model, performs calculations, and obtains output from the inference model. If the inference model corresponds to the type of object, the calculation unit 22 uses the inference model corresponding to the type of object related to the target image 30 for calculations. For example, if the object shown in the target image 30 is pasta, the calculation unit 22 uses an inference model for pasta.
- the information input to the inference model corresponds to the inference model, and is, for example, the target image 30 itself as described above.
- the information input to the inference model may also be information based on the target image 30 other than the target image 30 itself.
- the calculation unit 22 generates information to be input to the inference model from the target image 30.
- the information output from the inference model corresponds to the inference model, and is, for example, image 40 from which the foreign object portion of the target image 30 has been removed (as inferred) as described above.
- the information output from the inference model may also be information other than the image 40 itself that corresponds to the image 40.
- the calculation unit 22 outputs information related to the input and output to the inference model to the detection unit 23.
- the calculation unit 22 outputs the target image 30 and the image 40 output from the inference model to the detection unit 23 as information related to the input and output to the inference model.
- the calculation unit 22 may also output information corresponding to the target image 30 and the image 40 output from the inference model other than the image 30 and the image 40 output from the inference model to the detection unit 23.
- the detection unit 23 is a detection means that calculates the difference between the information related to the input to the inference model by the calculation unit 22 and the information related to the output from the inference model, and detects foreign objects contained in the target image 30 from the calculated difference.
- the detection unit 23 detects a foreign object, for example, as follows. Detection of a foreign object by the detection unit 23 is, for example, as described above, the generation of an anomaly map 50, which is information indicating the detection result as shown in FIG. 3.
- the detection unit 23 inputs information related to input and output from the calculation unit 22 to the inference model, for example, the target image 30 and the image 40 output from the inference model.
- the detection unit 23 takes these differences to generate the anomaly map 50. Specifically, it takes the difference in pixel values between the target image 30 and the image 40 output from the inference model for each corresponding pixel to generate the anomaly map 50.
- the anomaly map 50 parts that have pixel values other than 0, i.e. parts where there is a difference in pixel values between the images 30 and 40, are parts that are detected (estimated) to contain a foreign object.
- the detection unit 23 outputs an anomaly map 50, which is information indicating the detection result.
- the information indicating the detection result may be output, for example, to another system (device) or another module, or in a form that can be recognized by the user of the foreign object detection system 20 (for example, display or audio output).
- the detection unit 23 may also store criteria for detecting foreign objects in advance and determine whether or not a foreign object is included in the target image 30 based on the criteria from the anomaly map 50.
- the detection unit 23 may also perform other processes as long as it calculates the difference between information related to the input to the inference model and information related to the output from the inference model and detects a foreign object included in the target image 30 from the calculated difference. These are the functions of the foreign object detection system 20 according to this embodiment.
- training images 61, 62, 63, 72, and 73 are acquired by the training acquisition unit 11 (S01, training acquisition step).
- the training images are a combination of a first normal image 61, a second normal image 62, and a second foreign object image 72, and a combination of a third normal image 63 and a third foreign object image 73.
- the first to third normal images 61 to 63 are images in which training objects are shown.
- the second foreign object image 72 is an image in which a foreign object assumed to be a detection target has been added to the second normal image.
- the third foreign object image 73 is an image in which a foreign object not assumed to be a detection target has been added to the third normal image.
- the model generation unit 12 performs training using the training images 61, 62, 63, 72, and 73 to generate an inference model (S02, model generation step).
- the training includes training in which information based on the first normal image 61 is input to the inference model, and information based on the first normal image 61 is output from the inference model.
- the training includes training in which information based on the second foreign object image 72 is input to the inference model, and information based on the second normal image 62 is output from the inference model.
- the training includes training in which information based on the third foreign object image 73 is input to the inference model, and information based on the third normal image 63 is output from the inference model.
- the generated inference model is output from the model generation unit 12 (S03).
- the inference model output from the model generation system 10 is stored in the foreign object detection system 20.
- the above is the model generation method, which is the processing executed by the model generation system 10 according to this embodiment.
- the detection acquisition unit 21 acquires the target image 30 (S11, detection acquisition step).
- the calculation unit 22 inputs information based on the target image 30 to an inference model, performs calculations, and obtains an output from the inference model (S12, calculation step).
- the detection unit 23 calculates the difference between the information related to the input to the inference model and the information related to the output from the inference model as a process for detecting a foreign object contained in the target image 30, and generates an anomaly map (S13, detection step).
- the generated anomaly map is output from the detection unit 23 as information indicating the detection result of the foreign object (S14).
- the above is the foreign object detection method, which is a process executed by the foreign object detection system 20 according to this embodiment.
- an inference model generated in this way reflects the target object, among those captured in the input image, in the output, but does not reflect the foreign object in the output.
- an inference model with pasta as the target object is a pasta pass filter that passes the structure of pasta but does not pass the structure of foreign objects.
- foreign objects can be removed from the output image. Therefore, according to this embodiment, foreign objects can be detected with high accuracy by using the generated inference model to detect foreign objects.
- the foreign object not expected to be detected and used to generate the third foreign object image 73 may be a natural image.
- an inference model can be generated more appropriately and reliably.
- the foreign object not expected to be detected may be an image of various textures other than a natural image.
- the second normal image 62 and the third normal image 63 may be the first normal image 61.
- a foreign object expected to be detected may be added to the first normal image 61 to generate and acquire the second foreign object image 72
- a foreign object not expected to be detected may be added to the first normal image 61 to generate and acquire the third foreign object image 73.
- the target object may be a specific type of object
- the training images 61, 62, 63, 72, and 73 may be images in which a specific type of object is depicted as the training target object.
- a specific type of object For example, it may be a pasta product.
- Inference models for each type of food may also be generated and used. With this configuration, an inference model for detecting foreign objects with high accuracy for a specific type of object can be generated.
- training images 61, 62, 63, 72, and 73 in which the target object is not limited to a specific type of object may also be used.
- the ratio between the number of first normal images 61 acquired and used for training, the number of combinations of second normal images 62 and second foreign object images 72, and the number of combinations of third normal images 63 and third foreign object images 73 may be a preset ratio.
- these numbers may be the same.
- this ratio does not need to be preset.
- the model generation system 10 and the foreign object detection system 20 may be provided by the same entity, or may be provided by different entities. Furthermore, the model generation system 10 and the foreign object detection system 20 may be used by the same user, or may be used by different users.
- FIG. 11 shows an example of the results of actually detecting foreign objects using this embodiment.
- the results of detecting foreign objects using two conventional methods are compared with the results of this embodiment as comparative examples.
- the first of the conventional methods is as follows.
- a non-defective image e.g., normal images 61-63 used in this embodiment
- a feature amount e.g., a feature vector represented by a vector
- a feature amount is also calculated for each part of the image.
- the feature amount of the target image is compared with the feature amount of the non-defective image, and whether or not a foreign object is present for each part is detected based on the comparison. For example, the distance between the feature vectors is calculated, and if the distance between them is equal to or greater than a preset threshold, it is determined that a foreign object is present, and if the distance is less than the threshold, it is determined that no foreign object is present.
- the second of the conventional methods is as follows.
- Good product images e.g., normal images 61 to 63 used in this embodiment
- An autoencoder is generated from the good product images by training machine learning.
- the generated autoencoder is used as an inference model to detect foreign objects in the same manner as the method using the foreign object detection system 20 of this embodiment.
- the results shown in Figure 11 are the results of detecting foreign objects when five SUS balls and five glass balls were placed in a pasta product as foreign objects.
- the table (a) in Figure 11 shows the results using the first method
- the table (b) shows the results using the second method
- the table (c) shows the results using this embodiment.
- the first method two SUS balls and two glass balls were detected, with three false positives (foreign objects were detected even though there were none).
- the second method three SUS balls were detected, no glass balls were detected, and there were no false positives.
- FIGS. 12 and 13 show examples of images used for training and images and anomaly maps output from the inference model.
- the images and anomaly maps shown in FIGS. 12(a)-(f) and 13(a) and (b) are comparative examples, and the images and anomaly maps shown in FIGS. 13(c) and (d) are examples according to this embodiment.
- Figures 12(a) and (b) show the image and anomaly map output from the inference model when the inference model is generated by training using only the first normal image 61 (i.e., when the inference model is an autoencoder).
- the image output from the inference model does not erase the foreign object, and no foreign object is detected even in the area surrounded by the ellipse on the anomaly map where the foreign object should be.
- Figures 12(c) and (d) show the image and anomaly map output from the inference model when the inference model is generated by training using only the combination of the second normal image 62 and the second foreign object image 72.
- the image output from the inference model has the foreign object removed, but the pasta portion has also been removed in excess. Foreign objects are detected even in the portion of the anomaly map surrounded by an ellipse where there are no foreign objects.
- Figures 12(e) and (f) show the image and anomaly map output from the inference model when the inference model is generated by training using only the combination of the third normal image 63 and the third foreign object image 73. In this case, the image output from the inference model seems to have the structure of the pasta portion generally removed.
- Figures 13(a) and (b) show the image and anomaly map output from the inference model when the inference model is generated by training using an equal number of first normal images 61 and a combination of second normal images 62 and second foreign object images 72.
- the image output from the inference model has foreign objects removed.
- there has been some overlearning of foreign objects and there are parts of the pasta structure that have been removed as foreign objects.
- Foreign objects are also detected in the parts of the anomaly map that are surrounded by ellipses where there are no foreign objects.
- FIG. 13 show images and anomaly maps output from an inference model when an inference model is generated by training using an equal number of first normal images 61, a combination of second normal images 62 and second foreign object images 72, and a combination of third normal images 63 and third foreign object images 73 (i.e., in the case of this embodiment).
- the images output from the inference model have foreign objects appropriately removed compared to other examples, and the anomaly map also shows that appropriate foreign objects have been detected.
- Figure 14 shows an example where rice is used as the target.
- Figure 14 (a) is an example of a target image used to detect foreign objects, (b) is an example of an image output from the inference model when the target image is input to the inference model, and (c) is an example of an anomaly map generated from these images.
- training images 61, 62, 63, 72, and 73 which show rice as the target, are used for training to generate an inference model.
- This inference model is a rice-pass filter that passes the structure of rice but does not pass the structure of foreign objects.
- FIG. 15 shows an example of the target object being granola with added dried fruit.
- (a) is an example of a target image used to detect foreign objects
- (b) is an example of an image output from the inference model when the target image is input to the inference model
- (c) is an example of an anomaly map generated from these images.
- the area surrounded by dashed lines in the figure is the area where foreign objects exist.
- training images 61, 62, 63, 72, and 73 which show granola as the target object, are used for training to generate an inference model.
- This inference model is a granola pass filter that passes the structure of granola but does not pass the structure of foreign objects.
- the model generation program 100 is stored in a program storage area 111 formed in a computer-readable recording medium 110 that is inserted into a computer and accessed, or that is provided in the computer.
- the recording medium 110 may be a non-transitory recording medium.
- the model generation program 100 is configured with a training acquisition module 101 and a model generation module 102.
- the functions realized by executing the training acquisition module 101 and the model generation module 102 are similar to the functions of the training acquisition unit 11 and the model generation unit 12 of the model generation system 10 described above, respectively.
- the foreign object detection program 200 is stored in a program storage area 211 formed on a computer-readable recording medium 210 that is inserted into a computer and accessed, or that is provided on the computer.
- the recording medium 210 may be a non-transitory recording medium. Note that when the model generation program 100 and the foreign object detection program 200 are executed on the same computer, the recording medium 210 may be the same as the recording medium 110.
- the foreign object detection program 200 is configured with a detection acquisition module 201, a calculation module 202, and a detection module 203.
- the functions realized by executing the detection acquisition module 201, the calculation module 202, and the detection module 203 are similar to the functions of the detection acquisition unit 21, the calculation unit 22, and the detection unit 23, respectively, of the foreign object detection system 20 described above.
- the model generation program 100 and the foreign object detection program 200 may be configured so that part or all of them are transmitted via a transmission medium such as a communication line, and are received and recorded (including installed) by other equipment. Furthermore, each module of the model generation program 100 and the foreign object detection program 200 may be installed on one of multiple computers, rather than on one computer. In that case, the above-mentioned series of processes are performed by a computer system consisting of the multiple computers.
- FIG. 17 shows another example of the third normal image 63 and the third foreign object image 73.
- the third foreign object image 73 may be one in which multiple partial natural images are superimposed on the third normal image 63.
- the partial natural images are natural images that are smaller in size than the third normal image 63. Even when such a third foreign object image 73 is used, it is possible to generate an appropriate inference model for detecting foreign objects. In other words, classification is fully possible using the characteristics of the natural image, and it is possible to handle any foreign object structure (unexpected foreign objects).
- the foreign object added to the third foreign object image 73 may be an image drawn based on a calculation formula.
- FIG. 18 shows examples of the third normal image 63 and the third foreign object image 73 in this case.
- the image relating to the foreign object is, for example, an image generated by simulation based on a calculation formula prepared in advance.
- the image may be generated by a conventional method.
- the image relating to the foreign object added to the third normal image 63 may be generated by the model generation system 10 (the training acquisition unit 11), or may be generated by something other than the model generation system 10 and acquired by the model generation system 10 (the training acquisition unit 11).
- the image related to the foreign object added to the third foreign object image 73 and drawn based on a formula may be a geometric pattern image 81 as shown in FIG. 19.
- the image may also be a procedural texture image (a texture image such as a texture generated based on a formula) 82 as shown in FIG. 20.
- the image may also be a frequency image 83, which is an image generated based on a formula related to frequency, as shown in FIG. 21, or a combination of multiple frequency images 83.
- the image may also be an image combining the above images, for example, an image obtained by cutting out a frequency image 83 based on a procedural texture image 82 as shown in FIG. 22.
- FIG. 23(a) shows a case where foreign objects are detected from a target image 30 used for detecting foreign objects by a conventional simple binarization of an image, and the detected foreign objects are superimposed on the target image 30.
- FIG. 23(a) shows an anomaly map obtained from the target image 30 using the inference model of this embodiment
- FIG. 23(c) shows the foreign objects detected from the anomaly map superimposed on the target image 30.
- FIG. 23(c) with the method of this embodiment, four foreign objects were detected in the upper part of the image, two in the middle part of the image, and six in the lower part of the image.
- FIG. 24(a) shows a target image 30 (an image different from the target image shown in FIG. 23) used for detecting foreign objects, in which foreign objects are detected by a conventional simple binarization of an image, superimposed on the target image 30.
- FIG. 24(a) in the conventional method, two foreign objects were detected in the upper part of the image, three in the middle part of the image, and three in the lower part of the image.
- FIG. 24(b) shows an anomaly map obtained from the target image 30 using the inference model of this embodiment
- FIG. 24(c) shows the foreign objects detected from the anomaly map superimposed on the target image 30.
- FIG. 24(b) shows an anomaly map obtained from the target image 30 using the inference model of this embodiment
- FIG. 24(c) shows the foreign objects detected from the anomaly map superimposed on the target image 30.
- the method according to this embodiment in the method according to this embodiment, three foreign objects were detected in the upper part of the image, six in the middle part of the image, and five in the lower part of the image. As shown in the examples of FIG. 23 and FIG. 24, the method according to this embodiment detects actual foreign objects that could not be detected by the conventional method. Thus, the method according to this embodiment allows for highly accurate detection of foreign objects.
- the portion to which the foreign object is added does not have to be the entire third foreign object image 73, but may be a part of the third foreign object image 73.
- the position of the portion to which the foreign object is added in the third foreign object image 73 may be an irregular position (random position).
- the size of each individual foreign object in the third foreign object image 73 may also be various sizes (multi-size). This makes it possible to make the inference model capable of appropriately detecting foreign objects even if the foreign objects detected in the target image 30 are in irregular positions or of various sizes.
- FIG. 25 shows an example of the third foreign object image 73 to which foreign objects are added in irregular positions.
- the third foreign object image 73 may be an image in which a foreign object not expected to be detected has been added to the third normal image 63 by at least one of transparent addition and replacement addition.
- FIG. 26 shows the third foreign object image 73 with the foreign object transparently added, and the corresponding third normal image 63.
- FIG. 27 shows the third foreign object image 73 with the foreign object added by replacement, and the corresponding third normal image 63.
- Transparent addition of a foreign object refers to adding a foreign object so that both the foreign object and the third normal image 63 before the addition are visible in the portion of the third foreign object image 73 to which the foreign object has been added.
- transparent addition of a foreign object refers to superimposing a semi-transparent foreign object on the third normal image 63 before the addition in a state in which the third normal image 63 is visible through the foreign object in the portion to which the foreign object is added (or a state in which the foreign object is visible through the third normal image 63).
- the proportion of the size of the portion to which the foreign object has been added in the entire third foreign object image 73 may be 10% to 100%. By increasing this proportion, the foreign object detection performance of the inference model can be improved.
- FIG. 28 shows an example of detecting a foreign object from a target image 30, where the target is coffee beans, when an inference model is generated using a third foreign object image 73 with a transparent addition of the foreign object.
- (a) in FIG. 28 is an anomaly map obtained from the target image 30, and (b) shows the foreign object detected from the anomaly map superimposed on the target image 30.
- the target image 30 is an image in which the foreign body and other objects are transparently overlapped, as in the case of the transparent addition of the foreign body described above, it is possible to detect foreign bodies with high accuracy.
- the target image 30 is an X-ray image, it is possible to detect foreign bodies with high accuracy.
- Addition by foreign object replacement refers to removing the third normal image 63 and adding the foreign object in the portion of the third foreign object image 73 where the foreign object has been added.
- addition by foreign object replacement refers to superimposing the foreign object on the third normal image 63 before it has been added, with the third normal image 63 being blocked by the foreign object in the portion to be added.
- the proportion of the size of the portion to which the foreign object has been added in the entire third foreign object image 73 may be 10% to 60%. By increasing this proportion, the foreign object detection performance of the inference model can be improved.
- FIG. 29 shows an example of detecting a foreign object from a target image 30 of coffee beans as an object when an inference model is generated using a third foreign object image 73 obtained by adding and replacing a foreign object.
- (a) in FIG. 29 is an anomaly map obtained from the target image 30, and (b) shows the foreign object detected from the anomaly map superimposed on the target image 30.
- the inference model that is generated is obtained by restoring the occluded portion of the third normal image 63 (for example, restoring it to a normal product without any foreign object) and learning the positional relationship of the objects depicted in the image.
- the target image is an image similar to MVTecAD, a dataset used to evaluate anomaly detection methods, it is possible to detect foreign objects with a high degree of accuracy.
- the training acquisition unit 11 may acquire the third foreign object image 73 in the same manner as described above.
- the training acquisition unit 11 may generate the third foreign object image 73 using conventional techniques of transparent image addition and image replacement.
- the third foreign object image 73 may be one of transparent addition, replacement addition, or both.
- the multiple third foreign object images 73 may be composed of any one of the above types, or may include multiple types of the above.
- a configuration in which the third foreign object image 73 is generated by at least one of transparent addition and replacement addition can also generate an inference model more appropriately and reliably.
- an image related to information to be output from the inference model may be an image (normal image) related to input to the inference model that has been subjected to image processing other than the above.
- the image processing is preset, and is, for example, any of rotation, inversion, change of pixel value (brightness distribution), gamma correction, edge enhancement, and smoothing processing.
- the image processing may be performed on the second foreign object image 72 or the third foreign object image 73.
- images that have been subjected to the image processing may be used to train the inference model.
- the inference model generated by the model generation system 10 and used by the foreign object detection system 20 may be a model that includes a neural network having multiple layers, has a structure that performs concatenation (merging) between layers, and adds the image after concatenation to the input image.
- the inference model is a neural network with the above configuration.
- the neural network is shown diagrammatically in FIG. 30.
- the neural network includes an encoder that encodes an input image into features, and a decoder that decodes the features output from the encoder into an image.
- the encoder has multiple layers (Conv2D Layer, Activation Layer) where two-dimensional convolution and activation are performed. Pooling is performed between the multiple layers of the encoder.
- the decoder has multiple layers (Conv2D Layer, Activation Layer) where two-dimensional convolution and activation are performed. Unpooling is performed between the multiple layers of the decoder.
- the encoder layer is concatenated (concat) with a decoder layer of the same size as the encoder layer (concatenation layer). The two concatenated layers are not adjacent to each other. In this way, the neural network is a U-Net type model with a pooling layer.
- the image input to the encoder is added to the image output from the last layer of the decoder where two-dimensional convolution and activation are performed, and the image obtained by the addition is output from the decoder's output layer (Regression Layer).
- the addition of the above images is the addition of the pixel values for each corresponding pixel.
- the image output from the last layer of the decoder where two-dimensional convolution and activation are performed can be an image of the foreign object contained in the input image (more precisely, an image obtained by subtracting the pixel values of pixels related to foreign objects, which can be added to the input image to remove the foreign objects).
- the inference model can be made to output an image from which the foreign object portions have been appropriately removed. As a result, foreign objects can be detected with high accuracy.
- the model generation system 10 may generate a second inference model by performing new training based on the above-mentioned inference model. That is, the model generation system 10 may perform two-stage training, namely training to generate an inference model and then training to generate a second inference model.
- the foreign object detection system 20 may detect a foreign object contained in an image showing an object by using the second inference model generated by the model generation system 10 instead of the above-mentioned inference model. In the following description, when simply referring to an inference model, this refers to the inference model of the above-mentioned embodiment (the inference model generated in the first stage).
- the model generation unit 12 performs new training to generate a new second inference model in which a part that outputs information indicating the degree of foreign matter for each position of the image input to the inference model is added to the output side of the generated inference model.
- the model generation unit 12 generates the second inference model by performing transfer learning based on the inference model.
- the second inference model is a model (discrimination model, classification model) that inputs an image of the target for foreign object detection and outputs (infers) information indicating the degree of foreign object presence at each position in the input image.
- the second inference model outputs, for each pixel of the target image 30 for foreign object detection, a value of the probability that the pixel is related to a foreign object (probability of pass/fail, class classification value).
- the second inference model may output a value between 0 and 1 for each pixel as the probability. The closer the output value is to 1, the higher the degree to which the pixel is related to a foreign object, and the closer the output value is to 0, the lower the degree to which the pixel is related to a foreign object.
- foreign objects are detected by taking the difference between the image input to the inference model and the image output from the inference model.
- foreign object detection using the second inference model there is no need to take the difference between images as in foreign object detection using an inference model.
- FIG. 31 shows a schematic example of the second inference model of this embodiment.
- the second inference model is a neural network.
- the second inference model is generated by adding a new layer to the output side of the inference model, which is a neural network, and performing new training.
- the inference model is a neural network including an encoder that encodes an input image into features and a decoder that decodes the features output from the encoder into an image.
- the encoder has multiple layers (Conv2D Layer, Activation Layer) where two-dimensional convolution and activation are performed. Pooling is performed between the multiple layers of the encoder.
- the decoder has multiple layers (Conv2D Layer, Activation Layer) where two-dimensional convolution and activation are performed. Unpooling is performed between the multiple layers of the decoder.
- the encoder layer is concatenated (Concat) with a decoder layer of the same size as the encoder layer (Concatenation Layer). The two concatenated layers are not adjacent to each other.
- the last layer of the multiple layers of the decoder where two-dimensional convolution and activation are performed is the output layer of the inference model.
- the inference model used for the second inference model does not necessarily have to be the one shown in FIG. 31, and can be any model that can be used to construct the second inference model.
- the parts added in the second inference model are multiple layers of a neural network. For example, as shown in FIG. 31, three layers are added in which adjacent layers are connected to each other.
- the first layer from the inference model side is a layer where convolution and calculations using the Relu function are performed (Conv+Relu, Conv2D Layer, Activation Layer). This layer is connected to the output layer of the first inference model.
- the second layer is a layer where calculations using the softmax function are performed (softmax).
- the third layer is an output layer (Pixel Classification) that outputs the above probability values.
- the input layer of the second inference model is the same as the input layer of the inference model.
- the output layer is provided with neurons for outputting information indicating the degree of a foreign object for each position of the image related to the information input to the input layer.
- the information output from the inference model is the probability value of whether each pixel of the image is related to a foreign object, as described above.
- the output layer is provided with neurons equal to the number of pixels in the image, and each neuron outputs the probability value of the corresponding pixel.
- the information output from the inference model may be other than the probability value of each pixel, as long as it is information indicating the degree of a foreign object for each position of the image described above.
- the second inference model may be constructed of something other than a neural network, so long as it is generated by machine learning training and performs the input and output described above. Like the first inference model, the second inference model is also expected to be used as a program module that is part of artificial intelligence software.
- the second inference model may be based on the type of object, similar to the inference model.
- the second inference model can be treated the same as the inference model.
- the second inference model and the inference model may be similar.
- the training acquisition unit 11 also acquires information for training the second inference model.
- the training information for the second inference model is a combination of training images for the second inference model and information indicating the degree of foreign objects at each position of the image.
- FIG. 32 shows an example of an image 91 for training the second inference model and information 92 indicating the degree of foreign objects at each position of the image 91.
- the image 91 for training the second inference model can be at least any one of the first normal image 61, the second foreign object image 72, and the third foreign object image 73 described above.
- the training acquisition unit 11 does not need to acquire the image 91 for training the second inference model separately from the image for training the inference model.
- the training acquisition unit 11 may acquire the image 91 for training the second inference model separately from the image for training the inference model.
- the training acquisition unit 11 may acquire the image 91 in a manner similar to the method of acquiring images for training the inference model.
- the information 92 indicating the degree of a foreign object for each position of the image 91 for training the second inference model is, for example, a value indicating whether each pixel of the image 91 for training the second inference model is related to a foreign object.
- the value of the information 92 is 1 if the pixel is related to a foreign object, and 0 if the pixel is not related to a foreign object.
- the value of the information 92 does not necessarily have to be the above, and may be any value that corresponds to the output from the second inference model.
- the training acquisition unit 11 may generate and acquire the above information 92. For example, in the case of a training image 91 for the second inference model, a first normal image 61, a second foreign object image 72, and a third foreign object image 73, the training acquisition unit 11 generates information for each pixel of these images 61, 72, and 73 in which the foreign object portion is set to 1 and the non-foreign object portion is set to 0 as the above information 92.
- the foreign object portion is, for example, a portion of the image to be added to the normal image as a foreign object.
- the foreign object portion of the image to be added to the normal image as a foreign object may be detected by an existing detection technology, and the detected portion may be set as the foreign object portion in the above information 92. That is, the above information 92 may be acquired without annotation by the user, that is, annotation-free.
- the training acquisition unit 11 may also acquire the above information 92 by accepting the above information 92 input to the model generation system 10 by a user of the model generation system 10.
- the training acquisition unit 11 acquires a sufficient amount of training information for the second inference model to enable the model generation unit 12 to appropriately train the second estimation model.
- the training acquisition unit 11 outputs the acquired training information for the second inference model to the model generation unit 12.
- the model generation unit 12 generates the second inference model, for example, as follows.
- the model generation unit 12 inputs training information for the second inference model from the training acquisition unit 11.
- the model generation unit 12 performs training for generating the second inference model for each of the above combinations of training information for the second inference model.
- the training for generating the second inference model is performed after the first inference model is generated by training.
- the model generation unit 12 performs training by inputting an image 91 for training the second inference model to the second inference model, and outputting information 92 of the probability value corresponding to the image 91 from the second inference model.
- the encoder part of the inference model in the second inference model is not updated by training. That is, the first encoder part of the second inference model is updated only during training of the inference model (training in the first stage), and the learning rate during training of the second inference model (training in the second stage) is set to 0.
- the decoder part of the inference model in the second inference model is set to have a lower learning rate than the added part. For example, the learning rate of the decoder part is set to 1/100 of the learning rate of the added part.
- the cross entropy error is used as the loss function during training.
- the training of the second inference model may be performed in a manner other than the above. Each of the above trainings themselves, i.e., the update of the parameters of the second inference model, may be performed in the same manner as conventional machine learning training.
- the model generation unit 12 If the second inference model is one in which information based on an image other than the image itself is input, the model generation unit 12 generates information based on the image 91 from the image 91 that corresponds to the input to the second inference model, and performs training using the generated information as input to the inference model.
- the model generation unit 12 generates the second inference model, for example, by using all of the training information for the second inference model input from the training acquisition unit 11 for training. Alternatively, the model generation unit 12 may generate the second inference model by performing training until a preset condition for ending training other than the above is satisfied. The generated second inference model is used in the foreign object detection system 20. The model generation unit 12 outputs the generated second inference model. Input and output of the second inference model may be performed in the same manner as the input and output of the above inference model. Furthermore, when the second inference model is used to detect foreign objects, output of the inference model is not necessary.
- the detection acquisition unit 21 acquires a target image 30 that is to be detected for a foreign object.
- the detection acquisition unit 21 acquires the target image 30 in the same manner as when the inference model is used, and outputs it to the calculation unit 22.
- the calculation unit 22 inputs information based on the target image 30 acquired by the detection acquisition unit 21 into a second inference model, performs calculations, and obtains output from the second inference model.
- the calculation unit 22 inputs and stores the second inference model generated by the model generation system 10.
- the calculation unit 22 inputs the target image 30 from the detection acquisition unit 21.
- the calculation unit 22 inputs information based on the input target image 30 into the stored second inference model, performs calculations, and obtains output from the second inference model.
- the information input to the second inference model corresponds to the second inference model, and is, for example, the target image 30 itself as described above.
- the information input to the second inference model may also be information based on the target image 30 other than the target image 30 itself.
- the calculation unit 22 generates information to be input to the second inference model from the target image 30.
- the information output from the second inference model corresponds to the second inference model, and is, for example, a probability value (class map) for each pixel of the target image 30 as described above.
- the information output from the second inference model may also be information indicating the degree of foreign matter for each position of the target image 30 other than the above.
- the calculation unit 22 outputs the information output from the second inference model to the detection unit 23.
- the detection unit 23 detects foreign objects contained in the target image 30 from the output from the second inference model obtained by the calculation unit 22.
- the detection unit 23 detects foreign objects, for example, as follows.
- the detection unit 23 inputs from the calculation unit 22 information indicating the degree of foreign objects at each position of the target image 30, which is the output from the second inference model, for example, the probability value for each pixel of the target image 30.
- the detection unit 23 stores a standard for detecting foreign objects in advance, for example, a threshold value for detection (for example, 0.5).
- the detection unit 23 compares the probability value, which is the output from the second inference model, with the threshold value for each pixel of the target image 30.
- the detection unit 23 determines that the part of the pixel is a foreign object (a foreign object is captured in the part of the pixel). For pixels whose probability is not equal to or greater than the threshold value, the detection unit 23 determines that the part of the pixel is not a foreign object (no foreign object is captured in the part of the pixel and it is normal). Furthermore, the detection unit 23 may detect foreign objects using a method other than the above, as long as the detection unit 23 detects foreign objects contained in the target image 30 from the output of the second inference model obtained by the calculation unit 22.
- the detection unit 23 outputs information indicating the detection result.
- the information indicating the detection result may be output in the same manner as described above.
- Figure 33(a) shows an example of the output (class map) from the second inference model.
- Figure 33(b) shows a target image on which foreign objects detected using this output are superimposed. In Figure 33, the multiple round parts lined up horizontally are the foreign objects.
- the second inference model By generating the second inference model as described above and using it to detect foreign objects, foreign objects can be easily and reliably detected. Furthermore, the information output from the second inference model has less variation depending on the various conditions and objects (samples) related to the target image 30 compared to, for example, the anomaly map described above. Therefore, the criteria (for example, the threshold values described above) used when detecting foreign objects do not need to be tailored to the various conditions and objects related to the target image 30 and can be easily set. Therefore, by using the second inference model, foreign objects can be stably and appropriately detected even if a uniform criterion is used regardless of the various conditions and objects related to the target image 30.
- the criteria for example, the threshold values described above
- a model generation method for generating an inference model used to detect a foreign object contained in an image showing an object comprising: a training acquisition step of acquiring, as training images, a first normal image showing a training object, a second normal image showing the training object, a second foreign object image in which a foreign object assumed to be a detection target is added to the second normal image, a third normal image showing the training object, and a third foreign object image in which a foreign object not assumed to be a detection target is added to the third normal image;
- the model generation method includes training in which information based on the first normal image is used as an input to the inference model and information based on the first normal image is used as an output from the inference model, training in which information based on the second foreign object image is used
- the model generation method according to [1], wherein the foreign object not anticipated as a detection target is a natural image.
- the second normal image and the third normal image are the first normal image,
- the object is a specific type of object
- the model generating method according to any one of [1] to [5], wherein the foreign object not anticipated as a detection target is an image drawn based on a calculation formula.
- the model generation method according to any one of [1] to [6], wherein the third foreign object image is an image in which a foreign object not expected to be detected is added to the third normal image by at least one of transparent addition and addition by replacement.
- a model generation method according to any one of [1] to [7], in which the inference model includes a neural network having multiple layers, has a structure for connecting layers, and is a model that adds together the image after the connections and the input image.
- a model generation system that generates an inference model used to detect a foreign object included in an image showing an object, comprising: an acquisition means for acquiring, as training images, a first normal image showing a training object, a second normal image showing the training object, a second foreign object image in which a foreign object assumed to be a detection target has been added to the second normal image, a third normal image showing the training object, and a third foreign object image in which a foreign object not assumed to be a detection target has been added to the third normal image;
- a model generation program that causes a computer to operate as a model generation system that generates an inference model used to detect a foreign object included in an image showing an object, comprising: The computer, an acquisition means for acquiring, as training images, a first normal image showing a training object, a second normal image showing the training object, a second foreign object image in which a foreign object assumed to be a detection target has been added to the second normal image, a third normal image showing the training object, and a third foreign object image in which a foreign object not assumed to be a detection target has been added to the third normal image; and a model generation means for generating the inference model by performing training using training images acquired by the acquisition means,
- the training is a model generation program including: training in which information based on the first normal image is used as input to the inference model and information based on the first normal image is used as output from the inference model; training in which information based on the second foreign object image is used as input to the inference model and information based on the second normal image is used as
- a foreign object detection method comprising: [13] A foreign object detection method for detecting a foreign object included in an image showing an object by using the second inference model generated by the model generation method according to [9], a detection acquisition step for acquiring a target image that is a target for detecting a foreign object; a calculation step of inputting information based on the target image acquired
Landscapes
- Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Theoretical Computer Science (AREA)
- Biochemistry (AREA)
- Evolutionary Computation (AREA)
- Immunology (AREA)
- Pathology (AREA)
- Chemical & Material Sciences (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Life Sciences & Earth Sciences (AREA)
- Analytical Chemistry (AREA)
- Artificial Intelligence (AREA)
- Computing Systems (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Software Systems (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
Description
[1] 対象物が写った画像に含まれる異物の検出に用いられる推論モデルを生成するモデル生成方法であって、
訓練用の対象物が写っている第1の正常画像、訓練用の対象物が写っている第2の正常画像、検出対象として想定される異物が第2の正常画像に付加された第2の異物画像、訓練用の対象物が写っている第3の正常画像、及び検出対象として想定されない異物が第3の正常画像に付加された第3の異物画像を訓練用の画像として取得する訓練用取得ステップと、
前記訓練用取得ステップにおいて取得された訓練用の画像を用いた訓練を行って前記推論モデルを生成するモデル生成ステップと、を含み、
前記訓練は、前記第1の正常画像に基づく情報を前記推論モデルへの入力とし、当該第1の正常画像に基づく情報を前記推論モデルからの出力とした訓練、前記第2の異物画像に基づく情報を前記推論モデルへの入力とし、前記第2の正常画像に基づく情報を前記推論モデルからの出力とした訓練、及び前記第3の異物画像に基づく情報を前記推論モデルへの入力とし、前記第3の正常画像に基づく情報を前記推論モデルからの出力とした訓練を含むモデル生成方法。
[2] 前記検出対象として想定されない異物は、自然画像である[1]に記載されたモデル生成方法。
[3] 前記第2の正常画像及び前記第3の正常画像は、前記第1の正常画像であり、
前記訓練用取得ステップにおいて、前記第1の正常画像に対して、検出対象として想定される異物を付加して前記第2の異物画像を生成して取得し、前記第1の正常画像に対して、検出対象として想定されない異物を付加して前記第3の異物画像を生成して取得する[1]又は[2]に記載されたモデル生成方法。
[4] 前記対象物は、特定の種別の物であり、
前記訓練用取得ステップにおいて取得される第1の正常画像、第2の正常画像、第2の異物画像、第3の正常画像及び第3の異物画像は、前記特定の種別の物が前記訓練用の対象物として写っている画像である[1]~[3]の何れかに記載されたモデル生成方法。
[5] 前記訓練用取得ステップにおいて取得される第1の正常画像の数、第2の正常画像と第2の異物画像との組み合わせの数、並びに第3の正常画像と第3の異物画像との組み合わせの数の比率は、予め設定された比率である[1]~[4]の何れかに記載されたモデル生成方法。
[6] 前記検出対象として想定されない異物は、計算式に基づいて描画された画像である[1]~[5]の何れかに記載されたモデル生成方法。
[7] 前記第3の異物画像は、透過的な付加及び置き換えによる付加の少なくとも何れかによって、前記検出対象として想定されない異物が前記第3の正常画像に付加された画像である[1]~[6]の何れかに記載されたモデル生成方法。
[8] 前記推論モデルは、複数の層を有するニューラルネットワークを含み、層間での連結を行う構造を有し、連結を経由した後の画像と入力した画像とを足し合わせるモデルである[1]~[7]の何れかにに記載されたモデル生成方法。
[9] 前記モデル生成ステップにおいて、生成した前記推論モデルの出力側に、当該推論モデルに入力した画像の位置毎の異物の度合いを示す情報を出力する部分を追加した新たな第2の推論モデルを、新たな訓練を行って生成する[1]~[8]の何れかに記載されたモデル生成方法。
[10] 対象物が写った画像に含まれる異物の検出に用いられる推論モデルを生成するモデル生成システムであって、
訓練用の対象物が写っている第1の正常画像、訓練用の対象物が写っている第2の正常画像、検出対象として想定される異物が第2の正常画像に付加された第2の異物画像、訓練用の対象物が写っている第3の正常画像、及び検出対象として想定されない異物が第3の正常画像に付加された第3の異物画像を訓練用の画像として取得する取得手段と、
前記取得手段によって取得された訓練用の画像を用いた訓練を行って前記推論モデルを生成するモデル生成手段と、を備え、
前記訓練は、前記第1の正常画像に基づく情報を前記推論モデルへの入力とし、当該第1の正常画像に基づく情報を前記推論モデルからの出力とした訓練、前記第2の異物画像に基づく情報を前記推論モデルへの入力とし、前記第2の正常画像に基づく情報を前記推論モデルからの出力とした訓練、及び前記第3の異物画像に基づく情報を前記推論モデルへの入力とし、前記第3の正常画像に基づく情報を前記推論モデルからの出力とした訓練を含むモデル生成システム。
[11] コンピュータを、対象物が写った画像に含まれる異物の検出に用いられる推論モデルを生成するモデル生成システムとして動作させるモデル生成プログラムであって、
当該コンピュータを、
訓練用の対象物が写っている第1の正常画像、訓練用の対象物が写っている第2の正常画像、検出対象として想定される異物が第2の正常画像に付加された第2の異物画像、訓練用の対象物が写っている第3の正常画像、及び検出対象として想定されない異物が第3の正常画像に付加された第3の異物画像を訓練用の画像として取得する取得手段と、
前記取得手段によって取得された訓練用の画像を用いた訓練を行って前記推論モデルを生成するモデル生成手段と、として機能させ、
前記訓練は、前記第1の正常画像に基づく情報を前記推論モデルへの入力とし、当該第1の正常画像に基づく情報を前記推論モデルからの出力とした訓練、前記第2の異物画像に基づく情報を前記推論モデルへの入力とし、前記第2の正常画像に基づく情報を前記推論モデルからの出力とした訓練、及び前記第3の異物画像に基づく情報を前記推論モデルへの入力とし、前記第3の正常画像に基づく情報を前記推論モデルからの出力とした訓練を含むモデル生成プログラム。
[12] [1]~[8]の何れかに記載のモデル生成方法によって生成された前記推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出方法であって、
異物の検出対象となる対象画像を取得する検出用取得ステップと、
前記検出用取得ステップにおいて取得された前記対象画像に基づく情報を、前記推論モデルに入力して演算を行って、前記推論モデルからの出力を得る演算ステップと、
前記演算ステップにおける前記推論モデルへの入力に係る情報と、前記推論モデルからの出力に係る情報との差分を算出して、算出した差分から前記対象画像に含まれる異物の検出を行う検出ステップと、
を含む異物検出方法。
[13] [9]に記載のモデル生成方法によって生成された前記第2の推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出方法であって、
異物の検出対象となる対象画像を取得する検出用取得ステップと、
前記検出用取得ステップにおいて取得された前記対象画像に基づく情報を、前記第2の推論モデルに入力して演算を行って、前記第2の推論モデルからの出力を得る演算ステップと、
前記演算ステップにおいて得られた前記第2の推論モデルからの出力から前記対象画像に含まれる異物の検出を行う検出ステップと、
を含む異物検出方法。
[14] [1]~[8]の何れかに記載のモデル生成方法によって生成された前記推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出システムであって、
異物の検出対象となる対象画像を取得する検出用取得手段と、
前記検出用取得手段によって取得された前記対象画像に基づく情報を、前記推論モデルに入力して演算を行って、前記推論モデルからの出力を得る演算手段と、
前記演算手段による前記推論モデルへの入力に係る情報と、前記推論モデルからの出力に係る情報との差分を算出して、算出した差分から前記対象画像に含まれる異物の検出を行う検出手段と、
を備える異物検出システム。
[15] [9]に記載のモデル生成方法によって生成された前記第2の推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出システムであって、
異物の検出対象となる対象画像を取得する検出用取得手段と、
前記検出用取得手段によって取得された前記対象画像に基づく情報を、前記第2の推論モデルに入力して演算を行って、前記第2の推論モデルからの出力を得る演算手段と、
前記演算手段によって得られた前記第2の推論モデルからの出力から前記対象画像に含まれる異物の検出を行う検出手段と、
を備える異物検出システム。
[16] コンピュータを、[1]~[8]の何れかに記載のモデル生成方法によって生成された前記推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出システムとして動作させる異物検出プログラムであって、
当該コンピュータを、
異物の検出対象となる対象画像を取得する検出用取得手段と、
前記検出用取得手段によって取得された前記対象画像に基づく情報を、前記推論モデルに入力して演算を行って、前記推論モデルからの出力を得る演算手段と、
前記演算手段による前記推論モデルへの入力に係る情報と、前記推論モデルからの出力に係る情報との差分を算出して、算出した差分から前記対象画像に含まれる異物の検出を行う検出手段と、
として機能させる異物検出プログラム。
[17] コンピュータを、[9]に記載のモデル生成方法によって生成された前記推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出システムとして動作させる異物検出プログラムであって、
当該コンピュータを、
異物の検出対象となる対象画像を取得する検出用取得手段と、
前記検出用取得手段によって取得された前記対象画像に基づく情報を、前記第2の推論モデルに入力して演算を行って、前記第2の推論モデルからの出力を得る演算手段と、
前記演算手段によって得られた前記第2の推論モデルからの出力から前記対象画像に含まれる異物の検出を行う検出手段と、
として機能させる異物検出プログラム。
[18] 画像に基づく情報を入力して、入力に応じた演算を行って情報を出力するようコンピュータを機能させるための推論モデルであって、
[1]~[8]の何れかに記載のモデル生成方法によって生成されたものである推論モデル。
Claims (18)
- 対象物が写った画像に含まれる異物の検出に用いられる推論モデルを生成するモデル生成方法であって、
訓練用の対象物が写っている第1の正常画像、訓練用の対象物が写っている第2の正常画像、検出対象として想定される異物が第2の正常画像に付加された第2の異物画像、訓練用の対象物が写っている第3の正常画像、及び検出対象として想定されない異物が第3の正常画像に付加された第3の異物画像を訓練用の画像として取得する訓練用取得ステップと、
前記訓練用取得ステップにおいて取得された訓練用の画像を用いた訓練を行って前記推論モデルを生成するモデル生成ステップと、を含み、
前記訓練は、前記第1の正常画像に基づく情報を前記推論モデルへの入力とし、当該第1の正常画像に基づく情報を前記推論モデルからの出力とした訓練、前記第2の異物画像に基づく情報を前記推論モデルへの入力とし、前記第2の正常画像に基づく情報を前記推論モデルからの出力とした訓練、及び前記第3の異物画像に基づく情報を前記推論モデルへの入力とし、前記第3の正常画像に基づく情報を前記推論モデルからの出力とした訓練を含むモデル生成方法。 - 前記検出対象として想定されない異物は、自然画像である請求項1に記載されたモデル生成方法。
- 前記第2の正常画像及び前記第3の正常画像は、前記第1の正常画像であり、
前記訓練用取得ステップにおいて、前記第1の正常画像に対して、検出対象として想定される異物を付加して前記第2の異物画像を生成して取得し、前記第1の正常画像に対して、検出対象として想定されない異物を付加して前記第3の異物画像を生成して取得する請求項1又は2に記載されたモデル生成方法。 - 前記対象物は、特定の種別の物であり、
前記訓練用取得ステップにおいて取得される第1の正常画像、第2の正常画像、第2の異物画像、第3の正常画像及び第3の異物画像は、前記特定の種別の物が前記訓練用の対象物として写っている画像である請求項1又は2に記載されたモデル生成方法。 - 前記訓練用取得ステップにおいて取得される第1の正常画像の数、第2の正常画像と第2の異物画像との組み合わせの数、並びに第3の正常画像と第3の異物画像との組み合わせの数の比率は、予め設定された比率である請求項1又は2に記載されたモデル生成方法。
- 前記検出対象として想定されない異物は、計算式に基づいて描画された画像である請求項1又は2に記載されたモデル生成方法。
- 前記第3の異物画像は、透過的な付加及び置き換えによる付加の少なくとも何れかによって、前記検出対象として想定されない異物が前記第3の正常画像に付加された画像である請求項1又は2に記載されたモデル生成方法。
- 前記推論モデルは、複数の層を有するニューラルネットワークを含み、層間での連結を行う構造を有し、連結を経由した後の画像と入力した画像とを足し合わせるモデルである請求項1又は2に記載されたモデル生成方法。
- 前記モデル生成ステップにおいて、生成した前記推論モデルの出力側に、当該推論モデルに入力した画像の位置毎の異物の度合いを示す情報を出力する部分を追加した新たな第2の推論モデルを、新たな訓練を行って生成する請求項1又は2に記載されたモデル生成方法。
- 対象物が写った画像に含まれる異物の検出に用いられる推論モデルを生成するモデル生成システムであって、
訓練用の対象物が写っている第1の正常画像、訓練用の対象物が写っている第2の正常画像、検出対象として想定される異物が第2の正常画像に付加された第2の異物画像、訓練用の対象物が写っている第3の正常画像、及び検出対象として想定されない異物が第3の正常画像に付加された第3の異物画像を訓練用の画像として取得する取得手段と、
前記取得手段によって取得された訓練用の画像を用いた訓練を行って前記推論モデルを生成するモデル生成手段と、を備え、
前記訓練は、前記第1の正常画像に基づく情報を前記推論モデルへの入力とし、当該第1の正常画像に基づく情報を前記推論モデルからの出力とした訓練、前記第2の異物画像に基づく情報を前記推論モデルへの入力とし、前記第2の正常画像に基づく情報を前記推論モデルからの出力とした訓練、及び前記第3の異物画像に基づく情報を前記推論モデルへの入力とし、前記第3の正常画像に基づく情報を前記推論モデルからの出力とした訓練を含むモデル生成システム。 - コンピュータを、対象物が写った画像に含まれる異物の検出に用いられる推論モデルを生成するモデル生成システムとして動作させるモデル生成プログラムであって、
当該コンピュータを、
訓練用の対象物が写っている第1の正常画像、訓練用の対象物が写っている第2の正常画像、検出対象として想定される異物が第2の正常画像に付加された第2の異物画像、訓練用の対象物が写っている第3の正常画像、及び検出対象として想定されない異物が第3の正常画像に付加された第3の異物画像を訓練用の画像として取得する取得手段と、
前記取得手段によって取得された訓練用の画像を用いた訓練を行って前記推論モデルを生成するモデル生成手段と、として機能させ、
前記訓練は、前記第1の正常画像に基づく情報を前記推論モデルへの入力とし、当該第1の正常画像に基づく情報を前記推論モデルからの出力とした訓練、前記第2の異物画像に基づく情報を前記推論モデルへの入力とし、前記第2の正常画像に基づく情報を前記推論モデルからの出力とした訓練、及び前記第3の異物画像に基づく情報を前記推論モデルへの入力とし、前記第3の正常画像に基づく情報を前記推論モデルからの出力とした訓練を含むモデル生成プログラム。 - 請求項1又は2に記載のモデル生成方法によって生成された前記推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出方法であって、
異物の検出対象となる対象画像を取得する検出用取得ステップと、
前記検出用取得ステップにおいて取得された前記対象画像に基づく情報を、前記推論モデルに入力して演算を行って、前記推論モデルからの出力を得る演算ステップと、
前記演算ステップにおける前記推論モデルへの入力に係る情報と、前記推論モデルからの出力に係る情報との差分を算出して、算出した差分から前記対象画像に含まれる異物の検出を行う検出ステップと、
を含む異物検出方法。 - 請求項9に記載のモデル生成方法によって生成された前記第2の推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出方法であって、
異物の検出対象となる対象画像を取得する検出用取得ステップと、
前記検出用取得ステップにおいて取得された前記対象画像に基づく情報を、前記第2の推論モデルに入力して演算を行って、前記第2の推論モデルからの出力を得る演算ステップと、
前記演算ステップにおいて得られた前記第2の推論モデルからの出力から前記対象画像に含まれる異物の検出を行う検出ステップと、
を含む異物検出方法。 - 請求項1又は2に記載のモデル生成方法によって生成された前記推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出システムであって、
異物の検出対象となる対象画像を取得する検出用取得手段と、
前記検出用取得手段によって取得された前記対象画像に基づく情報を、前記推論モデルに入力して演算を行って、前記推論モデルからの出力を得る演算手段と、
前記演算手段による前記推論モデルへの入力に係る情報と、前記推論モデルからの出力に係る情報との差分を算出して、算出した差分から前記対象画像に含まれる異物の検出を行う検出手段と、
を備える異物検出システム。 - 請求項9に記載のモデル生成方法によって生成された前記第2の推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出システムであって、
異物の検出対象となる対象画像を取得する検出用取得手段と、
前記検出用取得手段によって取得された前記対象画像に基づく情報を、前記第2の推論モデルに入力して演算を行って、前記第2の推論モデルからの出力を得る演算手段と、
前記演算手段によって得られた前記第2の推論モデルからの出力から前記対象画像に含まれる異物の検出を行う検出手段と、
を備える異物検出システム。 - コンピュータを、請求項1又は2に記載のモデル生成方法によって生成された前記推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出システムとして動作させる異物検出プログラムであって、
当該コンピュータを、
異物の検出対象となる対象画像を取得する検出用取得手段と、
前記検出用取得手段によって取得された前記対象画像に基づく情報を、前記推論モデルに入力して演算を行って、前記推論モデルからの出力を得る演算手段と、
前記演算手段による前記推論モデルへの入力に係る情報と、前記推論モデルからの出力に係る情報との差分を算出して、算出した差分から前記対象画像に含まれる異物の検出を行う検出手段と、
として機能させる異物検出プログラム。 - コンピュータを、請求項9に記載のモデル生成方法によって生成された前記推論モデルを用いて、対象物が写った画像に含まれる異物の検出を行う異物検出システムとして動作させる異物検出プログラムであって、
当該コンピュータを、
異物の検出対象となる対象画像を取得する検出用取得手段と、
前記検出用取得手段によって取得された前記対象画像に基づく情報を、前記第2の推論モデルに入力して演算を行って、前記第2の推論モデルからの出力を得る演算手段と、
前記演算手段によって得られた前記第2の推論モデルからの出力から前記対象画像に含まれる異物の検出を行う検出手段と、
として機能させる異物検出プログラム。 - 画像に基づく情報を入力して、入力に応じた演算を行って情報を出力するようコンピュータを機能させるための推論モデルであって、
請求項1又は2に記載のモデル生成方法によって生成されたものである推論モデル。
Priority Applications (5)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP23917591.2A EP4625313A1 (en) | 2023-01-18 | 2023-09-07 | Model generation method, model generation system, model generation program, foreign substance detection method, foreign substance detection system, foreign substance detection program, and inference model |
| JP2023573665A JP7424572B1 (ja) | 2023-01-18 | 2023-09-07 | モデル生成方法、モデル生成システム、モデル生成プログラム、異物検出方法、異物検出システム、異物検出プログラム及び推論モデル |
| CN202380091701.8A CN120569753A (zh) | 2023-01-18 | 2023-09-07 | 模型生成方法、模型生成系统、模型生成程序、异物检测方法、异物检测系统、异物检测程序及推论模型 |
| KR1020257026571A KR20250137617A (ko) | 2023-01-18 | 2023-09-07 | 모델 생성 방법, 모델 생성 시스템, 모델 생성 프로그램, 이물 검출 방법, 이물 검출 시스템, 이물 검출 프로그램 및 추론 모델 |
| JP2024001044A JP2024102002A (ja) | 2023-01-18 | 2024-01-09 | モデル生成方法、モデル生成システム、モデル生成プログラム、異物検出方法、異物検出システム、異物検出プログラム及び推論モデル |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2023-006083 | 2023-01-18 | ||
| JP2023006083 | 2023-01-18 | ||
| JP2023080717 | 2023-05-16 | ||
| JP2023-080717 | 2023-05-16 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024154379A1 true WO2024154379A1 (ja) | 2024-07-25 |
Family
ID=91955772
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2023/032684 Ceased WO2024154379A1 (ja) | 2023-01-18 | 2023-09-07 | モデル生成方法、モデル生成システム、モデル生成プログラム、異物検出方法、異物検出システム、異物検出プログラム及び推論モデル |
Country Status (2)
| Country | Link |
|---|---|
| TW (1) | TW202445505A (ja) |
| WO (1) | WO2024154379A1 (ja) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2018225745A1 (ja) * | 2017-06-06 | 2018-12-13 | 株式会社デンソー | 外観検査装置、変換データ生成装置、及びプログラム |
| JP2022062303A (ja) * | 2020-10-08 | 2022-04-20 | 株式会社イシダ | X線検査装置、x線検査プログラム、x線検査方法、物品検査システム |
-
2023
- 2023-09-07 WO PCT/JP2023/032684 patent/WO2024154379A1/ja not_active Ceased
- 2023-10-03 TW TW112137807A patent/TW202445505A/zh unknown
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2018225745A1 (ja) * | 2017-06-06 | 2018-12-13 | 株式会社デンソー | 外観検査装置、変換データ生成装置、及びプログラム |
| JP2018205163A (ja) | 2017-06-06 | 2018-12-27 | 株式会社デンソー | 外観検査装置、変換データ生成装置、及びプログラム |
| JP2022062303A (ja) * | 2020-10-08 | 2022-04-20 | 株式会社イシダ | X線検査装置、x線検査プログラム、x線検査方法、物品検査システム |
Also Published As
| Publication number | Publication date |
|---|---|
| TW202445505A (zh) | 2024-11-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110619618B (zh) | 一种表面缺陷检测方法、装置及电子设备 | |
| WO2020031984A1 (ja) | 部品の検査方法及び検査システム | |
| CN114092386A (zh) | 缺陷检测方法和设备 | |
| CN112823375A (zh) | 使用前向扭曲、间隙鉴别器和基于坐标的修复的图像再合成 | |
| US12217411B2 (en) | Inspection apparatus, unit selection apparatus, inspection method, and computer-readable storage medium storing an inspection program | |
| CN114565594A (zh) | 基于软掩膜对比损失的图像异常检测方法 | |
| CN113129272A (zh) | 一种基于去噪卷积自编码器的缺陷检测方法及装置 | |
| CN112528782A (zh) | 水下鱼类目标检测方法及装置 | |
| CN115830004A (zh) | 表面缺陷检测方法、装置、计算机设备和存储介质 | |
| EP4107662A1 (en) | Out-of-distribution detection of input instances to a model | |
| CN115953347B (zh) | 一种单视角下工业缺陷检测方法及系统 | |
| CN117058450B (zh) | 一种基于自适应掩码重构的异常检测方法及装置 | |
| CN119599956B (zh) | 一种基于深度学习的键合引线缺陷检测方法 | |
| JP2023123387A (ja) | 欠陥検出方法およびシステム | |
| CN113034432B (zh) | 一种产品缺陷检测方法、系统、装置及存储介质 | |
| CN115880176A (zh) | 多尺度非成对水下图像增强方法 | |
| WO2024154379A1 (ja) | モデル生成方法、モデル生成システム、モデル生成プログラム、異物検出方法、異物検出システム、異物検出プログラム及び推論モデル | |
| JP2024102002A (ja) | モデル生成方法、モデル生成システム、モデル生成プログラム、異物検出方法、異物検出システム、異物検出プログラム及び推論モデル | |
| CN113822286A (zh) | 设备视觉检测方法、电子设备、存储介质和程序产品 | |
| Si et al. | Tfr: Texture defect detection with fourier transform using normal reconstructed template of simple autoencoder | |
| CN115428012A (zh) | 图像检查装置、图像检查方法以及学习完毕模型生成装置 | |
| CN118072310A (zh) | 基于多视角语义距离和约束图像重建的无监督异常检测方法 | |
| BAKIR et al. | A Deep Learning-Based Approach for Image Denoising: Harnessing Autoencoders for Removing Gaussian and Salt-Peper Noises | |
| CN116342395A (zh) | 图像修复方法、图像修复装置、电子设备、介质 | |
| CN118072148B (zh) | 一种精密滚珠丝杠副检测系统及其方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| WWE | Wipo information: entry into national phase |
Ref document number: 2023573665 Country of ref document: JP |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23917591 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 2023917591 Country of ref document: EP |
|
| ENP | Entry into the national phase |
Ref document number: 2023917591 Country of ref document: EP Effective date: 20250627 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202380091701.8 Country of ref document: CN |
|
| ENP | Entry into the national phase |
Ref document number: 1020257026571 Country of ref document: KR Free format text: ST27 STATUS EVENT CODE: A-0-1-A10-A15-NAP-PA0105 (AS PROVIDED BY THE NATIONAL OFFICE) |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 1020257026571 Country of ref document: KR |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| WWP | Wipo information: published in national office |
Ref document number: 202380091701.8 Country of ref document: CN |
|
| WWP | Wipo information: published in national office |
Ref document number: 2023917591 Country of ref document: EP |