Learning device, learning method, and program

The learning device automates the creation and evaluation of multiple training image groups to generate stable and accurate models, addressing the inefficiencies of human-dependent image preparation and enhancing model accuracy.

JP7954366B2Active Publication Date: 2026-11-20PANASONIC INTELLECTUAL PROPERTY MANAGEMENT CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing learning devices face challenges in easily generating stable learning models due to the reliance on human intuition and effort-intensive preparation of learning images, particularly in oversampling and cleansing processes that affect model accuracy.

Method used

A learning device that automates the creation of multiple types of learning image groups through data augmentation and random sampling, evaluates model performance, and selects the best model based on predetermined criteria, reducing the need for human intervention.

Benefits of technology

Facilitates the easy generation of stable and accurate learning models by automating the preparation of training images and model selection, improving accuracy and reducing the time and effort required for model generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007954366000001
    Figure 0007954366000001
  • Figure 0007954366000002
    Figure 0007954366000002
  • Figure 0007954366000003
    Figure 0007954366000003
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 machine learning technology for images obtained by imaging.

BACKGROUND ART

[0002] Conventionally, technologies related to machine learning have been disclosed (see, for example, Non-Patent Documents 1 and 2). In addition, learning apparatuses and the like that can reduce the labor of machine learning have 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 CNN (Convolutional Neural Network)) is used to generate a learning model for recognizing a subject included in an image. Here, in the generation of the learning model, model generation parameters are updated. Through such updating, the model generation parameters are optimized, and the labor for adjusting the learning model can be reduced.

PRIOR ART DOCUMENTS

PATENT DOCUMENTS

[0003]

PATENT DOCUMENT 1

NON-PATENT DOCUMENTS

[0004]

NON-PATENT DOCUMENT 1

NON-PATENT DOCUMENT 2

SUMMARY OF THE INVENTION

[0005] However, even with learning devices that utilize the technologies described in the above-mentioned literature, there is a challenge in that it is difficult to easily generate stable learning models.

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

[0007] A learning device according to a first aspect of this disclosure includes: a data creation unit that performs a data creation process to create multiple different types of learning image groups from an initial learning image group which includes multiple images in which each image shows an object, based on a predetermined algorithm; a learning unit that performs a model generation process to generate a learning model that outputs the degree of abnormality of an object shown in an image in response to an image input 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 performs an evaluation process to evaluate the performance of each of the generated multiple learning models; and a model selection unit that performs a selection process to select one learning model from the multiple learning models according to the performance evaluation result.

[0008] These comprehensive or specific embodiments may be implemented as a system, method, integrated circuit, computer program, or recording medium such as a computer-readable CD-ROM, or as any combination of a system, method, integrated circuit, computer program, and recording medium. Furthermore, the recording medium may be a non-temporary recording medium. [Effects of the Invention]

[0009] The learning device described herein can easily generate a stable learning model.

[0010] Further advantages and effects of one aspect of this disclosure will be made apparent from the specification and drawings. Such advantages and / or effects are provided by several embodiments and configurations described in the specification and drawings, but not all configurations are necessarily required. [Brief explanation of the drawing]

[0011] [Figure 1] Figure 1 shows an example of the appearance of the learning system in the embodiment. [Figure 2] Figure 2 is a block diagram showing an example of the hardware configuration of a learning device in an embodiment. [Figure 3] Figure 3 is a block diagram showing an example of the functional configuration of a learning device in an embodiment. [Figure 4] Figure 4 is a diagram illustrating the initial training image group in the embodiment. [Figure 5] Figure 5 is a diagram illustrating the learning model in the embodiment. [Figure 6] Figure 6 is a diagram illustrating the evaluation image group in the embodiment. [Figure 7] Figure 7 shows an example of evaluation result information in the embodiment. [Figure 8] Figure 8 is a flowchart showing an example of the processing operation of the learning device in the embodiment. [Figure 9] Figure 9 is a diagram illustrating an embodiment of the learning device in the embodiment. [Modes for carrying out the invention]

[0012] (Knowledge that formed the basis of this invention) The inventors have found that the following problems arise with respect to 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 for, for example, identifying whether an object shown in an image is a non-defective product or a defective product, oversampling of learning images showing defective products, or cleansing of learning images showing non-defective products, and the like are performed. In oversampling, the number of learning images used for learning is increased, and in cleansing, the number of learning images used for learning is decreased. Such oversampling and cleansing can significantly affect the accuracy of the learning model. Although automation of processing for generating a learning model from a state where such learning images are prepared is progressing, preparation of the learning images depends on human intuition or knack. Therefore, in order to generate a learning model having stable and high accuracy, a burden is imposed on the preparation of the learning images involving the above-described oversampling or cleansing and the like. As a result, it takes time and effort for the user to adjust the learning model.

[0014] To solve such a problem, a learning device according to a first aspect of the present disclosure includes: a data creation unit that executes data creation processing for creating a plurality of different types of learning image groups based on a predetermined algorithm from an initial learning image group including a plurality of images each showing an object; a learning unit that executes model generation processing for generating, for each of the plurality of types of learning image groups, a learning model that outputs an anomaly score of the object shown in an image in response to input of the image, by performing machine learning using the learning image group; a model performance evaluation unit that executes evaluation processing for evaluating the performance of each of the plurality of generated learning models; and a model selection unit that executes selection processing for selecting one learning model from the plurality of learning models in accordance with the evaluation result of the performance.

[0015] Thereby, a plurality of types of training image groups are automatically created from the initial training image group, and a training model is generated and evaluated for each of the training image groups. Then, for example, the training model with the best evaluation result is selected. Therefore, if the user prepares the initial training image group, the preparation of the training image groups, that is, the preparation of training images, can be easily performed without any operation by the user and without depending on human intuition or know-how. Further, for example, by selecting the training model with the best evaluation result, a highly accurate and stable training model can be generated. Accordingly, a stable training model can be easily generated.

[0016] Further, in the learning device according to the second aspect dependent on the first aspect, the data creation unit may perform predetermined image processing on the images included in the initial training image group to increase the number of images included in the initial training image group, and create the plurality of types of training image groups using the plurality of increased images included in the initial training image group.

[0017] As a result, the number of images included in the initial training image group is augmented. As a result, for generating a highly accurate and stable training model, for example, when the same number of images showing a target object judged as non-defective and images showing a target object judged as defective are required, the number of the insufficient type of images in the initial training image group can be increased. As a result, in each training image group, the ratio of non-defective product images to defective product images can be easily made 1:1. Accordingly, the accuracy of the training model can be further improved and stabilized.

[0018] Further, in the learning device according to the third aspect dependent on the first aspect or the second aspect, when creating each of the plurality of types of training image groups, the data creation unit may create the relevant training image group by randomly removing one or more images from the initial training image group.

[0019] This makes it easy to create multiple different training image groups from the initial training image group. Furthermore, since one or more images are randomly removed from the initial training image group, and each of the remaining one or more images is selected to be included in the training image group, it can be said that the training image groups are created by random sampling. In other words, the cleansing of images used to generate the training model can be performed automatically or easily.

