Pre-learning device, pre-learning method and computer program

The pre-learning device addresses the challenge of accurately classifying defects in products with small parts by using contrastive learning on partial images, enhancing defect detection on objects with similar patterns without extensive labeled data.

JP2024141773AInactive Publication Date: 2024-10-10SEIKO EPSON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2023053598
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-10
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing machine learning models struggle to accurately classify defects in products with small defective parts due to high learning costs when using detailed images, and fail to distinguish between similar patterns on objects, leading to inaccurate classification.

Method used

A pre-learning device that generates a pre-learning model by performing contrastive learning on partial images of objects with similar patterns, using encoders and predictors to output feature vectors that reflect positional differences, allowing for accurate classification without labeled data.

Benefits of technology

The pre-learning model effectively classifies products by generating appropriate feature vectors that account for positional differences in similar patterns, improving accuracy in defect detection on objects like circuit boards without requiring extensive labeled data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024141773000001_ABST
    Figure 2024141773000001_ABST
Patent Text Reader

Abstract

To generate a feature extraction model that can output appropriate feature vectors that reflect a difference in the location of a portion for an image representing the portion of an object containing multiple patterns similar to each other.SOLUTION: A pre-learning device acquires first original image data, based on that, generates multiple pieces of first type partial image data and multiple pieces of first type identification data, performs comparison learning by using multiple sets of first type input data sets to generate a pre-learning model. The first original image data is the image data of the first object including multiple patterns similar to each other. The first type partial image data represents a portion of the first original image represented by the first original image data. The first type identification data represents the position in the first original image of the partial image represented by the first type partial image data. The first type input dataset is a combination of one first type partial image data and the first type identification data that represents the position of the partial image represented by that.SELECTED DRAWING: Figure 4
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a pre-learning device, a pre-learning method, and a computer program. [Background technology]

[0002] Conventionally, machine learning models that have been pre-trained with product images are used in product inspection. The machine learning models receive product images and output the results of determining whether the product is "good" or "bad." However, in order to have the model perform supervised learning so as to achieve the required discrimination accuracy, a huge number of image data labeled "good" or "bad" is required.

[0003] One technology that solves this problem is self-supervised learning (SSL), which can realize a highly accurate model without preparing labeled data. Contrastive learning is a type of self-supervised learning. "Contrastive learning" is a type of learning that uses a mechanism to compare input data with each other, allowing data to be learned as is, without labeling the input data.

[0004] Non-Patent Document 1 refers to SimSiam as such contrast learning. In the technology of Non-Patent Document 1, a pair of feature extraction models having the same weight parameters are arranged. Each feature extraction model receives an image as input and outputs a feature vector. A plurality of images obtained by applying extension to an unsupervised image are given to the pair of feature extraction models, and the feature extraction models are trained so that the outputs of the respective feature extraction models approach each other. After that, a classifier that receives the feature vector output by the feature extraction model and outputs a discrimination result is trained with a small number of supervised images. By combining the pre-trained feature extraction models and the classifier, a model capable of discriminating images with high accuracy is realized. [Prior art documents] [Non-patent literature]

[0005] [Non-Patent Document 1] Xinlei Chen, Kaiming He, Facebook AI Research. Exploring Simple Siamese Representation Learning. arXiv preprint arXiv:2011.10566, 2020. Summary of the Invention [Problem to be solved by the invention]

[0006] There are products in which the dimensions of the part where the defect appears are very small compared to the dimensions of the whole product. For such products, if a detailed image that represents the whole product is trained, the cost of training will be high. On the other hand, if an image that represents the whole product but has fewer pixels is prepared, the shape of the part where the defect appears will not be accurately represented on the image. For a trained model trained with such an image, the accuracy of pass / fail judgment will decrease. For this reason, the inventors of the technology disclosed herein have considered training using images generated by dividing a detailed image that represents the whole product.

[0007] On the other hand, when such processing is performed on an object including multiple similar patterns, such as a circuit board, images cut out from different parts will be similar to each other. However, in the model described in Non-Patent Document 1, classification of images obtained by dividing an image of an object including multiple similar patterns is not assumed. For this reason, in the technology of Non-Patent Document 1, the inventors of the technology disclosed herein predicted that learning would be performed so that a pair of feature extraction models would output the same feature vector when similar patterns existing at different positions on an object have the same features.

[0008] However, for example, in the inspection of circuit boards, a pattern in one location may be classified as defective if it has a certain characteristic, while a similar pattern in another location may not be classified as defective even if it has the same characteristic. For this reason, there is a demand for learning that can generate a feature extraction model that can output an appropriate feature vector that reflects the differences in the locations of an image of a part of an object that includes multiple similar patterns. [Means for solving the problem]

[0009] The present disclosure has been made to solve at least a part of the above-mentioned problems, and can be realized in the following forms.

[0010] According to one embodiment of the present disclosure, there is provided a pre-learning device that receives image data as input and generates a pre-learning model that outputs a feature vector. This pre-learning device includes a first data acquisition unit that acquires first original image data, where the first original image data is image data of a first object including a plurality of patterns that are similar to each other; a first data generation unit that generates a plurality of first type partial image data and a plurality of first type identification data based on the first original image data, where each of the plurality of first type partial image data represents a different portion of a first original image represented by the first original image data, and each of the plurality of first type identification data represents a position in the first original image of a partial image represented by one of the plurality of first type partial image data; and a model generation unit that generates the pre-learning model by performing contrast learning using a plurality of first type input datasets, where each of the plurality of first type input datasets is a combination of one of the plurality of first type partial image data and first type identification data representing the position of the partial image represented by the one of the first type partial image data. [Brief description of the drawings]

