Learning device, learning method and program

The learning device automates the creation and evaluation of multiple learning image groups to generate stable and accurate learning models, addressing inefficiencies in existing techniques by optimizing the training image preparation and selection process.

JP2024134111AActive Publication Date: 2024-10-03PANASONIC INTELLECTUAL PROPERTY MANAGEMENT CO LTD

Patent Information

Application Number
JP2023044225
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2024-10-03
Estimated Expiration
2043-03-20

AI Technical Summary

Technical Problem

Existing machine learning techniques face challenges in generating stable learning models due to the reliance on human intuition and manual adjustments in preparing training images, leading to inefficiencies and reduced accuracy.

Method used

A learning device that automatically creates multiple types of learning image groups from an initial image set using data creation, model generation, evaluation, and selection processes, including padding, downsampling, and reset mechanisms to optimize the learning model generation process.

Benefits of technology

Enables the easy and stable generation of highly accurate learning models by automating the training image preparation and selection process, improving model performance and reducing reliance on human intervention.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024134111000001_ABST
    Figure 2024134111000001_ABST
Patent Text Reader

Abstract

To provide a learning device that can readily generate a stable learning model.SOLUTION: A learning device 100 comprises: an input data preparation unit 101 that generates a plurality of kinds of learning image groups 183 from an initial learning image group 182 on the basis of a prescribed algorithm; a learning unit 102 that performs, for each of the plurality of kinds of learning image groups 183, machine learning using said each learning image group 183, and thereby generates, for an input of an image, a learning model 186 outputting a degree of abnormality of an object imaged in the image; a model performance evaluation unit 103 that evaluates respective performances of a plurality of generated learning models 186; and a model selection unit 104 that selects one learning model 186 of the plurality of learning models 186 in accordance with an evaluation result of the performance.SELECTED DRAWING: Figure 3
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a machine learning technique for images obtained by imaging. [Background technology]

[0002] Conventionally, techniques related to machine learning have been disclosed (see, for example, Non-Patent Documents 1 and 2). Also, a learning device capable of reducing the effort of machine learning has been proposed (see, for example, Patent Document 1). Specifically, in the learning method of Patent Document 1, a convolutional neural network (hereinafter also referred to as a CNN (Convolutional Neural Network)) is used to generate a learning model that recognizes a subject included in an image. Here, in generating the learning model, model generation parameters are updated. Such an update optimizes the model generation parameters, and the effort of adjusting the learning model can be reduced. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent Publication No. 2021-86381 [Non-patent literature]

[0004] [Non-Patent Document 1] Kaiming He, 4 others, “Deep Residual Learning for Image Recognition”, arXiv:1512.03385v1, December 10, 2015 [Non-Patent Document 2] Xiao Zhang, 5 others, “AdaCos: Adaptively Scaling Cosine Logits for Effectively Learning Deep Face Representations”, arXiv:1905.00292v2, May 7, 2019 Summary of the Invention [Problem to be solved by the invention]

[0005] However, even in a learning device using the techniques described in the above documents, there is a problem in that it is difficult to easily generate a stable learning model.

[0006] Therefore, the present disclosure provides a learning device that can easily generate a stable learning model. [Means for solving the problem]

[0007] The learning device according to the first aspect of the present disclosure includes a data creation unit that executes a data creation process to create multiple different types of learning image groups based on a predetermined algorithm from an initial learning image group including multiple images each of which depicts an object; a learning unit that executes a model generation process to generate a learning model that outputs a degree of abnormality of an object depicted in an image in response to an input image by performing machine learning using the learning image group for each of the multiple types of learning image groups; a model performance evaluation unit that executes an evaluation process to evaluate the performance of each of the multiple generated learning models; and a model selection unit that executes a selection process to select one learning model from the multiple learning models depending on a result of the performance evaluation.

[0008] These comprehensive or specific aspects may be realized by a system, a method, an integrated circuit, a computer program, or a computer-readable recording medium such as a CD-ROM, or may be realized by any combination of the system, the method, the integrated circuit, the computer program, and the recording medium. The recording medium may be a non-transitory recording medium. Effect of the Invention

[0009] The learning device of the present disclosure can easily generate a stable learning model.

[0010] Further advantages and effects of one aspect of the present disclosure will become apparent from the specification and drawings. Such advantages and / or effects are provided by some of the embodiments and configurations described in the specification and drawings, but not all of the configurations are necessarily required. [Brief description of the drawings]

[0011] [Figure 1] FIG. 1 is a diagram showing an example of the external appearance of a learning system according to an embodiment. [Diagram 2] FIG. 2 is a block diagram illustrating an example of a hardware configuration of the learning device according to the embodiment. [Diagram 3] FIG. 3 is a block diagram illustrating an example of a functional configuration of the learning device according to the embodiment. [Figure 4] FIG. 4 is a diagram illustrating an initial learning image group according to the embodiment. [Diagram 5] FIG. 5 is a diagram for explaining a learning model in the embodiment. [Figure 6] FIG. 6 is a diagram illustrating an evaluation image group according to the embodiment. [Figure 7] FIG. 7 is a diagram showing an example of evaluation result information according to the embodiment. [Figure 8] FIG. 8 is a flowchart illustrating an example of the processing operation of the learning device in the embodiment. [Figure 9] FIG. 9 is a diagram for explaining an example of a learning device according to the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0012] (Findings on which the present invention is based) The present inventors have found that the following problems arise with respect to the above-mentioned Patent Document 1, Non-Patent Document 1, and Non-Patent Document 2 described in the "Background Art" section.

[0013] In generating a learning model used to distinguish whether an object shown in an image is good or bad, the learning images showing bad products are padded, or the learning images showing good products are cleansed. In padding, the number of learning images used for learning is increased, and in cleansing, the number of learning images used for learning is decreased. Such padding and cleansing can have a significant effect on the accuracy of the learning model. Although the automation of the process of generating a learning model from a state in which such learning images have been prepared is progressing, the preparation of the learning images relies on human intuition or skill. Therefore, in order to generate a learning model with stable high accuracy, the preparation of learning images involving the above-mentioned padding or cleansing is burdensome. As a result, it takes a lot of time and effort for the user to adjust the learning model.

[0014] In order to solve such problems, the learning device according to the first aspect of the present disclosure includes a data creation unit that executes a data creation process to create multiple different types of learning image groups based on a predetermined algorithm from an initial learning image group including multiple images each of which depicts an object; a learning unit that executes a model generation process to generate a learning model that outputs, in response to an input image, a degree of abnormality of an object depicted in an image by performing machine learning using the learning image group for each of the multiple types of learning image groups; a model performance evaluation unit that executes an evaluation process to evaluate the performance of each of the multiple generated learning models; and a model selection unit that executes a selection process to select one learning model from the multiple learning models depending on the performance evaluation result.

[0015] As a result, multiple types of learning image groups are automatically created from the initial learning image group, and a learning model is generated and evaluated for each of the learning image groups. Then, for example, the learning model with the best evaluation result is selected. Therefore, if a user prepares the initial learning image group, the user can easily prepare the learning image group, i.e., the learning images, without user operation and without relying on human intuition or knack. Furthermore, for example, by selecting the learning model with the best evaluation result, a stable learning model with high accuracy can be generated. Therefore, a stable learning model can be easily generated.

[0016] In addition, in a learning device according to a second aspect dependent on the first aspect, the data creation unit may increase the number of images included in the initial learning image group by performing a predetermined image processing on images included in the initial learning image group, and create the multiple types of learning image groups using the increased number of images included in the initial learning image group.

[0017] This inflates the number of images included in the initial learning image group. As a result, when, for example, an equal number of images showing objects that are deemed to be good and images showing objects that are deemed to be defective are required to generate a highly accurate and stable learning model, the initial learning image group can be increased in the number of images that are lacking. As a result, the ratio of images of good products to images of defective products in each learning image group can be easily adjusted to 1:1. This makes it possible to further improve and stabilize the accuracy of the learning model.

[0018] In addition, in a learning device according to a third aspect dependent on the first or second aspect, the data creation unit may create each of the multiple types of learning image groups by randomly removing one or more images from the initial learning image group.

[0019] This makes it possible to easily create a plurality of mutually different types of training image groups from the initial training image group. Note that one or more images are randomly removed from the initial training image group, and each of the remaining one or more images is adopted as an image included in the training image group, so it can also be said that the training image group is created by random sampling. In other words, cleansing of images used to generate a training model can be performed automatically or easily.

[0020] In addition, in a learning device according to a fourth aspect which is dependent on the third aspect, the learning device further includes a reset unit which causes the data creation unit to execute a reset process each time the learning image group is created by the data creation unit, in which one or more images removed for the creation of the learning image group are returned to the initial learning image group, and after performing the reset process, the data creation unit may create the learning image group from the initial learning image group which has been reset.

