WO2021261168A1 - 検査装置、ユニット選択装置、検査方法、及び検査プログラム - Google Patents

検査装置、ユニット選択装置、検査方法、及び検査プログラム Download PDF

Info

Publication number
WO2021261168A1
WO2021261168A1 PCT/JP2021/020336 JP2021020336W WO2021261168A1 WO 2021261168 A1 WO2021261168 A1 WO 2021261168A1 JP 2021020336 W JP2021020336 W JP 2021020336W WO 2021261168 A1 WO2021261168 A1 WO 2021261168A1
Authority
WO
WIPO (PCT)
Prior art keywords
estimation model
image
region
target
unit
Prior art date
Application number
PCT/JP2021/020336
Other languages
English (en)
French (fr)
Inventor
真嗣 栗田
左近 山元
友紀 長谷川
雄希 半澤
成典 長江
豊 加藤
Original Assignee
オムロン株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by オムロン株式会社 filed Critical オムロン株式会社
Priority to CN202180035168.4A priority Critical patent/CN115605746A/zh
Priority to DE112021003356.5T priority patent/DE112021003356T5/de
Priority to US17/999,715 priority patent/US20230222645A1/en
Publication of WO2021261168A1 publication Critical patent/WO2021261168A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/72Data preparation, e.g. statistical preprocessing of image or video features
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/7715Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8883Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges involving the calculation of gauges, generating models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]