[0020] Furthermore, in a learning device according to a fourth embodiment dependent on the third embodiment, the learning device further includes a reset unit that causes the data creation unit to perform a reset process to return one or more images removed for the creation of the learning image group back to the initial learning image group each time the learning image group is created by the data creation unit, and the data creation unit may, after performing the reset process, create the learning image group from the initial learning image group that has undergone the reset process.

[0021] As a result, even if a training image group is created by removing one or more images from the initial training image group, the reset process returns those removed images to the initial training image group. Therefore, if the number of images removed from the initial training image group is constant, it is easy to create multiple types of training image groups that have the same number of images but are different from each other. Consequently, it is easy to generate multiple training models with different performance using the same number of images.

[0022] Furthermore, in a learning device relating to a fifth embodiment that is dependent on any one of the first to fourth embodiments, the learning device may further include a determination unit that determines whether the evaluation result of the learning model selected by the model selection unit satisfies predetermined criteria, and an output unit that outputs at least one of the evaluation result that is determined to satisfy the criteria, the learning model corresponding to the evaluation result, and the learning image group used to generate the learning model.

[0023] This allows the system to suppress the output of information about a particular learning model, even if, for example, the learning model with the best evaluation results is selected from among multiple generated learning models, if the evaluation results of that learning model do not meet the criteria. Therefore, it is possible to suppress the output of information about low-accuracy or unstable learning models.

[0024] Furthermore, in a learning device relating to a sixth embodiment dependent on the fifth embodiment, when the determination unit determines that the evaluation result does not meet the criteria, 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. When the data creation unit repeatedly executes the data creation process, it may create multiple types of learning image groups that are different from the multiple types of learning image groups created in the past.

[0025] As a result, if the evaluation results do not meet the criteria, multiple different types of training image groups are created during the data creation process, and the model generation process, evaluation process, and selection process are repeated. Therefore, even if the evaluation results do not meet the criteria, the likelihood of generating a training model with evaluation results that meet the criteria afterward is increased.

[0026] Furthermore, in a learning device relating to a seventh embodiment dependent on the sixth embodiment, when the data creation unit repeatedly executes the data creation process, it may update the initial learning image group with the learning image group used to generate the learning model that was immediately 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 easy to create multiple types of training image groups that are different from those created in the past, further increasing the likelihood of generating a learning model with evaluation results that meet the criteria.

[0028] Furthermore, in a learning device relating to an eighth embodiment that is dependent on any one of the first to seventh embodiments, the learning unit may generate the learning model by (a) generating a feature extraction model that outputs feature quantities of an image in response to an image input, and (b) generating an abnormality calculation model that outputs the abnormality of an object depicted in the image in response to the feature quantities output from the feature extraction model, thereby generating the learning model including the feature extraction model and the abnormality calculation model.

[0029] This allows for the appropriate generation of a learning model that outputs an abnormality score for objects depicted in an image, given the image as input. For example, a feature extraction model is generated such that the difference between the features of an image showing a good product and an image showing a defective product is large. Then, an abnormality score calculation model is generated using the output from this feature extraction model. Therefore, for example, it is possible to generate a learning model that appropriately outputs an abnormality score indicating how much an object depicted in an image differs from a good product.

[0030] Furthermore, in a learning device relating to a ninth embodiment that is dependent on any one of the first to eighth embodiments, the model performance evaluation unit evaluates the performance of each of the plurality of learning models based on at least one of the following: (a) a first abnormality level of an object displayed in each of the plurality of first evaluation images 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 abnormality level of an object displayed in each of the plurality of second evaluation images output from the learning model by inputting a plurality of second evaluation images included in a second evaluation image group into the learning model. Each of the plurality of first evaluation images may display an object classified as a defective product, and each of the plurality of second evaluation images may display an object classified as a good product.

[0031] This allows us to evaluate the performance of the learning model more accurately and stably, for example, by considering the small variances of the first and second anomaly scores, or by considering the large difference between the means of the first and second anomaly scores, for example, by considering the performance of the learning model more accurately and stably. Therefore, the performance of the learning model can be appropriately evaluated.

[0032] The embodiments will be described in detail below with reference to the drawings.

[0033] The embodiments described below are all general or specific examples. The numerical values, shapes, materials, components, arrangement and connection configurations of components, steps, and the order of steps shown in the following embodiments are examples only and are not intended to limit this disclosure. Furthermore, among the components in the following embodiments, those not described in the independent claim representing the highest-level concept are described as optional components. In addition, each figure is a schematic diagram and is not necessarily a precise representation. Also, the same components are denoted by the same reference numerals in each figure.

[0034] (Embodiment) [System Configuration] Figure 1 shows an example of the appearance of the learning system in this embodiment.

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

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

[0037] The input unit 300 is configured as, for example, a keyboard or mouse, which receives input operations from the user and outputs operation signals corresponding to those input operations to the learning device 100. The input unit 300 may also be configured as a touch sensor or touchpad.

[0038] The learning device 100 is a device that generates a learning model by performing machine learning, and is composed of, for example, a personal computer. Machine learning will also be simply referred to as learning below. For example, the learning device 100 acquires operation signals output from the input unit 300 and performs processing according to those operation signals. The learning device 100 also displays information about the generated learning model on the display unit 200.

[0039] The learning model, for example, takes an image as input and outputs information about whether or not there are defects in the object depicted in that image. The image is image data obtained, for example, by capturing an object with a camera. The object is the workpiece to be inspected, and specifically, it is a product manufactured by the aforementioned 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 as a touch panel.

[0041] The learning device 100 is typically a computer with a general-purpose architecture, and it performs various processes according to this embodiment by executing pre-installed programs (i.e., instruction codes). Such programs are typically distributed on any storage medium or installed on the learning device 100 via a communication network or the like. When a general-purpose computer is used as the learning device 100, in addition to the programs for performing various processes according to this embodiment (specifically, application programs), an OS (Operating System) for performing basic computer operations may also be installed on the learning device 100. The OS may be, for example, WINDOWS® or Linux®-based open source, but is not particularly limited to these, and may be other OSs.

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

[0043] [Hardware configuration of the learning device] Figure 2 is a block diagram showing an example of the hardware configuration of the learning device 100 in this embodiment.

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

[0045] The CPU 161 performs various calculations by loading multiple programs 181 installed in the memory unit 180 into the RAM 162 and executing them. The CPU 161 may also retrieve data stored in the ROM 163, or read and execute programs stored in the ROM 163.

[0046] The GPU 164 performs high-speed computation on some of the various programs used to generate the learning model 186, which are among the multiple programs 181 installed in the memory unit 180. These various programs include, for example, a learning program for executing the model generation process described later, and a model evaluation and selection program for executing the evaluation and selection processes described later.

[0047] The communication interface 165 is, for example, a wired LAN (Local Area Network) module or a wireless LAN module, and is an interface for wired or wireless communication over a communication network. The learning device 100 can perform data communication over the communication network by utilizing this 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 the operation signal output from the input unit 300 and outputs that operation signal to the CPU 161.