[0021] As a result, even if a learning image group is created by removing one or more images from an initial learning image group, the removed one or more images are returned to the initial learning image group by the reset process. Therefore, if the number of images removed from the initial learning image group is constant, it is easy to create multiple different types of learning image groups that have the same number of images. As a result, it is easy to generate multiple learning models with different performances using the same number of images.

[0022] In addition, in a learning device according to a fifth aspect which is dependent on any one of the first to fourth aspects, the learning device may further include a judgment unit which judges whether the evaluation result of the learning model selected by the model selection unit satisfies a predetermined criterion, and an output unit which outputs at least one of the evaluation result which is judged to satisfy the criterion, the learning model corresponding to the evaluation result, and the learning image group used to generate the learning model.

[0023] As a result, even if a learning model with the best evaluation results is selected from among the multiple generated learning models, if the evaluation results of the learning model do not satisfy the criteria, the output of information about the learning model can be suppressed. Therefore, the output of information about a low-precision or unstable learning model can be suppressed.

[0024] In addition, in a learning device according to a sixth aspect which is dependent on the fifth aspect, when the judgment unit judges that the evaluation result does not satisfy the criterion, the data creation unit, the learning unit, the model performance evaluation unit, and the model selection unit repeatedly execute the data creation process, the model generation process, the evaluation process, and the selection process, and when the data creation unit repeatedly executes the data creation process, it may create multiple types of training image groups that are different from the multiple types of training image groups created in the past.

[0025] As a result, when the evaluation result does not satisfy the criteria, a plurality of different learning image groups are created in the data creation process, and the model generation process, evaluation process, and selection process are repeated. Therefore, even if the evaluation result does not satisfy the criteria, it is possible to increase the possibility that a learning model having an evaluation result that satisfies the criteria will be generated thereafter.

[0026] In addition, in a learning device according to a seventh aspect which is dependent on the sixth aspect, when the data creation unit repeatedly executes the data creation process, the data creation unit may update the initial learning image group to the learning image group used in generating the learning model most recently selected by the model selection unit, and create the multiple types of learning image groups from the updated initial learning image group.

[0027] This makes it possible to easily create multiple types of learning image groups that are different from multiple types of learning image groups created in the past, further increasing the likelihood of generating a learning model with evaluation results that meet the criteria.

[0028] In addition, in a learning device according to an eighth aspect which is dependent on any one of the first to seventh aspects, when generating the learning model, the learning unit may generate the learning model including the feature extraction model and the anomaly calculation model by (a) generating a feature extraction model which outputs features of an image when an image is input, and (b) generating an anomaly calculation model which outputs an anomaly degree of an object shown in the image when a feature output from the feature extraction model is input.

[0029] This makes it possible to appropriately generate a learning model that outputs the degree of abnormality of an object shown in an input image. For example, a feature extraction model is generated so that the difference between the feature amount of an image showing an object that is considered to be a good product and the feature amount of an image showing an object that is considered to be a defective product is large. Then, an anomaly calculation model is generated using the output from the feature extraction model. Therefore, for example, it is possible to generate a learning model that appropriately outputs the degree of abnormality that indicates how much an object shown in an image is different from a good product.

[0030] In addition, in a learning device according to a ninth aspect which is dependent on any one of the first to eighth aspects, the model performance evaluation unit evaluates performance of each of the multiple learning models based on at least one of: (a) a first degree of abnormality of the object displayed in each of the multiple first evaluation images which is output from the learning model by inputting a plurality of first evaluation images included in a first evaluation image group into the learning model; and (b) a second degree of abnormality of the object displayed in each of the multiple second evaluation images which is output from the learning model by inputting a plurality of second evaluation images included in a second evaluation image group into the learning model, wherein each of the multiple first evaluation images depicts an object classified as a defective product, and each of the multiple second evaluation images depicts an object classified as a good product.

[0031] Thereby, for example, the smaller the variance of each of the first and second anomaly degrees, the higher the accuracy and stability of the performance of the corresponding learning model can be evaluated. Or, for example, the larger the difference between the averages of the first and second anomaly degrees, the higher the accuracy and stability of the performance of the corresponding learning model can be evaluated. Therefore, the performance of the learning model can be appropriately evaluated.

[0032] Hereinafter, the embodiment will be specifically described with reference to the drawings.

[0033] The embodiments described below are all comprehensive or specific examples. The numerical values, shapes, materials, components, arrangement and connection of components, steps, and order of steps shown in the following embodiments are merely examples and are not intended to limit the present disclosure. In addition, among the components in the following embodiments, components that are not described in an independent claim showing the highest concept are described as optional components. In addition, each figure is a schematic diagram and is not necessarily a strict illustration. In addition, the same components are given the same reference numerals in each figure.

[0034] (Embodiment) [System Configuration] FIG. 1 is a diagram showing an example of the external appearance of a learning system according to the present embodiment.

[0035] The learning system 1000 in this embodiment is a system that generates a learning model to be used in, for example, a manufacturing line or a production line, and includes a learning device 100, a display unit 200, and an input unit 300.

[0036] Display unit 200 is a display that acquires an image signal from learning device 100 and displays an image corresponding to the image signal. Such display unit 200 may be, but is not limited to, a liquid crystal display, an organic EL (Electro-Luminescence) display, or the like.

[0037] Input unit 300 is configured as, for example, a keyboard, a mouse, or the like, which accepts an input operation by a user and outputs an operation signal corresponding to the input operation to study device 100. Note that input unit 300 may also be configured as a touch sensor or a touch pad.

[0038] The learning device 100 is a device that generates a learning model by performing machine learning, and is configured, for example, by a personal computer. Machine learning is also simply referred to as learning hereinafter. For example, the learning device 100 acquires an operation signal output from the input unit 300, and executes processing according to the operation signal. The learning device 100 also displays information about the generated learning model on the display unit 200.

[0039] For example, when an image is input, the learning model outputs information regarding the presence or absence of defects in an object shown in the image. The image is, for example, image data obtained by capturing an image of the object with a camera. The object is a workpiece to be inspected, specifically, a product manufactured by the above-mentioned manufacturing line or production line. Specific examples of defects include scratches, stains, cracks, dents, burrs, color unevenness, and foreign matter contamination.

[0040] In this embodiment, the input unit 300 and the display unit 200 are configured as independent devices, but they may be integrated into a touch panel.

[0041] The learning device 100 is typically a computer having a general-purpose architecture, and executes various processes according to the present embodiment by executing a pre-installed program (i.e., instruction code). Such programs are typically distributed in a state stored in an arbitrary recording medium, or are installed in the learning device 100 via a communication network, etc. When a general-purpose computer is used as the learning device 100, in addition to a program (specifically, an application program) for executing various processes according to the present embodiment, an OS (Operating System) for executing basic computer processing may be installed in the learning device 100. The OS may be, for example, an open source based on WINDOWS (registered trademark) or Linux (registered trademark), but is not particularly limited to these, and may be another OS.

[0042] Furthermore, the program in this embodiment may be provided by being incorporated into a part of another program. In this case, the program in this embodiment itself does not include a module of the other program, and causes a computer to execute a process in cooperation with the other program. That is, the program according to this embodiment may be in a form incorporated into such other program. Note that some or all of the functions provided by the execution of the program may be implemented as a dedicated hardware circuit.

[0043] [Hardware configuration of the learning device] FIG. 2 is a block diagram showing an example of a hardware configuration of learning device 100 according to the present embodiment.

[0044] The learning device 100 includes a CPU (Central Processing Unit) 161, a RAM (Random Access Memory) 162, a ROM (Read Only Memory) 163, a GPU (Graphics Processing Unit) 164, a communication interface 165, an input interface 166, a display interface 167, a storage unit 180, and a read interface 168. These components are connected to each other via a bus so that they can communicate data with each other. The interface is also referred to as an I / F.

[0045] The CPU 161 performs various calculations by expanding a plurality of programs 181 installed in the storage unit 180 into the RAM 162 and executing them. The CPU 161 may also obtain data stored in the ROM 163, and may also read and execute the programs stored in the ROM 163.

[0046] The GPU 164 performs high-speed computational processing of a part of various programs used to generate a learning model 186 among a plurality of programs 181 installed in the storage unit 180. The various programs are, for example, a learning program for executing a model generation process described below, and a model evaluation and selection program for executing an evaluation process and a selection process described below.

[0047] The communication interface 165 is, for example, a wired LAN (Local Area Network) module, a wireless LAN module, etc., and is an interface for performing wired or wireless communication via a communication network. The learning device 100 can perform data communication via the communication network by using the communication interface 165.

[0048] The input interface 166 mediates data transfer between the CPU 161 and the input unit 300. Specifically, the input interface 166 acquires an operation signal output from the input unit 300, and outputs the operation signal to the CPU 161.

[0049] The display interface 167 is an interface connected to the display unit 200 and for displaying an image on the display unit 200 according to the control of the CPU 161. Such an image may show, for example, the result of a calculation by the CPU 161 or the GPU 164, or may show information on the generated learning model 186. Furthermore, the display interface 167 may output various pieces of information stored in the storage unit 180 to the display unit 200 according to the control of the CPU 161, thereby displaying the information on the display unit 200.