Definitions

  • the present invention relates to an inspection device, a unit selection device, an inspection method, and an inspection program.
  • Patent Document 1 it is determined whether the inspection target imaged in the image is normal or abnormal based on the first learned neural network, and when it is determined that the inspection target is abnormal, it is determined.
  • An inspection device that classifies the type of the anomaly based on the learned second neural network has been proposed.
  • One of the factors that affect the performance of the estimated model is the quality of the training data used to generate the estimated model.
  • the quality of the training data used to generate the estimated model Basically, the more diverse the training data collected (in other words, the more diverse the situation of defects appearing in the training data), the better the performance of the generated estimation model can be.
  • the number of types of defects and the types of background including the appearance of the product increases, the number and types of samples that are desired to be collected as training data increase due to the combination of the types of defects and the types of backgrounds. Will also increase. Therefore, in the target environment where the inspection is carried out, it is costly and unrealistic to collect the learning data in advance assuming all situations.
  • the present invention has been made in view of such circumstances on one aspect, and an object of the present invention is to provide a technique for improving the accuracy of visual inspection by an estimation model while suppressing the cost of collecting learning data. That is.
  • the present invention adopts the following configuration in order to solve the above-mentioned problems.
  • the inspection device uses a data acquisition unit for acquiring a target image of the target product to be inspected and a first estimation model to obtain a region of interest from the acquired target image.
  • the region extraction unit for extracting, the first estimation model is based on the first training data including a plurality of first training images showing a defect-free product obtained in the target environment in which the inspection is performed.
  • the region extraction unit which is generated so as to acquire the ability to extract the region having a probability of being reflected as the region of interest, and the extraction result of the region of interest for the target image by the first estimation model are used.
  • the second estimation model is a model calculation unit that executes the calculation processing of the second estimation model, and the second estimation model determines the likelihood of defects based on the second training data including a plurality of second training images showing the defects. It is generated so as to acquire the ability to judge, and the arithmetic processing of the second estimation model is performed by executing a plurality of projection processing for projecting to a low-dimensional space on the target image. Including the generation of a plurality of feature maps having different dimensions, the extraction result of the region of interest is integrated into at least one of the plurality of feature maps in the process of arithmetic processing of the second estimation model.
  • the model calculation unit, the determination unit for determining whether or not the target product is defective based on the calculation result of the second estimation model, and the result of determining whether or not the target product is defective. It is provided with an output unit for outputting information indicating the above.
  • the first learning in addition to the second estimation model that has acquired the ability to determine the likelihood of defects, includes a plurality of first training images showing the defect-free product obtained in the target environment in which the inspection is performed.
  • the first estimation model generated based on the data is used for visual inspection.
  • the arithmetic processing of the second estimation model generates a plurality of feature maps having different dimensions by executing a plurality of projection processings each projecting onto a low-dimensional space on the target image. Including that.
  • the extraction result of the region of interest by the first estimation model is integrated into at least one of a plurality of feature maps in the process of arithmetic processing of the second estimation model.
  • Which feature map to integrate the extraction result of the region of interest by the first estimation model can be determined so that the determination accuracy regarding whether or not the target product is defective is as high as possible. Therefore, according to the configuration, it can be expected that the accuracy of the visual inspection by the estimation model will be improved for the products having various appearances.
  • the second estimation model is a encoder that converts an image into a feature amount and a decoder that decodes the image from the feature amount
  • the decoded image is A decoder may be provided that indicates the likelihood of defects on a pixel-by-pixel basis.
  • the codent may include a plurality of code units connected in series from the input side. Each code unit may be configured to transform the input data into a feature map that is lower in dimension than the input data. Executing the plurality of projection processes on the target image may be configured by executing the arithmetic processing of each code unit in order from the input side.
  • the extraction result of the region of interest may be integrated into a feature map generated by at least one of the plurality of code units in the process of arithmetic processing of the second estimation model.
  • the dimension for integrating the extraction results of the region of interest by the first estimation model can be easily changed, and thereby the improvement of the accuracy of the visual inspection by the estimation model can be easily manipulated.
  • the inspection device may further include a selection unit for selecting at least one or more target code units from the plurality of code units. Then, the extraction result of the region of interest may be integrated into a feature map generated by the selected at least one target code unit in the process of arithmetic processing of the second estimation model. According to this configuration, the accuracy of the visual inspection by the estimation model can be optimized by selecting the target code unit.
  • the selection unit acquires an evaluation image of the evaluation product including a predetermined defect, and uses the first estimation model to obtain a region of interest from the acquired evaluation image.
  • Each of the above is performed by repeating the arithmetic processing of the second estimation model using the extraction result of the region of interest for the evaluation image while changing the code unit that is extracted and assumed to be selected as the target code unit. It is tried for each code unit to determine whether or not the evaluation product is defective with respect to the evaluation image when it is assumed that the code unit is selected as the target code unit, and the optimum is based on the result of the trial. Code unit may be selected as the target code unit. According to this configuration, the accuracy of visual inspection by the estimation model can be automatically optimized.
  • the selection unit acquires an evaluation image of the evaluation product including a predetermined defect, and uses the first estimation model to obtain a region of interest from the acquired evaluation image.
  • Each of the above is performed by repeating the arithmetic processing of the second estimation model using the extraction result of the region of interest for the evaluation image while changing the code unit that is extracted and assumed to be selected as the target code unit. It is tried for each code unit to determine whether or not the evaluation product has a defect in the evaluation image when it is assumed that the code unit is selected as the target code unit, and the result of the trial is output to the operator.
  • the selection of the at least one target code unit from the plurality of code units may be accepted as specified by the operator. According to this configuration, the accuracy of the visual inspection by the estimation model can be optimized by the operation.
  • the coder may be composed of a convolutional neural network, and each code unit may be composed of one or a plurality of convolutional layers and a pooling layer. According to this configuration, the second estimation model can be easily implemented.
  • the inspection device may further include a setting unit for setting a parameter value that defines the degree to which the region in which the defect appears is extracted as the region of interest. Then, the region extraction unit may extract the region of interest according to the set value of the parameter. According to this configuration, the degree to which the estimation result of the first estimation model is reflected can be adjusted, whereby the accuracy of the appearance inspection by the estimation model in the target environment can be optimized.
  • the first estimation model may include a encoder that converts an image into a feature amount and a decoder that decodes the image from the feature amount.
  • the region extraction unit uses the encoder and the decoder of the first estimation model to generate a target decoded image for the target image, and the generated target decoded image and the target.
  • the difference area between the images may be calculated.
  • the parameter may include an expansion parameter that defines the extent to which the difference region is expanded. Then, the region extraction unit may acquire the extraction result of the region of interest by expanding the calculated difference region according to the set value of the expansion parameter. According to this configuration, the degree of reflecting the estimation result of the first estimation model can be easily adjusted.
  • the extraction result of the region of interest may be composed of an attention map. According to this configuration, since both the feature map and the attention map are image data, it is possible to easily implement the integration process of the extraction results.
  • the first estimation model acquires the ability to extract a region having a probability of showing the defect as a region of interest by machine learning using the first learning data. It may be generated by training. According to this configuration, the first estimation model can be easily implemented.
  • the second estimation model is generated by being trained to acquire the ability to determine the likelihood of defects by machine learning using the second learning data. May be. According to this configuration, the second estimation model can be easily implemented.
  • one aspect of the present invention may be an information processing method or a program that realizes each of the above configurations, or such a program may be used. It may be a stored storage medium that can be read by a computer or the like.
  • the storage medium that can be read by a computer or the like is a medium that stores information such as a program by electrical, magnetic, optical, mechanical, or chemical action.
  • a computer acquires a target image of a target product to be inspected, and a first estimation model is used to obtain a region of interest from the acquired target image.
  • the first estimation model is based on the first training data including a plurality of first training images of the defect-free product obtained in the target environment in which the inspection is performed.
  • the second estimation model acquires the ability to determine the likelihood of defects based on the second training data including a plurality of second training images showing defects.
  • the arithmetic processing of the second estimation model is performed by executing a plurality of projection processes for projecting to a low-dimensional space on the target image, thereby performing a plurality of projection processes having different dimensions.
  • the inspection program uses a computer to acquire a target image of the target product to be inspected, and the first estimation model is used to obtain the target image.
  • the first estimation model is based on the first training data including a plurality of first training images of the defect-free product obtained in the target environment in which the inspection is performed. It is generated to acquire the ability to extract the region having the probability of being reflected as the region of interest, using the step and the extraction result of the region of interest for the target image by the first estimation model.
  • a step of executing arithmetic processing of the second estimation model wherein the second estimation model has the ability to determine the likelihood of defects based on the second training data including a plurality of second training images showing defects.
  • the arithmetic processing of the second estimation model is generated so as to acquire A step in which the extraction result of the region of interest is integrated into at least one of the plurality of feature maps in the process of arithmetic processing of the second estimation model, which includes generating a plurality of feature maps.
  • the step of determining whether or not the target product is defective and the information indicating the result of determining whether or not the target product is defective are output. It is a program for executing steps.
  • FIG. 1 schematically illustrates an example of a situation in which the present invention is applied.
  • FIG. 2 schematically illustrates an example of the hardware configuration of the model generator according to the embodiment.
  • FIG. 3 schematically illustrates an example of the hardware configuration of the inspection device according to the embodiment.
  • FIG. 4 schematically illustrates an example of the software configuration of the model generator according to the embodiment.
  • FIG. 5 schematically illustrates an example of the software configuration of the inspection device according to the embodiment.
  • FIG. 6 is a flowchart showing an example of a processing procedure for generating a first estimation model by the model generator according to the embodiment.
  • FIG. 7 is a flowchart showing an example of a processing procedure for generating a second estimation model by the model generator according to the embodiment.
  • FIG. 8 is a flowchart showing an example of a processing procedure relating to selection of a target code unit by the inspection device according to the embodiment.
  • FIG. 9 is a flowchart showing an example of a processing procedure related to visual inspection by the inspection apparatus according to the embodiment.
  • FIG. 10 schematically illustrates an example of the second estimation model according to another embodiment.
  • FIG. 11 schematically illustrates an example of the hardware configuration of the unit selection device according to another embodiment.
  • FIG. 12 schematically illustrates an example of the software configuration of the unit selection device according to another embodiment.
  • a first estimation model configured to extract regions with a high probability of defects based on knowledge of the appearance of defect-free products obtained in the target environment, and regardless of the target environment.
  • Two estimation models of the second estimation model configured to determine the presence or absence of defects are used for visual inspection. According to the second estimation model, it is possible to determine whether or not the target product is defective. However, there is a possibility that an error may occur in the judgment using only the second estimation model due to the influence of the condition of the product appearing in the target environment. For example, the appearance pattern of a product resembles a defect pattern, so that the appearance pattern of the product may be mistaken for a defect.
  • the first estimation model is further used for visual inspection.
  • the first estimation model it is possible to preferentially extract an image region that does not appear in a product without defects in the target environment, that is, a region with a high probability of having defects in the target environment. Therefore, by fusing the estimation results of the two estimation models (that is, the range where the defect is detected by the first estimation model is narrowed down, and whether or not the defect exists in the range is determined by the second estimation model).
  • the accuracy of visual inspection can be optimized. That is, by reducing the cost of collecting training data, it is possible to expect an improvement in the accuracy of the visual inspection in the target environment even if the estimation accuracy of at least one of the estimation models is slightly low.
  • the appearance of the product is diverse. For example, if a product has a patterned appearance (wood grain, etc.), it may be easier to determine whether the product has a normal appearance or a defect by referring to a wider range than by narrowing down the judgment range. .. On the other hand, for example, when a product has a simple appearance with a partial design, it may be easier to determine whether the product has a normal appearance or a defect by narrowing the judgment range. Therefore, if the estimation results of the two estimation models are simply fused without considering the appearance of the product, the normal appearance such as the contour and pattern of the product will be mistakenly determined as a defect, and the accuracy of the appearance inspection will be inspected.
  • the extraction result of the region of interest by the first estimation model is integrated into at least one of the plurality of feature maps generated by the second estimation model in the process of arithmetic processing of the second estimation model. It was to be.
  • the present embodiment an embodiment according to one aspect of the present invention (hereinafter, also referred to as “the present embodiment”) will be described with reference to the drawings.
  • the embodiments described below are merely examples of the present invention in all respects. Needless to say, various improvements and modifications can be made without departing from the scope of the present invention. That is, in carrying out the present invention, a specific configuration according to the embodiment may be appropriately adopted.
  • the data appearing in the present embodiment are described in natural language, but more specifically, they are specified in a pseudo language, a command, a parameter, a machine language, etc. that can be recognized by a computer.
  • FIG. 1 schematically illustrates an example of a situation in which the present invention is applied.
  • the visual inspection system 100 includes a model generation device 1 and an inspection device 2.
  • the model generation device 1 is a computer configured to generate a first estimation model 5 and a second estimation model 6 that can be used for visual inspection.
  • the first estimation model 5 describes a region having a probability of showing defects based on the first learning data 30 including a plurality of first learning images showing a defect-free product obtained in the target environment in which the inspection is performed. Generated to acquire the ability to extract as a region of interest.
  • the second estimation model 6 is generated so as to acquire the ability to determine the likelihood of defects based on the second training data 35 including a plurality of second training images showing defects. If each estimation model (5, 6) is generated so that each ability can be acquired based on each training data (30, 35), the generation method of each estimation model (5, 6) is particularly limited.
  • each estimation model (5, 6) may be manually generated based on each training data (30, 35).
  • machine learning is adopted as the generation method of each estimation model (5, 6). This makes it possible to easily implement each estimation model (5, 6).
  • the model generator 1 acquires the first training data 30 including a plurality of non-defective product images 31 in which the defect-free product obtained in the target environment where the inspection is performed is shown.
  • the non-defective image 31 is an example of the first learning image.
  • the model generator 1 extracts a region having a probability of showing a defect (that is, a region including a feature derived from the defect) as a region of interest from a given image by machine learning using the first training data 30.
  • the first estimation model 5 is trained to acquire the ability to do. As a result, the trained first estimation model 5 that has acquired the ability is generated based on the first training data 30.
  • the model generation device 1 acquires the second learning data 35 including a plurality of defect images 371 in which the defects are shown.
  • the defect image 371 is an example of the second learning image.
  • the model generator 1 acquires the ability to determine the likelihood of defects for a given image (for example, an image of a product) by machine learning using the second training data 35. Train 6 As a result, the trained second estimation model 6 that has acquired the ability is generated based on the second training data 35.
  • the inspection device 2 is a computer configured to perform a visual inspection of a product using two generated estimation models (5, 6). Specifically, the inspection device 2 acquires a target image 221 showing the target product R to be inspected.
  • the camera S is appropriately arranged at a position where the target product R can be imaged, and the inspection device 2 is connected to the camera S. The inspection device 2 acquires the target image 221 from the camera S.
  • the inspection device 2 uses the first estimation model 5 to extract a region of interest from the acquired target image 221.
  • the inspection device 2 executes the arithmetic processing of the second estimation model 6 by using the extraction result of the region of interest for the target image 221 by the first estimation model 5.
  • the arithmetic processing of the second estimation model 6 includes generating a plurality of feature maps 63 having different dimensions by executing a plurality of projection processes of projecting onto a low-dimensional space on the target image 221. It is configured as follows. Each projection process is configured to project the input data into a space that is lower in dimension than the input data.
  • the configuration for generating a plurality of feature maps 63 having different dimensions by a plurality of projection processes may be appropriately determined according to the embodiment.
  • the arithmetic processing of the second estimation model 6 may include N (N is an integer of 2 or more) projection processing executed sequentially in series. That is, the first projection process may be configured to project the target image 221 into a low-dimensional space. Then, the second and subsequent projection processes (kth projection process) may be configured to project the result of the previous projection process (k-1st projection process) onto a lower dimensional space. ..
  • the extraction result of the region of interest by the first estimation model 5 is integrated into at least one of the plurality of feature maps 63 in the process of the arithmetic processing of the second estimation model 6.
  • the inspection device 2 determines whether or not the target product R has a defect based on the calculation result of the second estimation model 6. Then, the inspection device 2 outputs information indicating the result of determining whether or not the target product R has a defect.
  • the inspection device 2 according to the present embodiment carries out a visual inspection of the product using each estimation model (5, 6).
  • the present embodiment in addition to the second estimation model 6 that has acquired the ability to determine the likelihood of defects in the visual inspection of the target product R, a plurality of non-defective products obtained in the target environment in which the inspection is performed.
  • the first estimation model 5 generated based on the image 31 is used.
  • the extraction result of the region of interest by the first estimation model 5 is integrated into at least one of a plurality of feature maps 63 having different dimensions in the calculation process of the second estimation model 6.
  • Which feature map to integrate the extraction result of the region of interest by the first estimation model 5 is determined so that the determination accuracy regarding whether or not the target product is defective is as high as possible.
  • Which feature map should be integrated may be determined in advance by the manufacturer of the inspection device 2 through repeated experiments so as to be able to correspond to a certain degree of various appearances of the target product, or it corresponds to the target product having a specific appearance. It may be determined through experiments in the target environment in which the inspection device 2 is used so that a highly accurate defect determination result can be obtained.
  • the arithmetic processing of the second estimation model 6 may be configured so that the dimension for integrating the extraction results of the region of interest by the first estimation model 5 can be changed.
  • the range for determining the likelihood of defects can be adjusted at the dimensional level, and as a result, it can be expected that the integration process appropriate for the appearance of the target product R will be performed. Therefore, according to the present embodiment, it can be expected that the accuracy of the visual inspection by the two estimation models (5, 6) will be improved for the target product R which may have various appearances.
  • the model generation device 1 and the inspection device 2 are connected to each other via a network.
  • the type of network may be appropriately selected from, for example, the Internet, a wireless communication network, a mobile communication network, a telephone network, a dedicated network, and the like.
  • the method of exchanging data between the model generation device 1 and the inspection device 2 does not have to be limited to such an example, and may be appropriately selected depending on the embodiment.
  • data may be exchanged between the model generation device 1 and the inspection device 2 using a storage medium.
  • the model generation device 1 and the inspection device 2 are each configured by a separate computer.
  • the configuration of the visual inspection system 100 according to the present embodiment is not limited to such an example, and may be appropriately determined according to the embodiment.
  • the model generation device 1 and the inspection device 2 may be an integrated computer.
  • at least one of the model generation device 1 and the inspection device 2 may be configured by a plurality of computers.
  • the target product R may be, for example, a product transported on a production line for electronic devices, electronic parts, automobile parts, chemicals, foods, and the like.
  • the electronic component may be, for example, a board, a chip capacitor, a liquid crystal display, a winding of a relay, or the like.
  • Automotive parts may be, for example, connecting rods, shafts, engine blocks, power window switches, panels and the like.
  • the chemical may be, for example, a packaged tablet, an unpackaged tablet, or the like.
  • the target product R may be a final product produced after the completion of the manufacturing process, an intermediate product produced in the middle of the manufacturing process, or an initial product prepared before the manufacturing process. May be.
  • the defect may be, for example, scratches, stains, cracks, dents, burrs, color unevenness, foreign matter contamination, and the like.
  • FIG. 2 schematically illustrates an example of the hardware configuration of the model generation device 1 according to the present embodiment.
  • the control unit 11, the storage unit 12, the communication interface 13, the external interface 14, the input device 15, the output device 16, and the drive 17 are electrically connected. It is a computer that has been used.
  • the communication interface and the external interface are described as "communication I / F" and "external I / F".
  • the control unit 11 includes a CPU (Central Processing Unit), RAM (RandomAccessMemory), ROM (ReadOnlyMemory), etc., which are hardware processors, and is configured to execute information processing based on a program and various data.
  • the storage unit 12 is an example of a memory, and is composed of, for example, a hard disk drive, a solid state drive, or the like. In the present embodiment, the storage unit 12 stores various information such as the model generation program 81, the first learning data 30, the second learning data 35, the first learning result data 121, and the second learning result data 125.
  • the model generation program 81 is a program for causing the model generation device 1 to execute information processing (FIGS. 6 and 7) described later to generate each estimation model (5, 6).
  • the model generation program 81 includes a series of instructions for the information processing.
  • the first training data 30 is used to generate the first estimation model 5.
  • the second training data 35 is used to generate the second estimation model 6.
  • the first learning result data 121 shows information about the generated first estimation model 5.
  • the second training result data 125 shows information about the generated second estimation model 6.
  • each learning result data (121, 125) is generated as a result of executing the model generation program 81. Details will be described later.
  • the communication interface 13 is, for example, a wired LAN (Local Area Network) module, a wireless LAN module, or the like, and is an interface for performing wired or wireless communication via a network.
  • the model generation device 1 can execute data communication via a network with another information processing device by using the communication interface 13.
  • the external interface 14 is, for example, a USB (Universal Serial Bus) port, a dedicated port, or the like, and is an interface for connecting to an external device.
  • the type and number of external interfaces 14 may be arbitrarily selected.
  • the model generator 1 may be connected to a camera for obtaining a learning image via at least one of a communication interface 13 and an external interface 14.
  • the input device 15 is, for example, a device for inputting a mouse, a keyboard, or the like.
  • the output device 16 is, for example, a device for outputting a display, a speaker, or the like. An operator such as a user can operate the model generation device 1 by using the input device 15 and the output device 16.
  • the drive 17 is, for example, a CD drive, a DVD drive, or the like, and is a drive device for reading various information such as a program stored in the storage medium 91.
  • the storage medium 91 performs electrical, magnetic, optical, mechanical or chemical action on the information of the program or the like so that the computer or other device, the machine or the like can read various information of the stored program or the like. It is a medium that accumulates by. At least one of the model generation program 81, the first learning data 30, and the second learning data 35 may be stored in the storage medium 91.
  • the model generation device 1 may acquire at least one of the model generation program 81, the first training data 30, and the second training data 35 from the storage medium 91. Note that FIG.
  • the type of the storage medium 91 is not limited to the disc type, and may be other than the disc type.
  • a storage medium other than the disk type for example, a semiconductor memory such as a flash memory can be mentioned.
  • the type of the drive 17 may be arbitrarily selected according to the type of the storage medium 91.
  • the control unit 11 may include a plurality of hardware processors.
  • the hardware processor may be composed of a microprocessor, FPGA (field-programmable gate array), DSP (digital signal processor), or the like.
  • the storage unit 12 may be composed of a RAM and a ROM included in the control unit 11. At least one of the communication interface 13, the external interface 14, the input device 15, the output device 16, and the drive 17 may be omitted.
  • the model generator 1 may be composed of a plurality of computers. In this case, the hardware configurations of the computers may or may not match. Further, the model generation device 1 may be a general-purpose server device, a PC (Personal Computer), or the like, in addition to an information processing device designed exclusively for the provided service.
  • FIG. 3 schematically illustrates an example of the hardware configuration of the inspection device 2 according to the present embodiment.
  • the control unit 21, the storage unit 22, the communication interface 23, the external interface 24, the input device 25, the output device 26, and the drive 27 are electrically connected. It is a computer.
  • the control units 21 to drive 27 and the storage medium 92 of the inspection device 2 may be configured in the same manner as the control units 11 to drive 17 and the storage medium 91 of the model generation device 1, respectively.
  • the control unit 21 includes a CPU, RAM, ROM, etc., which are hardware processors, and is configured to execute various information processing based on programs and data.
  • the storage unit 22 is composed of, for example, a hard disk drive, a solid state drive, or the like. In the present embodiment, the storage unit 22 stores various information such as the inspection program 82, the first learning result data 121, and the second learning result data 125.
  • the inspection program 82 is a program for causing the inspection device 2 to execute information processing (FIGS. 8 and 9) described later regarding the appearance inspection of the target product R.
  • the inspection program 82 includes a series of instructions for the information processing. At least one of the inspection program 82, the first learning result data 121, and the second learning result data 125 may be stored in the storage medium 92. Further, the inspection device 2 may acquire at least one of the inspection program 82, the first learning result data 121, and the second learning result data 125 from the storage medium 92.
  • the inspection device 2 is connected to the camera S (imaging device) via the external interface 24.
  • the inspection device 2 is configured to be able to acquire the target image 221 from the camera S.
  • the connection method with the camera S does not have to be limited to such an example.
  • the inspection device 2 may be connected to the camera S via the communication interface 23.
  • the type of the camera S may be appropriately selected according to the embodiment.
  • the camera S may be, for example, a general RGB camera, a depth camera, an infrared camera, or the like.
  • the components can be omitted, replaced, or added as appropriate according to the embodiment.
  • the control unit 21 may include a plurality of hardware processors.
  • the hardware processor may be composed of a microprocessor, FPGA, DSP and the like.
  • the storage unit 22 may be composed of a RAM and a ROM included in the control unit 21. At least one of the communication interface 23, the external interface 24, the input device 25, the output device 26, and the drive 27 may be omitted.
  • the inspection device 2 may be composed of a plurality of computers. In this case, the hardware configurations of the computers may or may not match.
  • the inspection device 2 may be a general-purpose server device, a general-purpose PC, a PLC (programmable logic controller), or the like, in addition to an information processing device designed exclusively for the provided service. Further, the inspection device 2 and the camera S may be integrally configured as an image sensor.
  • FIG. 4 schematically illustrates an example of the software configuration of the model generation device 1 according to the present embodiment.
  • the control unit 11 of the model generation device 1 expands the model generation program 81 stored in the storage unit 12 into the RAM. Then, the control unit 11 controls each component by interpreting and executing the instruction included in the model generation program 81 expanded in the RAM by the CPU.
  • the model generation device 1 according to the present embodiment has the first acquisition unit 111, the first learning unit 112, the second acquisition unit 113, the second learning unit 114, and the storage processing unit 115. Operates as a computer equipped as a software module. That is, in this embodiment, each software module of the model generation device 1 is realized by the control unit 11 (CPU).
  • the first acquisition unit 111 acquires the first learning data 30 including a plurality of non-defective product images 31.
  • the first learning unit 112 uses the first learning data 30 to perform machine learning of the first estimation model 5.
  • the second acquisition unit 113 acquires the second learning data 35 including the plurality of defect images 371.
  • the second learning unit 114 uses the second learning data 35 to perform machine learning of the second estimation model 6.
  • the storage processing unit 115 generates information about the trained first estimation model 5 generated by machine learning as the first learning result data 121.
  • the storage processing unit 115 generates information about the trained second estimation model 6 generated by machine learning as the second learning result data 125.
  • the storage processing unit 115 stores each of the generated learning result data (121, 125) in a predetermined storage area.
  • each estimation model is not particularly limited and may be appropriately determined according to the embodiment.
  • the first estimation model 5 may be appropriately configured so that a region having a probability of showing a defect can be extracted as a region of interest.
  • the second estimation model 6 may be appropriately configured so that the likelihood of defects can be determined after generating a plurality of feature maps 63 having different dimensions in a calculation process by a plurality of projection processes.
  • the first estimation model 5 includes a encoder 51 that converts a given image (input image) into a feature amount, and a decoder 53 that decodes an image from the feature amount. It is configured to be prepared.
  • the second estimation model 6 is configured to include a encoder 61 that converts a given image (input image) into a feature amount, and a decoder 65 that decodes the image from the feature amount.
  • the image decoded by the decoder 65 is configured to indicate the likelihood of defects pixel by pixel. That is, each pixel of the decoded image is configured to indicate information about the degree of whether or not the object reflected in each pixel is a defect.
  • the coder 61 includes a plurality of code units 62 connected in series in order from the input side, and each code unit 62 is configured to convert input data into a feature map 63 having a lower dimension than the input data.
  • each estimation model (5, 6) that has acquired each of the above abilities is generated by machine learning. Therefore, for each estimation model (5, 6), a machine learning model having arithmetic parameters adjustable by machine learning is used.
  • the configuration and type of the machine learning model may be appropriately selected according to the embodiment.
  • a neural network is used for each estimation model (5, 6).
  • the encoder 51 and the decoder 53 of the first estimation model 5 are each composed of a fully coupled neural network.
  • the encoder 61 of the second estimation model 6 is configured by a convolutional neural network. According to this configuration, each estimation model (5, 6) can be easily implemented.
  • the encoder 51 and decoder 53 of the first estimation model 5 have an input layer (511, 513), an intermediate (hidden) layer (512, 532), and an output layer (513, 533), respectively. It is equipped with.
  • the encoder 51 and the decoder 53 are composed of three layers, but the number of layers of the encoder 51 and the decoder 53 may be arbitrarily selected.
  • at least one of the encoder 51 and the decoder 53 may include two or more intermediate layers.
  • an image such as the target image 221 is input to the input layer 511 of the encoder 51, and the feature amount calculated from the input image is output from the output layer 513. Further, a feature amount calculated by the encoder 51 is input to the input layer 531 of the decoder 53, and an image (decoded image) decoded from the input feature amount is output from the output layer 533.
  • the input / output formats of the encoder 51 and the decoder 53 are not limited to such an example as long as the estimation process can be executed.
  • each input layer (511, 513) may be configured to further input information other than the above.
  • each output layer (513, 533) may be configured to further output information other than the above.
  • Each layer (511, 512, 513, 513, 532, 533) comprises one or more neurons (nodes).
  • the number of neurons contained in each layer (511, 512, 513, 513, 532, 533) is not particularly limited and may be appropriately selected depending on the embodiment.
  • the input layer (511, 513) may be appropriately determined according to the input data such as the input image and the feature amount and the format thereof.
  • the output layer (513, 533) may be appropriately determined according to the output data such as the feature amount and the estimation result (for example, the decoded image) and the format thereof.
  • each neuron contained in each layer (511, 512, 513, 513, 532, 533) is connected to all neurons in the adjacent layer.
  • the connection relationship of each neuron is not limited to such an example, and may be appropriately determined according to the embodiment.
  • each neuron may be connected to a specific neuron in an adjacent layer or to a neuron in a layer other than the adjacent layer.
  • a weight (bonding load) is set for each bond of each layer (511, 512, 513, 513, 532, 533).
  • a threshold is set for each neuron, and basically, the output of each neuron is determined by whether or not the sum of the products of each input and each weight exceeds the threshold.
  • the threshold value may be expressed by an activation function. In this case, the output of each neuron is determined by inputting the sum of the products of each input and each weight into the activation function and executing the operation of the activation function.
  • the type of activation function may be arbitrarily selected.
  • the weight of the connection between each neuron and the threshold value of each neuron included in each layer (511, 512, 513, 513, 532, 533) are examples of arithmetic parameters used in the arithmetic processing of each of the encoder 51 and the decoder 53. Is.
  • the first learning unit 112 uses each non-defective image 31 as training data and correct answer data. That is, the first learning unit 112 inputs the non-defective image 31 to the input layer 511 of the encoder 51, and executes the arithmetic processing of the forward propagation of the encoder 51 and the decoder 53. As a result of this arithmetic processing, the first learning unit 112 acquires the generated decoded image from the output layer 533 of the decoder 53. The first learning unit 112 calculates an error (reconstruction error) between the acquired decoded image and the input non-defective image 31. The first learning unit 112 repeatedly adjusts the values of the calculation parameters of the encoder 51 and the decoder 53 so that the calculated error becomes smaller for each non-defective image 31. As a result, the trained first estimation model 5 can be generated.
  • the good product image 31 used for machine learning and an image similar thereto that is, a defect-free product (good product) obtained in the target environment in which the inspection is performed.
  • the image showing the appearance of can be reconstructed with high accuracy.
  • the accuracy of reconstruction is lowered. That is, the region where the reconstruction error is large is the region where the defect is likely to appear. Therefore, the first estimation model 5 according to the present embodiment can acquire the ability to extract a region having a probability of showing a defect based on the reconstruction error by the above machine learning.
  • the storage processing unit 115 generates the first learning result data 121 for reproducing the trained first estimation model 5 generated by the machine learning.
  • the configuration of the first learning result data 121 is not particularly limited and may be appropriately determined according to the embodiment.
  • the first learning result data 121 may include information indicating the value of each calculation parameter of the first estimation model 5 obtained by the adjustment of the machine learning.
  • the first learning result data 121 may further include information indicating the structure of the first estimation model 5 (coder 51 and decoder 53).
  • the structure may be specified, for example, by the number of layers from the input layer to the output layer in the neural network, the type of each layer, the number of neurons contained in each layer, the connection relationship between neurons in adjacent layers, and the like.
  • the storage processing unit 115 stores the generated first learning result data 121 in a predetermined storage area.
  • the encoder 61 of the second estimation model 6 includes a plurality of coding units 62.
  • Each code unit 62 is composed of one or more convolutional layers 621 and a pooling layer 623.
  • the convolution layer 621 is configured to perform a convolution operation on a given data.
  • the convolution operation corresponds to a process of calculating the correlation between a given data and a predetermined filter. For example, by convolving an image, it is possible to detect a shading pattern similar to the shading pattern of a filter from an input image.
  • the pooling layer 623 is configured to perform a pooling process. The pooling process discards a part of the information of the position where the response to the filter of the given data is strong, and realizes the invariance of the response to the minute position change of the feature appearing in the data. For example, in the pooling process, the largest value in the filter may be extracted and other values may be deleted.
  • Each code unit 62 according to the present embodiment is configured to convert the input data into a lower-dimensional feature map 63 by such a convolution layer 621 and a pooling layer 623.
  • each code unit 62 may be arbitrarily determined.
  • the coder 61 does not include components other than the code unit 62, and each code unit 62 is connected in series.
  • the convolution layer 621 is arranged on the input side of the pooling layer 623.
  • the convolutional layer 621 of the code unit 62 arranged on the most input side constitutes the input layer of the coder 61
  • the pooling layer 623 of the code unit 62 arranged on the most output side constitutes the output layer of the coder 61. is doing.
  • each code unit 62 comprises a plurality of convolutional layers 621 and a plurality of pooling layers 623
  • the convolutional layers 621 and the pooling layer 623 may be colloquially arranged.
  • one or more pooling layers 623 may be arranged after the plurality of convolutional layers 621 are continuously arranged.
  • the coder 61 may include components other than the code unit 62.
  • the encoder 61 may include other types of layers such as, for example, a normalized layer, a dropout layer, a fully coupled layer, and the like. Other types of layers may be arranged within the code unit 62.
  • the decoder 65 includes an amplifiering layer 651 and a deconvolution layer 653.
  • the amplifiering layer 651 is configured to execute the inverse operation of the pooling process
  • the deconvolution layer 653 is configured to execute the inverse operation of the convolution process.
  • the number of amplifiering layers 651 and deconvolution layers 653 included in the decoder 65 may be arbitrarily determined.
  • the amplifier ring layer 651 and the deconvolution layer 653 are arranged alternately.
  • the amplifier ring layer 651 arranged on the most input side constitutes the input layer of the decoder 65
  • the deconvolution layer 653 arranged on the most output side constitutes the output layer of the decoder 65.
  • the structure of the decoder 65 is not limited to such an example as in the above-mentioned encoder 61.
  • the arrangement and connection relationship of the amplifiering layer 651 and the deconvolution layer 653 may be appropriately determined according to the embodiment.
  • the decoder 65 may include other types of layers other than the amplifiering layer 651 and the deconvolution layer 653.
  • an image such as a target image 221 is input to the input layer of the encoder 61, and a feature amount (feature map) calculated from the input image is output from the output layer. Further, a feature amount calculated by the encoder 61 is input to the input layer of the decoder 65, and an image (determination) showing the estimation result of the likelihood of the defect, which is decoded from the input feature amount, for each pixel. Image) is output from the output layer.
  • the input / output formats of the encoder 61 and the decoder 65 are not limited to such an example as long as the estimation process can be executed.
  • each input layer may be configured to further input information other than the above.
  • Each output layer may be configured to further output information other than the above.
  • the convolution layer 621 is a neuron (node) corresponding to the convolution operation, and is a neuron (node) that connects to a part of the output of the input or the layer placed before (input side) the own layer. I have.
  • the deconvolution layer 653 also comprises neurons corresponding to the deconvolution operation.
  • the number of neurons contained in each layer (621, 653) is not particularly limited and may be appropriately selected depending on the embodiment.
  • each neuron of the convolution layer 621 may be further connected to a neuron of a layer other than the adjacent layer (for example, the corresponding deconvolution layer 653 of the decoder 65), such as U-net.
  • a weight (bonding load) is set for each connection of the convolution layer 621 and the deconvolution layer 653, as in the case of each layer of the first estimation model 5.
  • a threshold is set for each neuron.
  • the threshold value may be expressed by an activation function.
  • the weight of the connection between each neuron included in the convolution layer 621 and the deconvolution layer 653 and the threshold value of each neuron are examples of arithmetic parameters used in the arithmetic processing of the encoder 61 and the decoder 65.
  • the second acquisition unit 113 acquires the second learning data 35 that can be used for machine learning of the second estimation model 6 having such a structure.
  • the second training data 35 is composed of a plurality of training data sets 36.
  • Each training data set 36 is composed of a combination of a training image 37 and a correct answer image 38.
  • the training image 37 is used as training data
  • the correct image 38 is used as correct data.
  • Defect image 371 is used for at least a part of the training image 37. An image without defects may be used as the other part of the training image 37. When a defect appears in the learning image 37, the corresponding correct image 38 is configured to show the range of the defect.
  • the second learning unit 114 uses such second learning data 35 to perform machine learning of the second estimation model 6. Specifically, the second learning unit 114 inputs the training image 37 of each learning data set 36 to the input layer of the encoder 61, and executes the arithmetic processing of the forward propagation of the encoder 61 and the decoder 65. As a result of this arithmetic processing, the second learning unit 114 acquires the generated determination image from the output layer of the decoder 65. The second learning unit 114 calculates an error between the acquired determination image and the corresponding correct answer image 38.
  • the second learning unit 114 repeats adjusting the values of the arithmetic parameters of the encoder 61 and the decoder 65 so that the calculated error becomes smaller for each learning data set 36.
  • the trained second estimation model 6 can be generated.
  • the structure of the correct answer data may be appropriately selected according to the output format of the second estimation model 6.
  • the correct answer data includes information indicating the defect type in addition to the correct answer image 38 or in place of the correct answer image 38. It may be included.
  • the storage processing unit 115 generates the second learning result data 125 for reproducing the trained second estimation model 6 generated by the machine learning.
  • the configuration of the second training result data 125 does not have to be particularly limited as in the first training result data 121, and is appropriately determined according to the embodiment. May be done.
  • the second learning result data 125 may include information indicating the value of each calculation parameter of the second estimation model 6 obtained by the adjustment of the machine learning.
  • the second learning result data 125 may further include information indicating the structure of the second estimation model 6 (coder 61 and decoder 65).
  • the storage processing unit 115 stores the generated second learning result data 125 in a predetermined storage area.
  • FIG. 5 schematically illustrates an example of the software configuration of the inspection device 2 according to the present embodiment.
  • the control unit 21 of the inspection device 2 expands the inspection program 82 stored in the storage unit 22 into the RAM. Then, the control unit 21 controls each component by interpreting and executing the instruction included in the inspection program 82 expanded in the RAM by the CPU.
  • the inspection device 2 according to the present embodiment has a data acquisition unit 211, an area extraction unit 212, a model calculation unit 213, a determination unit 214, an output unit 215, a selection unit 216, and a setting unit. It operates as a computer equipped with 217 as a software module. That is, in the present embodiment, each software module of the inspection device 2 is also realized by the control unit 21 (CPU) in the same manner as the model generation device 1.
  • the data acquisition unit 211 acquires the target image 221 in which the target product R to be inspected is captured.
  • the region extraction unit 212 includes the first estimation model 5 by holding the first learning result data 121.
  • the region extraction unit 212 uses the first estimation model 5 to extract a region of interest from the target image 221.
  • the area extraction unit 212 inputs the target image 221 to the encoder 51, and executes the arithmetic processing of the forward propagation of the encoder 51 and the decoder 53. As a result, the region extraction unit 212 uses the encoder 51 and the decoder 53 to generate the target decoded image 223 for the target image 221.
  • the region extraction unit 212 calculates the difference region between the generated target decoded image 223 and the target image 221, and generates the extracted image 225 based on the calculation result of the difference region.
  • the extracted image 225 is an example of the extraction result of the region of interest.
  • the extracted image 225 may be composed of an attention map showing the degree of probability of being a defect for each pixel. Both the feature map 63 and the attention map are image data. Therefore, by configuring the extraction result of the region of interest with the attention map, it is possible to easily implement the integration process of the extraction result.
  • the model calculation unit 213 includes the second estimation model 6 by holding the second learning result data 125.
  • the model calculation unit 213 executes the calculation process of the second estimation model 6 by using the extraction result of the attention region (that is, the attention region extracted from the target image 221).
  • the arithmetic processing of the second estimation model 6 includes generating a plurality of feature maps 63 having different dimensions by executing a plurality of projection processes of projecting onto a low-dimensional space on the target image 221.
  • the extraction result of the region of interest is integrated into at least one of the plurality of feature maps 63 in the process of arithmetic processing of the second estimation model 6.
  • the model calculation unit 213 inputs the target image 221 to the encoder 61, and executes the arithmetic processing of the forward propagation of the encoder 61 and the decoder 65.
  • executing the projection processing a plurality of times on the target image 221 is configured by executing the arithmetic processing of each code unit 62 in order from the input side.
  • the extraction result of the region of interest is integrated into the feature map 63 generated by at least one of the plurality of code units 62 in the process of arithmetic processing of the second estimation model 6.
  • the model calculation unit 213 may appropriately resize the extracted image 225 so as to match the size of the feature map 63 to be integrated. Then, the model calculation unit 213 may integrate the extraction result of the region of interest into the target feature map 63 by multiplying the resized extracted image 225 by the target feature map 63. If it is not necessary, the resizing process may be omitted.
  • the determination unit 214 determines whether or not the target product R has a defect based on the calculation result of the second estimation model 6.
  • the output unit 215 outputs information indicating the result of determining whether or not the target product R has a defect.
  • the selection unit 216 selects at least one target code unit from the plurality of code units 62.
  • the extraction result of the region of interest may be integrated into the feature map 63 generated by at least one selected target code unit in the process of arithmetic processing of the second estimation model 6.
  • the accuracy of the visual inspection by the two estimation models (5, 6) can be optimized.
  • the evaluation data set 227 composed of the combination of the evaluation image 228 and the correct answer information 229 may be used.
  • the setting unit 217 sets the value of the parameter that defines the degree to which the area where the defect appears is extracted as the area of interest.
  • the area extraction unit 212 may extract the area of interest according to the value of the set parameter. According to this configuration, the degree to which the estimation result of the first estimation model 5 is reflected can be adjusted, thereby optimizing the accuracy of the visual inspection by the two estimation models (5, 6) in the target environment. Can be done.
  • a difference region between the target image 221 and the target decoded image 223 is calculated in order to extract the region of interest. Therefore, the parameter may include an expansion parameter that defines the extent to which this difference region is expanded.
  • the region extraction unit 212 may acquire the extraction result of the region of interest (extracted image 225 in the present embodiment) by expanding the calculated difference region according to the value of the set enlargement parameter.
  • each software module of the model generation device 1 and the inspection device 2 will be described in detail in an operation example described later.
  • an example in which each software module of the model generation device 1 and the inspection device 2 is realized by a general-purpose CPU is described.
  • some or all of the software modules may be implemented by one or more dedicated processors. That is, each of the above modules may be realized as a hardware module.
  • software modules may be omitted, replaced, or added as appropriate according to the embodiment.
  • FIG. 6 is a flowchart showing an example of a processing procedure related to generation (machine learning) of the first estimation model 5 by the model generation device 1 according to the present embodiment.
  • the following processing procedure for generating the first estimation model 5 is only an example, and each step may be changed as much as possible. Further, regarding the following processing procedure for generating the first estimation model 5, it is possible to omit, replace, and add steps as appropriate according to the embodiment.
  • Step S101 the control unit 11 operates as the first acquisition unit 111 to acquire the first learning data 30 including a plurality of non-defective image 31.
  • Each good product image 31 constituting the first learning data 30 may be appropriately generated.
  • a camera S or a camera of the same type is prepared.
  • a product of the same type as the target product R and having no defects is prepared.
  • the prepared product is imaged by a camera.
  • each non-defective product image 31 can be generated.
  • the non-defective image 31 may be an image as it is obtained by the camera.
  • the non-defective image 31 may be generated by applying some image processing to the image obtained by the camera.
  • the first learning data 30 may be automatically generated by the operation of a computer, or may be manually generated by at least partially including an operator's operation. Further, the first training data 30 may be generated by the model generation device 1 or by a computer other than the model generation device 1.
  • the control unit 11 automatically or manually executes the generation process by the operator's operation via the input device 15, so that the first learning data 30 is generated. Get 30.
  • the control unit 11 acquires the first learning data 30 generated by the other computer via, for example, a network, a storage medium 91, or the like.
  • a part of the non-defective image 31 of the first training data 30 may be generated by the model generator 1, and the other non-defective image 31 may be generated by one or a plurality of other computers.
  • the number of good product images 31 constituting the first learning data 30 is not particularly limited and may be appropriately determined according to the embodiment.
  • the first learning data 30 is preferably composed of only a non-defective product image 31, but a part of the first learning data 30 may include an image of a defective product as a learning image.
  • the control unit 11 proceeds to the next step S102.
  • Step S102 the control unit 11 operates as the first learning unit 112, and uses the acquired first learning data 30 to perform machine learning of the first estimation model 5. Through this machine learning, the control unit 11 trains the first estimation model 5 so as to acquire the ability to extract a region having a probability of showing a defect as a region of interest. It should be noted that not all the acquired non-defective image 31 must be used for machine learning of the first estimation model 5. The non-defective image 31 used for machine learning may be appropriately selected.
  • the control unit 11 prepares a neural network constituting the encoder 51 and the decoder 53 of the first estimation model 5 to be processed by machine learning.
  • the structure of each neural network eg, the number of layers, the type of each layer, the number of neurons contained in each layer, the connection relationship between neurons in adjacent layers, etc.
  • the initial value of the connection weight between each neuron may be given by the template or may be given by the input of the operator.
  • the control unit 11 may prepare the encoder 51 and the decoder 53 based on the learning result data obtained by the past machine learning.
  • control unit 11 uses each non-defective image 31 of the first learning data 30 as training data (input data) and correct answer data (teacher signal, label), and executes training processing of the encoder 51 and the decoder 53. do.
  • training data input data
  • correct answer data teacher signal, label
  • a stochastic gradient descent method a mini-batch gradient descent method, or the like may be used.
  • the control unit 11 inputs each non-defective image 31 to the encoder 51, and executes the arithmetic processing of the forward propagation of the encoder 51 and the decoder 53. That is, the control unit 11 inputs each non-defective image 31 to the input layer 511 of the encoder 51, and executes arithmetic processing such as firing determination of neurons included in each layer in order from the input side. As a result of this arithmetic processing, the control unit 11 acquires the decoded image generated corresponding to each non-defective image 31 from the output layer 533 of the decoder 53. The control unit 11 calculates an error between the obtained decoded image and the corresponding non-defective image 31. A loss function may be used to calculate the error (loss). The type of loss function used to calculate the error may be appropriately selected according to the embodiment.
  • control unit 11 calculates the calculated error gradient.
  • the control unit 11 uses the error gradient calculated by the back propagation method to perform each operation parameter of the encoder 51 and the decoder 53 (weight of connection between neurons, threshold value of each neuron, etc.). ) Value error is calculated in order from the output side.
  • the control unit 11 updates the values of the arithmetic parameters of the encoder 51 and the decoder 53 based on the calculated errors.
  • the degree to which the value of each arithmetic parameter is updated may be adjusted by the learning rate.
  • the learning rate may be given by the operator's designation, or may be given as a set value in the program.
  • the control unit 11 adjusts the values of the calculation parameters of the encoder 51 and the decoder 53 so that the sum of the calculated errors for each non-defective image 31 becomes smaller by the series of update processes. For example, until a predetermined condition such as execution for a specified number of times or the sum of calculated errors being equal to or less than a threshold value is satisfied, the control unit 11 performs the operation parameters of the encoder 51 and the decoder 53 by the above series of update processes. The value adjustment may be repeated.
  • the control unit 11 can generate a trained first estimation model 5 that has acquired the ability to extract a region having a probability of showing a defect as a region of interest. Specifically, in this embodiment, a trained first estimation model 5 is generated that has a high ability to reconstruct the appearance of a defect-free product that appears in the target environment and a low ability to reconstruct the rest.
  • the control unit 11 proceeds to the next step S103.
  • Step S103 the control unit 11 operates as the storage processing unit 115, and uses the information about the trained first estimation model 5 (coder 51 and decoder 53) generated by machine learning as the first learning result data 121. Generate. Then, the control unit 11 stores the generated first learning result data 121 in a predetermined storage area.
  • the predetermined storage area may be, for example, a RAM in the control unit 11, a storage unit 12, an external storage device, a storage medium, or a combination thereof.
  • the storage medium may be, for example, a CD, a DVD, or the like, and the control unit 11 may store the first learning result data 121 in the storage medium via the drive 17.
  • the external storage device may be, for example, a data server such as NAS (Network Attached Storage). In this case, the control unit 11 may store the first learning result data 121 in the data server via the network by using the communication interface 13. Further, the external storage device may be, for example, an external storage device connected to the model generation device 1 via the external interface 14.
  • control unit 11 ends the processing procedure related to the generation of the first estimation model 5 according to this operation example.
  • the generated first learning result data 121 may be provided to the inspection device 2 at an arbitrary timing.
  • the control unit 11 may transfer the first learning result data 121 to the inspection device 2 as the process of step S103 or separately from the process of step S103.
  • the inspection device 2 may acquire the first learning result data 121 by receiving this transfer.
  • the inspection device 2 may acquire the first learning result data 121 by accessing the model generation device 1 or the data server via the network by using the communication interface 23.
  • the inspection device 2 may acquire the first learning result data 121 via the storage medium 92.
  • the first learning result data 121 may be incorporated in the inspection device 2 in advance.
  • control unit 11 may update or newly generate the first learning result data 121 by repeating the processes of steps S101 to S103 periodically or irregularly. At the time of this repetition, at least a part of the first learning data 30 used for machine learning may be changed, modified, added, deleted, or the like as appropriate. Then, the control unit 11 updates the first learning result data 121 held by the inspection device 2 by providing the updated or newly generated first learning result data 121 to the inspection device 2 by an arbitrary method. May be good.
  • FIG. 7 is a flowchart showing an example of a processing procedure related to generation (machine learning) of the second estimation model 6 by the model generation device 1 according to the present embodiment.
  • the following processing procedure for generating the second estimation model 6 is only an example, and each step may be changed as much as possible.
  • the following processing procedure for generating the second estimation model 6 can be appropriately omitted, replaced, or added depending on the embodiment.
  • Step S151 the control unit 11 operates as the second acquisition unit 113 and acquires the second learning data 35 including the plurality of defect images 371.
  • the second training data 35 is composed of a plurality of training data sets 36.
  • Each training data set 36 is composed of a combination of a training image 37 and a correct answer image 38.
  • Defect image 371 is used for at least a part of the training image 37.
  • Each training data set 36 constituting the second training data 35 may be appropriately generated. Similar to the first learning data 30, for example, a camera S or a camera of the same type is prepared. Also, prepare a product with defects. Then, the prepared product is imaged by a camera. This makes it possible to generate a defect image 371 that can be used as the training image 37. Only the defective portion may be extracted from the obtained image by image processing. That is, an image showing only defects may be generated as a defect image 371. The defect image 371 may or may not show the appearance of the product. Further, an image without defects may be generated as the learning image 37. The learning image 37 may be appropriately generated by arbitrary image processing. In addition, a learning image 37 without defects may be generated by photographing a product without defects with a camera.
  • the training image 37 may be an image as it is obtained by the camera, or may be generated by applying some image processing to the image obtained by the camera. Further, the correct image 38 showing the range of defects is associated with the generated learning image 37. The correct image 38 may be generated from the learning image 37 according to the format of the determination image. In addition, the correct image 38 may be generated manually by the operator. By these processes, each training data set 36 can be generated.
  • the second learning data 35 may be automatically generated by the operation of the computer, or may be manually generated by at least partially including the operation of the operator. Further, the second training data 35 may be generated by the model generation device 1 or by a computer other than the model generation device 1.
  • the control unit 11 automatically or manually executes the generation process by the operator's operation via the input device 15, so that the second learning data 35 is generated. Get 35.
  • the control unit 11 acquires the second learning data 35 generated by the other computer via, for example, a network, a storage medium 91, or the like.
  • a part of the training data set 36 of the second training data 35 may be generated by the model generator 1, and the other training data set 36 may be generated by one or a plurality of other computers.
  • the number of learning data sets 36 constituting the second learning data 35 is not particularly limited and may be appropriately determined according to the embodiment.
  • the control unit 11 proceeds to the next step S152.
  • Step S152 the control unit 11 operates as the second learning unit 114, and uses the acquired second learning data 35 to perform machine learning of the second estimation model 6. Through this machine learning, the control unit 11 trains the second estimation model 6 to acquire the ability to determine the likelihood of defects with respect to a given image. It should be noted that not all the acquired training data sets 36 must be used for machine learning of the second estimation model 6. The training data set 36 used for machine learning may be selected as appropriate.
  • the control unit 11 prepares a neural network constituting the encoder 61 and the decoder 65 of the second estimation model 6 to be processed by machine learning.
  • the structure of each neural network, the initial value of the weight of the connection between each neuron, and the initial value of the threshold value of each neuron may be given by the template or by the input of the operator.
  • the control unit 11 may prepare the encoder 61 and the decoder 65 based on the learning result data obtained by the past machine learning.
  • control unit 11 uses the training image 37 of each training data set 36 as training data, and uses the correct answer image 38 as correct answer data to execute training processing of the encoder 61 and the decoder 65.
  • a stochastic gradient descent method, a mini-batch gradient descent method, or the like may be used.
  • the control unit 11 inputs the training image 37 of each learning data set 36 to the encoder 61, and executes the arithmetic processing of the forward propagation of the encoder 61 and the decoder 65. That is, the control unit 11 inputs each learning image 37 to the input layer of the encoder 61, and executes arithmetic processing such as firing determination of neurons included in each layer in order from the input side. As a result of this arithmetic processing, the control unit 11 acquires the determination image generated corresponding to each learning image 37 from the output layer of the decoder 65. The control unit 11 calculates an error between the obtained determination image and the corresponding correct answer image 38 for each learning data set 36. Any loss function may be used to calculate the error (loss). For example, the error between the determination image and the correct image 38 may be calculated by IOU (Intersection over Union).
  • control unit 11 calculates the calculated error gradient.
  • the control unit 11 calculates the error of the value of each calculation parameter of the encoder 61 and the decoder 65 in order from the output side by using the gradient of the error calculated by the error back propagation method.
  • the control unit 11 updates the values of the arithmetic parameters of the encoder 61 and the decoder 65 based on the calculated errors. Similar to the first estimation model 5, the degree to which the value of each calculation parameter is updated may be adjusted by the learning rate.
  • the control unit 11 adjusts the values of the calculation parameters of the encoder 61 and the decoder 65 so that the sum of the calculated errors for each learning data set 36 becomes smaller by the series of update processes. Similar to the first estimation model 5, the control unit 11 may repeatedly adjust the values of the arithmetic parameters of the encoder 61 and the decoder 65 by the series of update processes until a predetermined condition is satisfied.
  • control unit 11 can generate a trained second estimation model 6 that has acquired the ability to determine the likelihood of defects with respect to a given image.
  • the control unit 11 proceeds to the next step S153.
  • Step S153 the control unit 11 operates as the storage processing unit 115, and uses the information about the trained second estimation model 6 (coder 61 and decoder 65) generated by machine learning as the second learning result data 125. Generate. Then, the control unit 11 stores the generated second learning result data 125 in a predetermined storage area. Similar to step S103, the predetermined storage area may be, for example, a RAM in the control unit 11, a storage unit 12, an external storage device, a storage medium, or a combination thereof. The storage destination of the second learning result data 125 may be the same as or different from that of the first learning result data 121.
  • the control unit 11 ends the processing procedure related to the generation of the second estimation model 6 according to this operation example.
  • the second learning result data 125 may be provided to the inspection device 2 at an arbitrary timing. Further, the processes of steps S151 to S153 may be repeated periodically or irregularly. At the time of this repetition, at least a part of the second learning data 35 may be changed, modified, added, deleted, or the like as appropriate. Then, even if the second learning result data 125 held by the inspection device 2 is updated by providing the second learning result data 125 updated or newly generated by the repetition to the inspection device 2 by an arbitrary method. good.
  • FIG. 8 is a flowchart showing an example of a processing procedure for selecting a target code unit by the inspection device 2 according to the present embodiment.
  • the control unit 21 operates as the selection unit 216 and executes the following processes of steps S201 to S210.
  • the following processing procedure for selecting the target code unit is only an example, and each step may be changed as much as possible. Further, regarding the following processing procedure for selecting the target code unit, steps can be omitted, replaced, and added as appropriate according to the embodiment.
  • step S201 the control unit 21 acquires an evaluation image 228 showing the evaluation product including a predetermined defect.
  • the control unit 21 acquires an evaluation data set 227 composed of a combination of the evaluation image 228 and the correct answer information 229.
  • the evaluation image 228 may be generated by taking an image of an evaluation product having a predetermined defect with a camera, similarly to the good product image 31, the learning image 37, and the like. Alternatively, the evaluation image 228 may be generated by any image processing.
  • the correct answer information 229 is appropriately configured to indicate the range in which a predetermined defect appears. For example, the correct answer information 229 may be configured in the same manner as the correct answer image 38.
  • the number of evaluation data sets 227 to be acquired may be arbitrarily determined.
  • Step S202 the control unit 21 uses the first estimation model 5 to extract a region of interest from the acquired evaluation image 228.
  • the control unit 21 sets the trained first estimation model 5 with reference to the first learning result data 121.
  • the control unit 21 inputs the evaluation image 228 to the input layer 511 of the encoder 51 of the first estimation model 5, and executes the arithmetic processing of the forward propagation of the encoder 51 and the decoder 53.
  • the control unit 21 acquires the decoded image generated corresponding to the evaluation image 228 from the output layer 533 of the decoder 53.
  • the control unit 21 calculates a difference region between the generated decoded image and the evaluation image 228.
  • the control unit 21 may acquire the calculation result of the difference region as it is as an extracted image (extraction result of the region of interest).
  • the control unit 21 may acquire the extracted image by expanding the calculated difference area according to the value of the set enlargement parameter.
  • the expansion process of the difference region may be configured by, for example, a blurring process (that is, smoothing by a filter), an expansion process, or the like.
  • the magnifying parameter may be configured to specify a filter such as Gaussian.
  • the control unit 21 may acquire the extracted image by smoothing the difference region with the filter specified by the value of the enlargement parameter.
  • the control unit 21 proceeds to the next step S203.
  • step S203 the control unit 21 sets the variable n to 1.
  • the variable n is used to specify the sign unit 62, which is assumed to have been selected as the target sign unit.
  • step S204 the control unit 21 sets the trained second estimation model 6 with reference to the second learning result data 125.
  • the setting of the second estimation model 6 may be executed before the processing of step S203.
  • the control unit 21 inputs the evaluation image 228 to the input layer of the coder 61 of the second estimation model 6 and executes the arithmetic processing of the forward propagation to the nth code unit 62. As a result, the control unit 21 acquires the feature map 63 from the nth code unit 62.
  • step S205 the control unit 21 integrates the extracted image acquired by the process of step S202 into the feature map 63 generated by the nth code unit 62.
  • the method of integrating the extraction results of the region of interest does not have to be particularly limited. It may be appropriately determined according to the form of.
  • the control unit 21 may appropriately resize the extracted image to fit the size of the feature map 63 to be integrated, and multiply the resized extracted image by the feature map 63 of the target. Through these series of processes, the control unit 21 can integrate the extraction result of the region of interest into the target feature map 63. When this integration method is adopted, the control unit 21 inputs the integration result to the next layer.
  • step S206 the control unit 21 executes a forward propagation arithmetic process for the remaining portion of the second estimation model 6 (that is, the components after the nth code unit 62).
  • the control unit 21 acquires the determination image for the evaluation image 228 from the output layer of the decoder 65 as the calculation result of the second estimation model 6.
  • the control unit 21 determines whether or not the evaluation product is defective based on this determination image (calculation result of the second estimation model 6).
  • the control unit 21 attempts to determine whether or not the evaluation product is defective with respect to the evaluation image 228 when it is assumed that the nth code unit is selected as the target code unit. You can get the result.
  • step S207 the control unit 21 evaluates the trial result obtained by the processing up to step S206 by using the correct answer information 229.
  • the control unit 21 highly evaluates the code unit 62, which is assumed to be the target code unit in the trial process, as the determination accuracy (that is, the defect detection accuracy) is higher. As long as it can be evaluated in this way, the evaluation method and scale may be set arbitrarily.
  • the control unit 21 may score the degree of overlap between the correct answer range and the detection range as an evaluation value.
  • the correct answer range is the range in which a predetermined defect indicated by the correct answer information 229 appears.
  • the detection range is a range in which it is determined that a defect is shown (or its likelihood is high) based on the determination image.
  • step S208 the control unit 21 determines the branch destination of the process according to the value of the variable n. If the value of the variable n is not N (2 or more), the control unit 21 proceeds to step S209. N indicates the number of code units 62 included in the coder 61. In step S209, the control unit 21 increments the value of the variable n by 1. Then, the control unit 21 re-executes the process from step S204 based on the value of the new variable n. On the other hand, when the value of the variable n is N, the control unit 21 proceeds to the process in step S210.
  • control unit 21 repeats the processes of steps S204 to S206 while changing the value of the variable n by the loop process.
  • the control unit 21 uses the extraction result of the region of interest for the evaluation image 228 while changing the code unit 62 that is assumed to be selected as the target code unit, and performs arithmetic processing of the second estimation model 6. Can be repeated.
  • the control unit 21 determines whether or not there is a defect in the evaluation product for the evaluation image 228 when it is assumed that each code unit 62 is selected as the target code unit (defect detection). It can be tried for each code unit 62.
  • the trial method is an example.
  • the trial method of defect detection for the evaluation product is not limited to such an example, and may be appropriately changed depending on the embodiment. Further, in the above example, it is assumed that only one of the code units 62 is the target code unit in each trial. However, in each trial, the number of code units 62 that are assumed to be target code units is not limited to such an example, even if two or more code units 62 are each assumed to be target code units. good.
  • Step S210 the control unit 21 selects the optimum code unit 62 as the target code unit based on the result of the trial.
  • the control unit 21 selects the code unit 62 having the highest evaluation (that is, giving the trial result of the most accurate determination) obtained in step S207 as the target code unit.
  • the control unit 21 ends the process related to the selection of the target code unit according to this operation example. According to this process, the accuracy of the visual inspection by the two estimation models (5, 6) can be automatically optimized.
  • FIG. 9 is a flowchart showing an example of a processing procedure related to visual inspection by the inspection device 2 according to the present embodiment.
  • the following processing procedure for visual inspection is an example of an inspection method. However, the following processing procedure for visual inspection is only an example, and each step may be changed as much as possible. Further, regarding the following processing procedures related to visual inspection, steps can be omitted, replaced, and added as appropriate according to the embodiment.
  • Step S301 the control unit 21 acquires the target image 221 on which the target product R to be inspected is captured by the data acquisition unit 211.
  • the control unit 21 directly acquires the target image 221 from the camera S via the external interface 24.
  • the target image 221 may be a moving image or a still image.
  • the route for acquiring the target image 221 does not have to be limited to such an example.
  • the camera S may be connected to another computer. In this case, the control unit 21 may indirectly acquire the target image 221 from the camera S via another computer.
  • the control unit 21 proceeds to the next step S302.
  • Step S302 the control unit 21 operates as the area extraction unit 212 and extracts the region of interest from the target image 221 using the first estimation model 5.
  • the control unit 21 refers to the first learning result data 121 and sets the trained first estimation model 5 in the same manner as in step S202.
  • the control unit 21 inputs the target image 221 to the input layer 511 of the encoder 51 of the first estimation model 5, and executes the arithmetic processing of the forward propagation of the encoder 51 and the decoder 53.
  • the control unit 21 acquires the target decoded image 223 generated corresponding to the target image 221 from the output layer 533 of the decoder 53.
  • the control unit 21 calculates the difference region between the generated target decoded image 223 and the target image 221 and generates the extracted image 225 based on the calculation result of the difference region.
  • the extracted image 225 may be configured as an attention map showing the degree of probability of being a defect for each pixel.
  • the control unit 21 may acquire the calculation result of the difference region as it is as the extracted image 225.
  • the control unit 21 may acquire the extracted image 225 by expanding the calculated difference area according to the value of the set enlargement parameter. According to the form using this expansion parameter, the degree to which the estimation result of the first estimation model 5 is reflected in the visual inspection can be easily adjusted.
  • the enlargement parameter is an example of a parameter (hereinafter, also referred to as an extraction parameter) that defines the degree to which the region where the defect appears is extracted as the extraction region.
  • the timing for setting the parameter values may be arbitrary.
  • control unit 21 may accept the designation of the parameter value via the input device 25 before or during the execution of the process related to the visual inspection according to this operation example.
  • the control unit 21 proceeds to the next step S303.
  • Step S303 the control unit 21 operates as a model calculation unit 213, and uses the extraction result (extracted image 225) of the region of interest for the target image 221 by the first estimation model 5 to perform arithmetic processing of the second estimation model 6. To execute.
  • control unit 21 refers to the second learning result data 125 and sets the trained second estimation model 6.
  • the control unit 21 inputs the target image 221 to the input layer of the coder 61 of the second estimation model 6 and executes forward propagation arithmetic processing up to the code unit 62 selected as the target code unit.
  • the control unit 21 acquires the feature map 63 from the selected code unit 62.
  • the control unit 21 integrates the extracted image 225 into the feature map 63 generated by the selected code unit 62.
  • the integration method may be the same as in step S205.
  • the control unit 21 executes arithmetic processing and integration processing for forward propagation up to the selected code units 62 in order from the input side. Then, the control unit 21 executes the arithmetic processing of the forward propagation of the remaining portion of the second estimation model 6. As a result, the control unit 21 acquires the determination image for the target image 221 from the output layer of the decoder 65 as the calculation result of the second estimation model 6.
  • the control unit 21 executes the arithmetic processing of each code unit 62 of the coder 61 in order from the input side.
  • a plurality of projection processings are executed on the target image 221, and as a result, a plurality of feature maps 63 having different dimensions are generated.
  • the extracted image 225 is integrated into the feature map 63 generated by at least one selected target code unit in the process of arithmetic processing of the second estimation model 6.
  • Step S304 the control unit 21 operates as the determination unit 214, and determines whether or not the target product R has a defect based on the calculation result of the second estimation model 6.
  • Determining whether or not there is a defect is to certify the defect detection by referring to the output (calculation result) of the second estimation model 6.
  • the format of the determination may be appropriately determined according to the output format of the second estimation model 6.
  • determining whether or not there is a defect is determining the presence or absence of a defect, identifying the type of defect, extracting a region where a defect exists (or has a probability thereof), or using a defect. It may consist of estimating a certain likelihood or a combination thereof.
  • the control unit 21 may acquire the determination image as it is as the determination result, or may acquire the determination result by executing some information processing (for example, threshold value determination) on the determination image.
  • some information processing for example, threshold value determination
  • Step S305 the control unit 21 outputs information indicating the result of determining whether or not the target product R has a defect.
  • the output destination and the content of the information to be output may be appropriately determined according to the embodiment.
  • the output destination may be, for example, a RAM in the control unit 21, an output device 26, another computer, or the like.
  • the information indicating the determination result may include information obtained by executing some information processing based on the determination result (for example, a specific message, a control command for the controlled device, etc.).
  • the control unit 21 may output the result of determining whether or not the target product R is defective to the output device 26 or another computer as it is.
  • the control unit 21 may output a warning to notify the defect to the output device 26 or another computer.
  • the control unit 21 determines that the target product R has a defect and the target product R has no defect based on the result of the determination.
  • the conveyor device may be controlled so that it is conveyed on another line.
  • control unit 21 ends the processing procedure related to the visual inspection according to this operation example.
  • the control unit 21 may continuously and repeatedly execute a series of information processing in steps S301 to S305.
  • the timing of repeating may be arbitrary.
  • the target product R may be sequentially replaced by a conveyor device or the like.
  • the inspection device 2 can continuously carry out a visual inspection of the target product R.
  • the second estimation model 6 which has acquired the ability to determine the likelihood of defects in the visual inspection of the target product R in steps S301 to S305, it is specialized for the target environment.
  • the first estimation model 5 is used. By using this first estimation model 5, it can be expected that the accuracy of the visual inspection for the target product R will be improved.
  • the extraction result (extracted image 225) of the region of interest by the first estimation model 5 is obtained by a plurality of feature maps 63 having different dimensions in the calculation process of the second estimation model 6. It will be integrated into at least one of them.
  • the arithmetic processing of the second estimation model 6 is configured so that the dimension for integrating the extraction results of the region of interest by the first estimation model 5 can be changed.
  • the range for determining the likelihood of defects can be adjusted at the dimensional level, and as a result, it can be expected that the integration process appropriate for the appearance of the target product R will be performed.
  • a relatively wide range of references to a product with a patterned appearance, or a relatively narrow range of references to a product with a simple appearance. Can be done. Therefore, according to the present embodiment, it can be expected that the accuracy of the visual inspection by the two estimation models (5, 6) will be improved for the target product R which may have various appearances.
  • a fully coupled neural network is used for the encoder 51 and the decoder 53 of the first estimation model 5.
  • a convolutional neural network is used for the encoder 61 of the second estimation model 6.
  • the type of neural network used for each estimation model (5, 6) is not limited to such an example, and may be appropriately selected depending on the embodiment.
  • a convolutional neural network may be used for the encoder 51 of the first estimation model 5.
  • a neural network is used as a machine learning model in each estimation model (5, 6).
  • the type of machine learning model used for each estimation model (5, 6) is not limited to the neural network, and may be appropriately selected depending on the embodiment.
  • the machine learning method may be appropriately selected depending on the type of machine learning model.
  • the encoder 51 and the decoder 53 of the first estimation model 5 may be configured by an orthogonal projection matrix using an eigenvector derived by principal component analysis.
  • the machine learning of the first estimation model 5 may include performing principal component analysis.
  • each estimation model (5, 6) is generated by machine learning.
  • the method of generating each estimation model (5, 6) is not limited to such an example, and may be appropriately determined according to the embodiment.
  • each estimation model (5, 6) may be manually generated by rule base.
  • each estimation model (5, 6) may be configured by known image processing such as feature extraction.
  • Each code unit 62 may be configured to appropriately include a projection process such as a pooling process and a reduction process to reduce the dimension.
  • the first estimation model 5 may be configured to extract a region of interest with a high probability of defect by a method other than a method based on a reconstruction error, for example, by a method such as JP-A-2010-203845.
  • each code unit 62 is connected in series.
  • the arrangement of the code unit 62 does not have to be limited to such an example. At least some of the code units 62 may be arranged in parallel as long as a plurality of feature maps 63 having different dimensions can be generated. In the extreme, all sign units 62 may be arranged in parallel.
  • FIG. 10 schematically illustrates an example of the second estimation model 6A according to this modification.
  • the second estimation model 6A according to this modification is configured to execute at least a part of a plurality of projection processes in parallel by including three detection units arranged in parallel.
  • the first detection unit includes a first reduction unit 661, one or more feature extraction units 671 and a detection unit 681 in order from the input side.
  • the second detection unit includes a second reduction unit 662, one or more feature extraction units 672, and a detection unit 682 in order from the input side.
  • the third detection unit includes one or more feature extraction units 673 and detection units 683 in order from the input side.
  • the first reduction unit 661 and the second reduction unit 662 are configured to reduce the size of the input image (that is, lower the dimension of the input image).
  • a method of reducing the size of the input image for example, a method of thinning out the pixels in the image (for example, pooling processing), an average pixel method, or the like may be adopted.
  • the arithmetic processing of each reduction unit (661, 662) is an example of projection processing that projects onto a low-dimensional space.
  • the first reduction unit 661 and the second reduction unit 662 are configured to generate images of different sizes.
  • the first reduction unit 661 may be configured to reduce the size of the input image to 1/2
  • the second reduction unit 662 may be configured to reduce the size of the input image to 1/4. ..
  • Each feature extraction unit 671 to 673 is configured to extract the features of the image.
  • the process of extracting the features of the image may be configured by known filtering such as a Sobel filter and a Laplacian filter.
  • the number of each feature extraction unit 671 to 673 may be appropriately determined according to the embodiment.
  • each one or more feature extraction units 671 to 673 may be configured to extract the features of the defect and exclude the other features (that is, to extract the candidate region of the defect).
  • Each detection unit 681 to 683 is configured to detect a defect region based on the characteristics of the image obtained by each feature extraction unit 671 to 673. As an example, when each feature extraction unit 671 to 673 is configured to extract a defect candidate region, each detection unit 681 to 683 detects a candidate region whose size exceeds the threshold value among the extracted candidate regions. It may be configured to be detected as an area.
  • the result of defect detection can be obtained from a plurality of images having different dimensions.
  • the reduced image generated by each reduced unit (661, 662) and the image output from each feature extraction unit 671 to 673 are examples of the feature map.
  • the extracted image 225 obtained by the first estimation model 5 may be integrated into at least one of the images (feature map).
  • the extraction image 225 may be integrated with the target image 221 and then the arithmetic processing of the feature extraction unit 673 may be executed.
  • the integrated process may be configured by an image integration process.
  • the selection unit 216 of the inspection device 2 may be configured to enable or disable the integration process for each candidate image.
  • the second estimation model 6A further includes an integrated determination unit 69 configured to integrate the defect detection results of the three detection units and determine the presence or absence of the defect based on the results.
  • the integration determination unit 69 superimposes the defect regions detected by each of the detection units 681 to 683 so as to match the size of the image, and based on the result of the superimposition, the final presence / absence and position of the defect. May be configured to determine.
  • the superposition of defective regions may be configured by, for example, an AND operation (extracting only the overlapping portion), an OR operation (adding the areas), and the like.
  • the second estimation model 6A is configured to output the finally obtained defect determination result.
  • the second estimation model 6A may be configured to output the determination result of the integrated determination unit 69 as it is.
  • the defect enhancement unit non-deficiency
  • the defect enhancing portion may adjust the brightness value of each pixel of the target image 221 so that the contrast in the peripheral region of the detected defect becomes high and the contrast in the region other than the peripheral region of the defect becomes low.
  • the second estimation model 6A may be configured to output a defect-enhanced image obtained by the defect-enhanced portion.
  • the number of detection units arranged in parallel is not limited to three, and may be two or four or more. May be good. Further, in each detection unit, the process of reducing the size of the image may be executed a plurality of times. That is, the detection unit may include a plurality of reduction portions.
  • a process that does not involve dimension reduction (for example, a simple filtering process) is executed, or the numbers for dimension reduction are the same when the feature maps are generated in parallel.
  • Some dimensions of the plurality of feature maps 63 generated in the second estimation model 6 may match.
  • the target feature map 63 that integrates the extraction results of the region of interest by the first estimation model 5 may be changed to another feature map 63 having the same dimension. This makes it possible to change the feature amount that integrates the extraction results of the region of interest by the first estimation model 5.
  • each estimation model (5, 6) may be appropriately determined according to the embodiment.
  • the second estimation model 6 may include a determination device instead of the decoder 65.
  • the determination device may be configured to determine whether or not there is a defect from the feature amount obtained by the encoder 61.
  • each learning data set 36 of the second learning data 35 used for machine learning may be configured to include correct answer information indicating whether or not there is a defect, instead of the correct answer image 38.
  • the model generation device 1 can appropriately train the second estimation model 6 by using such second training data 35 in step S152.
  • each estimation model (5, 6) may be generated by a separate computer.
  • the first estimation model 5 may be generated based on the first training data 30 obtained in one field.
  • the second estimation model 6 may be generated based on the second learning data 35 collected from each of the plurality of sites.
  • the extraction parameter is not limited to the expansion parameter.
  • the inspection device 2 may generate a difference image by calculating the difference between the target decoded image 223 and the target image 221. Subsequently, the inspection device 2 may binarize each pixel of the difference image based on the threshold value (binarization threshold value). Then, the inspection device 2 may delete a group of pixels whose area is equal to or less than a threshold value (area threshold value) among the group of pixels indicating that a defect exists due to binarization. By this series of processing, the inspection device 2 may calculate the difference region between the target decoded image 223 and the target image 221. In this case, the extraction parameter may include at least one of the binarization threshold and the area threshold. In the above embodiment, the process of setting the value of the parameter may be omitted. In this case, the setting unit 217 may be omitted from the software configuration of the inspection device 2.
  • the optimum target code unit for the target environment can be automatically selected by the processes of steps S201 to S210.
  • the method of selecting the target code unit does not have to be limited to such an example.
  • the control unit 21 may select at least one target code unit from the plurality of code units 62 by any method.
  • the control unit 21 may omit the process of step S207 among the processes of steps S201 to S210.
  • the control unit 21 may output the result of the trial in step S206 to the operator instead of the process of step S210.
  • the output destination may be arbitrarily selected.
  • the control unit 21 may accept the selection of at least one target code unit from the plurality of code units 62 specified by the operator.
  • control unit 21 may output a list of determination images obtained by each trial to the output device 26.
  • the control unit 21 may accept selection of at least one target code unit from the plurality of code units 62 by designating an appropriate determination image via the input device 25 by the operator.
  • the processes of steps S201 to S206, steps S208 and S209 may be executed in the same manner as in the above embodiment. According to this process, the accuracy of the visual inspection by the two estimation models (5, 6) can be optimized by the operation.
  • the control unit 21 may omit the series of processes of steps S201 to S210 and simply accept the selection of the target code unit by the operator's designation. In the above embodiment, a series of processes for selecting the target code unit may be omitted. In this case, the selection unit 216 may be omitted from the software configuration of the inspection device 2.
  • the extraction result of the region of interest can be integrated into the target feature map 63.
  • the integration method does not have to be limited to such an example.
  • the target feature map 63 and the extracted image may be input to different nodes in the layer next to the layer obtained from the target feature map 63, respectively.
  • the extraction result of the region of interest can be integrated into the target feature map 63 by the arithmetic processing of the next layer.
  • the control unit 11 may input the extracted image obtained for the training image 37 by the trained first estimation model 5 into the target layer. ..
  • the process of selecting the target code unit may be executed by a computer other than the inspection device 2.
  • FIG. 11 schematically illustrates an example of the hardware configuration of the unit selection device 7 according to this modification.
  • the control unit 71, the storage unit 72, the communication interface 73, the external interface 74, the input device 75, the output device 76, and the drive 77 are electrically connected. It is a computer that has been used.
  • the control unit 71 to the drive 77 and the storage medium 97 may be configured in the same manner as the control unit 21 to the drive 27 and the storage medium 92 of the inspection device 2, respectively.
  • the storage unit 72 stores various information such as the selection program 87, the first learning result data 121, and the second learning result data 125.
  • the selection program 87 is a program for causing the unit selection device 7 to execute information processing related to the selection process of the target code unit.
  • the selection program 87 includes a series of instructions for the information processing. At least one of the selection program 87, the first learning result data 121, and the second learning result data 125 may be stored in the storage medium 97. Further, the unit selection device 7 may acquire at least one of the selection program 87, the first learning result data 121, and the second learning result data 125 from the storage medium 92.
  • the unit selection device 7 may be composed of a plurality of computers. In this case, the hardware configurations of the computers may or may not match. Further, the unit selection device 7 may be a general-purpose server device, a general-purpose PC, a PLC, or the like, in addition to an information processing device designed exclusively for the provided service.
  • FIG. 12 schematically illustrates an example of the software configuration of the unit selection device 7 according to this modification.
  • the software configuration of the unit selection device 7 is realized by executing the selection program 87 by the control unit 71.
  • the unit selection device 7 according to this modification operates as a computer including the model acquisition unit 219 and the selection unit 216 as software modules.
  • a part or all of the software module may be realized by one or more dedicated processors. That is, each of the above modules may be realized as a hardware module.
  • software modules may be omitted, replaced, or added as appropriate according to the embodiment.
  • the control unit 71 operates as a model acquisition unit 219 and acquires each learning result data (121, 125) by an arbitrary method. As a result, the control unit 71 acquires each estimation model (5, 6) that is the target of the process of selecting the target code unit. Next, the control unit 71 operates as the selection unit 216 and selects at least one target code unit from the plurality of code units 62. Any of the above methods may be adopted as the method for selecting the target code unit.
  • the result of selecting the target code unit may be reflected in any method for the inspection device that performs the visual inspection of the target product R in the target environment.
  • the control unit 71 may operate as an output unit and notify the inspection device of the selection result of the target code unit via a network or the like.
  • the inspection device may reflect the result of selecting the target code unit in response to the reception of this notification.
  • the control unit 71 may output the selection result of the target code unit to the output device 76 or the output device of another computer.
  • the operator may reflect the result of selecting the target code unit in the inspection device by referring to this output and operating the inspection device. According to the modification, the load on the inspection device can be reduced.
  • Model generator 11 ... control unit, 12 ... storage unit, 13 ... communication interface, 14 ... External interface, 15 ... Input device, 16 ... Output device, 17 ... Drive, 81 ... model generation program, 91 ... storage medium, 111 ... 1st acquisition unit, 112 ... 1st learning unit, 113 ... 2nd acquisition department, 114 ... 2nd learning department, 115 ... Preservation processing unit, 121 ... 1st learning result data, 125 ... 2nd learning result data, 2 ... Inspection device, 21 ... Control unit, 22 ... Storage unit, 23 ... Communication interface, 24 ... External interface, 25 ... Input device, 26 ... Output device, 27 ... Drive, 82 ... Inspection program, 92 ...
  • Storage medium 211 ... Data acquisition unit, 212 ... Area extraction unit, 213 ... Model calculation unit, 214 ... Judgment unit, 215 ... Output unit, 216 ... Selection unit, 217 ... Setting unit, 221 ... Target image, 223 ... Target decoded image, 225 ... Extracted image, 227 ... Evaluation data set, 228 ... Evaluation image, 229 ... Correct answer information, 30 ... 1st learning data, 31 ... Good image, 35 ... 2nd training data, 36 ... training data set, 37 ... learning image, 371 ... defective image, 38 ... Correct image, 5 ... 1st estimation model, 51 ... encoder, 53 ... decoder, 6 ... Second estimation model, 61 ... Coder, 62 ... Code unit, 621 ... Convolution layer, 623 ... Pooling layer, 65 ... Decoder, 651 ... Ampouling layer, 653 ... Deconvolution layer

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