[0011] [Figure 1]FIG. 1 is a block diagram showing a pre-learning device 1 according to a first embodiment. [Diagram 2] 11 is a flowchart showing a process for generating a pre-learning model that receives image data as input and outputs a feature vector. [Diagram 3] 1 is an explanatory diagram showing first original image data Im1 representing a circuit board CB1 and first type partial image data Ip11 and Ip22. FIG. [Figure 4] FIG. 13 is a block diagram showing contrastive learning of a model in step S300. [Diagram 5] 1 is a block diagram showing the configuration of a discrimination model IDM that receives an image of a circuit board and discriminates whether the circuit board is a good product or a defective product. [Figure 6] FIG. 11 is a block diagram showing a pre-learning device 1A of a second embodiment. [Figure 7] 11 is an explanatory diagram showing the relationship between a first type of partial image data Ip11 and a first type of extended image data Ipa11. FIG. [Figure 8] FIG. 11 is a block diagram showing a pre-learning device 1B of a third embodiment. [Figure 9] 13 is an explanatory diagram showing the relationship between a first type of partial image data Ip11 and a second type of partial image data Ip21. FIG. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] A. First embodiment: FIG. 1 is a block diagram showing a pre-learning device 1 according to a first embodiment. The pre-learning device 1 generates a pre-learning model that receives image data and outputs a feature vector. The pre-learning device 1 specifically includes a CPU 10, which is a processor, a RAM 20, and a ROM 30. The RAM 20 includes a main memory, which is a semiconductor memory, and a hard disk, which is an auxiliary storage device. The hard disk stores an operating system, application programs, and the like. The CPU 10 loads computer programs stored in the hard disk into the main memory and executes them to realize various functions, which will be described later.

[0013] The advance learning device 1 further includes an input device 60 and an output device 70. The input device 60 is a device for inputting information to the advance learning device 1. Specifically, the input device 60 is a keyboard, a mouse, and a communication interface (not shown). The output device 70 is a device for outputting information held by the advance learning device 1. Specifically, the output device 70 is a liquid crystal display, and a communication interface (not shown). The advance learning device 1 can exchange data with other devices through these communication interfaces and communication lines.

[0014] Fig. 2 is a flowchart showing a process for generating a pre-learning model. As a result of the process in Fig. 2, a pre-learning model that receives image data and outputs a feature vector is generated. The process in Fig. 2 is executed by the CPU 10 of the pre-learning device 1.

[0015] In step S100, image data used for learning the feature extraction model is acquired. The image data is acquired from another device via a communication line and a communication interface. The image data may be acquired from an image generating device that generates image data, such as a digital still camera, or may be acquired from a device that stores image data, such as an image server.

[0016] In the first embodiment, first original image data Im1 is acquired (see the left part of FIG. 1). The first original image data Im1 is image data of a first object CB1 including a plurality of patterns similar to each other. More specifically, the first original image data Im1 is an image obtained by photographing a circuit board as the first object CB1. The process of acquiring the first original image data Im1 is shown as step S110 in FIG. 2. The functional part of CPU 10 that realizes the function of step S110 is shown as first data acquisition part 110 in FIG. 1. The functional part of CPU 10 that realizes the function of step S100 is shown as data acquisition part 100 in FIG. 1.

[0017] In step S200, a plurality of partial image data and a plurality of identification data are generated based on the image data acquired in step S100. Step S200 includes step S210.

[0018] In step S210, a plurality of first type partial image data Ip11, Ip22, . . . are generated based on the first original image data Im1.

[0019] FIG. 3 is an explanatory diagram showing the first original image data Im1 representing the circuit board CB1 and the first type partial image data Ip11, Ip22. Each of the multiple first type partial image data Ip11, Ip22, ... represents a different part of the first original image represented by the first original image data Im1. In the example of FIG. 3, the range of the partial image represented by the first type partial image data Ip11 and the range of the partial image represented by the first type partial image data Ip22 do not overlap each other. However, the "different parts of the image" may further overlap each other. In FIG. 3, two first type partial image data Ip11, Ip22 are shown. However, in step S210, more first type partial image data are generated. The process of generating the multiple first type partial image data Ip11, Ip22, ... is shown as step S212 in FIG. 2.

[0020] Each of the plurality of first type identification data Pp11, Pp22,... represents a position in the first original image of a partial image represented by one of the plurality of first type partial image data Ip11, Ip22,.... In FIG. 3, the positions represented by the two first type identification data Pp11, Pp22 are indicated by dots. The positions represented by the first type identification data Pp11, Pp22,... are the center positions of the partial images represented by the first type partial image data Ip11, Ip22,... in the first original image. The process of generating the plurality of first type identification data Pp11, Pp22,... is shown as step S214 in FIG. 2. The functional unit of the CPU 10 that realizes the function of generating the first type partial image data in step S210 is shown as a first data generating unit 210 in FIG. 1.

[0021] In step S200, one of the plurality of first type partial image data Ip1x (x=1, 2, . . .) among the plurality of first type partial image data Ip11, Ip22, . . . and first type identification data Pp1x (x=1, 2, . . .) representing the position of the partial image represented by one of the first type partial image data Ip1x are combined with each other. The combination of the first type partial image data Ip1x and the first type identification data Pp1x representing the position of the partial image represented by the first type partial image data Ip1x is called a first type input data set Di1x (x=1, 2, . . .). A functional unit of the CPU 10 that realizes the function of combining the first type partial image data Ip1x and the first type identification data Pp1x is shown in FIG. 1 as a position information adding unit 260.

[0022] In step S300, a pre-learning model is generated by performing contrastive learning using a plurality of sets of first type input data sets Di11, Di12,... Each set of the plurality of first type input data sets Di11, Di12,... is a combination of one of the plurality of first type partial image data sets Ip1x (x=1, 2,...) of the plurality of first type partial image data sets Ip11, Ip22,... and first type identification data Pp1x representing the position of the partial image represented by one of the first type partial image data sets Ip1x.

[0023] Fig. 4 is a block diagram showing the contrastive learning of the model in step S300. Fig. 4 shows the process by taking as an example a first type input data set Di11 which is a combination of a first type partial image data Ip11 and a first type identification data Pp11 (see the lower center part of Fig. 4).