[0050] The read interface 168 is, for example, a USB Type-A port, and is an interface for reading information such as a program and data recorded in the recording medium 600. The type of the read interface 168 may be appropriately selected according to the type of the recording medium 600. The recording medium 600 is a medium that stores information such as the above-mentioned program by electrical, mechanical, optical, mechanical, or scientific action so that the information such as the program can be read by a computer, other device, machine, etc. The recording medium 600 may be, for example, a flash memory represented by a semiconductor memory.

[0051] The storage unit 180 is configured by, for example, a hard disk drive (HDD), a solid state drive (SSD), etc. The storage unit 180 is a recording medium for storing various information such as, for example, a plurality of programs 181, an initial learning image group 182, a learning image group 183, an evaluation image group 184, evaluation result information 185, and a plurality of learning models 186.

[0052] The plurality of programs 181 include the above-mentioned learning program, etc. The learning program is read into the CPU 161 or the GPU 164, etc., and executed, thereby generating a plurality of learning models 186.

[0053] The initial learning image group 182 includes a plurality of images that are stored in advance in the storage unit 180 in order to generate the learning model 186. As described above, these images are image data obtained by, for example, capturing an image of an object with a camera.

[0054] The training image group 183 includes a plurality of images created by the CPU 161 or the GPU 164 from the initial training image group 182 .

[0055] The evaluation image group 184 includes a plurality of images that are stored in advance in the storage unit 180 in order to evaluate the generated learning model 186. Like the images included in the initial training image group 182, these images are also image data obtained by, for example, capturing an image of an object with a camera, but are different from the images in the initial training image group 182.

[0056] The evaluation result information 185 is information indicating the evaluation result of the generated learning model 186. Such evaluation result information 185 is generated by the CPU 161 or the GPU 164 evaluating the learning model 186 using the evaluation image group 184.

[0057] Each of the multiple learning models 186 is machine-learned to output the degree of abnormality of an object shown in an input image. Such learning model 186 may be, for example, a CNN. The degree of abnormality of an object is information on the presence or absence of a defect in the object, and is used to determine the presence or absence of the defect.

[0058] The above-mentioned various information may be stored in the storage unit 180 via the communication interface 165 or the read interface 168. Information other than the above information may also be stored in the storage unit 180. For example, internal parameter information of the learning model 186 may be stored in the storage unit 180 as history.

[0059] [Functional configuration of the learning device] FIG. 3 is a block diagram showing an example of a functional configuration of the learning device 100.

[0060] The learning device 100 includes an input data creation unit 101, a learning unit 102, a model performance evaluation unit 103, a model selection unit 104, a learning data reset unit 105, a threshold determination unit 106, and an output unit 107. Note that these components are realized, for example, by at least one of the CPU 161 and the GPU 164 reading one or more programs 181 from the storage unit 180 and executing them.

[0061] The learning device 100 sequentially creates a plurality of types of learning image groups 183 from the initial learning image group 182, and generates a learning model 186 using the learning image group 183 for each learning image group 183. For example, n types of learning image groups 183 are created, and n learning models are generated. Note that n is an integer equal to or greater than 2, for example, n is 10. Then, the learning device 100 evaluates the learning models 186 and determines whether or not the best learning model 186 satisfies a criterion. If the learning device 100 determines that the best learning model 186 does not satisfy the criterion, it updates the initial learning image group 182 to the learning image group 183 used to generate the best learning model 186. Then, the learning device 100 repeatedly executes the same process as described above using the updated initial learning image group 182.

[0062] The series of processing operations of each component included in such a learning device 100 is outlined below.

[0063] The input data creation unit 101 creates a learning image group 183 based on the initial learning image group 182. Then, the learning unit 102 uses the learning image group 183 to generate a learning model 186 corresponding to the learning image group 183, and stores the learning model 186 in the storage unit 180. When the learning model 186 is generated, the learning data reset unit 105 instructs the input data creation unit 101 to perform a reset process. As a result, the input data creation unit 101 executes a reset process and creates a new learning image group 183 different from the already created learning image group 183. The learning unit 102 uses the new learning image group 183 to generate a learning model 186 corresponding to the new learning image group 183. By such a process, or by repeatedly executing such a process, n learning models 186 are generated and stored in the storage unit 180. The model performance evaluation unit 103 uses the evaluation image group 184 to evaluate the performance of each of the n learning models 186, and generates and outputs evaluation result information 185 indicating the evaluated performance as an evaluation value.

[0064] The model selection unit 104 selects the best learning model 186 from among the n learning models 186 generated based on the evaluation result information 185. The threshold determination unit 106 compares the evaluation value of the best learning model 186 with a threshold to determine whether or not the evaluation value meets a criterion. The output unit 107 outputs information about the learning model 186 having an evaluation value that meets the criterion. On the other hand, when the threshold determination unit 106 determines that the evaluation value of the best learning model 186 does not meet the criterion, the input data creation unit 101 updates the initial learning image group 182 and generates a learning image group 183 again based on the updated initial learning image group 182. Then, learning using the learning image group 183 and evaluation of the learning model generated by the learning are repeatedly performed.

[0065] Specifically, each of the above components executes the following processes.

[0066] The input data creation unit 101 sequentially generates each of the n types of learning image groups 183. Such an input data creation unit 101 is also called a data creation unit. More specifically, the input data creation unit 101 acquires an initial learning image group 182 including a plurality of images each depicting an object from the storage unit 180. Then, the input data creation unit 101 creates n types of different learning image groups 183 from the initial learning image group 182 based on a predetermined algorithm.

[0067] For example, the input data creation unit 101 creates the learning image groups 183 by augmenting images in the initial learning image group 182 and downsampling images. In augmenting images, the input data creation unit 101 increases the number of images included in the initial learning image group 182 by performing predetermined image processing on the images included in the initial learning image group 182. Then, the input data creation unit 101 creates n types of learning image groups 183 using the increased number of images included in the initial learning image group 182. In addition, in downsampling images, the input data creation unit 101 removes one or more images included in the initial learning image group 182. That is, when creating each of the n types of learning image groups 183, the input data creation unit 101 creates the learning image group 183 by randomly removing one or more images from the initial learning image group 182. In other words, the input data creation unit 101 creates the training image group 183 by sampling images other than the one or more images to be removed from the initial training image group 182. More specifically, the input data creation unit 101 performs a reset process in response to an instruction from the training data reset unit 105, and then creates the training image group 183 by removing one or more images from the initial training image group 182 that has been reset. Details of the reset process will be described later.

[0068] The learning unit 102 executes a model generation process for generating a learning model 186 that outputs the degree of anomaly of an object shown in an input image by performing machine learning using the learning image group 183 for each of the n types of learning image groups 183. In this machine learning, model generation parameters such as a batch size and a learning rate are used by the learning unit 102.

[0069] The model performance evaluation unit 103 executes an evaluation process to evaluate the performance of each of the generated n learning models 186. In this evaluation process, an evaluation image group 184 is used. Then, the model performance evaluation unit 103 generates evaluation result information 185 indicating the evaluation results of each of the n learning models 186 as evaluation values, and stores the evaluation result information in the storage unit 180.

[0070] The model selection unit 104 executes a selection process to select one learning model 186 from the n learning models 186 according to the performance evaluation result by the model performance evaluation unit 103. Specifically, the model selection unit 104 reads out the evaluation result information 185 generated by the model performance evaluation unit 103 and stored in the storage unit 180. The evaluation result information 185 indicates the evaluation results of the n learning models 186. The evaluation result is indicated, for example, as an evaluation value. The model selection unit 104 selects the learning model 186 having the best evaluation value from the n learning models 186. Then, the model selection unit 104 outputs information on the selected learning model 186 and the best evaluation value to the threshold determination unit 106.

[0071] The threshold determination unit 106 is a determination unit that determines whether or not the evaluation result of the learning model 186 selected by the model selection unit 104 satisfies a predetermined criterion. Specifically, the threshold determination unit 106 acquires information about the learning model 186 and the best evaluation value from the model selection unit 104. Then, the threshold determination unit 106 compares the evaluation value with a threshold to determine whether or not the evaluation value satisfies the criterion. If the threshold determination unit 106 determines that the evaluation value satisfies the criterion, it outputs information about the learning model 186 selected by the model selection unit 104 to the output unit 107. On the other hand, if the threshold determination unit 106 determines that the evaluation value does not satisfy the criterion, it instructs the input data creation unit 101 to update the initial learning image group 182.

[0072] The output unit 107 has at least one of the functions of the communication interface 165 and the display interface 167, for example. When the output unit 107 acquires information about the learning model 186 from the threshold determination unit 106, the output unit 107 outputs the information about the learning model 186. Specifically, the output unit 107 may output at least one of the evaluation result determined to satisfy the criterion, the learning model 186 corresponding to the evaluation result, and the learning image group 183 used to generate the learning model 186 as information about the learning model 186. For example, the output unit 107 displays the information about the learning model 186 on the display unit 200, or transmits the information about the learning model 186 to an external device or the like via a communication network. The information about the learning model 186 may be information indicating parameters, weights, and structure used in the learning model 186.