本発明の一側面に係る検査装置は、第1推定モデルを使用して、対象画像から注目領域を抽出し、注目領域の抽出結果を使用して、第2推定モデルの演算処理を実行し、かつ第2推定モデルの演算結果に基づいて、対象製品に欠陥があるか否かを判定する。第1推定モデルは、対象環境における欠陥のない製品の写る複数の第1学習画像に基づいて生成されたものであり、第2推定モデルは、欠陥の写る複数の第2学習画像に基づいて生成されたものである。第2推定モデルの演算処理は、それぞれ低次元の空間に射影することで、次元の異なる複数の特徴マップを生成することを含み、注目領域の抽出結果は、第2推定モデルの演算処理の過程において、複数の特徴マップのうちの少なくともいずれか1つに統合される。

Description

検査装置、ユニット選択装置、検査方法、及び検査プログラム
 本発明は、検査装置、ユニット選択装置、検査方法、及び検査プログラムに関する。
 従来、製造ライン等の製品を製造する場面において、製造される製品を画像センサにより観測し、得られた撮影画像により製品に欠陥があるか否かを検査する技術が利用されている。例えば、特許文献1では、学習済みの第1のニューラルネットワークに基づいて画像に写る検査対象物が正常であるか異常であるかを判定し、検査対象物が異常であると判定した場合に、学習済みの第2のニューラルネットワークに基づいて当該異常の種類を分類する検査装置が提案されている。