[0049] The display interface 167 is connected to the display unit 200 and is an interface for displaying images on the display unit 200 in response to control by the CPU 161. Such images may show, for example, the results of calculations performed by the CPU 161 or GPU 164, or they may show information related to the generated learning model 186. The display interface 167 may also display various information stored in the memory unit 180 on the display unit 200 by outputting that information to the display unit 200 in response to control by the CPU 161.

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

[0051] The memory unit 180 is composed of, for example, an HDD (Hard Disk Drive) or an SSD (Solid State Drive). The memory unit 180 is a recording medium for storing various information such as multiple programs 181, an initial training image group 182, a training image group 183, an evaluation image group 184, evaluation result information 185, and multiple learning models 186.

[0052] Multiple programs 181 include the aforementioned training program. When this training program is loaded and executed on the CPU 161 or GPU 164, multiple training models 186 are generated.

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

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

[0055] The evaluation image group 184 includes multiple images that are pre-stored in the memory unit 180 for evaluating the generated learning model 186. These images, like the images included in the initial learning image group 182, are image data obtained, for example, by capturing an object with a camera, but they are different from the images in the initial learning image group 182.

[0056] The evaluation result information 185 is information that shows the evaluation result of the generated learning model 186. Such evaluation result information 185 is generated when the CPU 161 or GPU 164 evaluates the learning model 186 using the evaluation image group 184.

[0057] Each of the multiple learning models 186 is trained to output an anomaly score for an object depicted in an image, given the image as input. Such learning models 186 may be, for example, CNNs. The anomaly score of an object is information about whether or not there is a defect in the object, and is used to determine whether or not such a defect exists.

[0058] The various types of information mentioned above may be stored in the storage unit 180 via the communication interface 165 or the read interface 168. Furthermore, the storage unit 180 may store information other than the above. 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] Figure 3 is a block diagram showing an example of the functional configuration of the learning device 100.

[0060] The learning device 100 comprises 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. These components are realized, for example, by at least one of the CPU 161 and GPU 164 reading and executing one or more programs 181 from the storage unit 180.

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

[0062] The following is an overview of the series of processing operations of each component provided in such a learning device 100.

[0063] The input data creation unit 101 creates a training image group 183 based on the initial training image group 182. Then, the learning unit 102 uses the training image group 183 to generate a training model 186 corresponding to the training image group 183 and stores the training model 186 in the storage unit 180. When the training model 186 is generated, the training 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 the reset process and creates a new training image group 183 that is different from the training image group 183 that has already been created. The learning unit 102 uses the new training image group 183 to generate a training model 186 corresponding to the new training image group 183. Through this process, or by repeatedly executing this process, n training 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 that shows the evaluated performance as an evaluation value.

[0064] The model selection unit 104 selects the best learning model 186 from among the n generated learning models 186 based on the evaluation result information 185. The threshold determination unit 106 determines whether the evaluation value of the best learning model 186 meets the criteria by comparing it with a threshold. The output unit 107 outputs information about the learning models 186 that have evaluation values ​​that meet the criteria. On the other hand, if the threshold determination unit 106 determines that the evaluation value of the best learning model 186 does not meet the criteria, the input data creation unit 101 updates the initial learning image group 182 and generates a new learning image group 183 based on the updated initial learning image group 182. Then, learning using the new learning image group 183 and evaluation of the learning model generated by that learning are repeatedly performed.

[0065] Each of the above components performs the following specific processes.

[0066] The input data creation unit 101 sequentially generates each of the n types of training 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 obtains an initial training image group 182 from the storage unit 180, each containing multiple images of the same object. Then, the input data creation unit 101 creates n different training image groups 183 from the initial training image group 182 based on a predetermined algorithm.

[0067] For example, the input data creation unit 101 creates training image groups 183 by augmenting images and downsampling images from the initial training image group 182. In image augmentation, the input data creation unit 101 increases the number of images in the initial training image group 182 by performing predetermined image processing on the images included in the initial training image group 182. Then, the input data creation unit 101 creates n types of training image groups 183 using the increased number of images included in the initial training image group 182. In image downsampling, the input data creation unit 101 removes one or more images from the initial training image group 182. In other words, when the input data creation unit 101 creates each of the n types of training image groups 183, it does so by randomly removing one or more images from the initial training 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 that are to be removed from the initial training image group 182. More specifically, the input data creation unit 101 creates the training image group 183 by performing a reset process in accordance with the instructions of the training data reset unit 105, and then removing one or more images from the reset initial training image group 182. Details of the reset process will be described later.

[0068] The learning unit 102 performs a model generation process to generate a learning model 186 that outputs the anomaly score of an object depicted in an image, by performing machine learning using each of the n types of training image groups 183. In this machine learning process, model generation parameters such as batch size and learning rate are used by the learning unit 102.

[0069] The model performance evaluation unit 103 performs an evaluation process to evaluate the performance of each of the n generated learning models 186. An evaluation image group 184 is used for this evaluation process. The model performance evaluation unit 103 then generates evaluation result information 185, which shows the evaluation result of each of the n learning models 186 as an evaluation value, and stores it in the storage unit 180.

[0070] The model selection unit 104 performs a selection process to select one learning model 186 from n learning models 186 according to the performance evaluation results by the model performance evaluation unit 103. Specifically, the model selection unit 104 reads evaluation result information 185 generated by the model performance evaluation unit 103 and stored in the memory unit 180. This evaluation result information 185 shows the evaluation results of the n learning models 186. The evaluation results are shown, for example, as evaluation values. The model selection unit 104 selects the learning model 186 with the best evaluation value from among the n learning models 186. Then, the model selection unit 104 outputs information about the selected learning model 186 and its best evaluation value to the threshold determination unit 106.

[0071] The threshold determination unit 106 is a determination unit that determines whether the evaluation result of the learning model 186 selected by the model selection unit 104 meets a predetermined standard. Specifically, the threshold determination unit 106 obtains 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 the evaluation value meets the standard. If the threshold determination unit 106 determines that the evaluation value meets the standard, it outputs the 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 meet the standard, it instructs the input data creation unit 101 to update the initial training image group 182.

[0072] The output unit 107 has the function of at least one of, for example, a communication interface 165 and a display interface 167. When such an output unit 107 obtains information about the learning model 186 from the threshold determination unit 106, it outputs information about the learning model 186. Specifically, the output unit 107 may output at least one of the following as information about the learning model 186: the evaluation result that is determined to satisfy the criteria, the learning model 186 corresponding to that evaluation result, and the training image group 183 used to generate the learning model 186. For example, the output unit 107 may display the information about the learning model 186 on the display unit 200 or transmit it to an external device via a communication network. The information about the learning model 186 may include information indicating the parameters, weights, and structure used in the learning model 186.

[0073] The learning data reset unit 105 receives notification from the learning unit 102 that the learning model 186 has been generated, and if it determines that predetermined conditions have not been met, it instructs the input data creation unit 101 to execute a reset process. In other words, each time the input data creation unit 101 creates a learning image group 183 and generates a learning model 186, the learning data reset unit 105 causes the input data creation unit 101 to execute a reset process until predetermined conditions are met. This reset process returns one or more images that were removed by downsampling by the input data creation unit 101 to create the previous learning image group 183 back to the initial learning image group 182. The predetermined conditions will be explained in detail using Figure 8. This learning data reset unit 105 is also called the reset unit.