[0073] When the learning data reset unit 105 receives a notification from the learning unit 102 that the learning model 186 has been generated and determines that the predetermined condition is not satisfied, it instructs the input data creation unit 101 to execute a reset process. That is, the learning data reset unit 105 causes the input data creation unit 101 to execute the reset process until the predetermined condition is satisfied, every time the input data creation unit 101 creates a learning image group 183 and generates a learning model 186. Such a reset process is a process of returning one or more images removed by downsampling by the input data creation unit 101 to create the immediately previous learning image group 183 to the initial learning image group 182. The predetermined condition will be described in detail with reference to FIG. 8. Such a learning data reset unit 105 is also called a reset unit.

[0074] By issuing an instruction to execute the reset process (n-1) times by the learning data reset unit 105, n types of learning image groups 183 are created from the initial learning image group 182. Note that when the input data creation unit 101 receives an instruction to execute the reset process, the input data creation unit 101 may refer to the history of one or more learning image groups 183 that have already been generated and stored in the storage unit 180, and create a new learning image group 183 that is different from those learning image groups 183.

[0075] Here, when the threshold determination unit 106 determines that the above-mentioned evaluation result does not satisfy the criteria, the input data creation unit 101, the learning unit 102, the model performance evaluation unit 103, and the model selection unit 104 repeatedly execute the data creation process, the model generation process, the evaluation process, and the selection process. The repetition of each process is started by the threshold determination unit 106 instructing the input data creation unit 101 to update the initial learning image group 182. Then, when the input data creation unit 101 repeatedly executes the data creation process, it creates new n types of learning image groups 183 that are different from the n types of learning image groups 183 created in the past. In other words, when the input data creation unit 101 repeatedly executes the data creation process, it updates the initial learning image group 182 to the learning image group 183 used to generate the learning model 186 selected immediately before by the model selection unit 104, and creates new n types of learning image groups from the updated initial learning image group 182.

[0076] [Explanation of various information and associated processing] FIG. 4 is a diagram for explaining the initial learning image group 182. As shown in FIG.

[0077] 5, the initial learning image group 182 includes a plurality of good product images 182a and a plurality of defective product images 182b. The good product images 182a are images depicting objects that are considered to be good products, and the defective product images 182b are images depicting objects that are considered to be defective products. Note that a good product is an item that does not include the above-mentioned defect, and a defective product is an item that includes the above-mentioned defect.

[0078] At the start-up stage of the learning system 1000, the pre-update initial learning image group 182 stored in the storage unit 180 includes a plurality of images prepared in advance. At such a stage, the number of images included in the initial learning image group 182 is small and insufficient. In other words, if such an initial learning image group 182 is used as is for learning by the learning unit 102, it is difficult to generate a learning model 186 with sufficient performance.

[0079] Therefore, the input data creation unit 101 pads the images. In this padding, the input data creation unit 101 generates a new image by performing image processing on an image included in the initial learning image group 182, and adds the new image to the initial learning image group 182. Note that a new image may be added to the initial learning image group 182 by photographing an object with a camera. Specifically, the image processing includes image rotation, inversion, and center position change, but is not limited to these and may be other processing. Center position change is a process of shifting the center position of the image to be processed up, down, left, or right, for example, a process of placing a defective part such as a dent on the object at the center of the image.

[0080] The type of image processing to be performed may be predetermined or may be determined by the user. For example, the input data creation unit 101 may acquire an operation signal output from the input unit 300 by an input operation by the user via the input interface 166, and determine the type of image processing according to the operation signal. Furthermore, a plurality of types of image processing may be performed on one image, or different image processing may be performed on each of a plurality of images. Furthermore, when padding, the input data creation unit 101 compares the number of good images 182a and the number of defective images 182b included in the initial learning image group 182, and pads the image with the fewer number. For example, the input data creation unit 101 may pad the image with the fewer number so that the number of good images 182a and the number of defective images 182b are equal. Padding may be performed so that the ratio between the number of good images 182a and the number of defective images 182b included in the initial learning image group 182 is a predetermined ratio. Such a ratio may be determined by the user. For example, the input data creation unit 101 may acquire, via the input interface 166, an operation signal output from the input unit 300 in response to an input operation by the user, and determine the above-mentioned ratio in response to the operation signal.

[0081] Here, the number of images included in the initial learning image group 182 increases due to padding, but even if the initial learning image group 182 is used as is as the learning image group 183 to generate the learning model 186, it may be difficult to easily improve the performance of the learning model 186. In other words, unless cleansing is performed on the images used for learning, the performance of the learning model 186 may deteriorate. Therefore, the input data creation unit 101 in this embodiment performs downsampling.

[0082] That is, the input data creation unit 101 creates the training image group 183 by downsampling the initial training image group 182 that has been padded as described above. Specifically, the downsampling is random downsampling. In random downsampling, the input data creation unit 101 randomly selects images to be included in the training image group 183 from the initial training image group 182 by random number processing. That is, the input data creation unit 101 creates the training image group 183 by removing one or more images that were not selected from the initial training image group 182.

[0083] The ratio between the number of images included in the initial learning image group 182 and the number of images included in the learning image group 183 may be predetermined or may be determined by the user. For example, the input data creation unit 101 may acquire an operation signal output from the input unit 300 by an input operation by the user via the input interface 166, and determine the above-mentioned ratio according to the operation signal. Furthermore, downsampling is basically performed on the non-defective images 182a, which are greater in number than the defective images 182b. However, downsampling may be performed on the non-defective images 182a, on the defective images 182b, or on the non-defective images 182a and the defective images 182b. The target of such downsampling may be predetermined or may be determined by the user. For example, the input data creation unit 101 may acquire an operation signal output from the input unit 300 by an input operation by the user via the input interface 166, and determine the target of downsampling according to the operation signal.

[0084] It should be noted that each of the above-mentioned decisions made by the user may be made before the generation of the learning model 186, i.e., in advance.

[0085] FIG. 5 is a diagram for explaining the learning model 186.

[0086] The learning unit 102 performs machine learning using the learning image group 183 to generate a learning model 186 consisting of, for example, a neural network. The learning model 186 in this embodiment includes a feature extraction model 11, an anomaly degree calculation model 14, and an output layer 13. The feature extraction model 11 is a model that outputs a feature vector 12 of an image in response to an input of the image, and is also called a deep metric learning model. The feature vector 12 is also called a feature. The output layer 13 outputs a class corresponding to the feature vector in response to an input of the feature vector 12. The classes include a class of good products and a class of defective products. In other words, the class indicates the type of object shown in the image included in the learning image group 183. Such an output layer 13 may be, for example, a fully connected layer, or may be a neural network having an architecture as disclosed in Non-Patent Document 2.

[0087] The anomaly degree calculation model 14 is a model that outputs the degree of anomaly of the feature vector 12 in response to the input of the feature vector 12. The degree of anomaly indicates how much the feature vector 12 differs from the feature vector of the image of a good product. It can also be said that the degree of anomaly indicates the degree of anomaly of the object shown in the image from the good product. The configuration of the anomaly degree calculation model 14 is not particularly limited and may be selected as appropriate.

[0088] The learning unit 102 in this embodiment performs two-stage learning. In the first stage of learning, the learning unit 102 performs learning of the feature extraction model 11 and the output layer 13. Specifically, the learning unit 102 trains the neural network by a method called deep distance learning. That is, the learning unit 102 trains the neural network for input of each image included in the learning image group 183 so that the difference in feature vectors between classes is maximized and the difference in feature vectors within a class is minimized. The difference in feature vectors between classes is the distance between the feature vector of a good image and the feature vector of a defective image. The difference in feature vectors within a class is the distance between the feature vector of a good image and the feature vector of another good image, or the distance between the feature vector of a defective image and the feature vector of another defective image. The learning unit 102 performs the above-mentioned training based on the comparison result between the class output from the output layer 13 and the correct answer label 21. That is, the learning unit 102 optimizes the parameters by performing error backpropagation using the comparison result. The optimization method in the error backpropagation is not particularly limited, and the optimization method may be a gradient descent method, a stochastic gradient descent method, a mini-batch gradient descent method, or the like.

[0089] Such a feature extraction model 11 is composed of a plurality of transformation layers that perform different predetermined transformations on an image input, and can be said to convert the image into a feature vector. The structure of the feature extraction model 11 is not particularly limited, and may be ResNet disclosed in Non-Patent Document 1. In addition, the training method of the feature extraction model 11 is not particularly limited, and may be deep distance learning or another training method. As an example, deep distance learning may be adacos as disclosed in Non-Patent Document 2. adacos is an example of deep distance learning, and is a learning method that performs training to generate a model that extracts a distance structure of an image so that the feature vectors of multiple images corresponding to the same label are close to each other and the feature vectors of multiple images corresponding to different labels are far apart.