特開2012-026982号公報
 ニューラルネットワーク等の機械学習モデルを利用すれば、学習データを使用した機械学習を実施することで、所望の推定タスクを遂行する能力を獲得した推定モデルを生成することができる。そのため、欠陥の有無が特定された製品の画像を学習データとして使用して機械学習を実施することで、製品の外観検査に利用可能な推定モデルを生成することができる(例えば、上記特許文献1)。なお、このような推定モデルは、機械学習を用いる方法に限られず、例えば、人手による方法等の他の方法でも生成することができる。しかしながら、本件発明者らは、この学習データに基づいて生成される推定モデルを用いた検査方法には、次のような問題点があることを見出した。
 推定モデルの性能(すなわち、外観検査の精度)に影響を与える要因の一つに、推定モデルの生成に使用される学習データの質が挙げられる。基本的には、収集される学習データが多岐にわたるほど(換言すると、学習データに表れる欠陥の状況が多様であるほど)、生成される推定モデルの性能の向上を図ることができる。しかしながら、欠陥の種類、及び製品の外観を含む背景の種別が多くなればなるほど、欠陥の種別及び背景の種別の組み合わせが増加し、学習データとして収集されることが所望されるサンプルの件数及び種類も増加する。そのため、検査を実施する対象環境において、あらゆる状況を想定した上で学習データを事前に収集するのにはコストがかかり、現実的ではないという問題点があった。
 本発明は、一側面では、このような事情を鑑みてなされたものであり、その目的は、学習データを収集するコストを抑えながら、推定モデルによる外観検査の精度の向上を図る技術を提供することである。
 本発明は、上述した課題を解決するために、以下の構成を採用する。
 すなわち、本発明の一側面に係る検査装置は、検査を実施する対象製品の写る対象画像を取得するデータ取得部と、第1推定モデルを使用して、取得された前記対象画像から注目領域を抽出する領域抽出部であって、前記第1推定モデルは、検査を実施する対象環境において得られた欠陥のない製品の写る複数の第1学習画像を含む第1学習データに基づいて、欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得するように生成されたものである、領域抽出部と、前記第1推定モデルによる前記対象画像に対する前記注目領域の抽出結果を使用して、第2推定モデルの演算処理を実行するモデル演算部であって、前記第2推定モデルは、欠陥の写る複数の第2学習画像を含む第2学習データに基づいて、欠陥の尤度を判定する能力を獲得するように生成されたものであり、前記第2推定モデルの演算処理は、それぞれ低次元の空間に射影する複数回の射影処理を前記対象画像に対して実行することで、次元の異なる複数の特徴マップを生成することを含み、前記注目領域の抽出結果は、前記第2推定モデルの演算処理の過程において、前記複数の特徴マップのうちの少なくともいずれか1つに統合される、モデル演算部と、前記第2推定モデルの演算結果に基づいて、前記対象製品に欠陥があるか否かを判定する判定部と、前記対象製品に欠陥があるか否かを判定した結果を示す情報を出力する出力部と、を備える。
 当該構成では、欠陥の尤度を判定する能力を獲得した第2推定モデルの他に、検査を実施する対象環境において得られた欠陥のない製品の写る複数の第1学習画像を含む第1学習データに基づいて生成された第1推定モデルを外観検査に使用する。この対象環境に特化型の第1推定モデルの使用により、対象環境における外観検査の精度の向上を見込むことができる。加えて、当該構成では、第2推定モデルの演算処理は、それぞれ低次元の空間に射影する複数回の射影処理を対象画像に対して実行することで、次元の異なる複数の特徴マップを生成することを含む。第1推定モデルによる注目領域の抽出結果は、第2推定モデルの演算処理の過程において、複数の特徴マップのうちの少なくともいずれか1つに統合される。第1推定モデルによる注目領域の抽出結果をどの特徴マップに統合するかは、対象製品に欠陥があるか否かについての判定精度がなるべく高くなるように決定することができる。したがって、当該構成によれば、多様な外観を有し得る製品に対して、推定モデルによる外観検査の精度の向上を期待することができる。
 上記一側面に係る検査装置において、前記第2推定モデルは、画像を特徴量に変換する符号器、及び前記特徴量から前記画像を復号化する復号器であって、復号化された前記画像は欠陥の尤度を画素毎に示す、復号器を備えてよい。前記符号器は、入力側から順に直列に接続される複数の符号ユニットを含んでよい。前記各符号ユニットは、入力データよりも次元の低い特徴マップに入力データを変換するように構成されてよい。前記複数回の射影処理を前記対象画像に対して実行することは、入力側から順に前記各符号ユニットの演算処理を実行することにより構成されてよい。そして、前記注目領域の抽出結果は、前記第2推定モデルの演算処理の過程において、前記複数の符号ユニットのうちの少なくとも1つにより生成される特徴マップに統合されてよい。当該構成によれば、第1推定モデルによる注目領域の抽出結果を統合する次元を容易に変更することができ、これにより、推定モデルによる外観検査の精度の向上を容易に操作することができる。
 上記一側面に係る検査装置は、前記複数の符号ユニットの中から少なくとも1つ以上の対象符号ユニットを選択する選択部を更に備えてもよい。そして、前記注目領域の抽出結果は、前記第2推定モデルの演算処理の過程において、選択された前記少なくとも1つ以上の対象符号ユニットにより生成される特徴マップに統合されてよい。当該構成によれば、対象符号ユニットの選択により、推定モデルによる外観検査の精度を最適化することができる。
 上記一側面に係る検査装置において、前記選択部は、所定の欠陥を含む評価用製品の写る評価画像を取得し、前記第1推定モデルを使用して、取得された前記評価画像から注目領域を抽出し、前記対象符号ユニットとして選択されたと仮定する符号ユニットを変更しながら、前記評価画像に対する前記注目領域の抽出結果を使用して、前記第2推定モデルの演算処理を繰り返すことにより、前記各符号ユニットを前記対象符号ユニットとして選択したと仮定したときの前記評価画像に対する前記評価用製品に欠陥があるか否かの判定を符号ユニット毎に試行し、かつ前記試行の結果に基づいて、最適な符号ユニットを前記対象符号ユニットとして選択してもよい。当該構成によれば、推定モデルによる外観検査の精度を自動的に最適化することができる。
 上記一側面に係る検査装置において、前記選択部は、所定の欠陥を含む評価用製品の写る評価画像を取得し、前記第1推定モデルを使用して、取得された前記評価画像から注目領域を抽出し、前記対象符号ユニットとして選択されたと仮定する符号ユニットを変更しながら、前記評価画像に対する前記注目領域の抽出結果を使用して、前記第2推定モデルの演算処理を繰り返すことにより、前記各符号ユニットを前記対象符号ユニットとして選択したと仮定したときの前記評価画像に対する前記評価用製品に欠陥があるか否かの判定を符号ユニット毎に試行し、前記試行の結果をオペレータに対して出力し、かつ前記オペレータの指定による、前記複数の符号ユニットの中からの前記少なくとも1つの対象符号ユニットの選択を受け付けてもよい。当該構成によれば、推定モデルによる外観検査の精度をオペレーションにより最適化することができる。
 上記一側面に係る検査装置において、前記符号器は、畳み込みニューラルネットワークにより構成されてよく、前記各符号ユニットは、1又は複数の畳み込み層及びプーリング層により構成されてよい。当該構成によれば、第2推定モデルを容易に実装することができる。
 上記一側面に係る検査装置は、前記欠陥の写る領域を注目領域として抽出する程度を規定するパラメータの値を設定する設定部を更に備えてよい。そして、前記領域抽出部は、設定された前記パラメータの値に応じて、前記注目領域を抽出してもよい。当該構成によれば、第1推定モデルの推定結果を反映する程度を調整することができ、これにより、対象環境における推定モデルによる外観検査の精度を最適化することができる。
 上記一側面に係る検査装置において、前記第1推定モデルは、画像を特徴量に変換する符号器、及び前記特徴量から前記画像を復号化する復号器を備えてよい。前記領域抽出部は、前記第1推定モデルの前記符号器及び前記復号器を使用して、前記対象画像に対して対象復号化画像を生成し、かつ生成された前記対象復号化画像及び前記対象画像の間の差分領域を算出してもよい。前記パラメータは、前記差分領域を拡げる程度を規定する拡大パラメータを含んでもよい。そして、前記領域抽出部は、設定された前記拡大パラメータの値に応じて、算出された前記差分領域を拡げることで、前記注目領域の抽出結果を取得してもよい。当該構成によれば、第1推定モデルの推定結果を反映する程度を容易に調整することができる。
 上記一側面に係る検査装置において、前記注目領域の抽出結果は、アテンションマップにより構成されてよい。当該構成によれば、特徴マップ及びアテンションマップは共に画像データであるため、抽出結果の統合処理を容易に実装することができる。
 上記一側面に係る検査装置において、前記第1推定モデルは、前記第1学習データを使用した機械学習により、前記欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得するように訓練されることで生成されたものであってよい。当該構成によれば、第1推定モデルを容易に実装することができる。
 上記一側面に係る検査装置において、前記第2推定モデルは、前記第2学習データを使用した機械学習により、欠陥の尤度を判定する能力を獲得するように訓練されることで生成されたものであってよい。当該構成によれば、第2推定モデルを容易に実装することができる。
 上記各形態に係る検査装置の別の態様として、本発明の一側面は、以上の各構成を実現する情報処理方法であってもよいし、プログラムであってもよいし、このようなプログラムを記憶した、コンピュータ等が読み取り可能な記憶媒体であってもよい。ここで、コンピュータ等が読み取り可能な記憶媒体とは、プログラム等の情報を、電気的、磁気的、光学的、機械的、又は、化学的作用によって蓄積する媒体である。
 例えば、本発明の一側面に係る検査方法は、コンピュータが、検査を実施する対象製品の写る対象画像を取得するステップと、第1推定モデルを使用して、取得された前記対象画像から注目領域を抽出するステップであって、前記第1推定モデルは、検査を実施する対象環境において得られた欠陥のない製品の写る複数の第1学習画像を含む第1学習データに基づいて、欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得するように生成されたものである、ステップと、前記第1推定モデルによる前記対象画像に対する前記注目領域の抽出結果を使用して、第2推定モデルの演算処理を実行するステップであって、前記第2推定モデルは、欠陥の写る複数の第2学習画像を含む第2学習データに基づいて、欠陥の尤度を判定する能力を獲得するように生成されたものであり、前記第2推定モデルの演算処理は、それぞれ低次元の空間に射影する複数回の射影処理を前記対象画像に対して実行することで、次元の異なる複数の特徴マップを生成することを含み、前記注目領域の抽出結果は、前記第2推定モデルの演算処理の過程において、前記複数の特徴マップのうちの少なくともいずれか1つに統合される、ステップと、前記第2推定モデルの演算結果に基づいて、前記対象製品に欠陥があるか否かを判定するステップと、前記対象製品に欠陥があるか否かを判定した結果を示す情報を出力するステップと、を実行する、情報処理方法である。
 また、例えば、本発明の一側面に係る検査プログラムは、コンピュータに、検査を実施する対象製品の写る対象画像を取得するステップと、第1推定モデルを使用して、取得された前記対象画像から注目領域を抽出するステップであって、前記第1推定モデルは、検査を実施する対象環境において得られた欠陥のない製品の写る複数の第1学習画像を含む第1学習データに基づいて、欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得するように生成されたものである、ステップと、前記第1推定モデルによる前記対象画像に対する前記注目領域の抽出結果を使用して、第2推定モデルの演算処理を実行するステップであって、前記第2推定モデルは、欠陥の写る複数の第2学習画像を含む第2学習データに基づいて、欠陥の尤度を判定する能力を獲得するように生成されたものであり、前記第2推定モデルの演算処理は、それぞれ低次元の空間に射影する複数回の射影処理を前記対象画像に対して実行することで、次元の異なる複数の特徴マップを生成することを含み、前記注目領域の抽出結果は、前記第2推定モデルの演算処理の過程において、前記複数の特徴マップのうちの少なくともいずれか1つに統合される、ステップと、前記第2推定モデルの演算結果に基づいて、前記対象製品に欠陥があるか否かを判定するステップと、前記対象製品に欠陥があるか否かを判定した結果を示す情報を出力するステップと、を実行させるための、プログラムである。
 本発明によれば、推定モデルによる外観検査の精度の向上を図ることができる。