[0074] Through (n-1) reset operations instructed by the learning data reset unit 105, n types of learning image groups 183 are created from the initial learning image group 182. The input data creation unit 101, upon receiving a reset operation instruction, may also create a new learning image group 183 different from those already generated by referring to the history of one or more learning image groups 183 stored in the memory unit 180.

[0075] If the threshold determination unit 106 determines that the evaluation result described above does not meet 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, model generation process, evaluation process, and selection process. The repetition of each of these processes is initiated by the threshold determination unit 106 instructing the input data creation unit 101 to update the initial training image group 182. When the input data creation unit 101 repeatedly executes the data creation process, it creates new n types of training image groups 183 that are different from the n types of training image groups 183 that were created in the past. In other words, when the input data creation unit 101 repeatedly executes the data creation process, it updates the initial training image group 182 with the training image group 183 used to generate the learning model 186 that was immediately selected by the model selection unit 104, and then creates new n types of training image groups from the updated initial training image group 182.

[0076] [Explanation of various information and associated processing] Figure 4 is a diagram illustrating the initial training image group 182.

[0077] The initial training image group 182 includes multiple good product images 182a and multiple defective product images 182b, as shown in Figure 5. Good product images 182a are images showing objects that are considered good products, and defective product images 182b are images showing objects that are considered defective products. Good products are items that do not contain the aforementioned defects, and defective products are items that contain the aforementioned defects.

[0078] In the startup phase of the learning system 1000, the initial training image group 182 stored in the memory unit 180 before updating contains several pre-prepared images. At this stage, the number of images included in the initial training image group 182 is small and insufficient. In other words, if such an initial training image group 182 is used as is for training 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 performs image augmentation. In this augmentation, the input data creation unit 101 generates new images by performing image processing on the images included in the initial training image group 182, and adds these new images to the initial training image group 182. Note that new images may also be added to the initial training image group 182 when the object is photographed by the camera. Specifically, the image processing may include image rotation, flipping, and center position change, but is not limited to these and may include other processing. Center position change is a process that shifts the center position of the image to be processed up, down, left, or right, for example, to place 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 determined by the user. For example, the input data creation unit 101 may acquire an operation signal output from the input unit 300 by a user's input operation via the input interface 166 and determine the type of image processing according to that operation signal. Furthermore, multiple types of image processing may be performed on a single image, or different image processing may be performed on each of multiple images. In addition, when performing augmentation, the input data creation unit 101 compares the number of good images 182a and the number of defective images 182b included in the initial training image group 182 and performs augmentation on the image with the smaller number. For example, the input data creation unit 101 may perform augmentation on the image with the smaller number so that the number of good images 182a and defective images 182b become equal. Augmentation may be performed so that the ratio of the number of good images 182a to the number of defective images 182b included in the initial training 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 the operation signal output from the input unit 300 in response to an input operation by the user via the input interface 166, and determine the above ratio according to that operation signal.

[0081] Here, although the number of images included in the initial training image group 182 increases through augmentation, if this initial training image group 182 is used as is as the training image group 183 to generate the training model 186, it may be difficult to easily improve the performance of the training model 186. In other words, if the images used for training are not cleaned, the performance of the training model 186 may deteriorate. Therefore, the input data creation unit 101 in this embodiment performs downsampling.

[0082] In other words, the input data creation unit 101 creates a training image group 183 by downsampling the initial training image group 182, which has been augmented 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 using random number processing. In other words, 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 of the number of images in the initial training image group 182 to the number of images in the training image group 183 may be predetermined or determined by the user. For example, the input data creation unit 101 may acquire the operation signal output from the input unit 300 in response to the user's input operation via the input interface 166 and determine the above ratio according to that operation signal. Furthermore, downsampling is basically performed on good product images 182a, which are more numerous than defective product images 182b. However, downsampling may be performed on good product images 182a, on defective product images 182b, or on both good product images 182a and defective product images 182b. The targets of such downsampling may be predetermined or determined by the user. For example, the input data creation unit 101 may acquire the operation signal output from the input unit 300 in response to the user's input operation via the input interface 166 and determine the targets of downsampling according to that operation signal.

[0084] Note that the user may make the above decisions before generating the learning model 186, i.e., in advance.

[0085] Figure 5 is a diagram illustrating the learning model 186.

[0086] The learning unit 102 generates a learning model 186, for example, consisting of a neural network, by performing machine learning using the learning image group 183. The learning model 186 in this embodiment includes a feature extraction model 11, an anomaly score 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 image input, and is also called a deep distance learning model. The feature vector 12 is also called a feature. The output layer 13 outputs a class corresponding to the feature vector 12 in response to the feature vector 12 input. The classes include a good product class and a defective product class. In other words, the class indicates the type of object depicted in the images included in the learning image group 183. Such an output layer 13 may be, for example, a fully connected layer, or it may be a neural network having an architecture such as that disclosed in Non-Patent Literature 2.

[0087] The anomaly score calculation model 14 is a model that takes the feature vector 12 as input and outputs an anomaly score for the feature vector 12. The anomaly score 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 anomaly score indicates the degree of abnormality of the object shown in the image compared to a good product. The configuration of the anomaly score calculation model 14 is not particularly limited and may be selected as appropriate.

[0088] In this embodiment, the learning unit 102 performs two stages of learning. In the first stage of learning, the learning unit 102 learns the feature extraction model 11 and the output layer 13. Specifically, the learning unit 102 trains the neural network using a method called deep distance learning. That is, for each image input in the training image group 183, the learning unit 102 trains the neural network 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 product image and the feature vector of a defective product image. The difference in feature vectors within a class is the distance between the feature vector of a good product image and the feature vector of another good product image, or the distance between the feature vector of a defective product image and the feature vector of another defective product image. The learning unit 102 also performs the above training based on the comparison result between the class output from the output layer 13 and the correct label 21. That is, the learning unit 102 optimizes the parameters by performing backpropagation using the comparison result. The optimization method used in backpropagation is not particularly limited, and methods such as gradient descent, stochastic gradient descent, and mini-batch gradient descent may be used for optimization.

[0089] Such a feature extraction model 11 is composed of multiple transformation layers that apply different predetermined transformations to each image input, and can be said to transform the image into a feature vector. The structure of the feature extraction model 11 is not particularly limited and may be ResNet as disclosed in Non-Patent Literature 1. Furthermore, the training method for the feature extraction model 11 is not particularly limited and may be deep distance learning or other training methods. Deep distance learning may be adacos as an example, as disclosed in Non-Patent Literature 2. adacos is an example of deep distance learning and is a learning method that trains a model to generate a model that extracts the distance structure of images such that the feature vectors of multiple images corresponding to the same label are close together, 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 trains the anomaly score calculation model 14. The learning unit 102 inputs only the good product images from the training image group 183 into the feature extraction model 11, thereby obtaining good product feature vectors as feature vectors 12 for those good product images. The learning unit 102 uses these good product feature vectors to create the anomaly score calculation model 14. The anomaly score calculation model 14 includes, for example, the mean feature vector 14a and covariance matrix 14b calculated using the good product feature vectors.