[0090] After the first stage of learning, in the second stage of learning, the learning unit 102 learns the anomaly degree calculation model 14. The learning unit 102 inputs only the good-quality images of the learning image group 183 into the feature amount extraction model 11, thereby acquiring good-quality feature vectors as the feature vectors 12 of the good-quality images. The learning unit 102 uses these good-quality feature vectors to create the anomaly degree calculation model 14. The anomaly degree calculation model 14 includes, for example, an average feature vector 14a and a covariance matrix 14b calculated using the good-quality feature vectors.

[0091] The feature extraction model 11 in such a learning model 186 is used during the first stage of learning, the second stage of learning, and the evaluation and operation of the learning model 186. The output layer 13 is used only during the first stage of learning, and the anomaly calculation model 14 is used during the second stage of learning, and the evaluation and operation of the learning model 186. In addition, the structure of the feature extraction model 11, the structure of the output layer 13, and the structure of the anomaly calculation model 14 can be freely set by the user by setting parameters.

[0092] In this way, the learning unit 102 in this embodiment generates the learning model 186 in two stages. That is, in the first stage, the learning unit 102 generates a feature extraction model 11 that outputs a feature of an image when an image is input. Then, in the second stage, the learning unit 102 generates an anomaly degree calculation model 14 that outputs an anomaly degree of an object shown in an image when a feature amount output from the feature extraction model 11 is input. In this way, the learning unit 102 generates the learning model 186 including the feature extraction model 11 and the anomaly degree calculation model 14.

[0093] This makes it possible to appropriately generate a learning model 186 that outputs the degree of abnormality of an object shown in an input image in response to an image input. For example, a feature amount extraction model 11 is generated so that the difference between the feature amount of an image showing an object that is deemed to be a good product and the feature amount of an image showing an object that is deemed to be a defective product becomes large. Then, an anomaly degree calculation model 14 is generated using the output from the feature amount extraction model 11. Therefore, for example, it is possible to generate a learning model 186 that appropriately outputs the degree of abnormality that indicates how much an object shown in an image differs from a good product.

[0094] FIG. 6 is a diagram for explaining the evaluation image group 184. As shown in FIG.

[0095] As shown in FIG. 6, the evaluation image group 184 includes a first evaluation image group 184a including a plurality of first evaluation images and a second evaluation image group 184b including a plurality of second evaluation images. The first evaluation images are images showing an object that is considered to be a defective product. These first evaluation images have variations in the imaging aspect of the defective product. For example, a plurality of images obtained by imaging a defective product in different directions, brightness, etc. are treated as a plurality of first evaluation images. The second evaluation images are images showing an object that is considered to be a non-defective product. These second evaluation images also have variations in the imaging aspect of the non-defective product. For example, a plurality of images obtained by imaging a non-defective product in different directions, brightness, etc. are treated as a plurality of second evaluation images.

[0096] The model performance evaluation unit 103 inputs a plurality of images included in the evaluation image group 184 into the learning model 186 generated by learning by the learning unit 102, thereby acquiring the degree of anomaly for those images. Then, the model performance evaluation unit 103 calculates an evaluation value of the learning model 186 as an evaluation result based on those acquired degrees of anomaly. For example, the model performance evaluation unit 103 may calculate at least one of a first variance value and a first average value of the degree of anomaly acquired for each of the plurality of first evaluation images as the evaluation value. In addition, the model performance evaluation unit 103 may calculate at least one of a second variance value and a second average value of the degree of anomaly acquired for each of the plurality of second evaluation images as the evaluation value. Such an evaluation value is treated as an index indicating the performance of the learning model 186, that is, stability and accuracy.

[0097] Here, the model performance evaluation unit 103 may calculate any one of the first variance value, the second variance value, the first average value, and the second average value as the evaluation value, or may calculate the evaluation value using two or more of these values. For example, the model performance evaluation unit 103 may calculate the sum of the first variance value and the second variance value as the evaluation value. Alternatively, the model performance evaluation unit 103 may calculate the difference between the first average value and the second average value as the evaluation value. Alternatively, the model performance evaluation unit 103 may calculate a value that is smaller as the above-mentioned sum is smaller and smaller as the above-mentioned difference is larger by substituting the first variance value, the second variance value, the first average value, and the second average value into the first arithmetic expression. Conversely, the model performance evaluation unit 103 may calculate a value that is larger as the above-mentioned sum is smaller and larger as the above-mentioned difference is larger by substituting the first variance value, the second variance value, the first average value, and the second average value into the second arithmetic expression.

[0098] The evaluation value is not limited to these values ​​and may be other values. For example, the variance values ​​such as the first variance value and the second variance value may be replaced with a standard deviation value. The type of evaluation value such as the first variance value, the sum of variance values, and the difference between average values ​​may be set by the user. For example, the model performance evaluation unit 103 acquires an operation signal output from the input unit 300 by an input operation by the user via the input interface 166. The model performance evaluation unit 103 determines the type of evaluation value according to the operation signal and calculates the evaluation value of the type.

[0099] The model performance evaluation unit 103 generates evaluation result information 185 indicating the evaluation value calculated for each of the n learning models 186 , and stores the evaluation result information 185 in the storage unit 180 .

[0100] In this manner, the model performance evaluation unit 103 in this embodiment evaluates the performance of each of the n learning models 186 based on at least one of (a) a first degree of abnormality of an object shown in each of the multiple first evaluation images output from the learning model 186 by inputting multiple first evaluation images included in the first evaluation image group 184a to the learning model 186, and (b) a second degree of abnormality of an object shown in each of the multiple second evaluation images output from the learning model 186 by inputting multiple second evaluation images included in the second evaluation image group 184b to the learning model 186. Also, each of the multiple first evaluation images shows an object classified as a defective product, and each of the multiple second evaluation images shows an object classified as a non-defective product. For example, the model performance evaluation unit 103 may evaluate at least one of the variance and average of the first anomaly degree of the acquired object and at least one of the variance and average of the second anomaly degree of the acquired object as the performance of the learning model 186. Thereby, for example, the smaller the variance of each of the first anomaly degree and the second anomaly degree, the more highly accurate and stable the performance of the corresponding learning model 186 can be evaluated. Alternatively, for example, the larger the difference between the averages of the first anomaly degree and the second anomaly degree, the more highly accurate and stable the performance of the corresponding learning model 186 can be evaluated. Therefore, the performance of the learning model 186 can be appropriately evaluated.

[0101] FIG. 7 is a diagram showing an example of the evaluation result information 185. As shown in FIG.

[0102] The evaluation result information 185 indicates, for each of the n types of training image groups 183, a training image group ID, a learning model ID, and an evaluation value corresponding to that training image group 183. The training image group ID is information for identifying the training image group 183 corresponding to that training image group ID. The learning model ID is information for identifying the training model 186 generated by training using the training image group 183 corresponding to that training model ID. The evaluation value is a value indicating the evaluation result or performance of the training model 186 generated by training using the training image group 183 corresponding to that evaluation value.

[0103] Each time a learning image group 183 is created and a learning model 186 is generated, the model performance evaluation unit 103 may write the learning image group ID, learning model ID, and evaluation value corresponding to the learning image group 183 into the evaluation result information 185. Alternatively, the model performance evaluation unit 103 may write the learning image group ID, learning model ID, and evaluation value corresponding to the n types of learning image groups 183 collectively into the evaluation result information 185 after n learning models 186 are generated using n types of learning image groups 183.

[0104] The output unit 107 may output the evaluation result information 185 to the display unit 200 via the display interface 167, thereby displaying the evaluation result information 185 on the display unit 200. This allows the user to adjust the learning model 186.

[0105] The model selection unit 104 reads out and refers to such evaluation result information 185 from the storage unit 180. Then, the model selection unit 104 identifies a learning model ID associated with the best evaluation value from among the n learning model IDs indicated in the evaluation result information 185, and selects a learning model 186 corresponding to the learning model ID.

[0106] For example, the evaluation value shown in the evaluation result information 185 is the first variance value, the second variance value, or the sum of the first variance value and the second variance value. In such a case, the model selection unit 104 searches the evaluation result information 185 for the minimum evaluation value as the best evaluation value. Alternatively, the evaluation value shown in the evaluation result information 185 is the difference between the first average value and the second average value. In such a case, the model selection unit 104 may search the evaluation result information 185 for the maximum evaluation value as the best evaluation value. Alternatively, the evaluation value shown in the evaluation result information 185 is a value calculated by the above-mentioned first arithmetic expression. In such a case, the model selection unit 104 searches the evaluation result information 185 for the minimum evaluation value as the best evaluation value. Alternatively, the evaluation value shown in the evaluation result information 185 is a value calculated by the above-mentioned second arithmetic expression. In such a case, the model selection unit 104 searches the evaluation result information 185 for the maximum evaluation value as the best evaluation value.