図1は、本発明が適用される場面の一例を模式的に例示する。 図2は、実施の形態に係るモデル生成装置のハードウェア構成の一例を模式的に例示する。 図3は、実施の形態に係る検査装置のハードウェア構成の一例を模式的に例示する。 図4は、実施の形態に係るモデル生成装置のソフトウェア構成の一例を模式的に例示する。 図5は、実施の形態に係る検査装置のソフトウェア構成の一例を模式的に例示する。 図6は、実施の形態に係るモデル生成装置による第1推定モデルの生成に関する処理手順の一例を示すフローチャートである。 図7は、実施の形態に係るモデル生成装置による第2推定モデルの生成に関する処理手順の一例を示すフローチャートである。 図8は、実施の形態に係る検査装置による対象符号ユニットの選択に関する処理手順の一例を示すフローチャートである。 図9は、実施の形態に係る検査装置による外観検査に関する処理手順の一例を示すフローチャートである。 図10は、他の形態に係る第2推定モデルの一例を模式的に例示する。 図11は、他の形態に係るユニット選択装置のハードウェア構成の一例を模式的に例示する。 図12は、他の形態に係るユニット選択装置のソフトウェア構成の一例を模式的に例示する。
 本発明の一側面では、対象環境において得られる欠陥のない製品の外観の知見に基づいて、欠陥の蓋然性の高い領域を抽出するように構成された第1推定モデル、及び対象環境に関係なく、欠陥の有無を判定するように構成された第2推定モデルの2つの推定モデルを外観検査に使用する。第2推定モデルによれば、対象製品に欠陥があるか否かを判定することができる。ただし、対象環境において表れる製品の状況に影響を受けて、第2推定モデルのみを使用した判定では誤りが生じる可能性がある。例えば、製品の外観模様が欠陥パターンに類似していることで、当該製品の外観模様を欠陥と誤る可能性がある。
 そこで、第1推定モデルを外観検査に更に使用する。第1推定モデルによれば、対象環境において欠陥のない製品には表れない画像領域、すなわち、対象環境において欠陥の生じている蓋然性の高い領域を優先的に抽出することができる。そのため、2つの推定モデルの推定結果を融合する(すなわち、第1推定モデルにより欠陥を検出する範囲を絞り込み、第2推定モデルによりその範囲に欠陥が存在するか否かを判定する)ことで、外観検査の精度の最適化を図ることができる。つまり、学習データを収集するコストを抑えたことで、少なくともいずれか一方の推定モデルの推定精度が多少低くても、対象環境における外観検査の精度の向上を見込むことができる。
 しかしながら、製品の外観は多様である。例えば、パターン化された外観(木目調等)を製品が有する場合、判定する範囲を絞るよりも、より広い範囲を参照した方が、製品の正常な外観か欠陥かを判別しやすいことがある。一方で、例えば、部分的にデザインの施された単純な外観を製品が有する場合、判定する範囲を絞った方が、製品の正常な外観か欠陥かを判別しやすいことがある。したがって、製品の外観を考慮せず、2つの推定モデルの推定結果を単純に融合した場合には、製品の輪郭、模様等の正常な外観を欠陥と誤って判別してしまい、外観検査の精度がかえって低下してしまう可能性があると想定された。そこで、本発明の一側面では、第2推定モデルの演算処理の過程において第1推定モデルによる注目領域の抽出結果を第2推定モデルが生成する複数の特徴マップのうちの少なくとも1つに統合することにした。
 以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。ただし、以下で説明する本実施形態は、あらゆる点において本発明の例示に過ぎない。本発明の範囲を逸脱することなく種々の改良や変形を行うことができることは言うまでもない。つまり、本発明の実施にあたって、実施形態に応じた具体的構成が適宜採用されてもよい。なお、本実施形態において登場するデータを自然言語により説明しているが、より具体的には、コンピュータが認識可能な疑似言語、コマンド、パラメータ、マシン語等で指定される。
 §1 適用例
 図1は、本発明を適用した場面の一例を模式的に例示する。図1に示されるとおり、本実施形態に係る外観検査システム100は、モデル生成装置1及び検査装置2を備えている。
 本実施形態に係るモデル生成装置1は、外観検査に利用可能な第1推定モデル5及び第2推定モデル6を生成するように構成されたコンピュータである。第1推定モデル5は、検査を実施する対象環境において得られた欠陥のない製品の写る複数の第1学習画像を含む第1学習データ30に基づいて、欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得するように生成される。第2推定モデル6は、欠陥の写る複数の第2学習画像を含む第2学習データ35に基づいて、欠陥の尤度を判定する能力を獲得するように生成される。各学習データ(30、35)に基づいて、各能力を獲得可能に各推定モデル(5、6)が生成されるのであれば、各推定モデル(5、6)の生成方法は、特に限定されなくてよく、実施の形態に応じて適宜選択されてよい。例えば、各推定モデル(5、6)は、各学習データ(30、35)に基づいて、手作業により生成されてもよい。本実施形態では、各推定モデル(5、6)の生成方法に機械学習を採用する。これにより、各推定モデル(5、6)を容易に実装することができる。
 具体的に、モデル生成装置1は、検査を実施する対象環境において得られた欠陥のない製品の写る複数の良品画像31を含む第1学習データ30を取得する。良品画像31は、第1学習画像の一例である。モデル生成装置1は、第1学習データ30を使用した機械学習により、与えられた画像から、欠陥の写っている蓋然性を有する領域(すなわち、欠陥に由来する特徴を含む領域)を注目領域として抽出する能力を獲得するように第1推定モデル5を訓練する。これにより、第1学習データ30に基づいて、当該能力を獲得した学習済みの第1推定モデル5が生成される。
 また、モデル生成装置1は、欠陥の写る複数の欠陥画像371を含む第2学習データ35を取得する。欠陥画像371は、第2学習画像の一例である。モデル生成装置1は、第2学習データ35を使用した機械学習により、与えられた画像(例えば、製品の写る画像)に対して欠陥の尤度を判定する能力を獲得するように第2推定モデル6を訓練する。これにより、第2学習データ35に基づいて、当該能力を獲得した学習済みの第2推定モデル6が生成される。
 一方、検査装置2は、生成された2つの推定モデル(5、6)を使用して、製品の外観検査を実施するように構成されたコンピュータである。具体的に、検査装置2は、検査を実施する対象製品Rの写る対象画像221を取得する。本実施形態では、カメラSが、対象製品Rを撮像可能な位置に適宜配置されており、検査装置2は、このカメラSに接続されている。検査装置2は、このカメラSから対象画像221を取得する。
 検査装置2は、第1推定モデル5を使用して、取得された対象画像221から注目領域を抽出する。次に、検査装置2は、第1推定モデル5による対象画像221に対する注目領域の抽出結果を使用して、第2推定モデル6の演算処理を実行する。この第2推定モデル6の演算処理は、それぞれ低次元の空間に射影する複数回の射影処理を対象画像221に対して実行することで、次元の異なる複数の特徴マップ63を生成することを含むように構成される。各射影処理は、入力データよりも低次元の空間に入力データを射影するように構成される。
 複数回の射影処理により、次元の異なる複数の特徴マップ63を生成する構成は、実施の形態に応じて適宜決定されてよい。例えば、第2推定モデル6の演算処理は、直列的に順次実行されるN(Nは2以上の整数)回の射影処理を含んでもよい。すなわち、第1番目の射影処理は、対象画像221を低次元の空間に射影するように構成されてよい。そして、第2番目以降の射影処理(第k番目の射影処理)は、前の射影処理(第k-1番目の射影処理)の結果を更に低次元の空間に射影するように構成されてよい。
 第1推定モデル5による注目領域の抽出結果は、この第2推定モデル6の演算処理の過程において、複数の特徴マップ63のうちの少なくともいずれか1つに統合される。検査装置2は、第2推定モデル6の演算結果に基づいて、対象製品Rに欠陥があるか否かを判定する。そして、検査装置2は、対象製品Rに欠陥があるか否かを判定した結果を示す情報を出力する。これにより、本実施形態に係る検査装置2は、各推定モデル(5、6)を使用して、製品の外観検査を実施する。
 以上のとおり、本実施形態では、対象製品Rの外観検査に、欠陥の尤度を判定する能力を獲得した第2推定モデル6の他に、検査を実施する対象環境において得られた複数の良品画像31に基づいて生成された第1推定モデル5が使用される。この対象環境に特化型の第1推定モデル5の使用により、対象製品Rに対する外観検査の精度の向上を見込むことができる。加えて、本実施形態では、第1推定モデル5による注目領域の抽出結果は、第2推定モデル6の演算過程において、次元の異なる複数の特徴マップ63のうちの少なくともいずれか1つに統合される。第1推定モデル5による注目領域の抽出結果をどの特徴マップに統合するかは、対象製品に欠陥があるか否かについての判定精度がなるべく高くなるように決定される。どの特徴マップに統合するかは、対象製品のある程度多様な外観に対応できるように検査装置2の製造者において予め実験を重ねて決定されていてもよいし、特定の外観を有する対象製品に対応して精度の高い欠陥判定結果が得られるように検査装置2が使用される対象環境における実験を経て決定されてもよい。第2推定モデル6の演算処理は、第1推定モデル5による注目領域の抽出結果を統合する次元を変更可能に構成されてもよい。この場合には、欠陥の尤度を判定する範囲を次元レベルで調整することができ、その結果、対象製品Rの有する外観に適切な統合処理の実施を期待することができる。したがって、本実施形態によれば、多様な外観を有し得る対象製品Rに対して、2つの推定モデル(5、6)による外観検査の精度の向上を期待することができる。
 なお、図1の例では、モデル生成装置1及び検査装置2は、ネットワークを介して互いに接続されている。ネットワークの種類は、例えば、インターネット、無線通信網、移動通信網、電話網、専用網等から適宜選択されてよい。ただし、モデル生成装置1及び検査装置2の間でデータをやりとりする方法は、このような例に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。例えば、モデル生成装置1及び検査装置2の間では、記憶媒体を利用して、データがやりとりされてよい。
 また、図1の例では、モデル生成装置1及び検査装置2は、それぞれ別個のコンピュータにより構成されている。しかしながら、本実施形態に係る外観検査システム100の構成は、このような例に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。たとえば、モデル生成装置1及び検査装置2は一体のコンピュータであってもよい。また、例えば、モデル生成装置1及び検査装置2のうちの少なくとも一方は、複数台のコンピュータにより構成されてもよい。
 対象製品Rは、例えば、電子機器、電子部品、自動車部品、薬品、食品等の製造ラインで搬送される製品であってよい。電子部品は、例えば、基盤、チップコンデンサ、液晶、リレーの巻線等であってよい。自動車部品は、例えば、コンロッド、シャフト、エンジンブロック、パワーウィンドウスイッチ、パネル等であってよい。薬品は、例えば、包装済みの錠剤、未包装の錠剤等であってよい。対象製品Rは、製造過程完了後に生成される最終品であってもよいし、製造過程の途中で生成される中間品であってもよいし、製造過程を経過する前に用意される初期品であってもよい。欠陥は、例えば、傷、汚れ、クラック、打痕、バリ、色ムラ、異物混入等であってよい。
 §2 構成例
 [ハードウェア構成]
 <モデル生成装置>
 図2は、本実施形態に係るモデル生成装置1のハードウェア構成の一例を模式的に例示する。図2に示されるとおり、本実施形態に係るモデル生成装置1は、制御部11、記憶部12、通信インタフェース13、外部インタフェース14、入力装置15、出力装置16、及びドライブ17が電気的に接続されたコンピュータである。なお、図2では、通信インタフェース及び外部インタフェースを「通信I/F」及び「外部I/F」と記載している。
 制御部11は、ハードウェアプロセッサであるCPU(Central Processing Unit)、RAM(Random Access Memory)、ROM(Read Only Memory)等を含み、プログラム及び各種データに基づいて情報処理を実行するように構成される。記憶部12は、メモリの一例であり、例えば、ハードディスクドライブ、ソリッドステートドライブ等で構成される。本実施形態では、記憶部12は、モデル生成プログラム81、第1学習データ30、第2学習データ35、第1学習結果データ121、第2学習結果データ125等の各種情報を記憶する。
 モデル生成プログラム81は、各推定モデル(5、6)を生成する後述の情報処理(図6及び図7)をモデル生成装置1に実行させるためのプログラムである。モデル生成プログラム81は、当該情報処理の一連の命令を含む。第1学習データ30は、第1推定モデル5の生成に利用される。第2学習データ35は、第2推定モデル6の生成に利用される。第1学習結果データ121は、生成された第1推定モデル5に関する情報を示す。第2学習結果データ125は、生成された第2推定モデル6に関する情報を示す。本実施形態では、各学習結果データ(121、125)は、モデル生成プログラム81を実行した結果として生成される。詳細は後述する。
 通信インタフェース13は、例えば、有線LAN(Local Area Network)モジュール、無線LANモジュール等であり、ネットワークを介した有線又は無線通信を行うためのインタフェースである。モデル生成装置1は、通信インタフェース13を利用して、他の情報処理装置との間で、ネットワークを介したデータ通信を実行することができる。外部インタフェース14は、例えば、USB(Universal Serial Bus)ポート、専用ポート等であり、外部装置と接続するためのインタフェースである。外部インタフェース14の種類及び数は任意に選択されてよい。モデル生成装置1は、通信インタフェース13及び外部インタフェース14の少なくとも一方を介して、学習画像を得るためのカメラに接続されてよい。
 入力装置15は、例えば、マウス、キーボード等の入力を行うための装置である。また、出力装置16は、例えば、ディスプレイ、スピーカ等の出力を行うための装置である。ユーザ等のオペレータは、入力装置15及び出力装置16を利用することで、モデル生成装置1を操作することができる。
 ドライブ17は、例えば、CDドライブ、DVDドライブ等であり、記憶媒体91に記憶されたプログラム等の各種情報を読み込むためのドライブ装置である。記憶媒体91は、コンピュータその他装置、機械等が、記憶されたプログラム等の各種情報を読み取り可能なように、当該プログラム等の情報を、電気的、磁気的、光学的、機械的又は化学的作用によって蓄積する媒体である。上記モデル生成プログラム81、第1学習データ30、及び第2学習データ35の少なくともいずれかは、記憶媒体91に記憶されていてもよい。モデル生成装置1は、この記憶媒体91から、上記モデル生成プログラム81、第1学習データ30、及び第2学習データ35の少なくともいずれかを取得してもよい。なお、図2では、記憶媒体91の一例として、CD、DVD等のディスク型の記憶媒体を例示している。しかしながら、記憶媒体91の種類は、ディスク型に限られなくてもよく、ディスク型以外であってもよい。ディスク型以外の記憶媒体として、例えば、フラッシュメモリ等の半導体メモリを挙げることができる。ドライブ17の種類は、記憶媒体91の種類に応じて任意に選択されてよい。
 なお、モデル生成装置1の具体的なハードウェア構成に関して、実施形態に応じて、適宜、構成要素の省略、置換及び追加が可能である。例えば、制御部11は、複数のハードウェアプロセッサを含んでもよい。ハードウェアプロセッサは、マイクロプロセッサ、FPGA(field-programmable gate array)、DSP(digital signal processor)等で構成されてよい。記憶部12は、制御部11に含まれるRAM及びROMにより構成されてもよい。通信インタフェース13、外部インタフェース14、入力装置15、出力装置16及びドライブ17の少なくともいずれかは省略されてもよい。モデル生成装置1は、複数台のコンピュータで構成されてもよい。この場合、各コンピュータのハードウェア構成は、一致していてもよいし、一致していなくてもよい。また、モデル生成装置1は、提供されるサービス専用に設計された情報処理装置の他、汎用のサーバ装置、PC(Personal Computer)等であってもよい。
 <検査装置>
 図3は、本実施形態に係る検査装置2のハードウェア構成の一例を模式的に例示する。図3に示されるとおり、本実施形態に係る検査装置2は、制御部21、記憶部22、通信インタフェース23、外部インタフェース24、入力装置25、出力装置26、及びドライブ27が電気的に接続されたコンピュータである。
 検査装置2の制御部21~ドライブ27及び記憶媒体92はそれぞれ、上記モデル生成装置1の制御部11~ドライブ17及び記憶媒体91それぞれと同様に構成されてよい。制御部21は、ハードウェアプロセッサであるCPU、RAM、ROM等を含み、プログラム及びデータに基づいて各種情報処理を実行するように構成される。記憶部22は、例えば、ハードディスクドライブ、ソリッドステートドライブ等で構成される。本実施形態では、記憶部22は、検査プログラム82、第1学習結果データ121、第2学習結果データ125等の各種情報を記憶する。
 検査プログラム82は、対象製品Rの外観検査に関する後述の情報処理(図8及び図9)を検査装置2に実行させるためのプログラムである。検査プログラム82は、当該情報処理の一連の命令を含む。検査プログラム82、第1学習結果データ121、及び第2学習結果データ125のうちの少なくともいずれかは、記憶媒体92に記憶されていてもよい。また、検査装置2は、検査プログラム82、第1学習結果データ121、及び第2学習結果データ125のうちの少なくともいずれかを記憶媒体92から取得してもよい。
 また、図3の例では、検査装置2は、外部インタフェース24を介して、カメラS(撮像装置)に接続されている。これにより、検査装置2は、カメラSから対象画像221を取得可能に構成される。ただし、カメラSとの接続方法は、このような例に限定されなくてもよい。例えば、カメラSが通信インタフェースを備える場合、検査装置2は、通信インタフェース23を介して、カメラSに接続されてもよい。カメラSの種類は、実施の形態に応じて適宜選択されてよい。カメラSは、例えば、一般的なRGBカメラ、深度カメラ、赤外線カメラ等であってよい。
 なお、検査装置2の具体的なハードウェア構成に関して、実施形態に応じて、適宜、構成要素の省略、置換及び追加が可能である。例えば、制御部21は、複数のハードウェアプロセッサを含んでもよい。ハードウェアプロセッサは、マイクロプロセッサ、FPGA、DSP等で構成されてよい。記憶部22は、制御部21に含まれるRAM及びROMにより構成されてもよい。通信インタフェース23、外部インタフェース24、入力装置25、出力装置26、及びドライブ27の少なくともいずれかは省略されてもよい。検査装置2は、複数台のコンピュータで構成されてもよい。この場合、各コンピュータのハードウェア構成は、一致していてもよいし、一致していなくてもよい。また、検査装置2は、提供されるサービス専用に設計された情報処理装置の他、汎用のサーバ装置、汎用のPC、PLC(programmable logic controller)等であってもよい。また、検査装置2及びカメラSは、画像センサとして一体的に構成されてもよい。
 [ソフトウェア構成]
 <モデル生成装置>
 図4は、本実施形態に係るモデル生成装置1のソフトウェア構成の一例を模式的に例示する。モデル生成装置1の制御部11は、記憶部12に記憶されたモデル生成プログラム81をRAMに展開する。そして、制御部11は、RAMに展開されたモデル生成プログラム81に含まれる命令をCPUにより解釈及び実行して、各構成要素を制御する。これにより、図4に示されるとおり、本実施形態に係るモデル生成装置1は、第1取得部111、第1学習部112、第2取得部113、第2学習部114、及び保存処理部115をソフトウェアモジュールとして備えるコンピュータとして動作する。すなわち、本実施形態では、モデル生成装置1の各ソフトウェアモジュールは、制御部11(CPU)により実現される。
 第1取得部111は、複数の良品画像31を含む第1学習データ30を取得する。第1学習部112は、第1学習データ30を使用して、第1推定モデル5の機械学習を実施する。第2取得部113は、複数の欠陥画像371を含む第2学習データ35を取得する。第2学習部114は、第2学習データ35を使用して、第2推定モデル6の機械学習を実施する。保存処理部115は、機械学習により生成された学習済みの第1推定モデル5に関する情報を第1学習結果データ121として生成する。同様に、保存処理部115は、機械学習により生成された学習済みの第2推定モデル6に関する情報を第2学習結果データ125として生成する。そして、保存処理部115は、生成された各学習結果データ(121、125)を所定の記憶領域に保存する。
 (各モデルの構成及び機械学習の方法の一例)
 上記演算処理を実装可能であれば、各推定モデル(5、6)の構成は、特に限定されなくてよく、実施の形態に応じて適宜決定されてよい。第1推定モデル5は、欠陥の写っている蓋然性を有する領域を注目領域として抽出可能に適宜構成されてよい。第2推定モデル6は、複数回の射影処理により次元の異なる複数の特徴マップ63を演算過程で生成した上で、欠陥の尤度を判定可能に適宜構成されてよい。
 図4に示されるとおり、本実施形態では、第1推定モデル5は、与えられた画像(入力画像)を特徴量に変換する符号器51、及び特徴量から画像を復号化する復号器53を備えるように構成される。第2推定モデル6は、与えられた画像(入力画像)を特徴量に変換する符号器61、及び特徴量から画像を復号化する復号器65を備えるように構成される。復号器65により復号化される画像は、欠陥の尤度を画素毎に示すように構成される。すなわち、復号化された画像の各画素は、各画素に写る対象が欠陥であるか否かの程度に関する情報を示すように構成される。符号器61は、入力側から順に直列に接続される複数の符号ユニット62を含み、各符号ユニット62は、入力データよりも次元の低い特徴マップ63に入力データを変換するように構成される。
 加えて、本実施形態では、上記各能力を獲得した各推定モデル(5、6)は、機械学習により生成される。そのため、各推定モデル(5、6)には、機械学習により調整可能な演算パラメータを有する機械学習モデルが用いられる。機械学習モデルの構成及び種類はそれぞれ、実施の形態に応じて適宜選択されてよい。本実施形態では、各推定モデル(5、6)には、ニューラルネットワークが用いられる。具体的には、第1推定モデル5の符号器51及び復号器53はそれぞれ、全結合型ニューラルネットワークにより構成される。第2推定モデル6の符号器61は畳み込みニューラルネットワークにより構成される。当該構成によれば、各推定モデル(5、6)を容易に実装することができる。
 (1)第1推定モデル
 第1推定モデル5の符号器51及び復号器53はそれぞれ、入力層(511、531)、中間(隠れ)層(512、532)、及び出力層(513、533)を備えている。図4の例では、符号器51及び復号器53は3層で構成されているが、符号器51及び復号器53の層の数はそれぞれ任意に選択されてよい。例えば、符号器51及び復号器53の少なくとも一方は、2層以上の中間層を備えてもよい。
 本実施形態では、符号器51の入力層511には、対象画像221等の画像が入力され、入力画像から算出された特徴量が出力層513から出力される。また、復号器53の入力層531には、符号器51により算出された特徴量が入力され、入力された特徴量から復号化された画像(復号化画像)が出力層533から出力される。しかしながら、上記推定処理を実行可能であれば、符号器51及び復号器53の入出力の形式は、このような例に限定されなくてよい。例えば、各入力層(511、531)は、上記以外の他の情報が更に入力されるように構成されてよい。また、各出力層(513、533)は、上記以外の他の情報を更に出力するように構成されてよい。
 各層(511、512、513、531、532、533)は、1又は複数のニューロン(ノード)を備える。各層(511、512、513、531、532、533)に含まれるニューロンの数は、特に限定されなくてよく、実施の形態に応じて適宜選択されてよい。入力層(511、531)は、例えば、入力画像、特徴量等の入力されるデータ及びその形式に応じて適宜決定されてよい。出力層(513、533)は、例えば、特徴量、推定結果(例えば、復号化画像)等の出力するデータ及びその形式に応じて適宜決定されてよい。図4の例では、各層(511、512、513、531、532、533)に含まれるに含まれる各ニューロンは、隣接する層の全てのニューロンと結合される。ただし、各ニューロンの結合関係は、このような例に限定されなくてよく、実施の形態に応じて適宜決定されてよい。例えば、各ニューロンは、隣接する層の特定のニューロンと接続されたり、隣接する層以外の層のニューロンと接続されたりしてもよい。
 各層(511、512、513、531、532、533)の各結合には、重み(結合荷重)が設定される。各ニューロンには閾値が設定されており、基本的には、各入力と各重みとの積の和が閾値を超えているか否かによって各ニューロンの出力が決定される。閾値は、活性化関数により表現されてもよい。この場合、各入力と各重みとの積の和を活性化関数に入力し、活性化関数の演算を実行することで、各ニューロンの出力が決定される。活性化関数の種類は任意に選択されてよい。各層(511、512、513、531、532、533)に含まれる各ニューロン間の結合の重み及び各ニューロンの閾値は、符号器51及び復号器53それぞれの演算処理に利用される演算パラメータの一例である。
 上記第1推定モデル5の機械学習では、第1学習部112は、各良品画像31を訓練データ及び正解データとして使用する。すなわち、第1学習部112は、良品画像31を符号器51の入力層511に入力し、符号器51及び復号器53の順伝播の演算処理を実行する。この演算処理の結果、第1学習部112は、生成された復号化画像を復号器53の出力層533から取得する。第1学習部112は、取得された復号化画像及び入力した良品画像31の間の誤差(再構成誤差)を算出する。第1学習部112は、各良品画像31について、算出される誤差が小さくなるように符号器51及び復号器53の各演算パラメータの値の調整を繰り返す。これにより、学習済みの第1推定モデル5を生成することができる。
 本実施形態に係る学習済みの第1推定モデル5によれば、機械学習に使用された良品画像31及びこれに類似する画像、すなわち、検査を実施する対象環境で得られる欠陥のない製品(良品)の外観の写る画像は、精度よく再構成することができる。これに対して、それ以外の画像、例えば、欠陥の写る画像については再構成の精度が下がる。つまり、再構成誤差の大きい領域は、欠陥の写る蓋然性の高い領域である。したがって、本実施形態に係る第1推定モデル5は、上記機械学習により、再構成誤差に基づいて、欠陥の写っている蓋然性の有する領域を抽出する能力を獲得することができる。
 保存処理部115は、上記機械学習により生成された学習済みの第1推定モデル5を再生するための第1学習結果データ121を生成する。学習済みの第1推定モデル5を再生可能であれば、第1学習結果データ121の構成は、特に限定されなくてよく、実施の形態に応じて適宜決定されてよい。例えば、第1学習結果データ121は、上記機械学習の調整により得られた第1推定モデル5の各演算パラメータの値を示す情報を含んでもよい。場合によって、第1学習結果データ121は、第1推定モデル5(符号器51及び復号器53)の構造を示す情報を更に含んでもよい。構造は、例えば、ニューラルネットワークにおける入力層から出力層までの層の数、各層の種類、各層に含まれるニューロンの数、隣接する層のニューロン同士の結合関係等により特定されてよい。保存処理部115は、生成された第1学習結果データ121を所定の記憶領域に保存する。
 (2)第2推定モデル
 第2推定モデル6の符号器61は、複数の符号ユニット62を含む。各符号ユニット62は、1又は複数の畳み込み層621及びプーリング層623により構成される。
 畳み込み層621は、与えられたデータに対する畳み込み演算を行うように構成される。畳み込み演算とは、与えられたデータと所定のフィルタとの相関を算出する処理に相当する。例えば、画像の畳み込みを行うことで、フィルタの濃淡パターンと類似する濃淡パターンを入力される画像から検出することができる。プーリング層623は、プーリング処理を行うように構成される。プーリング処理は、与えられたデータのフィルタに対する応答の強かった位置の情報を一部捨て、当該データ内に現れる特徴の微小な位置変化に対する応答の不変性を実現する。例えば、プーリング処理では、フィルタ内の最も大きな値が抽出され、それ以外の値が削除されてよい。本実施形態に係る各符号ユニット62は、このような畳み込み層621及びプーリング層623により、入力されたデータをより次元の低い特徴マップ63に変換するように構成される。
 各符号ユニット62に含まれる畳み込み層621及びプーリング層623の数は、任意に決定されてよい。図4の例では、符号器61は、符号ユニット62以外の構成要素を含んでおらず、各符号ユニット62は、直列的に接続されている。各符号ユニット62では、畳み込み層621が、プーリング層623よりも入力側に配置されている。最も入力側に配置された符号ユニット62の畳み込み層621が符号器61の入力層を構成しており、最も出力側に配置された符号ユニット62のプーリング層623が符号器61の出力層を構成している。
 ただし、符号器61及び各符号ユニット62の構造は、このような例に限定されなくてもよい。畳み込み層621及びプーリング層623の配置及び接続関係は、実施の形態に応じて適宜決定されてよい。例えば、各符号ユニット62が、複数の畳み込み層621及び複数のプーリング層623を備える場合、畳み込み層621及びプーリング層623は口語に配置されてよい。或いは、複数の畳み込み層621が連続して配置されたのちに、1又は複数のプーリング層623が配置されてもよい。符号器61は、符号ユニット62以外の構成要素を含んでもよい。符号器61は、例えば、正規化層、ドロップアウト層、全結合層等の他の種類の層を含んでもよい。他の種類の層は、符号ユニット62内に配置されてもよい。
 一方、復号器65は、アンプーリング層651及び逆畳み込み層653を備える。アンプーリング層651は、上記プーリング処理の逆演算を実行するように構成され、逆畳み込み層653は、上記畳み込み処理の逆演算を実行するように構成される。復号器65に含まれるアンプーリング層651及び逆畳み込み層653の数は、任意に決定されてよい。図4の例では、アンプーリング層651及び逆畳み込み層653は交互に配置されている。最も入力側に配置されるアンプーリング層651が復号器65の入力層を構成しており、最も出力側に配置される逆畳み込み層653が復号器65の出力層を構成している。ただし、復号器65の構造は、上記符号器61と同様に、このような例に限定されなくてよい。アンプーリング層651及び逆畳み込み層653の配置及び接続関係は、実施の形態に応じて適宜決定されてよい。復号器65は、アンプーリング層651及び逆畳み込み層653以外の他の種類の層を含んでもよい。
 本実施形態では、符号器61の入力層には、対象画像221等の画像が入力され、入力画像から算出された特徴量(特徴マップ)が出力層から出力される。また、復号器65の入力層には、符号器61により算出された特徴量が入力され、入力された特徴量から復号化された、欠陥の尤度の推定結果を画素毎に示す画像(判定画像)が出力層から出力される。しかしながら、上記推定処理を実行可能であれば、符号器61及び復号器65の入出力の形式は、このような例に限定されなくてよい。例えば、各入力層は、上記以外の他の情報が更に入力されるように構成されてもよい。各出力層は、上記以外の他の情報を更に出力するように構成されてよい。
 畳み込み層621は、畳み込み演算に対応するニューロン(ノード)であって、入力又は自分の層よりも前(入力側)に配置された層の出力の一部の領域に結合するニューロン(ノード)を備えている。逆畳み込み層653も、同様に、逆畳み込み演算に対応するニューロンを備えている。各層(621、653)に含まれるニューロンの数は、特に限定されなくてよく、実施の形態に応じて適宜選択されてよい。また、畳み込み層621の各ニューロンは、例えば、U-net等のように、隣接する層以外の層(例えば、復号器65の対応する逆畳み込み層653)のニューロンと更に接続されてもよい。
 畳み込み層621及び逆畳み込み層653の各結合には、上記第1推定モデル5の各層と同様に、重み(結合荷重)が設定される。各ニューロンには、閾値が設定される。閾値は、活性化関数により表現されてもよい。畳み込み層621及び逆畳み込み層653に含まれる各ニューロン間の結合の重み及び各ニューロンの閾値は、符号器61及び復号器65の演算処理に利用される演算パラメータの一例である。
 本実施形態では、第2取得部113は、このような構造を有する第2推定モデル6の機械学習に使用可能な第2学習データ35を取得する。一例として、第2学習データ35は、複数の学習データセット36により構成される。各学習データセット36は、学習画像37及び正解画像38の組み合わせにより構成される。機械学習において、学習画像37は訓練データとして使用され、正解画像38は正解データとして使用される。少なくとも一部の学習画像37には、欠陥画像371が用いられる。学習画像37の他の一部には、欠陥の写っていない画像が用いられてもよい。学習画像37に欠陥が写る場合に、対応する正解画像38は、その欠陥の範囲を示すように構成される。
 本実施形態では、第2学習部114は、このような第2学習データ35を使用して、第2推定モデル6の機械学習を実施する。具体的に、第2学習部114は、各学習データセット36の学習画像37を符号器61の入力層に入力し、符号器61及び復号器65の順伝播の演算処理を実行する。この演算処理の結果、第2学習部114は、生成された判定画像を復号器65の出力層から取得する。第2学習部114は、取得された判定画像及び対応する正解画像38の間の誤差を算出する。第2学習部114は、各学習データセット36について、算出される誤差が小さくなるように符号器61及び復号器65の各演算パラメータの値の調整を繰り返す。これにより、学習済みの第2推定モデル6を生成することができる。なお、正解データの構成は、第2推定モデル6の出力形式に応じて適宜選択されてよい。例えば、第2推定モデル6が欠陥の種別を識別した結果を出力するように構成される場合、正解データは、正解画像38の他に又は正解画像38に代えて、欠陥の種別を示す情報を含んでもよい。
 保存処理部115は、上記機械学習により生成された学習済みの第2推定モデル6を再生するための第2学習結果データ125を生成する。学習済みの第2推定モデル6を再生可能であれば、第2学習結果データ125の構成は、第1学習結果データ121と同様に、特に限定されなくてよく、実施の形態に応じて適宜決定されてよい。例えば、第2学習結果データ125は、上記機械学習の調整により得られた第2推定モデル6の各演算パラメータの値を示す情報を含んでもよい。場合によって、第2学習結果データ125は、第2推定モデル6(符号器61及び復号器65)の構造を示す情報を更に含んでもよい。保存処理部115は、生成された第2学習結果データ125を所定の記憶領域に保存する。
 <検査装置>
 図5は、本実施形態に係る検査装置2のソフトウェア構成の一例を模式的に例示する。検査装置2の制御部21は、記憶部22に記憶された検査プログラム82をRAMに展開する。そして、制御部21は、RAMに展開された検査プログラム82に含まれる命令をCPUにより解釈及び実行して、各構成要素を制御する。これにより、図5に示されるとおり、本実施形態に係る検査装置2は、データ取得部211、領域抽出部212、モデル演算部213、判定部214、出力部215、選択部216、及び設定部217をソフトウェアモジュールとして備えるコンピュータとして動作する。すなわち、本実施形態では、検査装置2の各ソフトウェアモジュールも、モデル生成装置1と同様に、制御部21(CPU)により実現される。
 データ取得部211は、検査を実施する対象製品Rの写る対象画像221を取得する。領域抽出部212は、第1学習結果データ121を保持していることで、第1推定モデル5を備えている。領域抽出部212は、第1推定モデル5を使用して、対象画像221から注目領域を抽出する。本実施形態では、領域抽出部212は、対象画像221を符号器51に入力し、符号器51及び復号器53の順伝播の演算処理を実行する。これにより、領域抽出部212は、符号器51及び復号器53を使用して、対象画像221に対して対象復号化画像223を生成する。領域抽出部212は、生成された対象復号化画像223及び対象画像221の間の差分領域を算出し、差分領域の算出結果に基づいて抽出画像225を生成する。抽出画像225は、注目領域の抽出結果の一例である。本実施形態では、抽出画像225は、欠陥である蓋然性の度合いを画素毎に示すアテンションマップにより構成されてよい。特徴マップ63及びアテンションマップは共に画像データである。そのため、注目領域の抽出結果をアテンションマップにより構成することで、当該抽出結果の統合処理を容易に実装することができる。
 モデル演算部213は、第2学習結果データ125を保持していることで、第2推定モデル6を備えている。モデル演算部213は、注目領域の抽出結果(すなわち、対象画像221から抽出された注目領域)を使用して、第2推定モデル6の演算処理を実行する。第2推定モデル6の演算処理は、それぞれ低次元の空間に射影する複数回の射影処理を対象画像221に対して実行することで、次元の異なる複数の特徴マップ63を生成することを含む。注目領域の抽出結果は、第2推定モデル6の演算処理の過程において、複数の特徴マップ63のうちの少なくともいずれか1つに統合される。
 本実施形態では、モデル演算部213は、対象画像221を符号器61に入力し、符号器61及び復号器65の順伝播の演算処理を実行する。この演算処理の過程において、複数回の射影処理を対象画像221に対して実行することは、入力側から順に各符号ユニット62の演算処理を実行することにより構成される。注目領域の抽出結果は、第2推定モデル6の演算処理の過程において、複数の符号ユニット62のうちの少なくとも1つにより生成される特徴マップ63に統合される。統合方法の一例として、モデル演算部213は、統合対象の特徴マップ63のサイズに合うように抽出画像225を適宜リサイズしてもよい。そして、モデル演算部213は、リサイズされた抽出画像225を対象の特徴マップ63に掛け合わせることで、注目領域の抽出結果を対象の特徴マップ63に統合してもよい。不要であれば、リサイズの処理は省略されてよい。
 判定部214は、第2推定モデル6の演算結果に基づいて、対象製品Rに欠陥があるか否かを判定する。出力部215は、対象製品Rに欠陥があるか否かを判定した結果を示す情報を出力する。
 選択部216は、複数の符号ユニット62の中から少なくとも1つ以上の対象符号ユニットを選択する。注目領域の抽出結果は、第2推定モデル6の演算処理の過程において、選択された少なくとも1つ以上の対象符号ユニットにより生成される特徴マップ63に統合されてよい。対象符号ユニットの選択により、2つの推定モデル(5、6)による外観検査の精度を最適化することができる。なお、対象符号ユニットの選択には、評価画像228及び正解情報229の組み合わせにより構成される評価用データセット227が利用されてよい。
 設定部217は、欠陥の写る領域を注目領域として抽出する程度を規定するパラメータの値を設定する。領域抽出部212は、設定されたパラメータの値に応じて、注目領域を抽出してよい。当該構成によれば、第1推定モデル5の推定結果を反映する程度を調整することができ、これにより、対象環境における2つの推定モデル(5、6)による外観検査の精度を最適化することができる。本実施形態では、注目領域を抽出するために、対象画像221及び対象復号化画像223の間の差分領域が算出される。そのため、当該パラメータは、この差分領域を拡げる程度を規定する拡大パラメータを含んでよい。領域抽出部212は、設定された拡大パラメータの値に応じて、算出された差分領域を拡げることで、注目領域の抽出結果(本実施形態では、抽出画像225)を取得してもよい。
 <その他>
 モデル生成装置1及び検査装置2の各ソフトウェアモジュールに関しては後述する動作例で詳細に説明する。なお、本実施形態では、モデル生成装置1及び検査装置2の各ソフトウェアモジュールがいずれも汎用のCPUによって実現される例について説明している。しかしながら、上記ソフトウェアモジュールの一部又は全部が、1又は複数の専用のプロセッサにより実現されてもよい。すなわち、上記各モジュールは、ハードウェアモジュールとして実現されてもよい。また、モデル生成装置1及び検査装置2それぞれのソフトウェア構成に関して、実施形態に応じて、適宜、ソフトウェアモジュールの省略、置換及び追加が行われてもよい。
 §3 動作例
 [モデル生成装置]
 (1)第1推定モデルの生成
 図6は、本実施形態に係るモデル生成装置1による第1推定モデル5の生成(機械学習)に関する処理手順の一例を示すフローチャートである。ただし、以下の第1推定モデル5の生成に関する処理手順は、一例に過ぎず、各ステップは可能な限り変更されてよい。また、以下の第1推定モデル5の生成に関する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
 (ステップS101)
 ステップS101では、制御部11は、第1取得部111として動作し、複数の良品画像31を含む第1学習データ30を取得する。
 第1学習データ30を構成する各良品画像31は適宜生成されてよい。例えば、カメラS又はこれと同種のカメラを用意する。また、検査を実施する対象環境において、対象製品Rと同種の製品であって、欠陥のない製品を用意する。そして、用意した製品をカメラにより撮像する。これにより、各良品画像31を生成することができる。良品画像31は、カメラにより得られたそのままの画像であってもよい。或いは、良品画像31は、カメラにより得られた画像に対して何らかの画像処理を適用することにより生成されてもよい。
 第1学習データ30は、コンピュータの動作により自動的に生成されてもよいし、或いは少なくとも部分的にオペレータの操作を含むことで手動的に生成されてもよい。また、第1学習データ30の生成は、モデル生成装置1により行われてもよいし、モデル生成装置1以外の他のコンピュータにより行われてもよい。第1学習データ30をモデル生成装置1が生成する場合、制御部11は、自動的に又は入力装置15を介したオペレータの操作により手動的に上記生成処理を実行することで、第1学習データ30を取得する。一方、第1学習データ30を他のコンピュータが生成する場合、制御部11は、例えば、ネットワーク、記憶媒体91等を介して、他のコンピュータにより生成された第1学習データ30を取得する。第1学習データ30の一部の良品画像31がモデル生成装置1により生成され、その他の良品画像31が1又は複数の他のコンピュータにより生成されてもよい。
 第1学習データ30を構成する良品画像31の件数は、特に限定されなくてよく、実施の形態に応じて適宜決定されてよい。なお、第1学習データ30は、良品画像31のみで構成されるのが好ましいが、第1学習データ30の一部には、欠陥のある製品の画像が学習画像として含まれてもよい。第1学習データ30を取得すると、制御部11は、次のステップS102に処理を進める。
 (ステップS102)
 ステップS102では、制御部11は、第1学習部112として動作し、取得された第1学習データ30を使用して、第1推定モデル5の機械学習を実施する。この機械学習により、制御部11は、欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得するように第1推定モデル5を訓練する。なお、必ずしも取得された全ての良品画像31が第1推定モデル5の機械学習に使用されなければならない訳ではない。機械学習に使用される良品画像31は適宜選択されてよい。
 機械学習の処理の一例として、まず、制御部11は、機械学習の処理対象となる第1推定モデル5の符号器51及び復号器53を構成するニューラルネットワークを用意する。各ニューラルネットワークの構造(例えば、層の数、各層の種類、各層に含まれるニューロンの数、隣接する層のニューロン同士の結合関係等)、各ニューロン間の結合の重みの初期値、及び各ニューロンの閾値の初期値は、テンプレートにより与えられてもよいし、オペレータの入力により与えられてもよい。また、再学習を行う場合には、制御部11は、過去の機械学習により得られた学習結果データに基づいて、符号器51及び復号器53を用意してもよい。
 次に、制御部11は、第1学習データ30の各良品画像31を訓練データ(入力データ)及び正解データ(教師信号、ラベル)として使用し、符号器51及び復号器53の訓練処理を実行する。この訓練処理には、確率的勾配降下法、ミニバッチ勾配降下法等が用いられてよい。
 訓練処理の一例として、制御部11は、各良品画像31を符号器51に入力し、符号器51及び復号器53の順伝播の演算処理を実行する。すなわち、制御部11は、各良品画像31を符号器51の入力層511に入力し、入力側から順に各層に含まれるニューロンの発火判定等の演算処理を実行する。この演算処理の結果、制御部11は、各良品画像31に対応して生成された復号化画像を復号器53の出力層533から取得する。制御部11は、得られた復号化画像と対応する良品画像31との間の誤差を算出する。誤差(損失)の算出には、損失関数が用いられてよい。誤差の計算に利用する損失関数の種類は、実施の形態に応じて適宜選択されてよい。
 次に、制御部11は、算出された誤差の勾配を算出する。制御部11は、誤差逆伝播(Back propagation)法により、算出された誤差の勾配を用いて、符号器51及び復号器53の各演算パラメータ(各ニューロン間の結合の重み、各ニューロンの閾値等)の値の誤差を出力側から順に算出する。制御部11は、算出された各誤差に基づいて、符号器51及び復号器53の各演算パラメータの値を更新する。各演算パラメータの値を更新する程度は、学習率により調節されてよい。学習率は、オペレータの指定により与えられてもよいし、プログラム内の設定値として与えられてもよい。
 制御部11は、上記一連の更新処理により、各良品画像31について、算出される誤差の和が小さくなるように、符号器51及び復号器53の各演算パラメータの値を調整する。例えば、規定回数実行する、算出される誤差の和が閾値以下になる等の所定の条件を満たすまで、制御部11は、上記一連の更新処理による符号器51及び復号器53の各演算パラメータの値の調整を繰り返してもよい。
 この機械学習の結果、制御部11は、欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得した訓練済みの第1推定モデル5を生成することができる。詳細には、本実施形態では、対象環境で出現する欠陥のない製品の外観を再構成する能力が高く、それ以外を再構成する能力の低い訓練済みの第1推定モデル5が生成される。第1推定モデル5の機械学習が完了すると、制御部11は、次のステップS103に処理を進める。
 (ステップS103)
 ステップS103では、制御部11は、保存処理部115として動作し、機械学習により生成された訓練済みの第1推定モデル5(符号器51及び復号器53)に関する情報を第1学習結果データ121として生成する。そして、制御部11は、生成された第1学習結果データ121を所定の記憶領域に保存する。
 所定の記憶領域は、例えば、制御部11内のRAM、記憶部12、外部記憶装置、記憶メディア又はこれらの組み合わせであってよい。記憶メディアは、例えば、CD、DVD等であってよく、制御部11は、ドライブ17を介して記憶メディアに第1学習結果データ121を格納してもよい。外部記憶装置は、例えば、NAS(Network Attached Storage)等のデータサーバであってよい。この場合、制御部11は、通信インタフェース13を利用して、ネットワークを介してデータサーバに第1学習結果データ121を格納してもよい。また、外部記憶装置は、例えば、外部インタフェース14を介してモデル生成装置1に接続された外付けの記憶装置であってもよい。
 第1学習結果データ121の保存が完了すると、制御部11は、本動作例に係る第1推定モデル5の生成に関する処理手順を終了する。
 なお、生成された第1学習結果データ121は、任意のタイミングで検査装置2に提供されてよい。例えば、制御部11は、ステップS103の処理として又はステップS103の処理とは別に、第1学習結果データ121を検査装置2に転送してもよい。検査装置2は、この転送を受信することで、第1学習結果データ121を取得してもよい。また、例えば、検査装置2は、通信インタフェース23を利用して、モデル生成装置1又はデータサーバにネットワークを介してアクセスすることで、第1学習結果データ121を取得してもよい。また、例えば、検査装置2は、記憶媒体92を介して、第1学習結果データ121を取得してもよい。また、例えば、第1学習結果データ121は、検査装置2に予め組み込まれてもよい。
 更に、制御部11は、上記ステップS101~ステップS103の処理を定期又は不定期に繰り返すことで、第1学習結果データ121を更新又は新たに生成してもよい。この繰り返しの際に、機械学習に使用する第1学習データ30の少なくとも一部の変更、修正、追加、削除等が適宜実行されてよい。そして、制御部11は、更新した又は新たに生成した第1学習結果データ121を任意の方法で検査装置2に提供することで、検査装置2の保持する第1学習結果データ121を更新してもよい。
 (2)第2推定モデルの生成
 図7は、本実施形態に係るモデル生成装置1による第2推定モデル6の生成(機械学習)に関する処理手順の一例を示すフローチャートである。ただし、以下の第2推定モデル6の生成に関する処理手順は、一例に過ぎず、各ステップは可能な限り変更されてよい。また、以下の第2推定モデル6の生成に関する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
 (ステップS151)
 ステップS151では、制御部11は、第2取得部113として動作し、複数の欠陥画像371を含む第2学習データ35を取得する。本実施形態では、第2学習データ35は、複数の学習データセット36により構成される。各学習データセット36は、学習画像37及び正解画像38の組み合わせにより構成される。少なくとも一部の学習画像37には、欠陥画像371が用いられる。
 第2学習データ35を構成する各学習データセット36は適宜生成されてよい。上記第1学習データ30と同様に、例えば、カメラS又はこれと同種のカメラを用意する。また、欠陥を有する製品を用意する。そして、用意した製品をカメラにより撮像する。これにより、学習画像37として使用可能な欠陥画像371を生成することができる。画像処理により、得られた画像において欠陥の部分のみを抽出してもよい。つまり、欠陥のみ写る画像を欠陥画像371として生成してもよい。欠陥画像371には、製品の外観が写っていてもよいし、写っていなくてもよい。また、欠陥の写っていない画像を学習画像37として生成してもよい。この学習画像37は、任意の画像処理により適宜生成されてもよい。その他、欠陥のない製品をカメラにより撮像することで、欠陥の写っていない学習画像37を生成してもよい。学習画像37は、カメラにより得られたそのままの画像であってもよいし、或いは、カメラにより得られた画像に対して何らかの画像処理を適用することで生成されてもよい。更に、生成された学習画像37に対して、欠陥の範囲を示す正解画像38を関連付ける。正解画像38は、判定画像の形式に合わせて、学習画像37から生成されてもよい。その他、正解画像38は、オペレータの手作業により生成されてよい。これらの処理により、各学習データセット36を生成することができる。
 第2学習データ35は、コンピュータの動作により自動的に生成されてもよいし、或いは少なくとも部分的にオペレータの操作を含むことで手動的に生成されてもよい。また、第2学習データ35の生成は、モデル生成装置1により行われてもよいし、モデル生成装置1以外の他のコンピュータにより行われてもよい。第2学習データ35をモデル生成装置1が生成する場合、制御部11は、自動的に又は入力装置15を介したオペレータの操作により手動的に上記生成処理を実行することで、第2学習データ35を取得する。一方、第2学習データ35を他のコンピュータが生成する場合、制御部11は、例えば、ネットワーク、記憶媒体91等を介して、他のコンピュータにより生成された第2学習データ35を取得する。第2学習データ35の一部の学習データセット36がモデル生成装置1により生成され、その他の学習データセット36が1又は複数の他のコンピュータにより生成されてもよい。
 第2学習データ35を構成する学習データセット36の件数は、特に限定されなくてよく、実施の形態に応じて適宜決定されてよい。第2学習データ35を取得すると、制御部11は、次のステップS152に処理を進める。
 (ステップS152)
 ステップS152では、制御部11は、第2学習部114として動作し、取得された第2学習データ35を使用して、第2推定モデル6の機械学習を実施する。この機械学習により、制御部11は、与えられた画像に対して欠陥の尤度を判定する能力を獲得するように第2推定モデル6を訓練する。なお、必ずしも取得された全ての学習データセット36が第2推定モデル6の機械学習に使用されなければならない訳ではない。機械学習に使用される学習データセット36は適宜選択されてよい。
 機械学習の処理の一例として、まず、制御部11は、機械学習の処理対象となる第2推定モデル6の符号器61及び復号器65を構成するニューラルネットワークを用意する。各ニューラルネットワークの構造、各ニューロン間の結合の重みの初期値、及び各ニューロンの閾値の初期値は、テンプレートにより与えられてもよいし、オペレータの入力により与えられてもよい。また、再学習を行う場合には、制御部11は、過去の機械学習により得られた学習結果データに基づいて、符号器61及び復号器65を用意してもよい。
 次に、制御部11は、各学習データセット36の学習画像37を訓練データとして使用し、正解画像38を正解データとして使用して、符号器61及び復号器65の訓練処理を実行する。この訓練処理には、確率的勾配降下法、ミニバッチ勾配降下法等が用いられてよい。
 訓練処理の一例として、制御部11は、各学習データセット36の学習画像37を符号器61に入力し、符号器61及び復号器65の順伝播の演算処理を実行する。すなわち、制御部11は、制御部11は、各学習画像37を符号器61の入力層に入力し、入力側から順に各層に含まれるニューロンの発火判定等の演算処理を実行する。この演算処理の結果、制御部11は、各学習画像37に対応して生成された判定画像を復号器65の出力層から取得する。制御部11は、各学習データセット36について、得られた判定画像及び対応する正解画像38の間の誤差を算出する。誤差(損失)の算出には、任意の損失関数が用いられてよい。例えば、判定画像及び正解画像38の間の誤差は、IoU(Intersection over Union)により算出されてよい。
 次に、制御部11は、算出された誤差の勾配を算出する。制御部11は、誤差逆伝播法により、算出された誤差の勾配を用いて、符号器61及び復号器65の各演算パラメータの値の誤差を出力側から順に算出する。制御部11は、算出された各誤差に基づいて、符号器61及び復号器65の各演算パラメータの値を更新する。上記第1推定モデル5と同様に、各演算パラメータの値を更新する程度は、学習率により調節されてよい。
 制御部11は、上記一連の更新処理により、各学習データセット36について、算出される誤差の和が小さくなるように、符号器61及び復号器65の各演算パラメータの値を調整する。上記第1推定モデル5と同様に、所定の条件を満たすまで、制御部11は、上記一連の更新処理による符号器61及び復号器65の各演算パラメータの値の調整を繰り返してもよい。
 この機械学習の結果、制御部11は、与えられた画像に対して欠陥の尤度を判定する能力を獲得した訓練済みの第2推定モデル6を生成することができる。第2推定モデル6の機械学習が完了すると、制御部11は、次のステップS153に処理を進める。
 (ステップS153)
 ステップS153では、制御部11は、保存処理部115として動作し、機械学習により生成された訓練済みの第2推定モデル6(符号器61及び復号器65)に関する情報を第2学習結果データ125として生成する。そして、制御部11は、生成された第2学習結果データ125を所定の記憶領域に保存する。上記ステップS103と同様に、所定の記憶領域は、例えば、制御部11内のRAM、記憶部12、外部記憶装置、記憶メディア又はこれらの組み合わせであってよい。第2学習結果データ125の保存先は、第1学習結果データ121と同じであってもよいし、異なっていてもよい。
 第2学習結果データ125の保存が完了すると、制御部11は、本動作例に係る第2推定モデル6の生成に関する処理手順を終了する。なお、上記第1学習結果データ121と同様に、第2学習結果データ125は、任意のタイミングで検査装置2に提供されてよい。また、上記ステップS151~ステップS153の処理は、定期又は不定期に繰り返されてよい。この繰り返しの際に、第2学習データ35の少なくとも一部の変更、修正、追加、削除等が適宜実行されてよい。そして、当該繰り返しにより更新又は新たに生成された第2学習結果データ125が任意の方法で検査装置2に提供されることで、検査装置2の保持する第2学習結果データ125が更新されてもよい。
 [検査装置]
 (1)対象符号ユニットの選択
 図8は、本実施形態に係る検査装置2による対象符号ユニットの選択に関する処理手順の一例を示すフローチャートである。制御部21は、選択部216として動作し、以下のステップS201~ステップS210の処理を実行する。ただし、以下の対象符号ユニットの選択に関する処理手順は、一例に過ぎず、各ステップは可能な限り変更されてよい。また、以下の対象符号ユニットの選択に関する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
 (ステップS201)
 ステップS201では、制御部21は、所定の欠陥を含む評価用製品の写る評価画像228を取得する。本実施形態では、制御部21は、評価画像228及び正解情報229の組み合わせにより構成される評価用データセット227を取得する。評価画像228は、良品画像31、学習画像37等と同様に、所定の欠陥を有する評価用製品をカメラにより撮像することで生成されてよい。或いは、評価画像228は、任意の画像処理により生成されてもよい。正解情報229は、所定の欠陥の写る範囲を示すように適宜構成される。例えば、正解情報229は、上記正解画像38と同様に構成されてよい。取得する評価用データセット227の件数は任意に決定されてよい。評価用データセット227を取得すると、制御部21は、次のステップS202に処理を進める。
 (ステップS202)
 ステップS202では、制御部21は、第1推定モデル5を使用して、取得された評価画像228から注目領域を抽出する。本実施形態では、制御部21は、第1学習結果データ121を参照して、訓練済みの第1推定モデル5の設定を行う。次に、制御部21は、第1推定モデル5の符号器51の入力層511に評価画像228を入力し、符号器51及び復号器53の順伝播の演算処理を実行する。この演算処理の結果、制御部21は、評価画像228に対応して生成された復号化画像を復号器53の出力層533から取得する。
 制御部21は、生成された復号化画像及び評価画像228の間の差分領域を算出する。制御部21は、差分領域の算出結果をそのまま抽出画像(注目領域の抽出結果)として取得してよい。拡大パラメータが設定されている場合、制御部21は、設定された拡大パラメータの値に応じて、算出された差分領域を拡げることで、抽出画像を取得してもよい。差分領域の拡大処理は、例えば、ぼかし処理(すなわち、フィルタによる平滑化)、膨張処理等により構成されてよい。一例として、拡大パラメータは、ガウシアン等のフィルタを指定するように構成されてよい。この場合、制御部21は、拡大パラメータの値により指定されたフィルタにより差分領域を平滑化することで、抽出画像を取得してもよい。評価画像228内の注目領域を抽出すると、制御部21は、次のステップS203に処理を進める。
 (ステップS203~ステップS209)
 ステップS203では、制御部21は、変数nに1を設定する。変数nは、対象符号ユニットとして選択されたと仮定する符号ユニット62の指定に使用される。
 ステップS204では、制御部21は、第2学習結果データ125を参照して、訓練済みの第2推定モデル6の設定を行う。この第2推定モデル6の設定は、ステップS203の処理よりも前に実行されてよい。制御部21は、第2推定モデル6の符号器61の入力層に評価画像228を入力し、n番目の符号ユニット62までの順伝播の演算処理を実行する。これにより、制御部21は、n番目の符号ユニット62から特徴マップ63を取得する。
 ステップS205では、制御部21は、n番目の符号ユニット62により生成された特徴マップ63に、ステップS202の処理により取得された抽出画像を統合する。第2推定モデル6による欠陥の尤度の判定に第1推定モデル5による注目領域の抽出結果を反映可能であれば、注目領域の抽出結果を統合する方法は、特に限定されなくてよく、実施の形態に応じて適宜決定されてよい。単純な統合方法の一例として、制御部21は、統合対象の特徴マップ63のサイズに合うように抽出画像を適宜リサイズし、リサイズされた抽出画像を対象の特徴マップ63に掛け合わせてもよい。これらの一連の処理により、制御部21は、注目領域の抽出結果を対象の特徴マップ63に統合することができる。この統合方法を採用する場合、制御部21は、上記統合結果を次の層に入力する。
 ステップS206では、制御部21は、第2推定モデル6の残りの部分(すなわち、n番目の符号ユニット62以降の構成要素)の順伝播の演算処理を実行する。これにより、制御部21は、第2推定モデル6の演算結果として、評価画像228に対する判定画像を復号器65の出力層から取得する。制御部21は、この判定画像(第2推定モデル6の演算結果)に基づいて、評価用製品に欠陥があるか否かを判定する。ステップS204~ステップS206までの処理により、制御部21は、n番目の符号ユニットを対象符号ユニットとして選択したと仮定したときの評価画像228に対する評価用製品に欠陥があるか否かの判定の試行結果を得ることができる。
 ステップS207では、制御部21は、正解情報229を使用して、ステップS206までの処理により得た試行結果を評価する。制御部21は、判定精度(すなわち、欠陥の検出精度)が高いほど、当該試行処理において対象符号ユニットであると仮定した符号ユニット62を高く評価する。このように評価可能であれば、評価方法及び尺度は、任意に設定されてよい。一例として、制御部21は、正解範囲及び検出範囲の間の重複度を評価値としてスコア化してもよい。正解範囲は、正解情報229により示される所定の欠陥の写る範囲である。また、検出範囲は、判定画像に基づいて欠陥が写っている(或いはその尤度が高い)と判定される範囲である。
 ステップS208では、制御部21は、変数nの値に応じて、処理の分岐先を決定する。変数nの値がN(2以上)ではない場合、制御部21は、ステップS209に処理を進める。Nは、符号器61に含まれる符号ユニット62の数を示す。ステップS209では、制御部21は、変数nの値を1だけインクリメントする。そして、制御部21は、新たな変数nの値に基づいて、ステップS204からの処理を再度実行する。一方、変数nの値がNである場合、制御部21は、ステップS210に処理を進める。
 本実施形態では、制御部21は、上記ループ処理により、変数nの値を変更しながら、ステップS204~ステップS206の処理を繰り返す。この一連の処理により、制御部21は、対象符号ユニットとして選択されたと仮定する符号ユニット62を変更しながら、評価画像228に対する注目領域の抽出結果を使用して、第2推定モデル6の演算処理を繰り返すことができる。そして、この繰り返し処理の結果、制御部21は、各符号ユニット62を対象符号ユニットとして選択したと仮定したときの評価画像228に対する評価用製品に欠陥があるか否かの判定(欠陥検出)を符号ユニット62毎に試行することができる。
 なお、当該試行方法は一例である。評価用製品に対する欠陥検出の試行方法は、このような例に限定されなくてよく、実施の形態に応じて適宜変更されてよい。また、上記の例では、各試行において、いずれか1つの符号ユニット62のみが対象符号ユニットであると仮定されている。しかしながら、各試行において、対象符号ユニットであると仮定する符号ユニット62の数はこのような例に限定されなくてよく、2つ以上の符号ユニット62がそれぞれ対象符号ユニットであると仮定されてもよい。
 (ステップS210)
 ステップS210では、制御部21は、試行の結果に基づいて、最適な符号ユニット62を対象符号ユニットとして選択する。本実施形態では、制御部21は、ステップS207により得られた評価の最も高い(すなわち、最も精度の高い判定の試行結果を与える)符号ユニット62を対象符号ユニットとして選択する。対象符号ユニットの選択が完了すると、制御部21は、本動作例に係る対象符号ユニットの選択に関する処理を終了する。当該処理によれば、2つの推定モデル(5、6)による外観検査の精度を自動的に最適化することができる。
 (2)外観検査
 図9は、本実施形態に係る検査装置2による外観検査に関する処理手順の一例を示すフローチャートである。以下の外観検査に関する処理手順は、検査方法の一例である。ただし、以下の外観検査に関する処理手順は、一例に過ぎず、各ステップは可能な限り変更されてよい。また、以下の外観検査に関する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
 (ステップS301)
 ステップS301では、制御部21は、データ取得部211は、検査を実施する対象製品Rの写る対象画像221を取得する。本実施形態では、制御部21は、外部インタフェース24を介して、カメラSから対象画像221を直接的に取得する。対象画像221は、動画像であってもよいし、静止画像であってもよい。なお、対象画像221を取得する経路は、このような例に限定されなくてよい。他の経路の一例として、カメラSは、他のコンピュータに接続されてよい。この場合、制御部21は、他のコンピュータを介してカメラSから間接的に対象画像221を取得してもよい。対象画像221を取得すると、制御部21は、次のステップS302に処理を進める。
 (ステップS302)
 ステップS302では、制御部21は、領域抽出部212として動作し、第1推定モデル5を使用して、対象画像221から注目領域を抽出する。
 本実施形態では、制御部21は、上記ステップS202と同様に、第1学習結果データ121を参照し、訓練済みの第1推定モデル5の設定を行う。次に、制御部21は、第1推定モデル5の符号器51の入力層511に対象画像221を入力し、符号器51及び復号器53の順伝播の演算処理を実行する。この演算処理の結果、制御部21は、対象画像221に対応して生成された対象復号化画像223を復号器53の出力層533から取得する。制御部21は、生成された対象復号化画像223及び対象画像221の間の差分領域を算出し、差分領域の算出結果に基づいて抽出画像225を生成する。抽出画像225は、欠陥である蓋然性の度合いを画素毎に示すアテンションマップとして構成されてよい。
 上記ステップS202と同様に、制御部21は、差分領域の算出結果をそのまま抽出画像225として取得してもよい。或いは、拡大パラメータが設定されている場合、制御部21は、設定された拡大パラメータの値に応じて、算出された差分領域を拡げることで、抽出画像225を取得してもよい。この拡大パラメータを利用する形態によれば、第1推定モデル5の推定結果を外観検査に反映する程度を容易に調節することができる。なお、拡大パラメータは、欠陥の写る領域を抽出領域として抽出する程度を規定するパラメータ(以下、抽出パラメータとも記載する)の一例である。パラメータの値を設定するタイミングは任意でよい。例えば、本動作例に係る外観検査に関する処理の実行前又は実行の際に、制御部21は、入力装置25を介してパラメータの値の指定を受け付けてもよい。抽出画像225(注目領域の抽出結果)を取得すると、制御部21は、次のステップS303に処理を進める。
 (ステップS303)
 ステップS303では、制御部21は、モデル演算部213として動作し、第1推定モデル5による対象画像221に対する注目領域の抽出結果(抽出画像225)を使用して、第2推定モデル6の演算処理を実行する。
 本実施形態では、制御部21は、第2学習結果データ125を参照し、訓練済みの第2推定モデル6の設定を行う。制御部21は、第2推定モデル6の符号器61の入力層に対象画像221を入力し、対象符号ユニットとして選択された符号ユニット62までの順伝播の演算処理を実行する。この演算処理の結果、制御部21は、選択された符号ユニット62から特徴マップ63を取得する。次に、制御部21は、選択された符号ユニット62により生成された特徴マップ63に抽出画像225を統合する。統合方法は、上記ステップS205と同様であってよい。複数の符号ユニット62が対象符号ユニットに選択されている場合、制御部21は、選択された符号ユニット62までの順伝播の演算処理及び統合処理を入力側から順に実行する。そして、制御部21は、第2推定モデル6の残りの部分の順伝播の演算処理を実行する。これにより、制御部21は、第2推定モデル6の演算結果として、対象画像221に対する判定画像を復号器65の出力層から取得する。
 本実施形態では、当該第2推定モデル6の演算処理の過程において、制御部21は、符号器61の各符号ユニット62の演算処理を入力側から順に実行する。当該各符号ユニット62の演算処理により、複数回の射影処理が対象画像221に対して実行され、その結果、次元の異なる複数の特徴マップ63が生成される。抽出画像225は、当該第2推定モデル6の演算処理の過程において、選択された少なくとも1つ以上の対象符号ユニットにより生成される特徴マップ63に統合される。第2推定モデル6の演算処理が完了すると、制御部21は、次のステップS304に処理を進める。
 (ステップS304)
 ステップS304では、制御部21は、判定部214として動作し、第2推定モデル6の演算結果に基づいて、対象製品Rに欠陥があるか否かを判定する。
 欠陥があるか否かを判定することは、第2推定モデル6の出力(演算結果)を参照して、欠陥検出の認定を行うことである。判定の形式は、第2推定モデル6の出力形式等に応じて適宜決定されてよい。一例として、欠陥があるか否かを判定することは、欠陥の有無を判別すること、欠陥の種別を識別すること、欠陥の存在する(又はその蓋然性の有する)領域を抽出すること、欠陥である尤度を推定すること、又はこれらの組み合わせにより構成されてよい。制御部21は、判定画像をそのまま判定結果として取得してもよいし、或いは、判定画像に対して何らかの情報処理(例えば、閾値判定)を実行することで、判定結果を取得してもよい。対象製品Rに欠陥があるか否かの判定が完了すると、制御部21は、次のステップS305に処理を進める。
 (ステップS305)
 ステップS305では、制御部21は、対象製品Rに欠陥があるか否かを判定した結果を示す情報を出力する。
 出力先及び出力する情報の内容はそれぞれ、実施の形態に応じて適宜決定されてよい。