[0091] In this learning model 186, the feature extraction model 11 is used during the first stage of learning, the second stage of learning, the evaluation of the learning model 186, and its operation. The output layer 13 is used only during the first stage of learning, and the anomaly score calculation model 14 is used during the second stage of learning, the evaluation of the learning model 186, and its operation. Furthermore, the structure of the feature extraction model 11, the structure of the output layer 13, and the structure of the anomaly score calculation model 14 can be freely configured by the user by setting parameters.

[0092] As described above, in this embodiment, the learning unit 102 generates the learning model 186 in two stages. Specifically, in the first stage, the learning unit 102 generates a feature extraction model 11 that outputs the feature quantities of an image in response to an image input. Then, in the second stage, the learning unit 102 generates an anomaly score calculation model 14 that outputs the anomaly score of the object depicted in the image in response to the feature quantities output from the feature extraction model 11. As a result, the learning unit 102 generates a learning model 186 that includes the feature extraction model 11 and the anomaly score calculation model 14.

[0093] This allows for the appropriate generation of a learning model 186 that outputs an abnormality score of the objects depicted in an image, given the image as input. For example, a feature extraction model 11 is generated such that the difference between the features of an image showing an object considered to be good and the features of an image showing an object considered to be defective is large. Then, an abnormality score calculation model 14 is generated using the output from the feature extraction model 11. Therefore, for example, a learning model 186 can be generated that appropriately outputs an abnormality score indicating how much the objects depicted in the image differ from good products.

[0094] Figure 6 is a diagram illustrating evaluation image group 184.

[0095] As shown in Figure 6, the evaluation image group 184 includes a first evaluation image group 184a containing multiple first evaluation images and a second evaluation image group 184b containing multiple second evaluation images. The first evaluation images are images showing objects that are considered defective. In these first evaluation images, there is variation in the imaging methods for the defective objects. For example, multiple images obtained by imaging defective objects from different directions and with different brightness levels are treated as multiple first evaluation images. The second evaluation images are images showing objects that are considered good. In these second evaluation images, there is also variation in the imaging methods for the good objects. For example, multiple images obtained by imaging good objects from different directions and with different brightness levels are treated as multiple second evaluation images.

[0096] The model performance evaluation unit 103 inputs multiple images included in the evaluation image group 184 into the learning model 186 generated by the learning unit 102, thereby obtaining anomaly scores for those images. The model performance evaluation unit 103 then calculates an evaluation value for the learning model 186 as an evaluation result based on the obtained anomaly scores. For example, the model performance evaluation unit 103 may calculate an evaluation value using at least one of the first variance and first mean values ​​of the anomaly scores obtained for each of the multiple first evaluation images. Alternatively, the model performance evaluation unit 103 may calculate an evaluation value using at least one of the second variance and second mean values ​​of the anomaly scores obtained for each of the multiple second evaluation images. Such evaluation values ​​are treated as indicators of the performance of the learning model 186, i.e., its stability and accuracy.

[0097] Here, the model performance evaluation unit 103 may calculate an evaluation value using any one of the first variance, second variance, first mean, and second mean values, or it may calculate an 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 and the second variance as the evaluation value. Alternatively, the model performance evaluation unit 103 may calculate the difference between the first mean and the second mean as the evaluation value. Alternatively, the model performance evaluation unit 103 may calculate an evaluation value that is smaller the smaller the sum and smaller the larger the difference by substituting the first variance, second variance, first mean, and second mean values ​​into the first calculation formula. Conversely, the model performance evaluation unit 103 may calculate an evaluation value that is larger the smaller the sum and larger the difference by substituting the first variance, second variance, first mean, and second mean values ​​into the second calculation formula.

[0098] The evaluation values ​​are not limited to these and may be other values. For example, variance values ​​such as the first variance and the second variance may be replaced with the standard deviation. The types of evaluation values, such as the first variance, the sum of variances, and the difference in means, may be set by the user. For example, the model performance evaluation unit 103 acquires an operation signal output from the input unit 300 in response to 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 an evaluation value of that type.

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

[0100] In this embodiment, the model performance evaluation unit 103 evaluates the performance of each of the n learning models 186 based on at least one of the following: (a) the first abnormality score of the object depicted in each of the multiple first evaluation images output from the learning model 186 by inputting a plurality of first evaluation images included in the first evaluation image group 184a into the learning model 186; and (b) the second abnormality score of the object depicted in each of the multiple second evaluation images output from the learning model 186 by inputting a plurality of second evaluation images included in the second evaluation image group 184b into the learning model 186. Furthermore, 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. For example, the model performance evaluation unit 103 may evaluate the performance of the learning model 186 based on at least one of the variance and mean of the first anomaly score of the acquired object, and at least one of the variance and mean of the second anomaly score of the acquired object. This allows the performance of the learning model 186 to be evaluated as highly accurate and stable, for example, if the variances of the first and second anomalies are small. Alternatively, the performance of the learning model 186 to be evaluated as highly accurate and stable, for example, if the difference between the means of the first and second anomalies is large. Therefore, the performance of the learning model 186 can be appropriately evaluated.

[0101] Figure 7 shows an example of evaluation result information 185.

[0102] The evaluation result information 185 shows, for each of the n types of training image groups 183, the training image group ID, the training model ID, and the 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 training 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 that indicates 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] The model performance evaluation unit 103 may write the training image group ID, training model ID, and evaluation value corresponding to the training image group 183, and the evaluation value, to the evaluation result information 185 each time a training image group 183 is created and a training model 186 is generated. Alternatively, the model performance evaluation unit 103 may write the training image group ID, training model ID, and evaluation value corresponding to the n types of training image groups 183, and the evaluation result information 185 together, after n training models 186 have been generated using n types of training image groups 183.

[0104] The output unit 107 may also 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 and references such evaluation result information 185 from the storage unit 180. Then, the model selection unit 104 selects a learning model 186 corresponding to the learning model ID by identifying the learning model ID associated with the best evaluation value from the n learning model IDs shown in the evaluation result information 185.

[0106] For example, the evaluation value shown in evaluation result information 185 is the first variance, the second variance, or the sum of the first and second variances. In such cases, the model selection unit 104 searches for the minimum evaluation value as the best evaluation value from evaluation result information 185. Alternatively, the evaluation value shown in evaluation result information 185 is the difference between the first mean and the second mean. In such cases, the model selection unit 104 may search for the maximum evaluation value as the best evaluation value from evaluation result information 185. Alternatively, the evaluation value shown in evaluation result information 185 is the value calculated by the first calculation formula described above. In such cases, the model selection unit 104 searches for the minimum evaluation value as the best evaluation value from evaluation result information 185. Alternatively, the evaluation value shown in evaluation result information 185 is the value calculated by the second calculation formula described above. In such cases, the model selection unit 104 searches for the maximum evaluation value as the best evaluation value from evaluation result information 185.