[0107] When the threshold judgment unit 106 acquires the best evaluation value of the learning model 186 selected by the model selection unit 104, the threshold judgment unit 106 compares the best evaluation value with the threshold. For example, the evaluation value is the first variance value, the second variance value, the sum of the first variance value and the second variance value, or a value calculated by the first arithmetic expression. In this case, if the evaluation value is equal to or less than the threshold, the threshold judgment unit 106 judges that the evaluation value of the learning model 186 meets the criterion. On the other hand, if the evaluation value is greater than the threshold, the threshold judgment unit 106 judges that the evaluation value of the learning model 186 does not meet the criterion. Alternatively, the evaluation value is the difference between the first average value and the second average value, or a value calculated by the second arithmetic expression. In this case, if the evaluation value is equal to or greater than the threshold, the threshold judgment unit 106 judges that the evaluation value of the learning model 186 meets the criterion. On the other hand, if the evaluation value is less than the threshold, the threshold judgment unit 106 judges that the evaluation value of the learning model 186 does not meet the criterion.

[0108] Here, when the threshold determination unit 106 determines that the evaluation value does not satisfy the criterion, it instructs the input data creation unit 101 to update the initial learning image group 182. On the other hand, when the threshold determination unit 106 determines that the evaluation value satisfies the criterion, it outputs information about the learning model 186 selected by the model selection unit 104 to the output unit 107.

[0109] [Processing flow] FIG. 8 is a flowchart showing an example of the processing operation of the learning device 100.

[0110] First, the input data creation unit 101 acquires the initial learning image group 182 from the storage unit 180 (step S1). For example, the input data creation unit 101 refers to a folder designated by the user, and acquires the initial learning image group 182 in the folder. Next, the input data creation unit 101 augments the initial learning image group 182, that is, executes an augmentation process (step S2). This increases the number of images included in the initial learning image group 182. Furthermore, this augmentation process sets the ratio between the number of non-defective images 182a and the number of defective images 182b included in the initial learning image group 182 to the ratio set by the user. Then, the learning data reset unit 105 sets the variable k to 0 (step S3). That is, the variable k is initialized.

[0111] Next, the input data creation unit 101 creates a learning image group 183 from the initial learning image group 182 by downsampling the initial learning image group 182 after the padding process (step S4). The learning unit 102 generates a learning model 186 using the learning image group 183 created in step S4 (step S5). The generated learning model 186 is stored in the storage unit 180. The model performance evaluation unit 103 evaluates the learning model 186 generated in step S5 (step S6). That is, the model performance evaluation unit 103 calculates an evaluation value of the learning model 186. Then, the model performance evaluation unit 103 writes the evaluation value of the learning model 186 in the evaluation result information 185, thereby storing the evaluation value (step S7). When such evaluation values ​​are stored, the learning data reset unit 105 increments the variable k (step S8).

[0112] Then, the learning data reset unit 105 determines whether the variable k has reached n (step S9). The value of the variable n is, for example, 10, but may be set arbitrarily by the user. For example, the learning data reset unit 105 may acquire, via the input interface 166, an operation signal output from the input unit 300 by an input operation by the user, and determine the value of the variable n according to the operation signal. Here, when the learning data reset unit 105 determines that the variable k has not reached n (No in step S9), that is, when it determines that the above-mentioned predetermined condition is not satisfied, it instructs the input data creation unit 101 to perform a reset process on the learning image group 183. As a result, the learning image group 183 is returned to the initial learning image group 182. Then, the input data creation unit 101 repeatedly executes the processes from step S4 using the initial learning image group 182.

[0113] On the other hand, when the learning data reset unit 105 determines that the variable k has reached n (Yes in step S9), that is, when the above-mentioned predetermined condition is satisfied, it instructs the model selection unit 104 to select a learning model 186. When the model selection unit 104 receives the instruction from the learning data reset unit 105, it selects the learning model 186 having the best evaluation value from among the 10 learning models 186 stored in the storage unit 180, using the evaluation result information 185 (step S11). Then, the threshold determination unit 106 determines whether or not the best evaluation value of the selected learning model 186 satisfies a criterion, using a threshold (step S12).

[0114] Here, if the threshold determination unit 106 determines that the evaluation value does not satisfy the criterion (No in step S12), the input data creation unit 101 selects the training image group 183 used to generate the learning model 186 selected in step S11 as the initial training image group 182 (step S13). That is, the input data creation unit 101 updates the initial training image group 182 to the training image group 183. Then, the learning device 100 repeatedly executes the processes from step S3.

[0115] On the other hand, if the threshold value determination unit 106 determines that the evaluation value meets the criterion (Yes in step S12), the output unit 107 outputs information about the learning model 186 selected in step S11 (step S14).

[0116] FIG. 9 is a diagram for explaining an embodiment of the learning device 100. In FIG. 9, the score associated with each image is illustrated as the degree of abnormality of the object depicted in the image. These images are composed of a plurality of first evaluation images (i.e., the images in the upper row of FIG. 9) included in the first evaluation image group 184a and a plurality of second evaluation images (i.e., the images in the lower row of FIG. 9) included in the second evaluation image group 184b. The plurality of first evaluation images included in the first evaluation image group 184a depict an object having a dent. In the example of FIG. 9, a standard deviation or a standard deviation value is used instead of the variance or variance value of the degree of abnormality.

[0117] <First n-loop process> First, the learning device 100 performs learning. That is, the learning device 100 executes the process of steps S4 to S9 in FIG. 8 n times. Such n-times processing is hereinafter also referred to as n-loop processing. Through the first n-loop processing, the learning device 100 creates n types of first training image groups from the initial training image group 182, and generates a learning model 186 for each of the n types of first training image groups using the first training image group. Each of the n types of first training image groups is a mutually different training image group 183 created by downsampling the initial training image group 182 after the padding process, and includes the same number of images. For example, each of the n types of first training image groups includes 400 images.

[0118] Next, the learning device 100 verifies each of the n learning models 186 generated using the n types of first learning image groups.

[0119] In such a verification, the model performance evaluation unit 103 inputs each of the multiple first evaluation images included in the first evaluation image group 184a into the learning model 186, thereby acquiring the degree of abnormality of the object depicted in each of the multiple images. The degrees of abnormality of the multiple images are, for example, 1 point, 42 points, 69 points, 86 points, and 97 points. The model performance evaluation unit 103 calculates the standard deviation of these degrees of abnormality as a first standard deviation value σ=34, and calculates the average of these degrees of abnormality as a first average value μ=59.

[0120] Similarly, the model performance evaluation unit 103 inputs each of the second evaluation images included in the second evaluation image group 184b into the learning model 186 to obtain the degree of abnormality of the object depicted in each of the images. The degrees of abnormality of the images are, for example, 20 points, 30 points, 15 points, 90 points, and 45 points. The model performance evaluation unit 103 calculates the standard deviation of these degrees of abnormality as a second standard deviation value σ=27, and calculates the average of these degrees of abnormality as a second average value μ=40.

[0121] The model performance evaluation unit 103 calculates an evaluation value of the learning model 186 using at least one of the first standard deviation value, the second standard deviation value, the first average value, and the second average value. The evaluation value may be any one of the first standard deviation value, the second standard deviation value, the first average value, and the second average value. Such an evaluation value is calculated for each of the n learning models 186. In the example of FIG. 9, the evaluation value is the first standard deviation value. Then, the model selection unit 104 selects the learning model 186 having the best evaluation value from the n learning models 186. For example, the model selection unit 104 selects the learning model 186 having the smallest evaluation value (i.e., the smallest first standard deviation value) as the learning model 186 having the best evaluation value. In a specific example, the learning model 186 having the smallest first standard deviation value σ=34 as the best evaluation value is selected.

[0122] The threshold determination unit 106 determines whether the evaluation value of the selected learning model 186 meets the criteria. A threshold is used for this determination. The threshold is, for example, 5. Therefore, the threshold determination unit 106 compares the evaluation value "first standard deviation value σ=36" with the threshold "5", and determines that the evaluation value meets the criteria if the evaluation value is equal to or less than the threshold. In this first n-loop process, the threshold determination unit 106 determines that the evaluation value does not meet the criteria.

[0123] <Second n-loop process> If the evaluation value of the learning model 186 selected in the first n-loop process does not satisfy the criterion, the initial learning image group 182 is updated. That is, the learning device 100 uses the learning image group 183 used in generating the learning model 186 as a new initial learning image group 182 for the second n-loop process. In the second n-loop process, the learning device 100 generates n types of second learning image groups from the new initial learning image group 182. Each of the n types of second learning image groups is a different learning image group 183 created by downsampling the updated initial learning image group 182, and includes the same number of images. For example, each of the n types of second learning image groups includes 390 images. Then, the learning device 100 generates a learning model 186 for each of the n types of second learning image groups using the second learning image group.

[0124] Next, the learning device 100 verifies each of the n learning models 186 generated using the n types of second learning image groups.