出力先は、例えば、制御部21内のRAM、出力装置26、他のコンピュータ等であってよい。判定結果を示す情報には、判定の結果に基づいて何らかの情報処理を実行することで得られた情報(例えば、特定のメッセージ、制御対象装置に対する制御指令等)が含まれてもよい。一例として、制御部21は、対象製品Rに欠陥があるか否かを判定した結果をそのまま出力装置26又は他のコンピュータに出力してもよい。その他の一例として、対象製品Rに欠陥が存在すると判定した場合、制御部21は、そのことを知らせるための警告を出力装置26又は他のコンピュータに出力してもよい。更にその他の一例として、対象製品Rを搬送するコンベア装置に検査装置2が接続される場合、制御部21は、判定の結果に基づいて、欠陥のある対象製品Rと欠陥のない対象製品Rとを別のラインで搬送されるようにコンベア装置を制御してもよい。
 判定結果を示す情報の出力が完了すると、制御部21は、本動作例に係る外観検査に関する処理手順を終了する。なお、制御部21は、ステップS301~ステップS305の一連の情報処理を継続的に繰り返し実行してもよい。繰り返すタイミングは任意であってよい。繰り返す間、対象製品Rは、コンベア装置等により順次入れ替わってよい。これにより、検査装置2は、対象製品Rに対する外観検査を継続的に実施することができる。
 [特徴]
 以上のとおり、本実施形態では、ステップS301~ステップS305による対象製品Rの外観検査に、欠陥の尤度を判定する能力を獲得した第2推定モデル6の他に、対象環境に特化型の第1推定モデル5が使用される。この第1推定モデル5の使用により、対象製品Rに対する外観検査の精度の向上を見込むことができる。加えて、本実施形態では、ステップS303の処理により、第1推定モデル5による注目領域の抽出結果(抽出画像225)は、第2推定モデル6の演算過程において、次元の異なる複数の特徴マップ63のうちの少なくともいずれか1つに統合される。すなわち、第2推定モデル6の演算処理は、第1推定モデル5による注目領域の抽出結果を統合する次元を変更可能に構成される。これにより、欠陥の尤度を判定する範囲を次元レベルで調整することができ、その結果、対象製品Rの有する外観に適切な統合処理の実施を期待することができる。例えば、パターン化された外観を有する製品に対して、比較的に広い範囲を参照するようにしたり、単純な外観を有する製品に対して、参照する範囲を比較的に絞ったりするようにすることができる。したがって、本実施形態によれば、多様な外観を有し得る対象製品Rに対して、2つの推定モデル(5、6)による外観検査の精度の向上を期待することができる。
 §4 変形例
 以上、本発明の実施の形態を詳細に説明してきたが、前述までの説明はあらゆる点において本発明の例示に過ぎない。本発明の範囲を逸脱することなく種々の改良又は変形を行うことができることは言うまでもない。例えば、以下のような変更が可能である。なお、以下では、上記実施形態と同様の構成要素に関しては同様の符号を用い、上記実施形態と同様の点については、適宜説明を省略した。以下の変形例は適宜組み合わせ可能である。
 <4.1>
 上記実施形態では、第1推定モデル5の符号器51及び復号器53には、全結合型ニューラルネットワークが用いられている。また、第2推定モデル6の符号器61には、畳み込みニューラルネットワークが用いられている。しかしながら、各推定モデル(5、6)に用いられるニューラルネットワークの種類は、このような例に限定されなくてよく、実施の形態に応じて適宜選択されてよい。例えば、第1推定モデル5の符号器51には、畳み込みニューラルネットワークが用いられてよい。
 また、上記実施形態では、各推定モデル(5、6)には、機械学習モデルとしてニューラルネットワークが用いられている。しかしながら、各推定モデル(5、6)に用いられる機械学習モデルの種類は、ニューラルネットワークに限られなくてよく、実施の形態に応じて適宜選択されてよい。機械学習の方法は、機械学習モデルの種類に応じて適宜選択されてよい。例えば、第1推定モデル5の符号器51及び復号器53は、主成分分析により導出された固有ベクトルを用いた直交射影行列により構成されてよい。この場合、第1推定モデル5の機械学習は、主成分分析を行うことを含んでよい。
 また、上記実施形態では、各推定モデル(5、6)は、機械学習により生成されている。しかしながら、各推定モデル(5、6)の生成方法は、このような例に限定されなくてよく、実施の形態に応じて適宜決定されてよい。一例として、各推定モデル(5、6)は、ルールベースにより手作業で生成されてよい。この場合、各推定モデル(5、6)は、特徴抽出等の公知の画像処理により構成されてよい。各符号ユニット62は、プーリング処理、縮小処理等の次元を落とす射影処理を適宜含むように構成されてよい。第1推定モデル5は、例えば、特開2010-203845号公報等の方法により、再構成誤差に基づく方法以外の方法で、欠陥の蓋然性の高い注目領域を抽出するように構成されてよい。また、上記実施形態では、第2推定モデル6の符号器61において、各符号ユニット62は直列的に接続されている。しかしながら、符号ユニット62の配置は、このような例に限定されなくてよい。次元の異なる複数の特徴マップ63を生成可能であれば、少なくとも一部の符号ユニット62は並列に配置されてよい。極端には、全ての符号ユニット62が並列に配置されてもよい。
 図10は、本変形例に係る第2推定モデル6Aの一例を模式的に例示する。本変形例に係る第2推定モデル6Aは、並列に配置された3つの検出ユニットを備えることで、複数回の射影処理の少なくとも一部を並列に実行するように構成されている。具体的に、第1検出ユニットは、入力側から順に、第1縮小部661、1つ以上の特徴抽出部671、及び検出部681を備える。第2検出ユニットは、入力側から順に、第2縮小部662、1つ以上の特徴抽出部672、及び検出部682を備える。第3検出ユニットは、入力側から順に、1つ以上の特徴抽出部673及び検出部683を備える。
 第1縮小部661及び第2縮小部662は、入力画像のサイズを縮小する(すなわち、入力画像の次元を低くする)ように構成される。入力画像のサイズを縮小する方法には、例えば、画像内の画素を間引く(例えば、プーリング処理)、平均画素法等の方法が採用されてよい。各縮小部(661、662)の演算処理は、低次元の空間に射影する射影処理の一例である。第1縮小部661及び第2縮小部662の間では、異なるサイズの画像を生成するように構成される。一例として、第1縮小部661は、入力画像のサイズを1/2にするように構成されてよく、第2縮小部662は、入力画像のサイズを1/4にするように構成されてよい。
 各特徴抽出部671~673は、画像の特徴を抽出するように構成される。画像の特徴を抽出する処理は、例えば、ソーベルフィルタ、ラプラシアンフィルタ等の公知のフィルタリングにより構成されてよい。各特徴抽出部671~673の数は、実施の形態に応じて適宜決定されてよい。一例として、各1つ以上の特徴抽出部671~673は、欠陥の特徴を抽出し、それ以外の特徴を除外する(すなわち、欠陥の候補領域を抽出する)ように構成されてよい。
 各検出部681~683は、各特徴抽出部671~673により得られた画像の特徴に基づいて、欠陥領域を検出するように構成される。一例として、各特徴抽出部671~673が欠陥の候補領域を抽出するように構成される場合、各検出部681~683は、抽出された候補領域のうち、サイズが閾値を超える候補領域を欠陥領域として検出するように構成されてよい。
 各検出ユニットによれば、次元の異なる複数の画像から欠陥検出の結果を得ることができる。なお、本変形例では、各縮小部(661、662)により生成される縮小画像、及び各特徴抽出部671~673から出力される画像は、特徴マップの一例である。図10の点線の矢印で示されるとおり、第1推定モデル5により得られる抽出画像225は、少なくともいずれかの画像(特徴マップ)に統合されてよい。縮小部を備えていない第3検出ユニットでは、対象画像221に抽出画像225を統合した上で、特徴抽出部673の演算処理を実行してもよい。また、図10に示されるとおり、統合処理は、画像の積算処理により構成されてよい。検査装置2の上記選択部216は、候補となる各画像に対する統合処理の有効又は無効を設定するように構成されてよい。
 本変形例に係る第2推定モデル6Aは、3つの検出ユニットによる欠陥の検出結果を統合し、その結果によって欠陥の有無を判定するように構成された統合判定部69を更に備える。一例として、統合判定部69は、各検出部681~683により検出された欠陥領域を画像のサイズを合わせるように調整した後に重ね合わせ、重ね合わせの結果に基づいて最終的な欠陥の有無及び位置を判定するように構成されてよい。欠陥領域の重ね合わせは、例えば、AND演算(重なり部分のみ抽出)、OR演算(領域を足し合わせる)等により構成されてよい。
 本変形例に係る第2推定モデル6Aは、最終的に得られた欠陥の判定結果を出力するように構成される。一例として、第2推定モデル6Aは、統合判定部69の判定結果をそのまま出力するように構成されてよい。その他の一例として、第2推定モデル6Aは、欠陥が存在すると統合判定部69が判定した場合に、その欠陥の部分を強調するように対象画像221を加工するよう構成された欠陥強調部(不図示)を更に備えてもよい。強調方法は、適宜決定されてよい。一例として、欠陥強調部は、検出された欠陥の周辺領域のコントラストが高くなり、欠陥の周辺以外の領域のコントラストが低くなるように対象画像221の各画素の輝度値を調整してもよい。この場合、第2推定モデル6Aは、欠陥強調部により得られる欠陥を強調した画像を出力するように構成されてよい。
 なお、本変形例に係る第2推定モデル6Aにおいて、並列に配置される検出ユニットの数は、3つに限定されなくてよく、2つであってもよいし、或いは4つ以上であってもよい。また、各検出ユニットでは、画像のサイズを縮小する処理が複数回実行されてもよい。すなわち、検出ユニットは、複数の縮小部を備えてもよい。
 また、上記実施形態において、例えば、次元の削減を伴わない処理(例えば、単純なフィルタリング処理)を実行する、並列的に特徴マップを生成する場合に次元を削減する数が一致する等の理由により、第2推定モデル6において生成される複数の特徴マップ63の一部の次元が一致してもよい。この場合、第1推定モデル5による注目領域の抽出結果を統合する対象の特徴マップ63は、次元が同じである別の特徴マップ63に変更されてもよい。これにより、第1推定モデル5による注目領域の抽出結果を統合する特徴量を変更することができる。
 また、上記実施形態において、各推定モデル(5、6)の出力形式は、実施の形態に応じて適宜決定されてよい。例えば、第2推定モデル6は、復号器65に代えて、判定器を備えてもよい。判定器は、符号器61により得られる特徴量から欠陥があるか否かを判定するように構成されてよい。この場合、機械学習に使用される第2学習データ35の各学習データセット36は、正解画像38に代えて、欠陥があるか否かを示す正解情報を含むように構成されてよい。モデル生成装置1は、上記ステップS152において、このような第2学習データ35を使用することで、当該第2推定モデル6を適切に訓練することができる。また、上記実施形態において、各推定モデル(5、6)は、別々のコンピュータで生成されてよい。第1推定モデル5は、一現場で得られる第1学習データ30に基づいて生成されてよい。これに対して、第2推定モデル6は、複数の現場それぞれから収集された第2学習データ35に基づいて生成されてよい。
 <4.2>
 上記実施形態において、抽出パラメータは、拡大パラメータに限られなくてよい。一例として、検査装置2は、対象復号化画像223及び対象画像221の間の差分を算出することにより差分画像を生成してもよい。続いて、検査装置2は、閾値(2値化閾値)に基づいて、差分画像の各画素を2値化してもよい。そして、検査装置2は、2値化により欠陥が存在すると示す画素のまとまりのうち、面積が閾値(面積閾値)以下のまとまりを削除してもよい。この一連の処理により、検査装置2は、対象復号化画像223及び対象画像221の間の差分領域を算出してもよい。この場合、抽出パラメータは、2値化閾値及び面積閾値のうちの少なくとも一方を含んでよい。なお、上記実施形態において、当該パラメータの値を設定する処理は省略されてよい。この場合、検査装置2のソフトウェア構成から設定部217が省略されてよい。
 <4.3>
 上記実施形態では、ステップS201~ステップS210の処理により、対象環境に最適な対象符号ユニットを自動的に選択することができる。しかしながら、対象符号ユニットの選択方法は、このような例に限定されなくてよい。制御部21は、任意の方法により、複数の符号ユニット62の中から少なくとも1つ以上の対象符号ユニットを選択してもよい。他の方法の一例として、制御部21は、ステップS201~ステップS210の処理のうち、ステップS207の処理を省略してよい。更に、制御部21は、ステップS210の処理の代わりに、ステップS206による試行の結果をオペレータに対して出力してもよい。出力先は、任意に選択されてよい。そして、制御部21は、オペレータの指定による、複数の符号ユニット62の中から少なくとも1つの対象符号ユニットの選択を受け付けてもよい。例えば、制御部21は、各試行により得られた判定画像の一覧を出力装置26に出力してもよい。制御部21は、オペレータによる入力装置25を介した適切な判定画像の指定によって、複数の符号ユニット62の中から少なくとも1つの対象符号ユニットの選択を受け付けてもよい。ステップS201~ステップS206、ステップS208及びステップS209の処理は、上記実施形態と同様に実行されてよい。当該処理によれば、2つの推定モデル(5、6)による外観検査の精度をオペレーションにより最適化することができる。更にその他の方法の一例として、制御部21は、ステップS201~ステップS210の一連の処理を省略し、オペレータの指定により対象符号ユニットの選択を単純に受け付けてもよい。なお、上記実施形態において、対象符号ユニットを選択する一連の処理は省略されてよい。この場合、検査装置2のソフトウェア構成から選択部216が省略されてよい。
 <4.4>
 上記実施形態では、対象の特徴マップ63に抽出画像を掛け合わせることで、注目領域の抽出結果を対象の特徴マップ63に統合することができる。ただし、統合方法は、このような例に限定されなくてよい。その他の一例として、対象の特徴マップ63及び抽出画像が、当該対象の特徴マップ63を得た層の次の層における別のノードにそれぞれ入力されてよい。この場合、当該次の層の演算処理により、注目領域の抽出結果を対象の特徴マップ63に統合することができる。なお、この場合、ステップS152の機械学習の処理において、制御部11は、訓練済みの第1推定モデル5により学習画像37に対して得られる抽出画像を対象の層に入力するようにしてもよい。
 <4.5>
 上記実施形態又は変形例において、対象符号ユニットを選択する処理は、検査装置2以外の他のコンピュータで実行されてよい。
 図11は、本変形例に係るユニット選択装置7のハードウェア構成の一例を模式的に例示する。図11に示されるとおり、本変形例に係るユニット選択装置7は、制御部71、記憶部72、通信インタフェース73、外部インタフェース74、入力装置75、出力装置76、及びドライブ77が電気的に接続されたコンピュータである。制御部71~ドライブ77及び記憶媒体97はそれぞれ、上記検査装置2の制御部21~ドライブ27及び記憶媒体92それぞれと同様に構成されてよい。
 本変形例では、記憶部72は、選択プログラム87、第1学習結果データ121、第2学習結果データ125等の各種情報を記憶する。選択プログラム87は、上記対象符号ユニットの選択処理に関する情報処理をユニット選択装置7に実行させるためのプログラムである。選択プログラム87は、当該情報処理の一連の命令を含む。選択プログラム87、第1学習結果データ121、及び第2学習結果データ125のうちの少なくともいずれかは、記憶媒体97に記憶されていてもよい。また、ユニット選択装置7は、選択プログラム87、第1学習結果データ121、及び第2学習結果データ125のうちの少なくともいずれかを記憶媒体92から取得してもよい。
 なお、検査装置2等と同様に、ユニット選択装置7のハードウェア構成に関して、実施形態に応じて、適宜、構成要素の省略、置換及び追加が可能である。ユニット選択装置7は、複数台のコンピュータで構成されてもよい。この場合、各コンピュータのハードウェア構成は、一致していてもよいし、一致していなくてもよい。また、ユニット選択装置7は、提供されるサービス専用に設計された情報処理装置の他、汎用のサーバ装置、汎用のPC、PLC等であってもよい。
 図12は、本変形例に係るユニット選択装置7のソフトウェア構成の一例を模式的に例示する。上記検査装置2等と同様に、ユニット選択装置7のソフトウェア構成は、制御部71による選択プログラム87の実行により実現される。選択プログラム87の実行により、本変形例に係るユニット選択装置7は、モデル取得部219及び選択部216をソフトウェアモジュールとして備えるコンピュータとして動作する。なお、当該ソフトウェアモジュールの一部又は全部が、1又は複数の専用のプロセッサにより実現されてもよい。すなわち、上記各モジュールは、ハードウェアモジュールとして実現されてもよい。また、ユニット選択装置7のソフトウェア構成に関して、実施形態に応じて、適宜、ソフトウェアモジュールの省略、置換及び追加が行われてもよい。
 制御部71は、モデル取得部219として動作し、任意の方法により、各学習結果データ(121、125)を取得する。これにより、制御部71は、対象符号ユニットを選択する処理の対象となる各推定モデル(5、6)を取得する。次に、制御部71は、選択部216として動作し、複数の符号ユニット62の中から少なくとも1つ以上の対象符号ユニットを選択する。対象符号ユニットを選択する方法には、上記いずれかの方法が採用されてよい。
 対象符号ユニットを選択した結果は、対象環境における対象製品Rの外観検査を実施する検査装置に対して任意の方法で反映されてよい。一例として、制御部71は、出力部として動作し、ネットワーク等を介して、対象符号ユニットの選択結果を検査装置に通知してもよい。検査装置では、この通知の受信に応じて、対象符号ユニットを選択した結果が反映されてよい。その他の一例として、制御部71は、対象符号ユニットの選択結果を出力装置76又は他のコンピュータの出力装置に出力してもよい。オペレータは、この出力を参照し、検査装置を操作することで、対象符号ユニットを選択した結果を検査装置に反映してもよい。当該変形例によれば、検査装置の負荷を低減することができる。
 1…モデル生成装置、
 11…制御部、12…記憶部、13…通信インタフェース、
 14…外部インタフェース、
 15…入力装置、16…出力装置、17…ドライブ、
 81…モデル生成プログラム、91…記憶媒体、
 111…第1取得部、112…第1学習部、
 113…第2取得部、114…第2学習部、
 115…保存処理部、
 121…第1学習結果データ、125…第2学習結果データ、
 2…検査装置、
 21…制御部、22…記憶部、23…通信インタフェース、
 24…外部インタフェース、
 25…入力装置、26…出力装置、27…ドライブ、
 82…検査プログラム、92…記憶媒体、
 211…データ取得部、212…領域抽出部、
 213…モデル演算部、214…判定部、
 215…出力部、216…選択部、217…設定部、
 221…対象画像、223…対象復号化画像、
 225…抽出画像、
 227…評価用データセット、
 228…評価画像、229…正解情報、
 30…第1学習データ、31…良品画像、
 35…第2学習データ、36…学習データセット、
 37…学習画像、371…欠陥画像、
 38…正解画像、
 5…第1推定モデル、
 51…符号器、53…復号器、
 6…第2推定モデル、
 61…符号器、62…符号ユニット、
 621…畳み込み層、623…プーリング層、
 65…復号器、
 651…アンプーリング層、653…逆畳み込み層