[0107] The threshold determination unit 106 obtains the best evaluation value of the learning model 186 selected by the model selection unit 104 and compares that best evaluation value with a threshold. For example, the evaluation value is the first variance, the second variance, the sum of the first and second variances, or a value calculated by the first calculation formula. In this case, the threshold determination unit 106 determines that the evaluation value of the learning model 186 meets the criteria if the evaluation value is less than or equal to the threshold. On the other hand, the threshold determination unit 106 determines that the evaluation value of the learning model 186 does not meet the criteria if the evaluation value is greater than the threshold. Alternatively, the evaluation value is the difference between the first mean and the second mean, or a value calculated by the second calculation formula. In this case, the threshold determination unit 106 determines that the evaluation value of the learning model 186 meets the criteria if the evaluation value is greater than or equal to the threshold. On the other hand, the threshold determination unit 106 determines that the evaluation value of the learning model 186 does not meet the criteria if the evaluation value is less than the threshold.

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

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

[0110] First, the input data creation unit 101 obtains the initial training image group 182 from the storage unit 180 (step S1). For example, the input data creation unit 101 refers to a folder specified by the user and obtains the initial training image group 182 located within that folder. Next, the input data creation unit 101 performs image augmentation, or image augmentation process, on the initial training image group 182 (step S2). This increases the number of images included in the initial training image group 182. This augmentation process also sets the ratio of good images 182a to defective images 182b in the initial training image group 182 to the ratio set by the user. Then, the training data reset unit 105 sets the variable k to 0 (step S3). In other words, the variable k is initialized.

[0111] Next, the input data creation unit 101 creates a training image group 183 from the initial training image group 182 by downsampling the initial training image group 182 after the augmentation process has been performed (step S4). The learning unit 102 generates a training model 186 using the training image group 183 created in step S4 (step S5). The generated training model 186 is stored in the storage unit 180. The model performance evaluation unit 103 evaluates the training model 186 generated in step S5 (step S6). That is, the model performance evaluation unit 103 calculates an evaluation value for the training model 186. The model performance evaluation unit 103 then stores the evaluation value of the training model 186 by writing it to the evaluation result information 185 (step S7). When such an evaluation value is stored, the training data reset unit 105 increments the variable k (step S8).

[0112] The learning data reset unit 105 then determines whether the variable k has reached n (step S9). The numerical value of such a variable n is, for example, 10, but it may be arbitrarily set by the user. For example, the learning data reset unit 105 may acquire an operation signal output from the input unit 300 in response to an input operation by the user via the input interface 166, and determine the numerical value of variable n according to that operation signal. Here, if the learning data reset unit 105 determines that the variable k has not reached n (No in step S9), that is, if it determines that the predetermined conditions described above have not been met, 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. The input data creation unit 101 then repeatedly executes the process 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 predetermined conditions described above are met, 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 uses the evaluation result information 185 to select the learning model 186 with the best evaluation value from among the 10 learning models 186 stored in the memory unit 180 (step S11). Then, the threshold determination unit 106 uses a threshold to determine whether the best evaluation value of the selected learning model 186 meets the criteria (step S12).

[0114] If the threshold determination unit 106 determines that the evaluation value does not meet the criteria (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). In other words, the input data creation unit 101 updates the initial training image group 182 to the training image group 183. The learning device 100 then repeatedly executes the process from step S3.

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

[0116] Figure 9 is a diagram illustrating an embodiment of the learning device 100. In Figure 9, the points associated with each image are exemplified as the degree of abnormality of the object depicted in that image. These images consist of multiple first evaluation images included in the first evaluation image group 184a (i.e., the upper images in Figure 9) and multiple second evaluation images included in the second evaluation image group 184b (i.e., the lower images in Figure 9). The multiple first evaluation images included in the first evaluation image group 184a depict objects with dents. In the example in Figure 9, the standard deviation or standard deviation value is used instead of the variance or variance value of the degree of abnormality.

[0117] <First iteration of the n-loop process> First, the learning device 100 performs learning. That is, the learning device 100 executes the processes in steps S4 to S9 of Figure 8 n times. Such n processes are also referred to as n-loop processes. In the first n-loop process, the learning device 100 creates n types of first learning image groups from the initial learning image group 182, and for each of these n types of first learning image groups, it generates a learning model 186 using that first learning image group. Each of the n types of first learning image groups is a different learning image group 183 created by downsampling the initial learning image group 182 after augmentation, and each contains the same number of images. For example, each of the n types of first learning image groups contains 400 images.

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

[0119] In this type of 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 to obtain the anomaly score of the object depicted in each of the multiple images. The anomaly scores 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 anomaly scores as the first standard deviation value σ = 34, and calculates the average of these anomaly scores as the first mean value μ = 59.

[0120] Similarly, the model performance evaluation unit 103 inputs each of the multiple second evaluation images included in the second evaluation image group 184b into the learning model 186 to obtain the anomaly score of the object depicted in each of the multiple images. The anomaly scores of the multiple 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 anomaly scores as the second standard deviation value σ = 27, and calculates the average of these anomaly scores as the second mean value μ = 40.

[0121] The model performance evaluation unit 103 calculates an evaluation value for the learning model 186 using at least one of the first standard deviation, second standard deviation, first mean, and second mean. The evaluation value may also be any one of the first standard deviation, second standard deviation, first mean, and second mean. Such an evaluation value is calculated for each of the n learning models 186. In the example in Figure 9, the evaluation value is the first standard deviation. The model selection unit 104 then selects the learning model 186 with the best evaluation value from the n learning models 186. For example, the model selection unit 104 selects the learning model 186 with the smallest evaluation value (i.e., the smallest first standard deviation) as the learning model 186 with the best evaluation value. In a specific example, the learning model 186 with the smallest first standard deviation σ = 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. For example, the threshold is 5. Therefore, the threshold determination unit 106 compares the evaluation value "first standard deviation σ=36" with the threshold "5", and if the evaluation value is less than or equal to the threshold, it determines that the evaluation value meets the criteria. 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 processing> If the evaluation value of the selected learning model 186 in the first n-loop process does not meet the criteria, the initial training image group 182 is updated. In other words, the learning device 100 uses the training image group 183 used to generate the learning model 186 as the new initial training image group 182 for the second n-loop process. In the second n-loop process, the learning device 100 generates n types of second training image groups from the new initial training image group 182. Each of the n types of second training image groups is a different training image group 183 created by downsampling the updated initial training image group 182, and contains the same number of images. For example, each of the n types of second training image groups contains 390 images. Then, for each of the n types of second training image groups, the learning device 100 generates a learning model 186 using that second training image group.

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

[0125] In this type of 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 to obtain the anomaly score of the object depicted in each of the multiple images. The anomaly scores 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 anomaly scores as the first standard deviation value σ = 20, and calculates the average of these anomaly scores as the first mean value μ = 68.

[0126] Similarly, the model performance evaluation unit 103 inputs each of the multiple second evaluation images included in the second evaluation image group 184b into the learning model 186 to obtain the anomaly score of the object depicted in each of the multiple images. The anomaly scores 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 anomaly scores as the second standard deviation value σ = 16, and calculates the average of these anomaly scores as the second mean value μ = 34.