[0125] In such a verification, the model performance evaluation unit 103 inputs each of the multiple images included in the first evaluation image group 184a into the learning model 186, thereby acquiring the degree of abnormality of the object depicted in each of the multiple images. The degrees of abnormality of the multiple images are, for example, 50 points, 42 points, 69 points, 86 points, and 97 points. The model performance evaluation unit 103 calculates the standard deviation of these degrees of abnormality as a first standard deviation value σ=20, and calculates the average of these degrees of abnormality as a first average value μ=68.

[0126] Similarly, the model performance evaluation unit 103 inputs each of the second evaluation images included in the second evaluation image group 184b into the learning model 186 to obtain the degree of abnormality of the object depicted in each of the multiple images. The degrees of abnormality of the multiple images are, for example, 20 points, 30 points, 15 points, 60 points, and 45 points. The model performance evaluation unit 103 calculates the standard deviation of these degrees of abnormality as a second standard deviation value σ=16, and calculates the average of these degrees of abnormality as a second average value μ=34.

[0127] In the example of FIG. 9, as described above, the evaluation value is treated as the first standard deviation value. Then, the model selection unit 104 selects the learning model 186 having the best evaluation value from the n learning models 186. For example, the model selection unit 104 selects the learning model 186 having the smallest evaluation value (i.e., the smallest first standard deviation value) as the learning model 186 having the best evaluation value. In a specific example, the learning model 186 having the smallest first standard deviation value σ=20 as the best evaluation value is selected.

[0128] The threshold determination unit 106 determines whether the evaluation value of the selected learning model 186 meets the criterion. As described above, the threshold value "5" is used as an example for this determination. Therefore, the threshold determination unit 106 compares the evaluation value "first standard deviation value σ=20" with the threshold value "5", and determines that the evaluation value meets the criterion if the evaluation value is equal to or less than the threshold value. In this second n-loop process, the threshold determination unit 106 determines that the evaluation value does not meet the criterion.

[0129] Note that the first standard deviation value σ and the second standard deviation value σ obtained by the second n-loop process are smaller than the first standard deviation value σ and the second standard deviation value σ obtained by the first n-loop process. That is, it can be said that the learning model 186 generated by the second n-loop process has higher accuracy and is more stable than the learning model 186 generated by the first n-loop process. However, the best evaluation value does not satisfy the threshold. Therefore, such an n-loop process is repeatedly executed until the best evaluation value satisfies the criterion.

[0130] <Mth n-loop process> If the evaluation value of the learning model 186 selected in the (M - 1)th n-loop process does not satisfy the criterion, the initial learning image group 182 is updated. That is, the learning device 100 uses the learning image group 183 used to generate the selected learning model 186 as a new initial learning image group 182, and generates n types of Mth learning image groups from the new initial learning image group 182. Each of the n types of Mth learning image groups is a different learning image group 183 created by downsampling the updated initial learning image group 182 and contains the same number of images. For example, each of the n types of third learning image groups contains 350 images. Then, the learning device 100 generates a learning model 186 for each of the n types of Mth learning image groups using the Mth learning image group.

[0131] Next, the learning device 100 verifies each of the n learning models 186 generated using the n types of Mth learning image groups.

[0132] In such a verification, the model performance evaluation unit 103 inputs each of the multiple images included in the first evaluation image group 184a into the learning model 186, thereby acquiring the degree of abnormality of the object depicted in each of the multiple images. The degrees of abnormality of the multiple images are, for example, 85 points, 90 points, 94 points, 93 points, and 97 points. The model performance evaluation unit 103 calculates the standard deviation of these degrees of abnormality as a first standard deviation value σ=4, and calculates the average of these degrees of abnormality as a first average value μ=91.

[0133] Similarly, the model performance evaluation unit 103 inputs each of the second evaluation images included in the second evaluation image group 184b into the learning model 186, thereby acquiring the degree of abnormality of the object depicted in each of the multiple images. The degrees of abnormality of the multiple images are, for example, 5 points, 8 points, 3 points, 4 points, and 7 points. The model performance evaluation unit 103 calculates the standard deviation of these degrees of abnormality as a second standard deviation value σ=2, and calculates the average of these degrees of abnormality as a second average value μ=5.

[0134] In the example of FIG. 9, as described above, the evaluation value is treated as the first standard deviation value. Then, the model selection unit 104 selects the learning model 186 having the best evaluation value from the n learning models 186. For example, the model selection unit 104 selects the learning model 186 having the smallest evaluation value (i.e., the smallest first standard deviation value) as the learning model 186 having the best evaluation value. In a specific example, the learning model 186 having the smallest first standard deviation value σ=4 as the best evaluation value is selected.

[0135] The threshold judgment unit 106 judges whether the evaluation value of the selected learning model 186 meets the criterion. As described above, the threshold "5" is used as an example for this judgment. Therefore, the threshold judgment unit 106 compares the evaluation value "first standard deviation value σ=4" with the threshold "5", and judges that the evaluation value meets the criterion if the evaluation value is equal to or less than the threshold. In the Mth n-loop processing, the threshold judgment unit 106 judges that the evaluation value meets the criterion. As a result, the output unit 107 outputs information about the selected learning model 186. This ends the processing of the learning device 100. The first standard deviation value σ=4 and the second standard deviation value σ=2 of the learning model 186 generated in this way are small, and the difference between the first average value μ=91 and the second average value μ=5 of the learning model 186 is large. Therefore, it can be said that the learning model 186 generated by the Mth n-loop processing has higher accuracy and is more stable than the learning model 186 generated by the first n-loop processing. In other words, the learning model 186 generated by the Mth n-loop process can distinguish between non-defective and defective products with higher accuracy than the learning model 186 generated by the first n-loop process.

[0136] Thus, in this embodiment, the learning device 100 executes a data creation process that creates multiple types of learning image groups 183 from the initial learning image group 182 based on a predetermined algorithm. The predetermined algorithm is, for example, the processes of steps S2 and S4 in FIG. 8. Then, the learning unit 102 executes a model generation process that generates a learning model 186 from each of the multiple types of learning image groups 183. Next, the learning unit 102 executes an evaluation process for each of the multiple learning models 186, and executes a selection process that selects one learning model 186 from the multiple learning models 186 according to the evaluation result.

[0137] As a result, a plurality of types of learning image groups 183 are automatically created from the initial learning image group 182, and a learning model 186 is generated and evaluated for each of the learning image groups 183. Then, for example, the learning model 186 with the best evaluation result is selected. Therefore, once the user prepares the initial learning image group 182, the user can easily prepare the learning image group 183, i.e., the learning images, without the user's operation, without the user's steady adjustment, and without relying on human intuition or tips. Furthermore, for example, by selecting the learning model 186 with the best evaluation result, a stable learning model with high accuracy can be generated. Therefore, a stable learning model 186 can be easily generated.

[0138] Furthermore, in this embodiment, the number of images included in the initial learning image group 182 is inflated. As a result, when, for example, the same number of images showing objects that are deemed to be good and images showing objects that are deemed to be defective are required to generate a highly accurate and stable learning model 186, the initial learning image group 182 can be increased in number to include the missing images. As a result, the ratio of good images to defective images in each learning image group 183 can also be easily adjusted to 1:1. Therefore, the accuracy of the learning model 186 can be further improved and made stable.

[0139] Furthermore, in this embodiment, downsampling is performed. This makes it possible to easily create a plurality of different learning image groups 183 from the initial learning image group 182. In other words, cleansing of images used to generate the learning model 186 can be performed automatically or easily.

[0140] Furthermore, in this embodiment, a reset process is performed. As a result, even if the learning image group 183 is created by removing one or more images from the initial learning image group 182, the reset process returns the removed one or more images to the initial learning image group 182. Therefore, if the number of images removed from the initial learning image group 182 is constant, it is possible to easily create multiple types of learning image groups 183 that have the same number of images and are different from each other. As a result, it is possible to easily generate multiple learning models 186 with different performances, each using the same number of images.

[0141] In addition, in this embodiment, information about the learning model 186 whose evaluation result meets the standard is output. As a result, even if a learning model whose evaluation result is the best is selected from among the multiple learning models generated, if the evaluation result of the learning model does not meet the standard, the output of information about the learning model can be suppressed. Therefore, the output of information about the learning model 186 with low accuracy or instability can be suppressed.

[0142] Furthermore, in this embodiment, when the evaluation result does not satisfy the criteria, a plurality of different learning image groups 183 are created in the data creation process, and the model generation process, evaluation process, and selection process are repeated. Therefore, even if the evaluation result does not satisfy the criteria, it is possible to increase the possibility that a learning model 186 having an evaluation result that satisfies the criteria will be generated thereafter.

[0143] Furthermore, in this embodiment, the initial training image group 182 is updated. This makes it possible to easily create a plurality of training image groups 183 that are different from the plurality of training image groups 183 created in the past, and further increases the possibility of generating a training model 186 having an evaluation result that satisfies the criteria.

[0144] (Other variations) Although the learning device 100 according to one aspect of the present disclosure has been described based on the above embodiment, the present disclosure is not limited to the embodiment. As long as it does not deviate from the spirit of the present disclosure, various modifications conceivable by a person skilled in the art to the above embodiment may also be included in the present disclosure.