Claims (13)

  1.  検査を実施する対象製品の写る対象画像を取得するデータ取得部と、
     第1推定モデルを使用して、取得された前記対象画像から注目領域を抽出する領域抽出部であって、前記第1推定モデルは、検査を実施する対象環境において得られた欠陥のない製品の写る複数の第1学習画像を含む第1学習データに基づいて、欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得するように生成されたものである、領域抽出部と、
     前記第1推定モデルによる前記対象画像に対する前記注目領域の抽出結果を使用して、第2推定モデルの演算処理を実行するモデル演算部であって、
      前記第2推定モデルは、欠陥の写る複数の第2学習画像を含む第2学習データに基づいて、欠陥の尤度を判定する能力を獲得するように生成されたものであり、
      前記第2推定モデルの演算処理は、それぞれ低次元の空間に射影する複数回の射影処理を前記対象画像に対して実行することで、次元の異なる複数の特徴マップを生成することを含み、
      前記注目領域の抽出結果は、前記第2推定モデルの演算処理の過程において、前記複数の特徴マップのうちの少なくともいずれか1つに統合される、
    モデル演算部と、
     前記第2推定モデルの演算結果に基づいて、前記対象製品に欠陥があるか否かを判定する判定部と、
     前記対象製品に欠陥があるか否かを判定した結果を示す情報を出力する出力部と、
    を備える、
    検査装置。
  2.  前記第2推定モデルは、画像を特徴量に変換する符号器、及び前記特徴量から前記画像を復号化する復号器であって、復号化された前記画像は欠陥の尤度を画素毎に示す、復号器を備え、
     前記符号器は、入力側から順に直列に接続される複数の符号ユニットを含み、
     前記各符号ユニットは、入力データよりも次元の低い特徴マップに入力データを変換するように構成され、
     前記複数回の射影処理を前記対象画像に対して実行することは、入力側から順に前記各符号ユニットの演算処理を実行することにより構成され、
     前記注目領域の抽出結果は、前記第2推定モデルの演算処理の過程において、前記複数の符号ユニットのうちの少なくとも1つにより生成される特徴マップに統合される、
    請求項1に記載の検査装置。
  3.  前記複数の符号ユニットの中から少なくとも1つ以上の対象符号ユニットを選択する選択部を更に備え、
     前記注目領域の抽出結果は、前記第2推定モデルの演算処理の過程において、選択された前記少なくとも1つ以上の対象符号ユニットにより生成される特徴マップに統合される、
    請求項2に記載の検査装置。
  4.  前記選択部は、
      所定の欠陥を含む評価用製品の写る評価画像を取得し、
      前記第1推定モデルを使用して、取得された前記評価画像から注目領域を抽出し、
      前記対象符号ユニットとして選択されたと仮定する符号ユニットを変更しながら、前記評価画像に対する前記注目領域の抽出結果を使用して、前記第2推定モデルの演算処理を繰り返すことにより、前記各符号ユニットを前記対象符号ユニットとして選択したと仮定したときの前記評価画像に対する前記評価用製品に欠陥があるか否かの判定を符号ユニット毎に試行し、かつ
      前記試行の結果に基づいて、最適な符号ユニットを前記対象符号ユニットとして選択する、
    請求項3に記載の検査装置。
  5.  前記選択部は、
      所定の欠陥を含む評価用製品の写る評価画像を取得し、
      前記第1推定モデルを使用して、取得された前記評価画像から注目領域を抽出し、
      前記対象符号ユニットとして選択されたと仮定する符号ユニットを変更しながら、前記評価画像に対する前記注目領域の抽出結果を使用して、前記第2推定モデルの演算処理を繰り返すことにより、前記各符号ユニットを前記対象符号ユニットとして選択したと仮定したときの前記評価画像に対する前記評価用製品に欠陥があるか否かの判定を符号ユニット毎に試行し、
      前記試行の結果をオペレータに対して出力し、かつ
      前記オペレータの指定による、前記複数の符号ユニットの中からの前記少なくとも1つの対象符号ユニットの選択を受け付ける、
    請求項3に記載の検査装置。
  6.  前記符号器は、畳み込みニューラルネットワークにより構成され、
     前記各符号ユニットは、1又は複数の畳み込み層及びプーリング層により構成される、
    請求項2から5のいずれか1項に記載の検査装置。
  7.  前記欠陥の写る領域を注目領域として抽出する程度を規定するパラメータの値を設定する設定部を更に備え、
     前記領域抽出部は、設定された前記パラメータの値に応じて、前記注目領域を抽出する、
    請求項1から6のいずれか1項に記載の検査装置。
  8.  前記第1推定モデルは、画像を特徴量に変換する符号器、及び前記特徴量から前記画像を復号化する復号器を備え、
     前記領域抽出部は、
      前記第1推定モデルの前記符号器及び前記復号器を使用して、前記対象画像に対して対象復号化画像を生成し、かつ
      生成された前記対象復号化画像及び前記対象画像の間の差分領域を算出し、
     前記パラメータは、前記差分領域を拡げる程度を規定する拡大パラメータを含み、
     前記領域抽出部は、設定された前記拡大パラメータの値に応じて、算出された前記差分領域を拡げることで、前記注目領域の抽出結果を取得する、
    請求項7に記載の検査装置。
  9.  前記注目領域の抽出結果は、アテンションマップにより構成される、
    請求項1から8のいずれか1項に記載の検査装置。
  10.  前記第1推定モデルは、前記第1学習データを使用した機械学習により、前記欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得するように訓練されることで生成されたものである、
    請求項1から9のいずれか1項に記載の検査装置。
  11.  前記第2推定モデルは、前記第2学習データを使用した機械学習により、欠陥の尤度を判定する能力を獲得するように訓練されることで生成されたものである、
    請求項1から10のいずれか1項に記載の検査装置。
  12.  コンピュータが、
     検査を実施する対象製品の写る対象画像を取得するステップと、
     第1推定モデルを使用して、取得された前記対象画像から注目領域を抽出するステップであって、前記第1推定モデルは、検査を実施する対象環境において得られた欠陥のない製品の写る複数の第1学習画像を含む第1学習データに基づいて、欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得するように生成されたものである、ステップと、
     前記第1推定モデルによる前記対象画像に対する前記注目領域の抽出結果を使用して、第2推定モデルの演算処理を実行するステップであって、
      前記第2推定モデルは、欠陥の写る複数の第2学習画像を含む第2学習データに基づいて、欠陥の尤度を判定する能力を獲得するように生成されたものであり、
      前記第2推定モデルの演算処理は、それぞれ低次元の空間に射影する複数回の射影処理を前記対象画像に対して実行することで、次元の異なる複数の特徴マップを生成することを含み、
      前記注目領域の抽出結果は、前記第2推定モデルの演算処理の過程において、前記複数の特徴マップのうちの少なくともいずれか1つに統合される、
    ステップと、
     前記第2推定モデルの演算結果に基づいて、前記対象製品に欠陥があるか否かを判定するステップと、
     前記対象製品に欠陥があるか否かを判定した結果を示す情報を出力するステップと、
    を実行する、
    検査方法。
  13.  コンピュータに、
     検査を実施する対象製品の写る対象画像を取得するステップと、
     第1推定モデルを使用して、取得された前記対象画像から注目領域を抽出するステップであって、前記第1推定モデルは、検査を実施する対象環境において得られた欠陥のない製品の写る複数の第1学習画像を含む第1学習データに基づいて、欠陥の写っている蓋然性を有する領域を注目領域として抽出する能力を獲得するように生成されたものである、ステップと、
     前記第1推定モデルによる前記対象画像に対する前記注目領域の抽出結果を使用して、第2推定モデルの演算処理を実行するステップであって、
      前記第2推定モデルは、欠陥の写る複数の第2学習画像を含む第2学習データに基づいて、欠陥の尤度を判定する能力を獲得するように生成されたものであり、
      前記第2推定モデルの演算処理は、それぞれ低次元の空間に射影する複数回の射影処理を前記対象画像に対して実行することで、次元の異なる複数の特徴マップを生成することを含み、
      前記注目領域の抽出結果は、前記第2推定モデルの演算処理の過程において、前記複数の特徴マップのうちの少なくともいずれか1つに統合される、
    ステップと、
     前記第2推定モデルの演算結果に基づいて、前記対象製品に欠陥があるか否かを判定するステップと、
     前記対象製品に欠陥があるか否かを判定した結果を示す情報を出力するステップと、
    を実行させるための、
    検査プログラム。