[0024] First, the first type partial image data Ip11 prepared in step S212 is subjected to a pre-extension process to generate the first type partial conversion data Ip11c (see the middle right part of FIG. 4). The pre-extension process is any one of a process of distorting an image, a process of rotating an image, a process of inverting an image, and a process of changing the color tone of an image, or a combination of two or more of these. The content of the pre-extension process executed for each first type partial image data is determined probabilistically.

[0025] The first type partial image data Ip11 and the first type partial transformation data Ip11c are input to encoders En1 and En2, respectively (see the middle part of FIG. 4). The encoders En1 and En2 have the same configuration and are encoders in which corresponding internal parameters can take different values. The encoders En1 and En2 are encoders that receive image data representing partial images and output feature vectors of the partial images and predicted values ​​of identification data representing the positions of the partial images. In FIG. 4, the feature vector output from the encoder En1 is indicated as z1. The predicted value of the identification data output from the encoder En1 is indicated as Pa1_pred. The feature vector output from the encoder En2 is indicated as z2. The predicted value of the identification data output from the encoder En2 is indicated as Pa2_pred.

[0026] The feature vector z1, which is the output of the encoder En1, is further input to the predictor PR (see the upper left part of Figure 4). The predictor PR is a neural network composed of a fully connected layer. In Figure 4, the vector that is the output of the predictor PR is indicated as p1.

[0027] The similarity between the output of encoder En1 and the output of encoder En2 is evaluated (see the upper center part of Figure 4). First, the similarity D(p1,z2) between vector p1, which is the output of predictor PR, and feature vector z2, which is the output of encoder En2, is calculated. The following formula (1) is used to calculate the similarity D(p1,z2). The similarity D(p1,z2) is the cosine similarity.

[0028]

number

[0029] Although not shown in the figure to facilitate understanding of the technology, in the model generating unit 300, a predictor PR is not arranged downstream of the encoder En1, but is arranged downstream of the encoder En2, which is the opposite of the configuration shown in the upper part of Fig. 4. Then, a feature vector z2 which is the output of the encoder En2 is further input to the predictor PR. The vector p2 is the output of the predictor PR to which the feature vector z2 which is the output of the encoder En2 is input.

[0030] The similarity D(p2,z1) between vector p2, which is the output of the predictor PR, and feature vector z1, which is the output of the encoder En1, is calculated. To calculate the similarity D(p2,z1), the above formula (1) is used, where p1 is replaced with p2 and z2 is replaced with z1.

[0031] Then, the average similarity of those output vectors, L1, is calculated, where L1 represents the similarity of the output vectors of each encoder.

number

[0032] On the other hand, the sum L2 of the prediction error between the predicted value Pa1_pred of the identification data which is the output of the encoder En1 and the predicted value Pa2_pred of the identification data which is the output of the encoder En2 is calculated using the following equation (3).

number

[0033] Then, the loss function L is calculated using the following equation (4):

number

[0034] In step S300, learning is performed so as to minimize the loss function L. However, gradient stopping processing is performed for the encoder En2.

[0035] In step S300, according to the process described above, contrastive learning is performed using a plurality of sets of first-type input data sets Di11, Di12, ..., thereby learning the encoder. Then, after the process of step S300, the encoder En1 is extracted as a learned model. The functional unit of the CPU 10 that realizes the function of step S300 is shown as a model generation unit 300 in FIG. 1.

[0036] FIG. 5 is a block diagram showing the configuration of a discrimination model IDM that receives an image of a circuit board and discriminates between good and defective products. The discrimination model IDM includes a trained model LM and a classifier DM. The trained model LM is an encoder En1 trained by the process of FIG. 2 (see FIG. 4). The trained model LM receives image data Im of the circuit board and outputs a feature vector z. The classifier DM receives the feature vector z and outputs a discrimination result of good or defective products. In the right part of FIG. 5, the feature vector z is represented by a two-dimensional point, and a set Gg of good products and a set Gng of defective products determined by the classifier DM are shown on either side of a boundary line.

[0037] The classifier DM is combined with the trained model LM in advance and trained using a small amount of labeled image data. As a result, the discrimination model IDM is able to input an image of a circuit board and distinguish between good and defective products with high accuracy.

[0038] According to the pre-learning device 1 of the first embodiment, it is possible to generate a pre-learning model LM that can output an appropriate feature vector that reflects the difference in the location of a part of a circuit board that includes multiple similar patterns on an object, without preparing image data with pass / fail labels. The generated pre-learning model LM can output feature vectors that reflect the respective positions of similar configurations that exist at different positions on the circuit board (see FIGS. 3 and 5).

[0039] B. Second embodiment: FIG. 6 is a block diagram showing a pre-learning device 1A of the second embodiment. The CPU 10A of the pre-learning device 1A of the second embodiment includes a first extended data generating unit 210a as a functional unit (see the upper center part of FIG. 6). In the second embodiment, in addition to the first type of input data set, a first type of extended input data set is generated and used to learn the feature extraction model. Other points of the pre-learning device 1A of the second embodiment are the same as those of the pre-learning device 1 of the first embodiment (see FIG. 1). Below, points of processing in the second embodiment that are different from the processing in the first embodiment will be described with reference to FIG. 2.

[0040] In the second embodiment, step S200 includes step S210a in addition to step S210. Step S210a is indicated by a dashed line in FIG.

[0041] In Step S210a, a plurality of first type extended image data Ipa11, Ipa12, . . . and a plurality of first type extended identification data Ppa11, Ppa12, . . . are generated based on the first original image data Im1.