[0145] For example, in the above embodiment, information on the learning model 186 whose evaluation result meets the criterion is output from the output unit 107. However, information on the learning model 186 that does not meet the criterion may be output. In this case, the output unit 107 outputs information on the learning model 186 selected by the model selection unit 104, that is, the learning model 186 having the best evaluation result. Alternatively, information on the learning model 186 according to the operation by the user may be output. In this case, the output unit 107 displays the evaluation result information 185 on the display unit 200 via the display interface 167. The user refers to the displayed evaluation result information 185 and performs an input operation on the input unit 300 to cause the model selection unit 104 to select the learning model 186 according to the input operation stored in the storage unit 180. As a result, the output unit 107 outputs information on the learning model 186 selected by the input operation by the user.

[0146] In the above embodiment, each component may be configured with dedicated hardware, or may be realized by executing a software program suitable for each component. Each component may be realized by a program execution unit such as a CPU or a processor reading and executing a software program recorded on a recording medium such as a hard disk or a semiconductor memory. Here, the software for realizing the learning device 100 of the above embodiment is, for example, a program that causes a computer to execute each step of the flowchart shown in FIG.

[0147] The following cases are also included in this disclosure:

[0148] (1) The at least one device is specifically a computer system consisting of a microprocessor, a ROM (Read Only Memory), a RAM (Random Access Memory), a hard disk unit, a display unit, a keyboard, a mouse, etc. A computer program is stored in the RAM or the hard disk unit. The at least one device achieves its functions by the microprocessor operating in accordance with the computer program. Here, the computer program is composed of a combination of multiple instruction codes that indicate commands for a computer to achieve a specified function.

[0149] (2) Some or all of the components constituting at least one of the above devices may be composed of one system LSI (Large Scale Integration). The system LSI is an ultra-multifunctional LSI manufactured by integrating multiple components on one chip, and specifically, is a computer system including a microprocessor, ROM, RAM, etc. A computer program is stored in the RAM. The system LSI achieves its functions by the microprocessor operating in accordance with the computer program.

[0150] (3) A part or all of the components constituting at least one of the above devices may be composed of an IC card or a standalone module that is detachable from the device. The IC card or module is a computer system composed of a microprocessor, ROM, RAM, etc. The IC card or module may include the above-mentioned ultra-multifunction LSI. The IC card or module achieves its functions by the microprocessor operating according to a computer program. This IC card or module may be tamper-resistant.

[0151] (4) The present disclosure may be embodied as any of the methods described above, a computer program for implementing these methods on a computer, or a digital signal comprising a computer program.

[0152] The present disclosure may also be a computer program or a digital signal recorded on a computer-readable recording medium, such as a flexible disk, a hard disk, a CD (Compact Disc)-ROM, a DVD, a DVD-ROM, a DVD-RAM, a BD (Blu-ray (registered trademark) Disc), a semiconductor memory, etc. Also, the present disclosure may be a digital signal recorded on such a recording medium.

[0153] The present disclosure may also involve transmitting a computer program or a digital signal via a telecommunications line, a wireless or wired communication line, a network such as the Internet, data broadcasting, or the like.

[0154] Furthermore, the program or digital signal may be recorded on a recording medium and transferred, or the program or digital signal may be transferred via a network or the like, so that the program or digital signal may be implemented by another independent computer system. [Industrial Applicability]

[0155] The learning device disclosed herein has the effect of being able to easily generate a stable learning model, and can be applied, for example, to a device or system that inspects whether a product is good or defective based on an image obtained by photographing the product produced on a production line. [Explanation of symbols]

[0156] 100 Learning Device 101 Input Data Creation Department 102 Learning Department 103 Model Performance Evaluation Section 104 Model Selection Section 105 Learning data reset unit 106 Threshold judgment unit 107 Output section 161 CPU 162 RAM 163 ROM 164 GPU 165 Communication Interface 166 Input Interface 167 Display Interface 168 Read Interface 180 Storage section 181 Programs 182 Initial learning image group 182a Good product image 182b Defective product image 183 Learning Image Group 184 Evaluation Image Group 184a First evaluation image group 184b Second evaluation image group 185 Evaluation result information 186 Learning Model 200 Display 300 Input section 600 Recording media 1000 Learning System

Claims

1. a data creation unit that executes a data creation process to create a plurality of different learning image groups based on a predetermined algorithm from an initial learning image group including a plurality of images each depicting an object; a learning unit that executes a model generation process for generating a learning model that outputs an abnormality level of an object shown in an input image by performing machine learning using the learning image group for each of a plurality of types of learning image groups; A model performance evaluation unit that executes an evaluation process for evaluating the performance of each of the generated learning models; a model selection unit that executes a selection process to select one learning model from the plurality of learning models according to the performance evaluation result; A learning device comprising:

2. The data creation unit is increasing the number of images included in the initial training image group by performing a predetermined image processing on the images included in the initial training image group, and creating the multiple types of training image groups using the increased multiple images included in the initial training image group. The learning device according to claim 1 .

3. The data creation unit is When creating each of the plurality of training image groups, the training image group is created by randomly removing one or more images from the initial training image group. The learning device according to claim 2 .

4. The learning device further comprises: a reset unit that causes the data creation unit to execute a reset process that returns one or more images removed for the creation of the learning image group to the initial learning image group each time the learning image group is created by the data creation unit; The data creation unit is After performing the reset process, the learning image group is created from the initial learning image group that has been reset. The learning device according to claim 3 .

5. The learning device further comprises: a determination unit that determines whether or not the evaluation result of the learning model selected by the model selection unit satisfies a predetermined criterion; an output unit that outputs at least one of the evaluation result determined to satisfy the criterion, the learning model corresponding to the evaluation result, and the learning image group used to generate the learning model; The learning device according to claim 1 .

6. When the evaluation result is determined to not satisfy the criteria by the determination unit, The data creation unit, the learning unit, the model performance evaluation unit, and the model selection unit are Repeating the data creation process, the model generation process, the evaluation process, and the selection process; The data creation unit is When the data creation process is repeatedly executed, a plurality of types of learning image groups different from the plurality of types of learning image groups created in the past are created. The learning device according to claim 5 .

7. The data creation unit is When the data creation process is repeatedly executed, the initial learning image group is updated to the learning image group used in generating the learning model previously selected by the model selection unit, and the multiple types of learning image groups are created from the updated initial learning image group. The learning device according to claim 6.

8. When generating the learning model, the learning unit (a) generating a feature extraction model for outputting a feature of an image when an image is input; (b) generating an anomaly degree calculation model that outputs an anomaly degree of an object shown in the image in response to an input of a feature amount output from the feature amount extraction model, generating the learning model including the feature extraction model and the anomaly degree calculation model; The learning device according to claim 1 .

9. The model performance evaluation unit includes: For each of the plurality of learning models, (a) a first abnormality degree of an object depicted in each of the first evaluation images included in a first evaluation image group, the first abnormality degree being output from the learning model by inputting the first evaluation images included in a first evaluation image group into the learning model; and (b) a second abnormality degree of the object depicted in each of the second evaluation images included in the second evaluation image group, which is output from the learning model by inputting the second evaluation images included in the second evaluation image group into the learning model; and Evaluate the performance of the learning model based on at least one of Each of the plurality of first evaluation images shows an object to be classified as a defective product; Each of the plurality of second evaluation images depicts an object classified as a non-defective product. The learning device according to claim 1 .

10. 1. A computer implemented method of learning, comprising: executing a data creation process for creating a plurality of different learning image groups based on a predetermined algorithm from an initial learning image group including a plurality of images each depicting an object; executing a model generation process for generating a learning model that outputs an abnormality level of an object shown in an input image by performing machine learning using the learning image group for each of a plurality of types of learning image groups; Executing an evaluation process to evaluate the performance of each of the generated learning models; executing a selection process for selecting one learning model from the plurality of learning models according to the performance evaluation result; How to learn.

11. executing a data creation process for creating a plurality of different learning image groups based on a predetermined algorithm from an initial learning image group including a plurality of images each depicting an object; executing a model generation process for generating a learning model that outputs an abnormality level of an object shown in an input image by performing machine learning using the learning image group for each of a plurality of types of learning image groups; Executing an evaluation process to evaluate the performance of each of the generated learning models; executing a selection process for selecting one learning model from the plurality of learning models according to the performance evaluation result; A program that causes a computer to do something.

Citation Information

Patent Citations

  • Abnormal product determination method

    JP2020173496A

  • Specimen evaluation system and method for constructing the same

    JP2020177287A

  • Image inspection apparatus, image inspection method, and program

    JP2021176070A

  • Leaning device, learning method, and learning program

    JP2022047528A

  • Learning apparatus, learning method, and program

    JP2021086381A

Cited By

  • Damage detection system and damage detection method

    JP7900574B1

  • Data processing device and data processing method

    WO2026196737A1