PCT/JP2021/020336 2020-06-23 2021-05-28 検査装置、ユニット選択装置、検査方法、及び検査プログラム WO2021261168A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202180035168.4A CN115605746A (zh) 2020-06-23 2021-05-28 检查装置、单元选择装置、检查方法以及检查程序
DE112021003356.5T DE112021003356T5 (de) 2020-06-23 2021-05-28 Inspektionsvorrichtung, Einheitsauswahlvorrichtung, Inspektionsverfahren und Inspektionsprogramm
US17/999,715 US20230222645A1 (en) 2020-06-23 2021-05-28 Inspection apparatus, unit selection apparatus, inspection method, and computer-readable storage medium storing an inspection program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020-108201 2020-06-23
JP2020108201A JP7435303B2 (ja) 2020-06-23 2020-06-23 検査装置、ユニット選択装置、検査方法、及び検査プログラム

Publications (1)

Publication Number Publication Date
WO2021261168A1 true WO2021261168A1 (ja) 2021-12-30

Family

ID=79247117

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/020336 WO2021261168A1 (ja) 2020-06-23 2021-05-28 検査装置、ユニット選択装置、検査方法、及び検査プログラム

Country Status (6)

Country Link
US (1) US20230222645A1 (ja)
JP (1) JP7435303B2 (ja)
CN (1) CN115605746A (ja)
DE (1) DE112021003356T5 (ja)
TW (1) TWI784537B (ja)
WO (1) WO2021261168A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117037143A (zh) * 2023-09-27 2023-11-10 深圳市特区建工科工集团盛腾科技有限公司 基于图像处理的预应力构件性能数据分析方法及***

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023168966A (ja) * 2022-05-16 2023-11-29 ブラザー工業株式会社 コンピュータプログラム、および、検査装置
WO2024009868A1 (ja) * 2022-07-05 2024-01-11 三菱電機株式会社 外観検査システム、外観検査方法、学習装置および推論装置
CN117250208B (zh) * 2023-11-20 2024-02-06 青岛天仁微纳科技有限责任公司 基于机器视觉的纳米压印晶圆缺陷精准检测***及方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016148747A (ja) * 2015-02-12 2016-08-18 株式会社ニューフレアテクノロジー 画像作成方法、検査方法および画像作成装置
JP2020085705A (ja) * 2018-11-28 2020-06-04 セイコーエプソン株式会社 判定装置及び判定方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5359377B2 (ja) 2009-03-02 2013-12-04 オムロン株式会社 欠陥検出装置、欠陥検出方法および欠陥検出プログラム
JP2012026982A (ja) 2010-07-27 2012-02-09 Panasonic Electric Works Sunx Co Ltd 検査装置
WO2019176407A1 (ja) 2018-03-16 2019-09-19 富士フイルム株式会社 学習支援装置、学習支援方法、学習支援プログラム、関心領域判別装置、関心領域判別方法、関心領域判別プログラム及び学習済みモデル
KR20210049086A (ko) 2018-06-29 2021-05-04 델타레이 비브이 투영각의 동적 선택에 의한 물품 검사
US11087174B2 (en) 2018-09-25 2021-08-10 Nec Corporation Deep group disentangled embedding and network weight generation for visual inspection
CN109490316B (zh) 2018-11-30 2021-08-03 熵智科技(深圳)有限公司 一种基于机器视觉的表面缺陷检测算法
CN109741346B (zh) 2018-12-30 2020-12-08 上海联影智能医疗科技有限公司 感兴趣区域提取方法、装置、设备及存储介质

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016148747A (ja) * 2015-02-12 2016-08-18 株式会社ニューフレアテクノロジー 画像作成方法、検査方法および画像作成装置
JP2020085705A (ja) * 2018-11-28 2020-06-04 セイコーエプソン株式会社 判定装置及び判定方法

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117037143A (zh) * 2023-09-27 2023-11-10 深圳市特区建工科工集团盛腾科技有限公司 基于图像处理的预应力构件性能数据分析方法及***
CN117037143B (zh) * 2023-09-27 2023-12-08 深圳市特区建工科工集团盛腾科技有限公司 基于图像处理的预应力构件性能数据分析方法及***

Also Published As

Publication number Publication date
US20230222645A1 (en) 2023-07-13
DE112021003356T5 (de) 2023-04-13
JP2022003495A (ja) 2022-01-11
JP7435303B2 (ja) 2024-02-21
TW202200993A (zh) 2022-01-01
TWI784537B (zh) 2022-11-21
CN115605746A (zh) 2023-01-13

Similar Documents

Publication Publication Date Title
WO2021261168A1 (ja) 検査装置、ユニット選択装置、検査方法、及び検査プログラム
KR102166458B1 (ko) 인공신경망 기반의 영상 분할을 이용한 불량 검출 방법 및 불량 검출 장치
JP6792842B2 (ja) 外観検査装置、変換データ生成装置、及びプログラム
WO2019188040A1 (ja) 画像処理装置、画像処理方法および画像処理プログラム
KR102150673B1 (ko) 외관불량 검사방법 및 외관불량 검사 시스템
CN110619618A (zh) 一种表面缺陷检测方法、装置及电子设备
US11715190B2 (en) Inspection system, image discrimination system, discrimination system, discriminator generation system, and learning data generation device
WO2021059909A1 (ja) データ生成システム、学習装置、データ生成装置、データ生成方法及びデータ生成プログラム
JP7059883B2 (ja) 学習装置、画像生成装置、学習方法、及び学習プログラム
CN111914843B (zh) 文字检测方法、***、设备及存储介质
JP7164028B2 (ja) 学習システム、データ生成装置、データ生成方法、及びデータ生成プログラム
TWI743837B (zh) 訓練資料增量方法、電子裝置與電腦可讀取記錄媒體
CN115830004A (zh) 表面缺陷检测方法、装置、计算机设备和存储介质
JP7170605B2 (ja) 欠陥検査装置、欠陥検査方法、およびプログラム
CN117011300A (zh) 一种实例分割与二次分类相结合的微小缺陷检测方法
CN114612434B (zh) 一种波纹管表面缺陷检测方法及***
CN113034432B (zh) 一种产品缺陷检测方法、***、装置及存储介质
JP7070308B2 (ja) 推定器生成装置、検査装置、推定器生成方法、及び推定器生成プログラム
JP2021174194A (ja) 学習用データ処理装置、学習装置、学習用データ処理方法、およびプログラム
CN113807378B (zh) 训练数据增量方法、电子装置与计算机可读记录介质
JP6791182B2 (ja) ニューラルネットワーク型画像処理装置
JP6961319B2 (ja) 評価方法及び評価装置
CA2997335A1 (en) Automatically generating image datasets for use in image recognition and detection
KR102621884B1 (ko) 상품불량 선별을 위한 딥러닝 기반의 이미지 분석 방법 및 이를 위한 시스템
JP2022053944A (ja) 情報処理装置

Legal Events

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

Ref document number: 21829746

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21829746

Country of ref document: EP

Kind code of ref document: A1