Inspection device and learning device
The inspection device and learning device use machine learning to generate text explaining abnormalities, addressing the lack of clarity in conventional AI-based inspection systems, enhancing cause identification and reducing abnormality frequency.
Patent Information
- Application Number
- JP2023107422
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-27
- Filing Date
- 2023-06-29
- Publication Date
- 2024-10-09
AI Technical Summary
Conventional inspection technologies using artificial intelligence fail to provide clear basis for determining abnormalities, making it difficult to identify the cause and implement countermeasures.
An inspection device and learning device that utilize a trained model to generate text indicating abnormalities, incorporating machine learning techniques such as neural networks and data mining to analyze inspection images and related information, providing insights into the basis for determining abnormalities.
Enables the acquisition of information on why an object is determined abnormal, facilitating prompt identification of causes and reducing the frequency of abnormalities by improving quality and reducing man-hours.
Smart Images

Figure 2024139648000001_ABST
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an inspection apparatus and a learning apparatus. [Background technology]
[0002] Patent Document 1 discloses an inspection device that applies a captured image of an object to a trained artificial intelligence to determine whether the object is good or bad. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2019-196985 A Summary of the Invention [Problem to be solved by the invention]
[0004] However, the above-mentioned conventional technology can determine whether an object to be inspected is normal or abnormal, but does not output the reason why the artificial intelligence judged it to be abnormal. Therefore, the user cannot understand the reason why it is abnormal. Therefore, when an abnormality occurs, it is not clear what measures should be taken, and it is not easy to make improvements to reduce the occurrence of abnormalities. One aspect of the present disclosure aims to obtain information regarding the basis for an artificial intelligence's determination of an abnormality. [Means for solving the problem]
[0005] In order to solve the above problems, an inspection device according to one embodiment of the present disclosure includes a target image acquisition unit that acquires an inspection image, which is an image of an inspection target, and an anomaly estimation unit that inputs the inspection image acquired by the target image acquisition unit into a trained model that has undergone machine learning to generate text indicating an anomaly contained in the inspection target from the image of the inspection target, and acquires the text indicating the anomaly generated by the trained model.
[0006] Moreover, a learning device according to another aspect of the present disclosure includes a data acquisition unit that acquires teacher data including an image of an inspection target and text indicating an abnormality in the inspection target, a text acquisition unit that inputs the image of the inspection target included in the teacher data acquired by the data acquisition unit into a learning model that has undergone machine learning for the relationship between the learned image of the inspection target and the learned text indicating an abnormality in the inspection target, and acquires text output from the learning model, and a parameter update unit that updates parameters of the learning model based on a comparison result between the text included in the teacher data acquired by the data acquisition unit and the text acquired by the text acquisition unit by inputting the image of the inspection target included in the teacher data into the learning model. Effect of the Invention
[0007] According to one aspect of the present disclosure, information regarding the basis for the artificial intelligence's determination of an abnormality can be obtained. [Brief description of the drawings]
[0008] [Figure 1] 1 is a diagram illustrating an example of a configuration of an inspection system including an inspection device and a learning device according to an embodiment of the present disclosure. [Diagram 2] 1 is a diagram showing a configuration of an inspection device according to an embodiment of the present disclosure. [Diagram 3] FIG. 13 is a diagram showing an example of an inspection image. [Figure 4] FIG. 1 is a diagram used to explain a learning model. [Diagram 5] 1 is a flowchart showing a process flow in an inspection device according to an embodiment of the present disclosure. [Figure 6] FIG. 1 is a diagram illustrating a configuration of a learning device according to an embodiment of the present disclosure. [Figure 7] 11 is a flowchart showing a processing flow in a learning device according to an embodiment of the present disclosure. [Figure 8] This is a diagram used to explain Vision Transformer. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] An embodiment of the present disclosure will be described in detail below. Fig. 1 is a diagram showing an example of a configuration of an inspection system 100 including an inspection device and a learning device according to an embodiment of the present disclosure. The inspection system 100 is a system for performing an appearance inspection of an inspection object 5, and includes an inspection device 1, a learning device 2, a camera 3, and a light 4.
[0010] The inspection object 5 is, for example, a brake part. In the following description, the inspection object 5 is a cylindrical metal part having a groove on its side. The inspection object 5 is placed on the rotating table 6 with its circular bottom surface facing down so that the center of the bottom surface of the inspection object 5 is located on the rotation axis of the rotating table 6. When the rotating table 6 is rotated in a predetermined direction R by the rotation of a motor or the like (not shown), the inspection object 5 is rotated in the predetermined direction R together with the rotating table 6.
[0011] The camera 3 is, for example, a line scan camera. The camera 3 is arranged so that its imaging range includes the side of the inspection object 5. The lighting 4 is arranged so as to illuminate at least the imaging range of the camera 3 when imaging the inspection object 5. The camera 3 images the inspection object 5 and outputs an image of the side of the inspection object 5, preferably a specular reflection image of the side of the inspection object 5. The camera 3 is connected to the inspection device 1 and the learning device 2 by wire or wirelessly, and can output the image of the inspection object 5 to the inspection device 1 and the learning device 2.
[0012] The inspection device 1 is a device that detects anomalies in the inspection object 5 using a trained learning model. Anomalies in the inspection object 5 include, for example, dents, scratches, and dents on the side of the inspection object 5. Grooves on the side of the inspection object 5 and minor stains on the side of the inspection object 5 are not included in the anomalies in the inspection object 5. The learning device 2 is a device that constructs a learning model used by the inspection device 1.
[0013] (Inspection equipment configuration) 2 is a diagram showing a configuration of an inspection device 1 according to an embodiment of the present disclosure. The inspection device 1 is, for example, a computer, and includes a control unit 10, a storage unit 11, an input / output unit 12, and a communication unit 13.
[0014] The control unit 10 is, for example, a CPU (Central Processing Unit), and reads out a program from a storage unit 11 and executes it. The storage unit 11 is, for example, a hard disk drive (HDD) or a solid state drive (SSD). The storage unit 11 stores a program executed by the control unit 10 and a learned learning model. The storage unit 11 also has a random access memory (RAM) and the like that is used by the control unit 10 as a workspace. The RAM and the like store images of the inspection target 5, such as an inspection target image and an edge-enhanced image, during the appearance inspection of the inspection target 5. The input / output unit 12 includes, for example, an input device such as a keyboard, and an output device such as a display and a speaker. The communication unit 13 includes a communication interface for communicating with the learning device 2 or the camera 3 via wired or wireless communication.
[0015] FIG. 3 is a diagram showing an example of an inspection image. The inspection image 50 shown in FIG. 3 is a schematic diagram showing the side of the inspection object 5 rotated in a predetermined direction R. In the inspection image 50 in FIG. 3, one rotation of the image is divided into five blocks. In the inspection image 50 in FIG. 3, a plurality of grooves 51 and holes 52 provided on the side of the inspection object 5, and line scratches 53 and dent scratches 54 on the side of the inspection object 5 are captured. Note that the side of the inspection object 5 may include dirt within a normal range, but the normal range of dirt is omitted in the schematic diagram shown in FIG. 3.
[0016] (Learning model structure and functions) Fig. 4 is a diagram used to explain the learning model. The learning model M shown in Fig. 4 is obtained by performing machine learning to generate text indicating an abnormality contained in the inspection object 5 from an inspection image 50 which is an image of the inspection object 5. The learning model M shown in Fig. 4 is composed of a first neural network NN1, a second neural network NN2, a third neural network NN3, and a fourth neural network NN4.
[0017] The first neural network NN1 is a network that performs machine learning to output, when an inspection image 50 that is an image of an inspection object 5 is input, information indicating whether the inspection object 5 is normal or abnormal and information regarding the type of abnormality. The first neural network NN1 includes a generator and a discriminator constructed using a generative adversarial network technique, and a convolutional neural network for classification. Hereinafter, the generator included in the first neural network NN1 will be simply referred to as the generator, and the discriminator included in the first neural network NN1 will be simply referred to as the discriminator.
[0018] The generator uses, for example, a U-net, and has previously learned the relationship between the inspection image 50 of a normal inspection object 5 and an input image including at least an edge-enhanced image generated from the inspection image 50. Hereinafter, the input image including at least an edge-enhanced image generated from the inspection image 50 of the inspection object 5 will be referred to as the input image of the inspection object 5. The input image of the inspection object 5 may include the inspection image 50 of the inspection object 5 used to generate the edge-enhanced image of the inspection object 5.
[0019] The generator includes an encoder and a decoder connected to the output side of the encoder. The encoder and the decoder include a plurality of layers such as a convolutional layer. The generator has at least one skip structure that connects at least one of a plurality of layers included in the encoder to a corresponding layer included in the decoder. The encoder-side layer and the decoder-side layer connected by the skip structure are in a corresponding relationship in which the resolutions of the feature maps output by each of them match. In the decoder-side layer, the output of the encoder-side layer is superimposed on the output of the layer.
[0020] An input image of the inspection object 5 is input to the generator. When the input image of the inspection object 5 is input to the generator, a reproduced image is output by pix2pix, which is a type of image generation algorithm. The reproduced image is an image that falls within the category of a normal inspection object 5. Since the generator includes a skip structure, it is possible to prevent grooves 51 and the like of the inspection object 5 from disappearing from the reproduced image even after passing through multiple layers.
[0021] The discriminator receives the inspection image 50 of the inspection object 5 and the reproduced image output by the generator based on the input image of the inspection object 5. The discriminator outputs information indicating whether the inspection object 5 is normal or abnormal. For example, the discriminator generates a difference image indicating the difference in pixel values at corresponding pixel positions based on the reproduced image of the inspection object 5 and the inspection image 50 of the inspection object 5. Next, the discriminator performs a discrete Fourier transform on the difference image, applies a non-local means filter (NLM) and a high-pass filter to the calculation result, and obtains a high-frequency emphasized image of the inspection object 5. The discriminator calculates the degree of abnormality based on a value obtained by dividing the sum of squares of the pixel values of the high-frequency emphasized image by the number of pixels. Then, the discriminator determines that the inspection object 5 is abnormal if the degree of abnormality is equal to or greater than a predetermined threshold, and determines that the inspection object 5 is normal if the degree of abnormality is less than the predetermined threshold.
[0022] The first neural network NN1 also includes a convolutional neural network used to classify anomalies. This convolutional neural network is a machine learning process that generates information indicating the type of anomaly from an input image of the inspection object 5. The convolutional neural network includes a convolutional layer, a pooling layer, a fully connected layer, and a softmax layer. An input image of the inspection object 5 is input to the convolutional neural network. This convolutional neural network can output a classification of anomalies contained in the inspection object 5. Types of anomalies include, for example, dents, line scratches, dents, burrs, dirt in an abnormal range, dimensions that are out of tolerance, and overall curling.
[0023] The second neural network NN2 is an encoder that performs machine learning to extract feature parts containing abnormalities from an input image of the inspection object 5. The second neural network NN2 includes a convolution layer and a pooling layer. An inspection image 50 of the inspection object 5 is input to the second neural network NN2. The second neural network NN2 can extract feature parts containing abnormalities in the inspection image 50 of the inspection object 5, and output latent variables (feature vectors) for the feature parts.
[0024] The third neural network NN3 is a machine learning process that generates text indicating an abnormality in the inspection target 5 from the output information of at least the first neural network NN1 and the second neural network NN2. The third neural network NN3 may be, for example, a decoder of a recursive neural network. The third neural network NN3 may include an attention mechanism. The text indicating an abnormality in the inspection target 5 output by the third neural network NN3 is, for example, an explanatory text including the type of abnormality contained in the inspection target 5.
[0025] When the inspection image 50 shown in FIG. 3 is input to the first neural network NN1, the first neural network NN1 outputs, for example, a judgment result of “abnormality” and information regarding the classification of the abnormality as a “linear scratch” or a “dent scratch”. When the inspection image 50 shown in FIG. 3 is input to the second neural network NN2, the second neural network NN2 outputs latent variables indicating, for example, the presence or absence, position, size, etc. of linear scratches 53 and dents 54. The third neural network NN3 outputs text indicating an abnormality in the inspection object 5, such as "This part has linear scratches and dents" based on the outputs of the first neural network NN1 and the second neural network NN2.
[0026] The fourth neural network NN4 performs machine learning to output keywords related to the production situation where an abnormality occurred from related information related to the production of the inspection target. The fourth neural network NN4 may be, for example, an encoder of a recursive neural network. The related information may be, for example, information on a defect report on a production line. The keywords related to the production situation where an abnormality occurred may be the line number of the production line where the defect occurred, the lot number of the inspection target 5 produced on the production line where the defect occurred, the worker who was working on the production line when the defect occurred, information on the surrounding environment of the production line when the defect occurred, etc. The keywords output by the fourth neural network NN4 may be input to the third neural network NN3. The third neural network NN3 may supplement the words with the keywords input from the fourth neural network NN4 and output text indicating the abnormality of the inspection target 5.
[0027] (Inspection equipment functions) As shown in FIG. 2, the control unit 10 functions as a target image acquisition unit 101, a related information acquisition unit 102, an abnormality estimation unit 103, a feature quantification unit 104, an information accumulation unit 105, and a trend acquisition unit 106 by executing a program stored in the memory unit 11.
[0028] The object image acquisition unit 101 acquires a captured image of the inspection object 5 from the camera 3, and acquires an inspection image 50, which is an image of the inspection object 5, based on the captured image.
[0029] The related information acquisition unit 102 acquires related information. For example, the related information acquisition unit 102 reads out the text of a defect report stored in advance in the storage unit 11, and acquires related information from the text of the defect report. The related information acquisition unit 102 may accept input of related information via the input / output unit 12, or may acquire the text of the defect report from an external storage device via the communication unit 13.
[0030] 4, the abnormality estimation unit 103 inputs the inspection image 50 acquired by the target image acquisition unit 101 and the related information acquired by the related information acquisition unit 102. The abnormality estimation unit 103 acquires information indicating whether the inspection target 5 is normal or abnormal, and information regarding the type of abnormality contained in the inspection target 5, which are output from the first neural network NN1 of the learning model M, as well as text indicating the abnormality, which is output from the third neural network NN3.
[0031] The feature digitization unit 104 digitizes the features that the first neural network NN1 has focused on in the process leading up to the output. In other words, the feature digitization unit 104 digitizes the basis on which the first neural network NN1 has output the input test image. Possible examples of the feature digitization unit 104 include LIME (Local interpretable model-agnostic explanations) and SHAP (Shapley additive explanations).
[0032] The information accumulation unit 105 stores information on the type of anomaly contained in the inspection target 5 acquired by the anomaly estimation unit 103 and text indicating the anomaly in a defect analysis database. The defect analysis database may be stored in the storage unit 11 of the inspection device 1, or in a storage device external to the inspection device 1. When storing information in the defect analysis database, the information accumulation unit 105 may associate the inspection image 50 of the inspection target 5 acquired by the object image acquisition unit 101, the related information acquired by the related information acquisition unit 102, the anomaly feature word extracted from the text indicating the anomaly, and the like.
[0033] An abnormality characteristic word is a word that is included in the text indicating an abnormality output by the third neural network NN3 and is related to information on the type of abnormality output by the first neural network NN1. A database of words that are candidates for abnormality characteristic words (hereinafter, referred to as an abnormality term dictionary) is stored in the storage unit 11 for each type of abnormality that the first neural network NN1 can output. The information accumulation unit 105 divides the text indicating an abnormality into words, and extracts words included in the abnormality term dictionary from among these words as abnormality characteristic words.
[0034] The trend acquisition unit 106 acquires information indicating the tendency of anomalies to occur by applying data mining techniques such as text mining to the information stored in the defect analysis database by the information storage unit 105. The information indicating the tendency of anomalies to occur includes the distribution of production lines in which anomalies occurred, the distribution of lots in which anomalies occurred, the distribution of dates and times when anomalies occurred, the distribution of anomalies by type, and the like.
[0035] (Inspection equipment control) Fig. 5 is a flowchart showing the flow of processing in the inspection device 1. Before the processing shown in Fig. 5, the user of the inspection device 1 places an unlearned inspection target 5, which has not been trained by the learning model M, on the turntable 6, turns the inspection target 5 one or more times while illuminating it from the light 4, and causes the camera 3 to capture an image of the side of the inspection target 5.
[0036] In S100, the control unit 10 functions as an object image acquisition unit 101 and acquires an inspection image 50 of the inspection object 5.
[0037] When the inspection image 50 is acquired, the control unit 10 functions as an abnormality estimation unit 103 . In S101, the control unit 10 acquires a difference image of the inspection object 5. The control unit 10 performs image processing to enhance edges on the inspection image 50 acquired in S100 to generate an edge-enhanced image. The control unit 10 inputs the edge-enhanced image to the first neural network NN1 and acquires a reproduced image from the generator. The control unit 10 acquires a difference image of the inspection object 5 based on the reproduced image and the inspection image 50 acquired in S100.
[0038] In the next step S102, the control unit 10 determines whether the inspection object 5 is normal or abnormal based on the difference image acquired in S101, and classifies the type of abnormality contained in the inspection object 5. The control unit 10 calculates the degree of abnormality of the inspection object 5 based on the differential image acquired in S101, and judges the inspection object 5 to be abnormal if the degree of abnormality is equal to or greater than a predetermined threshold, and judges the inspection object 5 to be normal if the degree of abnormality is less than the predetermined threshold. Furthermore, the control unit 10 inputs an input image of the inspection object 5 to a convolutional neural network included in the first neural network NN1, and acquires information indicating the type of abnormality.
[0039] In S103, the control unit 10 inputs the inspection image 50 acquired in S100 to the second neural network NN2 to acquire latent variables. The process of S103 may be performed before the processes of S101 and S102.
[0040] In S104, the control unit 10 functions as the related information acquisition unit 102 and acquires the related information. The process of S104 may be performed before the processes from S101 to S103. In the next S105, the control unit 10 functions as the abnormality estimation unit 103, inputs the related information acquired in S104 to the fourth neural network NN4, and acquires keywords related to the production situation in which the abnormality occurred.
[0041] In S106, the control unit 10 functions as the abnormality estimation unit 103 and generates text indicating an abnormality. More specifically, the control unit 10 inputs the information indicating whether the inspection target 5 is normal or abnormal, and the information indicating the type of abnormality contained in the inspection target 5, acquired in S102, the latent variables acquired in S103, and the keywords acquired in S105, to the third neural network NN3, and generates text indicating an abnormality in the inspection target 5.
[0042] In S107, the control unit 10 functions as the information storage unit 105, and stores the text indicating the abnormality generated in S106 and the related information acquired in S104 in the malfunction analysis database. In the next step S108, the control unit 10 functions as the trend acquisition unit 106 and acquires information indicating the occurrence trend of anomalies from the information accumulated in the malfunction analysis database. In the next S109, the control unit 10 provides information on the abnormality included in the inspection target 5 based on the text indicating the abnormality of the inspection target 5 generated in S106 and the information indicating the tendency of abnormality occurrence acquired in S108. For example, the control unit 10 outputs the text indicating the abnormality of the inspection target 5 generated in S106 and the information indicating the tendency of abnormality occurrence acquired in S108 from an output device included in the input / output unit 12 or an output device connected via the communication unit 13. By displaying the text indicating the abnormality, the user can recognize the basis for determining that the inspection target 5 is abnormal, that is, what kind of abnormality is present in the inspection target 5. When an abnormality occurs in the inspection target 5, the cause can be presented to the user promptly, so that the user can start investigating the cause at an early stage. In addition, the user can recognize the tendency of abnormality occurrence, so that the user can identify the cause at an early stage. The frequency of abnormality occurrence decreases, the quality of the inspection target 5 improves, and the man-hours of workers devoted to dealing with abnormalities can be reduced.
[0043] After executing the process of S109, the control unit 10 ends the process shown in Fig. 5. If there are other inspection objects 5 remaining to be visually inspected, the control unit 10 executes the series of processes shown in Fig. 5 for the next inspection object 5.
[0044] (Learning device configuration) 6 is a diagram showing a configuration of a learning device 2 according to an embodiment of the present disclosure. The learning device 2 is, for example, a computer, and includes a control unit 20, a storage unit 21, an input / output unit 22, and a communication unit 23. The control unit 20, the storage unit 21, the input / output unit 22, and the communication unit 23 of the learning device 2 have the same configuration as the control unit 10, the storage unit 11, the input / output unit 12, and the communication unit 13 of the inspection device 1.
[0045] The memory unit 21 of the learning device 2 stores a program executed by the control unit 20 of the learning device 2 and a learning model M being constructed. The memory unit 21 also stores teacher data used when constructing the learning model M. The teacher data includes an image of the inspection object 5 and text indicating an abnormality in the inspection object.
[0046] (Functions of the learning device) The control unit 20 executes various programs stored in the storage unit 21 to function as a data acquisition unit 201, a text acquisition unit 202, and a parameter update unit 203.
[0047] The data acquisition unit 201 acquires teacher data from the storage unit 21. The data acquisition unit 201 can perform an augmentation process on the teacher data acquired from the storage unit 21 to further acquire the augmented teacher data. For example, when the teacher data acquired by the data acquisition unit 201 from the storage unit 21 is regarded as first teacher data, and an image of the inspection target 5 included in the first teacher data and text indicating an abnormality in the inspection target are regarded as a first image and a first text, respectively, the data acquisition unit 201 further acquires the following teacher data by the augmentation process. (1) Second training data including a second image obtained by processing the first image and the first text (2) Third training data including the first image and the second text obtained by processing the first text (3) A fourth training data set including the second image and the second text.
[0048] In the training data padding process, processing of the image of the inspection object 5 may include, for example, flipping left and right, flipping up and down, flipping left and right, rotating by 90 degrees, etc. Processing of the text indicating an abnormality in the inspection object 5 may include, for example, changing the word order or phrases, or rephrasing with a synonym, etc. For example, if the first text is "This part has a scratch," then the second text may be "This is a part with a scratch," etc.
[0049] The text acquisition unit 202 inputs the image of the inspection object 5 contained in the training data acquired by the data acquisition unit 201 into the learning model M being constructed, and acquires the text output from the third neural network NN3 of the learning model M.
[0050] The parameter update unit 203 updates the parameters of the learning model M based on a comparison result between the text included in the teacher data acquired by the data acquisition unit 201 and the text acquired by the text acquisition unit 202 based on the image included in the teacher data. The parameter update unit 203 separates the text included in the teacher data acquired by the data acquisition unit 201 and the text acquired by the text acquisition unit 202 based on the image included in the teacher data into phrases. The parameter update unit 203 calculates the error between the contents of the phrases of the two texts using a predetermined error function. The parameter update unit 203 calculates the parameters of the learning model M that minimize this error by an error backpropagation method or the like, and updates the parameters of the learning model M. The parameters of the learning model M include the parameters of the first neural network NN1, the second neural network NN2, the third neural network NN3, and the fourth neural network NN4, as well as parameters for image processing that generates an edge-enhanced image, etc.
[0051] (Control of learning device) FIG. 7 is a flowchart showing the flow of processing in the learning device 2. In S200, the control unit 20 of the learning device 2 functions as the data acquisition unit 201 and acquires teacher data from the storage unit 21. At this time, the control unit 20 appropriately performs an augmentation process on the acquired teacher data, and also acquires the augmented teacher data.
[0052] In S201, the control unit 20 functions as a text acquisition unit 202, and inputs images contained in the training data acquired in S200 into the learning model M being constructed, and acquires text indicating an anomaly output from the third neural network NN3. In S202, the control unit 20 functions as the parameter update unit 203, and compares the text included in the teacher data acquired in S200 with the text acquired in S201. For example, the control unit 20 calculates the error between the text included in the teacher data acquired in S200 and the text acquired in S201 by using a predetermined error function. In S203, the control unit 20 updates the parameters of the learning model M by the error backpropagation method or the like based on the error calculated in S202.
[0053] After executing the process of S203, the control unit 20 ends the process shown in Fig. 7. When learning is to be performed multiple times for one teacher data, the series of processes shown in Fig. 7 may be executed for the same teacher data.
[0054] (Modification) In the above embodiment, the inspection system 100 is provided with the inspection device 1 and the learning device 2 separately. However, the inspection device 1 may also have some of the functions of the learning device 2. In the above embodiment, the inspection system 100 is provided with the inspection device 1 and the camera 3 separately. However, the camera 3 may be built into the inspection device 1. In the above embodiment, the inspection system 100 is described as including the illumination 4, but it is not necessarily required to include the illumination 4.
[0055] In the above embodiment, the control unit 10 of the inspection device 1 functions as the trend acquisition unit 106, but this is not limited thereto. For example, the control unit 20 of the learning device 2 may function as the trend acquisition unit 106. Specifically, the control unit 20 of the learning device 2 may apply a data mining technique such as text mining to the information accumulated in the defect analysis database to acquire information indicating the occurrence tendency of anomalies. The control unit 20 of the learning device 2 may reflect the information indicating the occurrence tendency of anomalies acquired by the trend acquisition unit 106 in the update of the parameters of the learning model M by the parameter update unit 203.
[0056] In the above embodiment, the inspection system 100 performs an appearance inspection of the inspection target 5, but the scope of application of the present disclosure is not limited to appearance inspection. The present disclosure can also be applied to inspections other than appearance inspections, such as various non-destructive inspections, as long as the inspection uses an image of the inspection target 5. Possible non-destructive inspections include, for example, inspections using X-ray images or thermography images.
[0057] In the above embodiment, in the data acquisition unit 201, the control unit 20 of the learning device 2 acquires the teacher data stored in the storage unit 21, performs an augmentation process on the teacher data, and further acquires the augmented teacher data. However, the method of the learning device 2 acquiring the teacher data is not limited to these. For example, the control unit 20 of the learning device 2 may superimpose a difference image of an abnormal test object 5 on an inspection image 50 of a normal test object 5 (hereinafter, normal image) to acquire a composite image of the test object 5, and acquire teacher data based on the composite image. The control unit 20 of the learning device 2 may further acquire a composite image in which an image in which the size, angle, aspect ratio, etc. of an abnormal part included in the difference image is changed is superimposed on the normal image, thereby further augmenting the teacher data. The control unit 20 of the learning device 2 may further acquire an image in which the composite image is flipped left and right, flipped up and down, flipped up and down and left and right, rotated 90 degrees, etc., to further augment the teacher data. It is preferable that the composite image generated for augmenting the teacher data in this way is combined with text indicating an abnormality occurring in the abnormal test object 5 to be used as teacher data. By acquiring a composite image of the inspection target 5 in this manner, it is possible to acquire sufficient training data to ensure interpretability even for an inspection target 5 for which it is not possible to secure sufficient inspection images 50 of abnormal inspection targets 5. This makes it possible to improve the accuracy of the text output from the third neural network NN3.
[0058] In the above embodiment, the generator included in the first neural network NN1 uses U-net. The encoder and decoder of the generator include multiple layers such as convolution layers and have at least one skip structure. However, the generator included in the first neural network NN1 is not limited to this. For example, the generator included in the first neural network NN1 (hereinafter, generator) may apply Vision Transformer (hereinafter, Vit) to its encoder. More specifically, the output of a convolutional neural network formed by a convolution layer or the like in the encoder of the generator may be input to Vit. In Vit, an input image is divided into multiple patches, and information included in each patch is flattened into a vector. This vector is given information indicating the position of each patch relative to the input image.
[0059] FIG. 8 is a diagram used to explain Vit. In FIG. 8, the output X of the convolutional neural network included in the encoder of the generator is divided into four patches Xp. A vector in which the information included in the four patches Xp is flattened is set as Fp. Note that, although the number of divisions of the output X is set to four in FIG. 8, this is not limited to this.
[0060] Additional information Ep is added to the vector Fp. The additional information Ep includes information indicating the position of each patch Xp relative to the output X. For example, of the four patches Xp shown in FIG. 8, the vector Fp relating to the upper left patch Xp is added with position information of "0", and the vector Fp relating to the upper right patch Xp is added with position information of "1". The vector Fp to which the additional information Ep is added is input to the encoder 70 of Vit.
[0061] The Vit encoder 70 has a multi-layer perceptron and a self-multihead attention. The encoder 70 performs machine learning to determine the relevance of each patch Xp to neighboring patches Xp. When a vector Fp to which additional information Ep is added is input, the Vit encoder 70 estimates, for each patch Xp, patches Xp with high relevance in the vicinity of the patch Xp, and obtains peripheral information on the highly relevant patches Xp. The Vit encoder 70 outputs an output based on the position information, peripheral information, and vector Fp of each patch Xp to the generator decoder. The generator decoder generates a reproduction image based on this output. Since the relevance to the surroundings is taken into account in the reproduction image, the reconstruction accuracy can be improved.
[0062] In the above embodiment, the input image of the inspection object 5 is input to the generator included in the first neural network NN1. The input image of the inspection object 5 includes at least an edge-enhanced image generated from the inspection image 50 of the inspection object 5, and may include the inspection image 50 used to generate the edge-enhanced image. The edge-enhanced image is an image in which the change in luminance in the inspection image 50 is emphasized. The edge-enhanced image may be a binary image in which the luminance of each pixel is binarized, or the luminance of each pixel may be expressed in multiple gradations of three or more values. By making the edge-enhanced image a multiple gradation image including gray, which is an intermediate color, the reconstruction accuracy of the reproduced image output by the generator can be improved with respect to the shading of each part of the inspection object 5. In addition, information indicating a characteristic region extracted from the inspection image 50 of the inspection object 5 may be added to the edge-enhanced image. The reconstruction accuracy of the reproduced image output by the generator can also be improved by adding information indicating a characteristic region to the edge-enhanced image.
[0063] 〔summary〕 An inspection device according to one embodiment of the present disclosure includes a target image acquisition unit that acquires an inspection image, which is an image of an inspection target, and an anomaly estimation unit that inputs the inspection image acquired by the target image acquisition unit into a trained model that has undergone machine learning to generate text indicating an anomaly contained in the inspection target from the image of the inspection target, and acquires the text indicating the anomaly generated by the trained model. The inspection device according to one aspect of the present disclosure includes an anomaly estimation unit having a trained model for generating text indicating an anomaly contained in an inspection object. When an inspection image is input to the anomaly estimation unit, text regarding an anomaly in the input inspection image can be obtained from the trained model.
[0064] The inspection device according to one aspect of the present disclosure includes a trend acquisition unit that acquires a trend of anomaly occurrence by performing text mining on the text indicating the anomaly acquired by the anomaly estimation unit. An inspection device according to one aspect of the present disclosure can acquire the occurrence tendency of anomalies by storing text indicating an anomaly obtained by an anomaly estimation unit in a memory unit and performing text mining on the text indicating anomalies stored in the memory unit.
[0065] A learning device according to one aspect of the present disclosure includes a data acquisition unit that acquires teacher data including an image of an object to be inspected and text indicating an abnormality in the object to be inspected, a text acquisition unit that inputs the image of the object to be inspected included in the teacher data acquired by the data acquisition unit into a learning model of the object to be inspected and acquires text output from the learning model, and a parameter update unit that updates parameters of the learning model based on a comparison result between the text included in the teacher data acquired by the data acquisition unit and the text acquired by the text acquisition unit by inputting the image of the object to be inspected included in the teacher data into the learning model. A learning device according to an aspect of the present disclosure updates parameters of a learning model based on a comparison result between a text indicating an abnormality in an inspection target output from a learning model to which an image of the inspection target included in training data is input, and a text indicating an abnormality in the inspection target included in the training data, thereby making it possible to make the text indicating an abnormality in the inspection target output from the learning model appropriate.
[0066] In a learning device according to one embodiment of the present disclosure, the data acquisition unit further acquires, for each first teacher data of at least one of a first image of the inspection object and a first text indicating an abnormality in the inspection object, second teacher data including the first image and a second text obtained by processing an expression of the first text. In addition, in a learning device according to one embodiment of the present disclosure, the data acquisition unit further acquires, for each of the first teacher data, third teacher data including a second image obtained by processing the first image and the first text, and further acquires, for each of the second teacher data, fourth teacher data including the second image and the second text. In the learning device according to an embodiment of the present disclosure, the data acquisition unit processes the images or text of the teacher data to pad it out. This makes it possible to appropriately update the parameters of the learning model even when the original first teacher data is small.
[0067] In an inspection device according to one embodiment of the present disclosure, the trained model includes a first neural network that has undergone machine learning to output information regarding the type of anomaly from an image of the inspection object, a second neural network that has undergone machine learning to output an extracted image that extracts an abnormal portion from the image of the inspection object, and a third neural network that has undergone machine learning to generate text indicating anomalies contained in the inspection object based on output information from the first neural network and the second neural network. In an inspection device according to one aspect of the present disclosure, a trained model having the above-described configuration can be used to properly generate text indicating an abnormality contained in an object to be inspected from an image of the object to be inspected.
[0068] An inspection device according to one embodiment of the present disclosure includes a related information acquisition unit that acquires related information related to the production of the inspection object, and the trained model has a fourth neural network that has undergone machine learning to output keywords related to the production situation in which an abnormality occurred from the related information acquired by the related information acquisition unit, and the third neural network has undergone machine learning to generate text indicating an abnormality contained in the inspection object based on output information of the first neural network, the second neural network, and the fourth neural network. When an inspection device generates text indicating an anomaly contained in an inspection target, the device may run out of words to use in the description of the anomaly. In an inspection device according to an embodiment of the present disclosure, keywords can be obtained from related information, thereby reducing the shortage of words to use in the description of the anomaly.
[0069] In an inspection device according to one aspect of the present disclosure, the trained model includes a generator that has previously machine-learned the relationship between an input image including at least an edge-enhanced image in which the edges of the test image of the normal test object are enhanced, and an output image which is the test image of the normal test object, and a discriminator that inputs at least an edge-enhanced image in which the edges of the test image of the unlearned test object are enhanced to the generator, obtains a reproduction image which is an image output from the generator, and determines whether the test object is normal or abnormal based on the test image and the reproduction image relating to the test object. In the inspection device according to the embodiment of the present disclosure, the luminance of each pixel in the edge-enhanced image is expressed in multiple gradations having three or more values. In the inspection device according to one aspect of the present disclosure, information indicating a characteristic region extracted from the inspection image is added to the edge-enhanced image. By using the edge-enhanced image, the reconstruction accuracy of the reproduced image output by the generator can be improved.
[0070] In an inspection device according to one embodiment of the present disclosure, the generator includes a decoder, a first encoder connected to the decoder by a skip structure, and a second encoder that outputs to the decoder a second output based on the first output output from the first encoder, and the second encoder obtains peripheral information indicating the degree of association with surrounding patches for each of a plurality of patches divided from the first output, and outputs the second output based on the peripheral information to the decoder. In the field of anomaly detection for industrial parts using technologies such as pix2pix, the shading of each part of the inspection object 5 is averaged when generating a reproduced image, and sufficient reconstruction accuracy may not be obtained. The second encoder acquires peripheral information and outputs an output based on the peripheral information to the decoder, so that the relationship with the surroundings can be reflected in the reproduced image. This makes it possible to acquire a high-definition reproduced image that takes into account the shading of the surrounding parts, for example.
[0071] In a learning device according to one aspect of the present disclosure, the data acquisition unit may superimpose the reproduction image generated based on the test image of the test object determined to be abnormal by the discriminator and a difference image generated based on the test image of the test object determined to be abnormal on the test image of the test object determined to be normal by the discriminator to obtain a composite image, and acquire teacher data based on the composite image. By obtaining a composite image of the test subject in this manner, sufficient training data can be obtained to ensure interpretability, even for test subjects for which it is not possible to obtain sufficient test images of abnormal test subjects.
[0072] The present disclosure is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. Embodiments obtained by appropriately combining the technical means disclosed in different embodiments are also included in the technical scope of the present disclosure. [Explanation of symbols]
[0073] 1. Inspection equipment 2 Learning device 5. Subjects of Inspection 101 Target image acquisition unit 102 Related Information Acquisition Department 103 Anomaly estimation section 104 Feature Quantification Unit 105 Information Storage Unit 106 Trend acquisition section 201 Data Acquisition Department 202 Text Acquisition Section 203 Parameter Update Unit M Learning Model NN1 First Neural Network NN2 Second Neural Network NN3 Third Neural Network NN4 Fourth Neural Network
Claims
1. an object image acquisition unit for acquiring an inspection image which is an image of an object to be inspected; an anomaly estimation unit that inputs the inspection image acquired by the target image acquisition unit into a trained model that has been subjected to machine learning to generate text indicating an anomaly contained in the inspection target from the image of the inspection target, and acquires the text indicating the anomaly generated by the trained model; An inspection device comprising:
2. The inspection device according to claim 1 , further comprising a trend acquisition unit that acquires an occurrence trend of an anomaly by performing text mining on the text indicating the anomaly acquired by the anomaly estimation unit.
3. A data acquisition unit that acquires teacher data including an image of an object to be inspected and text indicating an abnormality in the object to be inspected; a text acquisition unit that inputs an image of the inspection target included in the teacher data acquired by the data acquisition unit into a learning model of a learning target, and acquires text output from the learning model; a parameter update unit that updates parameters of the learning model based on a comparison result between a text included in the teacher data acquired by the data acquisition unit and a text acquired by the text acquisition unit by inputting the image of the inspection target included in the teacher data into the learning model; A learning device comprising:
4. The learning device according to claim 3, characterized in that the data acquisition unit further acquires, for each first teacher data of at least one of a first image of the inspection object and a first text indicating an abnormality in the inspection object, second teacher data including the first image and a second text obtained by processing an expression of the first text.
Citation Information
Patent Citations
Inspection equipment and inspection method
JP2019196985A