[0042] FIG. 7 is an explanatory diagram showing the relationship between the first type partial image data Ip11 and the first type extended image data Ipa11. Each of the multiple first type extended image data Ipa11, Ipa12, ... represents a range of the first object CB1 that partially overlaps with the range of the partial image represented by the first type partial image data Ip1x (x = 1, 2, ...) for the first object CB1, and is data different from the first type partial image data Ip1x. In the example shown in FIG. 7, the first type extended image data Ipa11 is image data that represents a range that is shifted to the lower right and partially overlaps with the range of the partial image represented by the first type partial image data Ip11 for the first object CB1. The process of generating the multiple first type extended image data Ipa11, Ipa12, ... is shown by a dashed line as step S212a in FIG. 2.

[0043] Each of the multiple first type extended identification data Ppa11, Ppa12, ... represents the position of the partial image represented by one of the multiple first type extended image data Ipa11, Ipa12, ... in the first original image. In FIG. 7, the positions represented by the first type identification data Pp11 and the first type extended image data Ipa11 are indicated by dots. The positions represented by each of the multiple first type extended identification data Ppa11, Ppa12, ... are the center positions of the partial images represented by the multiple first type extended image data Ipa11, Ipa12, ... in the first original image. The process of generating the multiple first type extended identification data Ppa11, Ppa12, ... is indicated by a dashed line as step S214a in FIG. 2. The functional unit of the CPU 10 that realizes the function of step S210a is indicated as a first extended data generating unit 210a in FIG. 6.

[0044] In step S200 of the second embodiment, one of the first type extended image data Ipa1x (x=1, 2, . . .) among the plurality of first type extended image data Ipa11, Ipa12, . . . and the first type extended identification data Ppa1x representing the position of the partial image represented by the one first type extended image data Ipa1x are combined with each other. The combination of the first type extended image data Ipa1x and the first type extended identification data Ppa1x representing the position of the partial image represented by the first type extended image data Ipa1x is called the first type extended input data set Dia1x (x=1, 2, . . .) (see the upper right part of FIG. 6). The functional unit of the CPU 10A that realizes the function of combining the first type extended image data Ipa1x and the first type extended identification data Ppa1x is the position information adding unit 260. In the second embodiment, the functional unit of the CPU 10A that realizes the function of step S200 is shown in FIG. 6 as a data generating unit 200A. In the second embodiment, configurations corresponding to those in the first embodiment are indicated by adding "A" to the end of the reference numerals representing those configurations in the first embodiment.

[0045] In step S300, a pre-training model is generated by performing contrastive learning using multiple sets of first type input data sets Di11, Di12, ... as well as multiple sets of first type extended input data sets Dia11, Dia12, ... (see Di11 in the lower center of Figure 4).

[0046] In the second embodiment, the first type extended input data sets Dia11, Dia12, ... are generated based on the first original image data Im1 in step S210a, so that a larger number of image data for pre-learning and identification data are generated from one original image data Im1 (see the center part of FIG. 6). Therefore, even when the state of the circuit board as the individual object to be inspected varies, a model that can stably output a feature vector can be generated without preparing a large number of original image data.

[0047] C. Third embodiment: FIG. 8 is a block diagram showing a pre-learning device 1B of the third embodiment. A CPU 10B of the pre-learning device 1B of the third embodiment includes, as functional units, a second data acquisition unit 120 and a second data generation unit 220 (see the lower left part of FIG. 8). In the third embodiment, in addition to the first type of input data set, a second type of input data set is generated and used to learn the feature extraction model. Other points of the pre-learning device 1B of the third embodiment are the same as those of the pre-learning device 1 of the first embodiment. Below, points of processing in the third embodiment that are different from the processing in the first embodiment will be described with reference to FIG. 2.

[0048] In the third embodiment, step S100 includes step S120 in addition to step S110. Step S120 is indicated by a dashed line in FIG.

[0049] In step S120, the second original image data Im2 is acquired (see the lower left part of FIG. 8). The second original image data Im2 is image data of the second object CB2, which is different from the first object CB1 and has the same configuration as the first object CB1. More specifically, the second original image data Im2 is an image obtained by photographing a circuit board, which is different from the circuit board of the first object CB1 and has the same configuration as the circuit board of the first object CB1. The functional part of the CPU 10B that realizes the function of step S120 is shown in FIG. 8 as the second data acquisition part 120. In the third embodiment, the functional part of the CPU 10B that realizes the function of step S100 is shown in FIG. 8 as the data acquisition part 100B. Note that in the third embodiment, the configuration corresponding to the configuration of the first embodiment is shown with "B" added to the end of the reference symbol representing the configuration of the first embodiment.

[0050] In the third embodiment, step S200 includes step S220 in addition to step S210. Step S220 is indicated by a dashed line in FIG.

[0051] In step S220, a plurality of second type partial image data Ip21, Ip22, . . . and a plurality of second type identification data Pp21, Pp22, . . . are generated based on the second original image data Im2.

[0052] 9 is an explanatory diagram showing the relationship between the first type partial image data Ip11 and the second type partial image data Ip21. Each of the multiple second type partial image data Ip21, Ip22, ... represents a different part of the second original image represented by the second original image data Im2. The range represented by each of the multiple second type partial image data Ip21, Ip22, ... in the second original image coincides with the range represented by each of the multiple first type identification data Pp11, Pp22, ... in the first original image. The process of generating the multiple second type partial image data Ip21, Ip22, ... is indicated by a dashed line as step S222 in FIG. 2.

[0053] Each of the plurality of second type identification data Pp21, Pp22,... represents a position in the second original image of a partial image represented by one of the plurality of second type partial image data Ip21, Ip22,.... In FIG. 9, the positions represented by the first type identification data Pp11 and the second type identification data Pp21 are indicated by dots. The positions represented by each of the plurality of second type identification data Pp21, Pp22,... in the second original image coincide with the positions represented by each of the plurality of first type identification data Pp11, Pp22,... in the first original image. In the example of FIG. 9, the position represented by the second type identification data Pp21 in the second original image coincides with the position represented by the first type identification data Pp11 in the first original image. The process of generating the plurality of second type identification data Pp21, Pp22,... is indicated by a dashed line as step S224 in FIG. 2. The functional section of the CPU 10B that realizes the function of step S220 is shown as a second data generating section 220 in FIG.