[0127] In the example in Figure 9, as described above, the evaluation value is treated as the first standard deviation. The model selection unit 104 then selects the learning model 186 with the best evaluation value from among the n learning models 186. For example, the model selection unit 104 selects the learning model 186 with the smallest evaluation value (i.e., the smallest first standard deviation) as the learning model 186 with the best evaluation value. In a specific example, the learning model 186 with the smallest first standard deviation σ = 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 criteria. As mentioned above, a threshold of "5" is used as an example for this determination. Therefore, the threshold determination unit 106 compares the evaluation value "first standard deviation σ=20" with the threshold of "5", and if the evaluation value is less than or equal to the threshold, it determines that the evaluation value meets the criteria. In this second n-loop process, the threshold determination unit 106 determines that the evaluation value does not meet the criteria.

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

[0130] <M-th n loop processing> When the evaluation value of the learning model 186 selected in the n-th loop processing of the (M-1)th time 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 for generating the selected learning model 186 as a new initial learning image group 182, so as to generate n types of M-th learning image groups from the new initial learning image group 182. Each of the n types of M-th 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 third learning image groups includes 350 images. Then, the learning device 100 generates a learning model 186 for each of the n types of M-th learning image groups using the corresponding M-th learning image group.

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

[0132] In this type of 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 to obtain the anomaly score of the object depicted in each of the multiple images. The anomaly scores of the multiple images are, for example, 85, 90, 94, 93, and 97. The model performance evaluation unit 103 calculates the standard deviation of these anomaly scores as the first standard deviation value σ = 4, and calculates the average of these anomaly scores as the first mean value μ = 91.

[0133] Similarly, the model performance evaluation unit 103 inputs each of the multiple second evaluation images included in the second evaluation image group 184b into the learning model 186 to obtain the anomaly score of the object depicted in each of the multiple images. The anomaly scores 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 anomaly scores as the second standard deviation value σ=2 and calculates the average of these anomaly scores as the second mean value μ=5.

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

[0135] The threshold determination unit 106 determines whether the evaluation value of the selected learning model 186 meets the criteria. As mentioned above, a threshold of "5" is used as an example for this determination. Therefore, the threshold determination unit 106 compares the evaluation value "first standard deviation σ=4" with the threshold "5", and if the evaluation value is less than or equal to the threshold, it determines that the evaluation value meets the criteria. In the Mth n-loop processing, the threshold determination unit 106 determines that the evaluation value meets the criteria. As a result, the output unit 107 outputs information about the selected learning model 186. This completes the processing of the learning device 100. The first standard deviation σ=4 and the second standard deviation σ=2 of the learning model 186 generated in this way are both small, and the difference between the first mean μ=91 and the second mean μ=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 good and defective products with higher accuracy than the learning model 186 generated by the first n-loop process.

[0136] In this embodiment, the learning device 100 performs a data creation process to create 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 shown in steps S2 and S4 of Figure 8. The learning unit 102 then performs a model generation process to generate a learning model 186 from each of the multiple types of learning image groups 183. Next, the learning unit 102 performs an evaluation process for each of the multiple learning models 186 and, according to the evaluation results, performs a selection process to select one learning model 186 from the multiple learning models 186.

[0137] As a result, multiple training image groups 183 are automatically created from the initial training image group 182, and a training model 186 is generated and evaluated for each training image group 183. Then, for example, the training model 186 with the best evaluation result is selected. Therefore, once the user prepares the initial training image group 182, the preparation of the training image groups 183, i.e., the preparation of training images, can be easily done without user intervention, without the user having to make painstaking adjustments, and without relying on human intuition or skill. Furthermore, by selecting, for example, the training model 186 with the best evaluation result, a highly accurate and stable training model can be generated. Therefore, a stable training model 186 can be easily generated.

[0138] Furthermore, in this embodiment, the number of images included in the initial training image group 182 is increased. As a result, if, for example, the same number of images showing good products and images showing defective products are needed to generate a highly accurate and stable learning model 186, the number of images of the missing product can be increased in the initial training image group 182. Consequently, in each training image group 183, the ratio of good product images to defective product images can be easily made 1:1. Therefore, the accuracy of the learning model 186 can be further improved and made more stable.

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

[0140] Furthermore, in this embodiment, a reset process is performed. As a result, even if a training image group 183 is created by removing one or more images from the initial training image group 182, the reset process returns the removed one or more images to the initial training image group 182. Therefore, if the number of images removed from the initial training image group 182 is constant, multiple types of training image groups 183, each with the same number of images but different from one another, can be easily created. As a result, multiple training models 186 with different performance can be easily generated, each using the same number of images.

[0141] Furthermore, in this embodiment, information about the learning model 186 whose evaluation results meet the criteria is output. As a result, even if, for example, the learning model with the best evaluation result is selected from among the multiple learning models that have been generated, if the evaluation result of that learning model does not meet the criteria, the output of information about that learning model can be suppressed. Therefore, the output of information about low-accuracy or unstable learning models 186 can be suppressed.

[0142] Furthermore, in this embodiment, if the evaluation result does not meet the criteria, multiple types of training image groups 183 different from those used before are created during the data creation process, and the model generation process, evaluation process, and selection process are repeated. Therefore, even if the evaluation result does not meet the criteria, the possibility of generating a training model 186 with evaluation results that meet the criteria afterward can be increased.

[0143] Furthermore, in this embodiment, the initial training image group 182 is updated. This makes it easy to create multiple types of training image groups 183 that are different from the multiple types of training image groups 183 created in the past, and further increases the possibility of generating a training model 186 that has evaluation results that meet the criteria.

[0144] (Other variations) Although a learning device 100 according to one aspect of the present disclosure has been described above based on the above embodiment, the present disclosure is not limited to that embodiment. Various modifications to the above embodiment that a person skilled in the art can conceive of may also be included in the present disclosure, as long as they do not depart from the spirit of the present disclosure.

[0145] For example, in the above embodiment, the output unit 107 outputs information about the learning model 186 whose evaluation results meet the criteria. However, information about the learning model 186 that does not meet the criteria may also be output. In this case, the output unit 107 outputs information about the learning model 186 selected by the model selection unit 104, that is, the learning model 186 with the best evaluation results. Alternatively, information about the learning model 186 corresponding to user operations 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 to the input unit 300, causing the model selection unit 104 to select the learning model 186 corresponding to that input operation stored in the memory unit 180. As a result, the output unit 107 outputs information about the learning model 186 selected by the user's input operation.

[0146] In the above embodiment, each component may be implemented by dedicated hardware or by executing a software program suitable for each component. Each component may also be implemented by a program execution unit such as a CPU or processor reading and executing a software program recorded on a recording medium such as a hard disk or semiconductor memory. Here, the software that implements 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 Figure 8.

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

[0148] (1) The at least one device described above is specifically a computer system consisting of a microprocessor, ROM (Read Only Memory), 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 hard disk unit. The at least one device described above achieves its function by the operation of the microprocessor in accordance with the computer program. Here, the computer program is composed of a combination of multiple instruction codes that indicate commands to the computer in order to achieve a predetermined function.