[0054] In step S200 of the third embodiment, one of the second type partial image data Ip2x (x=1, 2, . . .) among the plurality of second type partial image data Ip21, Ip22, . . . and second type identification data Pp2x representing the position of the partial image represented by one of the second type partial image data Ip2x are combined with each other. The combination of the second type partial image data Ip2x and the second type identification data Pp2x representing the position of the partial image represented by the second type partial image data Ip2x is called a second type input data set Di2x (x=1, 2, . . .) (see the lower right part of FIG. 8). The functional unit of the CPU 10B that realizes the function of combining the second type partial image data Ip2x and the second type identification data Pp2x is the position information adding unit 260. In the third embodiment, the functional unit of the CPU 10B that realizes the function of step S200 is shown in FIG. 8 as a data generating unit 200B.

[0055] In step S300, in addition to multiple sets of first type input data sets Di11, Di12, ..., multiple sets of second type input data sets Di21, Di22, ... are used to perform contrastive learning, thereby generating a pre-training model (see Di11 in the lower center of Figure 4).

[0056] In the third embodiment, in step S220, second type input data sets Di21, Di22, ... are generated based on the second original image data Im2, thereby generating a larger amount of image data and classification data for pre-learning (see the lower left part of FIG. 8). Therefore, based on a larger amount of image data obtained from a plurality of actual objects CB1, CB2, a model that can stably output feature vectors against variations in the actual appearance of individual objects can be generated.

[0057] D. Other embodiments: (1) In the above embodiment, the positions represented by the first type identification data Pp11, Pp22, ... are the center positions of the partial images represented by the first type partial image data Ip11, Ip22, ... in the first original image (see FIG. 3). However, the positions represented by the first type identification data may be, for example, the lower right or upper left corner positions of the rectangular range represented by the first type partial image data, and may be positions determined based on the range represented by the first type partial image data according to a predetermined criterion. The same applies to the positions represented by the first type extended image data and the second type identification data.

[0058] (2) In the second embodiment, each of the multiple first type extended image data Ipa11, Ipa12, ... is data representing a range of the first object CB1 that partially overlaps with the range of the partial image represented by the first type partial image data Ip1x (x = 1, 2, ...) for the first object CB1 (see FIG. 7). However, each of the multiple first type extended image data may represent a range of the first object that completely overlaps with the range of the partial image represented by the first type partial image data for the first object, and may be data different from the first type partial image data. Such partial image data may be image data obtained by subjecting the first type extended image data to any one of a process of distorting an image, a process of rotating an image, a process of inverting an image, and a process of changing the color tone of an image, or a combination of two or more of these processes. The position of the partial image represented by the first type extended image data obtained in this way is the same as the position represented by the first type identification data corresponding to the first type partial image data.

[0059] Furthermore, the multiple first type extended image data may be image data that has been subjected to one or a combination of two or more of the processes of distorting an image, rotating an image, inverting an image, and changing a color tone of an image, in addition to the multiple first type extended image data Ipa11, Ipa12, in the second embodiment. The position of the partial image represented by the first type extended image data obtained in this manner is the same as the position represented by the first type identification data corresponding to the multiple first type extended image data Ipa11, Ipa12, in the first embodiment.

[0060] (3) In the third embodiment, the second original image data Im2 is an image obtained by photographing a circuit board different from the circuit board of the first object CB1 and having the same configuration as the circuit board of the first object CB1. However, the second original image data may be image data of a second object different from the first object, which is not the same as the first object but has a similar configuration.

[0061] (4) In step S300 of the second embodiment, a pre-learned model is generated by performing contrastive learning using a plurality of sets of first type input data sets Di11, Di12, and a plurality of sets of first type extended input data sets Dia11, Dia12, (see the right part of FIG. 6). In step S300 of the third embodiment, a pre-learned model is generated by performing contrastive learning using a plurality of sets of first type input data sets Di11, Di12, and a plurality of sets of second type input data sets Di21, Di22, (see the right part of FIG. 8).

[0062] However, contrastive learning may be performed using a plurality of sets of first type input data sets Di11, Di12, ··, a plurality of sets of first type extended input data sets Dia11, Dia12, ··, and a plurality of sets of second type input data sets Di21, Di22, ··.

[0063] (5) In the above embodiment, the discrimination model IDM receives an image of a circuit board and discriminates whether the circuit board is a good product or a defective product (see FIG. 5). However, the discrimination model IDM may receive an image of a partial area of ​​the circuit board and discriminate whether the circuit board is a good product or a defective product.

[0064] (6) In the above first embodiment, a first type input data set Di1x (x=1, 2, . . .) is generated as a combination of the first type partial image data Ip1x and the first type identification data Pp1x representing the position of the partial image represented by the first type partial image data Ip1x (x=1, 2, . . .) and used for learning (see the middle right part of FIG. 1). However, data to be used for learning may be prepared, for example, by the following method. That is, the first type partial image data Ip1x (x=1, 2, . . .) may be vectorized, and information on the position of the partial image represented by the first type partial image data Ip1x may be embedded to generate data for learning.

[0065] (7) In the above embodiment, the first original image data Im1 is an image obtained by photographing a circuit board as the first object CB1. However, the object to be inspected is not limited to a circuit board, and may be other objects such as a semiconductor wafer on which multiple chips may be formed, or a printed matter.

[0066] (8) In the above embodiment, the first type partial image data Ip11 and the first type partial transformation data Ip11c are input to the encoders En1 and En2, respectively (see the middle part of FIG. 4). The encoders En1 and En2 have the same configuration and are encoders in which corresponding internal parameters can take different values. However, it is also possible to adopt an embodiment in which the first type partial image data Ip11 and the first type partial transformation data Ip11c are input to three or more encoders and learning is performed. In addition, two or more encoders may actually be realized by providing one encoder with multiple sets of alternative internal parameters.

[0067] E. Other forms: The present disclosure is not limited to the above-mentioned embodiment, and can be realized in various forms without departing from the spirit of the present disclosure. For example, the present disclosure can be realized in the following forms. The technical features in the above-mentioned embodiments corresponding to the technical features in each form described below can be appropriately replaced or combined in order to solve some or all of the problems of the present disclosure, or to achieve some or all of the effects of the present disclosure. Furthermore, if the technical feature is not described as essential in this specification, it can be appropriately deleted.

[0068] (1) According to one embodiment of the present disclosure, there is provided a pre-learning device that generates a pre-learning model that receives image data as input and outputs a feature vector. This pre-learning device includes a first data acquisition unit that acquires first original image data, where the first original image data is image data of a first object including a plurality of patterns that are similar to each other; a first data generation unit that generates a plurality of first type partial image data and a plurality of first type identification data based on the first original image data, where each of the plurality of first type partial image data represents a different portion of a first original image represented by the first original image data, and each of the plurality of first type identification data represents a position in the first original image of a partial image represented by one of the plurality of first type partial image data; and a model generation unit that generates the pre-learning model by performing contrast learning using a plurality of first type input datasets, where each of the plurality of first type input datasets is a combination of one of the plurality of first type partial image data and first type identification data representing the position of the partial image represented by the one of the first type partial image data. By adopting this configuration, it is possible to generate a pre-training model that can output an appropriate feature vector that reflects differences in the location of a part of an object for an image that represents a part of an object that includes multiple patterns that are similar to each other, without preparing labeled image data.

[0069] (2) In the pre-learning device of the above embodiment, the first type extended data generation unit generates a plurality of first type extended image data and a plurality of first type extended identification data based on the first original image data, each of the plurality of first type extended image data represents a range of the first object that at least partially overlaps with a range of a partial image represented by the first type partial image data for the first object and is data different from the first type partial image data, and each of the plurality of first type extended identification data represents a position in the first original image of a partial image represented by one of the plurality of first type extended image data, and the model generation unit further generates the pre-learning model by performing the contrast learning using a plurality of sets of first type extended input datasets, and each set of the plurality of first type extended input datasets is a combination of one of the plurality of first type extended image data and first type extended identification data representing the position of the partial image represented by the one of the first type extended image data. By adopting such an embodiment, a model capable of stably outputting feature vectors even when the aspects of individual objects vary can be generated without preparing a large amount of original image data.

[0070] (3) In the advance learning device of the above aspect, the second data acquisition unit acquires second original image data, the second original image data being image data of a second object different from the first object and having the same or similar configuration as the first object; and a second data generation unit generates a plurality of second type partial image data and a plurality of second type identification data based on the second original image data, each of the plurality of second type partial image data representing a different portion of the second original image represented by the second original image data, and each of the plurality of second type identification data represents a front image of a partial image represented by one of the plurality of second type partial image data. and a second data generation unit which represents a position in the second original image, and the position in the second original image represented by each of the plurality of second type identification data coincides with a position in the first original image represented by each of the plurality of first type identification data, wherein the model generation unit generates the pre-learning model by further performing the contrastive learning using a plurality of second type input datasets, and each of the plurality of second type input datasets is a combination of one of the plurality of second type partial image data and second type identification data which represents the position of the partial image represented by the one of the second type partial image data. By adopting such an embodiment, it is possible to generate a model that can output a stable feature vector despite variations in the actual appearance of individual objects, based on a larger amount of image data obtained from multiple actual objects.

[0071] (4) According to another aspect of the present disclosure, there is provided a pre-learning method for generating a pre-learning model that receives image data as input and outputs a feature vector. This pre-learning method includes a first data acquisition process for acquiring first original image data, where the first original image data is image data of a first object including a plurality of patterns that are similar to each other; a first data generation process for generating a plurality of first type partial image data and a plurality of first type identification data based on the first original image data, where each of the plurality of first type partial image data represents a different portion of a first original image represented by the first original image data, and each of the plurality of first type identification data represents a position in the first original image of a partial image represented by one of the plurality of first type partial image data; and a model generation process for generating the pre-learning model by performing contrastive learning using a plurality of first type input datasets, where each of the plurality of first type input datasets is a combination of one of the plurality of first type partial image data and first type identification data representing the position of the partial image represented by the one of the first type partial image data.

[0072] (5) In the pre-learning method of the above embodiment, the method may further include a first type of extended data generation step of generating a plurality of first type of extended image data and a plurality of first type of extended identification data based on the first original image data, each of the plurality of first type of extended image data representing a range of the first object that at least partially overlaps with a range of a partial image represented by the first type of partial image data for the first object and is data different from the first type of partial image data, and each of the plurality of first type of extended identification data representing a position in the first original image of a partial image represented by one of the plurality of first type of extended image data, and the model generation step is a step of generating the pre-learning model by further performing the contrast learning using a plurality of sets of first type of extended input datasets, and each set of the plurality of first type of extended input datasets is a combination of one of the plurality of first type of extended image data and first type of extended identification data representing the position of the partial image represented by the one of the first type of extended image data.

[0073] (6) In the pre-learning method of the above aspect, the second data acquisition step includes acquiring second original image data, the second original image data being image data of a second object different from the first object and having the same or similar configuration as the first object; and a second data generation step includes generating a plurality of second type partial image data and a plurality of second type identification data based on the second original image data, each of the plurality of second type partial image data representing different parts of a second original image represented by the second original image data, and each of the plurality of second type identification data representing the second type of partial image of a partial image represented by one of the plurality of second type partial image data. and a second data generation step, in which the position in the second original image represented by each of the plurality of second type identification data coincides with the position in the first original image represented by each of the plurality of first type identification data, wherein the model generation step is a step of generating the pre-learning model by performing the contrast learning further using a plurality of second type input datasets, each of the plurality of second type input datasets being a combination of one of the plurality of second type partial image data and second type identification data representing the position of the partial image represented by the one of the second type partial image data.