[0149] (2) Some or all of the components constituting at least one of the above-described devices may be made up of a single system LSI (Large Scale Integration). The system LSI is a multi-functional LSI manufactured by integrating multiple components onto a single chip, and specifically, it is a computer system comprising a microprocessor, ROM, RAM, etc. The RAM stores a computer program. The system LSI achieves its function by operating the microprocessor in accordance with the computer program.

[0150] (3) Some or all of the components constituting at least one of the above-described devices may consist of an IC card or a standalone module that is detachable from the device. The IC card or module is a computer system consisting of a microprocessor, ROM, RAM, etc. The IC card or module may include the above-described multi-function LSI. The IC card or module achieves its function by the operation of the microprocessor in accordance with a computer program. The IC card or module may be tamper-resistant.

[0151] (4) The disclosure may also be the methods described above. Alternatively, it may be a computer program that implements these methods using a computer, or a digital signal consisting of a computer program.

[0152] Furthermore, this disclosure may also refer to a computer program or digital signal recorded on a computer-readable recording medium, such as a flexible disk, hard disk, CD (Compact Disc)-ROM, DVD, DVD-ROM, DVD-RAM, BD (Blu-ray® Disc), semiconductor memory, etc. Alternatively, it may refer to a digital signal recorded on such a recording medium.

[0153] Furthermore, this disclosure may also include the transmission of computer programs or digital signals via telecommunications lines, wireless or wired communication lines, networks such as the Internet, data broadcasting, etc.

[0154] Alternatively, the program or digital signal may be carried out by another independent computer system by recording and transferring it on a recording medium, or by transferring the program or digital signal via a network or the like. [Industrial applicability]

[0155] The learning device of this disclosure has the effect of easily generating stable learning models and can be applied, for example, to a device or system that inspects whether a product is good or defective from images obtained by imaging products manufactured on a production line. [Explanation of Symbols]

[0156] 100 Learning Devices 101 Input Data Creation Unit 102 Learning Department 103 Model Performance Evaluation Department 104 Model Selection Section 105 Learning Data Reset Unit 106 Threshold determination unit 107 Output section 161 CPU 162 RAM 163 ROM 164 GPU 165 Communication Interfaces 166 Input Interfaces 167 Display Interface 168 Reading Interface 180 Storage section 181 Programs 182 Initial training image group 182a Good condition image 182b Defective product image 183 Training Image Group 184 Evaluation Image Group 184a Image group for first evaluation 184b Second evaluation image group 185 Evaluation Results Information 186 Learning Models 200 Display section 300 Input section 600 recording media 1000 Learning Systems

Claims

1. A data creation unit performs a data creation process that creates multiple different types of training image groups from an initial training image group containing multiple images, each showing a different object, based on a predetermined algorithm. A learning unit performs a model generation process that generates a learning model that outputs the degree of abnormality of an object depicted in an image in response to an image input by performing machine learning using each of several types of training image groups. A model performance evaluation unit that performs an evaluation process to evaluate the performance of each of the multiple learning models that have been generated, A model selection unit that performs a selection process to select one learning model from a plurality of learning models according to the performance evaluation results, A learning device equipped with the following features.

2. The aforementioned data creation unit, By performing predetermined image processing on the images included in the initial training image group, the number of images included in the initial training image group is increased, and the multiple training image groups of the increased number of images included in the initial training image group are used to create the multiple training image groups. The learning device according to claim 1.

3. The aforementioned data creation unit, When creating each of the aforementioned multiple types 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, Each time the data creation unit creates the training image group, the system includes a reset unit that causes the data creation unit to perform a reset process to return one or more images that were removed for the creation of the training image group back to the initial training image group. The aforementioned data creation unit, After performing the reset process, a training image group is created from the initial training image group that has undergone the reset process. The learning device according to claim 3.

5. The learning device further, A determination unit determines whether the evaluation result of the learning model selected by the model selection unit satisfies predetermined criteria, The system includes an output unit that outputs at least one of the evaluation results determined to satisfy the aforementioned criteria, the learning model corresponding to the evaluation results, and the group of learning images used to generate the learning model. The learning device according to claim 1.

6. When the evaluation result is determined by the determination unit to not meet the criteria, The data creation unit, the learning unit, the model performance evaluation unit, and the model selection unit are: The data creation process, the model generation process, the evaluation process, and the selection process are repeatedly executed. The aforementioned data creation unit, When the aforementioned data creation process is repeatedly executed, multiple types of training image groups different from those previously created are created. The learning device according to claim 5.

7. The aforementioned data creation unit, When the data creation process is repeatedly executed, the initial training image group is updated with the training image group used to generate the training model that was immediately selected by the model selection unit, and the multiple types of training image groups are created from the updated initial training image group. The learning device according to claim 6.

8. When the learning unit generates the learning model, (a) A feature extraction model is generated that outputs the feature quantities of an image in response to an image input. (b) By generating an anomaly calculation model that outputs the anomaly degree of the object shown in the image in response to the feature quantities output from the feature extraction model, A learning model is generated that includes the feature extraction model and the anomaly calculation model. The learning device according to claim 1.

9. The aforementioned model performance evaluation unit is: For each of the multiple learning models, (a) By inputting multiple first evaluation images included in the first evaluation image group into the learning model, the learning model outputs a first abnormality score of the object depicted in each of the multiple first evaluation images, (b) By inputting multiple second evaluation images included in the second evaluation image group into the learning model, the learning model outputs the second abnormality degree of the object depicted in each of the multiple second evaluation images, The performance of the learning model is evaluated based on at least one of the following: Each of the aforementioned multiple first evaluation images displays an object that is classified as a defective product. Each of the aforementioned multiple second evaluation images shows an object that is classified as a good product. The learning device according to claim 1.

10. A learning method performed by a computer, From an initial training image group containing multiple images, each depicting a different object, a data creation process is performed to create multiple distinct training image groups based on a predetermined algorithm. For each of the multiple training image groups, a model generation process is executed to generate a learning model that outputs the degree of abnormality of the object depicted in the image in response to an image input, by performing machine learning using the training image group. An evaluation process is performed to evaluate the performance of each of the generated learning models. Based on the performance evaluation results, a selection process is performed to select one learning model from the multiple learning models. Learning methods.

11. From an initial training image group containing multiple images, each depicting a different object, a data creation process is performed to create multiple distinct training image groups based on a predetermined algorithm. For each of the multiple training image groups, a model generation process is executed to generate a learning model that outputs the degree of abnormality of the object depicted in the image in response to an image input, by performing machine learning using the training image group. An evaluation process is performed to evaluate the performance of each of the generated learning models. Based on the performance evaluation results, a selection process is performed to select one learning model from the multiple learning models. A program that causes a computer to perform a task.

Citation Information

Patent Citations

  • Abnormal product determination method

    JP2020173496A

  • Specimen evaluation system and method for constructing the same

    JP2020177287A

  • Learning apparatus, learning method, and program

    JP2021086381A

  • Image inspection apparatus, image inspection method, and program

    JP2021176070A

  • Leaning device, learning method, and learning program

    JP2022047528A