[0074] (7) According to one embodiment of the present disclosure, there is provided a computer program for using a computer to generate a pre-trained model that receives image data as input and outputs a feature vector. This computer program causes the computer to realize: a first data acquisition function that acquires first original image data, where the first original image data is image data of a first object including a plurality of patterns that are similar to each other; a first data generation function that generates a plurality of first type partial image data and a plurality of first type identification data based on the first original image data, where each of the plurality of first type partial image data represents a different portion of a first original image represented by the first original image data, and each of the plurality of first type identification data represents a position in the first original image of a partial image represented by one of the plurality of first type partial image data; and a model generation function that generates the pre-learning model by performing contrastive learning using a plurality of first type input datasets, where each set of the plurality of first type input datasets is a combination of one of the plurality of first type partial image data and first type identification data representing the position of the partial image represented by the one of the first type partial image data.

[0075] (8) In the computer program of the above embodiment, the computer is caused to realize a first type of extended data generation function that generates a plurality of first type of extended image data and a plurality of first type of extended identification data based on the first original image data, each of the plurality of first type of extended image data representing a range of the first object that at least partially overlaps with a range of a partial image represented by the first type of partial image data for the first object and is data different from the first type of partial image data, and each of the plurality of first type of extended identification data representing a position in the first original image of a partial image represented by one of the plurality of first type of extended image data, and the model generation function is a function that generates the pre-learning model by further performing the contrast learning using a plurality of sets of first type extended input datasets, and each set of the plurality of first type extended input datasets is a combination of one of the plurality of first type of extended image data and first type of extended identification data representing the position of the partial image represented by the one of the first type of extended image data.

[0076] (9) In the computer program of the above aspect, there is provided a second data acquisition function for acquiring second original image data, the second original image data being image data of a second object different from the first object and having the same or similar configuration as the first object; and a second data generation function for generating a plurality of second type partial image data and a plurality of second type identification data based on the second original image data, each of the plurality of second type partial image data representing a different portion of a second original image represented by the second original image data, and each of the plurality of second type identification data representing the second original image of a partial image represented by one of the plurality of second type partial image data. and a second data generation function for generating the pre-learning model by performing the contrast learning further using a plurality of sets of second type input datasets, wherein each set of the plurality of second type input datasets is a combination of one piece of second type partial image data among the plurality of second type partial image data and second type identification data representing the position of the partial image represented by the one piece of second type partial image data.

[0077] The present disclosure may be realized in various forms other than a pre-learning device, a pre-learning method, and a computer program, for example, a method for producing a feature extraction model or a method for producing a discrimination model, a computer program for implementing these methods, a non-transitory recording medium on which the computer program is recorded, etc. [Explanation of symbols]

[0078] 1...pre-learning device, 1B...pre-learning device, 10...CPU, 10B...CPU, 20...RAM, 30...ROM, 60...input device, 70...output device, 100...data acquisition unit, 100B...data acquisition unit, 110...first data acquisition unit, 120...second data acquisition unit, 210...first data generation unit, 210a...first extended data generation unit, 220...second data generation unit, 260...position information assignment unit, 300...model generation unit, CB1...first object (circuit board), CB2...second object (circuit board), DM...classifier, Di11...first type input dataset, Di12...first type input dataset, Di21...second type input dataset, Di22...second type input dataset, Dia11...first type extended input dataset, Dia12...first type extended input dataset set, En1...encoder, En2...encoder, Gg...set, Gng...set, IDM...discriminant model, Im...image data, Im1...first original image data, Im2...second original image data, Ip11...first type partial image data, Ip12...first type partial image data, Ip21...second type partial image data, Ip22...second type partial image data, Ipa11...first type extended image data, Ipa12...first type extended image data, LM...trained model, PR...predictor, Pp11...first type classification data, Pp12...first type classification data, Pp21...second type classification data, Ppa11...first type extended classification data, p1...output vector of predictor PR, z...feature vector, z1...output vector of encoder En1, z2...output vector of encoder En2

Claims

1. A pre-learning device that generates a pre-learning model that receives image data and outputs a feature vector, A first data acquisition unit that acquires first original image data, a first data acquisition unit, the first original image data being image data of a first object including a plurality of patterns similar to each other; a first data generating unit that generates a plurality of first type partial image data and a plurality of first type identification data based on the first original image data, each of the plurality of first type partial image data represents a different portion of a first original image represented by the first original image data; a first data generating unit, each of the plurality of first type identification data representing a position in the first original image of a partial image represented by one of the plurality of first type partial image data; A model generation unit that generates the pre-trained model by performing contrastive learning using a plurality of sets of first type input data sets, a model generating unit, wherein each of the plurality of sets of first type input data sets is a combination of one of the plurality of first type partial image data and first type identification data representing the position of a partial image represented by the one of the first type partial image data; A pre-learning device comprising:

2. The advance learning device according to claim 1 , a first type extended data generating unit that generates a plurality of first type extended image data and a plurality of first type extended identification data based on the first original image data, Each of the plurality of first type extended image data represents a range of the first object that at least partially overlaps with a range of a partial image represented by the first type partial image data of the first object, and is data different from the first type partial image data, a first type extended data generating unit, each of the plurality of first type extended identification data representing a position of a partial image represented by one of the plurality of first type extended image data in the first original image; The model generation unit further uses a plurality of sets of first type extended input data sets to perform the contrastive learning, thereby generating the pre-trained model; A pre-learning device, wherein each set of the multiple sets of first type extended input data sets is a combination of one of the multiple sets of first type extended image data and first type extended identification data representing the position of a partial image represented by the one set of first type extended image data.

3. The advance learning device according to claim 1 or 2, A second data acquisition unit that acquires second original image data, a second data acquisition unit, the second original image data being image data of a second object different from the first object and having the same or similar configuration as the first object; a second data generating unit that generates a plurality of second type partial image data and a plurality of second type identification data based on the second original image data, each of the plurality of second type partial image data represents a different portion of a second original image represented by the second original image data; each of the plurality of second type identification data represents a position in the second original image of a partial image represented by one of the plurality of second type partial image data; a second data generating unit, wherein a position in the second original image represented by each of the plurality of second type identification data coincides with a position in the first original image represented by each of the plurality of first type identification data, The model generation unit further uses a plurality of sets of second type input data sets to perform the contrastive learning, thereby generating the pre-learned model; A pre-learning device, wherein each set of the multiple sets of second type input data sets is a combination of one of the multiple sets of second type partial image data and second type identification data representing the position of the partial image represented by the one set of second type partial image data.

4. A pre-learning method for generating a pre-learning model that receives image data and outputs a feature vector, comprising the steps of: A first data acquisition step of acquiring first original image data, a first data acquisition step, in which the first original image data is image data of a first object including a plurality of patterns similar to each other; a first data generating step of generating a plurality of first type partial image data and a plurality of first type identification data based on the first original image data, each of the plurality of first type partial image data represents a different portion of a first original image represented by the first original image data; a first data generating step in which each of the plurality of first type identification data represents a position in the first original image of a partial image represented by one of the plurality of first type partial image data; A model generation step of generating the pre-trained model by performing contrastive learning using a plurality of sets of first type input data sets, a model generating process, in which each of the plurality of sets of first type input data sets is a combination of one of the plurality of first type partial image data and first type identification data representing the position of a partial image represented by the one of the first type partial image data; A pre-learning method that includes:

5. The advance learning method according to claim 4, A first type extended data generating step of generating a plurality of first type extended image data and a plurality of first type extended identification data based on the first original image data, Each of the plurality of first type extended image data represents a range of the first object that at least partially overlaps with a range of a partial image represented by the first type partial image data of the first object, and is data different from the first type partial image data, a first type extended data generating step in which each of the plurality of first type extended identification data represents a position of a partial image represented by one of the plurality of first type extended image data in the first original image; The model generation step is a step of generating the pre-trained model by performing the contrastive learning using a plurality of sets of first type extended input data sets, A pre-learning method, wherein each set of the multiple sets of first type extended input data sets is a combination of one of the multiple first type extended image data and first type extended identification data representing the position of a partial image represented by the one of the first type extended image data.

6. The advance learning method according to claim 4 or 5, A second data acquisition step of acquiring second original image data, a second data acquisition step in which the second original image data is image data of a second object different from the first object and having the same or similar configuration as the first object; a second data generating step of generating a plurality of second type partial image data and a plurality of second type identification data based on the second original image data, each of the plurality of second type partial image data represents a different portion of a second original image represented by the second original image data; each of the plurality of second type identification data represents a position in the second original image of a partial image represented by one of the plurality of second type partial image data; a second data generating step in which a position in the second original image represented by each of the plurality of second type identification data coincides with a position in the first original image represented by each of the plurality of first type identification data; The model generating step is a step of generating the pre-trained model by performing the contrastive learning using a plurality of sets of second type input data sets, A pre-learning method, wherein each of the plurality of sets of second type input data sets is a combination of one of the plurality of second type partial image data and second type identification data representing the position of the partial image represented by the one of the second type partial image data.

7. A computer program for generating a pre-learned model that receives image data and outputs a feature vector using a computer, A first data acquisition function for acquiring first original image data, a first data acquisition function, in which the first original image data is image data of a first object including a plurality of patterns similar to each other; a first data generating function for generating a plurality of first type partial image data and a plurality of first type identification data based on the first original image data, each of the plurality of first type partial image data represents a different portion of a first original image represented by the first original image data; a first data generating function, in which each of the plurality of first type identification data represents a position in the first original image of a partial image represented by one of the plurality of first type partial image data; A model generation function that generates the pre-trained model by performing contrastive learning using a plurality of sets of first type input data sets, a model generating function, wherein each of the plurality of sets of first type input data sets is a combination of one of the plurality of first type partial image data and first type identification data representing the position of a partial image represented by the one of the first type partial image data; A computer program that causes the computer to realize the above.

8. 8. A computer program according to claim 7, comprising: A first type extended data generating function that generates a plurality of first type extended image data and a plurality of first type extended identification data based on the first original image data, Each of the plurality of first type extended image data represents a range of the first object that at least partially overlaps with a range of a partial image represented by the first type partial image data of the first object, and is data different from the first type partial image data, A first type extended data generating function is realized in the computer, in which each of the plurality of first type extended identification data represents a position in the first original image of a partial image represented by one of the plurality of first type extended image data; The model generation function is a function of generating the pre-trained model by performing the contrastive learning using a plurality of sets of first type extended input data sets, A computer program, wherein each set of the multiple sets of first type extended input data sets is a combination of one of the multiple first type extended image data and first type extended identification data representing the position of a partial image represented by the one of the first type extended image data.

9. A computer program according to claim 7 or 8, A second data acquisition function for acquiring second original image data, a second data acquisition function, in which the second original image data is image data of a second object different from the first object and having the same or similar configuration as the first object; a second data generating function for generating a plurality of second type partial image data and a plurality of second type identification data based on the second original image data, each of the plurality of second type partial image data represents a different portion of a second original image represented by the second original image data; each of the plurality of second type identification data represents a position in the second original image of a partial image represented by one of the plurality of second type partial image data; a second data generating function in which a position in the second original image represented by each of the plurality of second type identification data coincides with a position in the first original image represented by each of the plurality of first type identification data; The model generation function is a function of generating the pre-trained model by performing the contrastive learning using a plurality of sets of second type input data sets, A computer program, wherein each of the plurality of sets of second type input data sets is a combination of one of the plurality of second type partial image data and second type identification data representing the position of the partial image represented by the one of the second type partial image data.