Machine learning device, machine learning method, machine learning program, evaluation device, evaluation method, and evaluation program
By dividing learning datasets and parameter setting datasets into class and type groups with equalized subgroups, and employing type-specific and comprehensive evaluations, the method addresses biased image data issues, enhancing model performance and accuracy.
Patent Information
- Application Number
- JP2020219579
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2024-10-31
- Estimated Expiration
- 2040-12-28
AI Technical Summary
Learning datasets used for machine learning often contain biased types of image data, leading to overfitting and decreased accuracy for other types, which deteriorates model performance.
The machine learning device and method involve dividing learning datasets and parameter setting datasets into groups by class and type, ensuring equalization of elements within subgroups to minimize bias, and using type-specific and comprehensive evaluation processes to assess model performance.
This approach reduces the likelihood of model performance deterioration due to biased image data types, ensuring accurate and balanced evaluation and construction of models.
Smart Images

Figure 0007576462000006 
Figure 0007576462000007 
Figure 0007576462000008
Abstract
Description
[Technical field]
[0001] The present invention relates to a machine learning device, a machine learning method, and a machine learning program that construct a model that receives image data as input and outputs one of a number of predetermined classes, and also to an evaluation device, an evaluation method, and an evaluation program that evaluate such a model. [Background technology]
[0002] There is known a method for inspecting an item using a model (trained model) constructed by machine learning. For example, Patent Document 1 discloses an inspection device that inspects an item using a model that receives image data including the item as a subject and outputs the class of the item. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent Publication No. 2020-042754 Summary of the Invention [Problem to be solved by the invention]
[0004] A learning dataset used in machine learning contains various types of image data. Moreover, it is rare that each type of image data is contained evenly, and a particular type of image data may be contained in a significantly larger amount. In this way, if there is a bias in the types of image data contained in the learning dataset, the performance (e.g., generalization ability) of a model constructed by machine learning may decrease. For example, if a particular type of image data is contained in a significantly larger amount, overlearning for that type occurs, and the accuracy for other types of image data decreases.
[0005] One aspect of the present invention has been made in consideration of the above problems, and its purpose is to realize a machine learning technique that is less susceptible to degradation of model performance due to bias in the types of image data contained in a training dataset. [Means for solving the problem]
[0006] A machine learning device according to aspect 1 of the present invention includes at least one processor, and the processor executes a set creation process for creating a training dataset from a dataset consisting of image data to which a label indicating any one of a plurality of predetermined classes and any one of a plurality of predetermined types is assigned, and a model construction process for constructing a model using the training dataset created in the set creation process, in which image data is input and any one of the plurality of classes is output. In the set creation process, the processor divides the training dataset into groups according to classes, and further divides each group into subgroups according to type, and selects elements of the training dataset from the dataset with the goal of equalizing the number of elements in each group and equalizing the number of elements in each subgroup for each group.
[0007] According to the above configuration, bias in the types of image data included in the training dataset is unlikely to occur, and therefore degradation of model performance caused by bias in the types of image data is unlikely to occur.
[0008] In a machine learning device according to aspect 2 of the present invention, in addition to the configuration of the machine learning device according to aspect 1, the model construction process includes a parameter setting process of setting hyperparameters that define a network structure of the model using a parameter setting dataset, and the processor is configured to select the parameter setting dataset from the learning dataset with the goal of equalizing the number of elements in each group and equalizing the number of elements in each subgroup for each group when the parameter setting dataset is divided into groups according to classes and each group is further divided into subgroups according to type.
[0009] According to the above configuration, the parameter setting dataset is less likely to include a bias in the type of image data, and therefore the performance of the model is less likely to deteriorate due to the hyperparameters being specialized for a specific type of image data.
[0010] In the machine learning device of aspect 3 of the present invention, in addition to the machine learning device of aspect 1 or 2 of the present invention, the processor further executes a model evaluation process to evaluate the performance of the model using an evaluation dataset, and in the set creation process, the processor selects image data belonging to the dataset that was not selected as an element of the learning dataset as an element of the evaluation dataset.
[0011] According to the above configuration, it is possible to effectively utilize image data contained in the dataset to evaluate the performance of the model.
[0012] In a machine learning device according to a fourth aspect of the present invention, in addition to the configuration of the machine learning device according to the third aspect, the model evaluation process includes a type-specific evaluation process for evaluating the performance of the model by type using a type-specific evaluation dataset, and the processor is configured to divide the type-specific evaluation dataset into groups according to classes, and further divide each group into subgroups according to type, and select elements of the type-specific evaluation dataset from the evaluation dataset with the goal of equalizing the number of elements in each subgroup for each group.
[0013] According to the above configuration, it is possible to effectively utilize image data included in a dataset and evaluate the performance of a model for each type of image data.
[0014] A machine learning device according to aspect 5 of the present invention employs, in addition to the configuration of the machine learning device according to any one of aspects 1 to 4, a configuration in which the input of the model is image data including a specific item as a subject, the output of the model is a class indicating the quality of a specific part of the item, and the type is a type defined by focusing on attributes of the background, the item, and some or all of the parts.
[0015] According to the above configuration, for a model that takes image data containing a specific item as a subject as input and outputs a class indicating the quality of a specific part of the item, a decrease in model performance due to a bias in the type of image data is less likely to occur.
[0016] A machine learning method according to aspect 6 of the present invention includes a set creation process in which at least one processor creates a training dataset from a dataset consisting of image data to which labels indicating any one of a plurality of predetermined classes and any one of a plurality of predetermined types are assigned, and a model construction process in which the processor uses the training dataset created in the set creation process to construct a model in which image data is input and any one of the plurality of classes is output, wherein in the set creation process, the processor divides the training dataset into groups according to class, and further divides each group into subgroups according to type, and selects elements of the training dataset from the dataset with the goal of equalizing the number of elements in each group and equalizing the number of elements in each subgroup for each group.
[0017] According to the above configuration, bias in the types of image data included in the training dataset is unlikely to occur, and therefore degradation of model performance caused by bias in the types of image data is unlikely to occur.
[0018] The machine learning program of aspect 7 of the present invention is a program for operating a computer as a machine learning device of any of aspects 1 to 5, and is a program for causing a processor provided in the computer to execute each of the above processes.
[0019] According to the above configuration, the above machine learning device can be realized using a computer.
[0020] An evaluation device according to an eighth aspect of the present invention includes at least one processor, and the processor executes a set creation process for creating an evaluation dataset from a dataset consisting of image data to which a label indicating any one of a predetermined number of classes and any one of a predetermined number of types has been assigned, and a model evaluation process for evaluating performance of a model that takes image data as input and outputs any one of the plurality of classes, using the evaluation dataset created in the set creation process, wherein the model evaluation process includes a type-specific evaluation process for evaluating performance of the model by type, using a type-specific evaluation dataset, and a comprehensive evaluation process for comprehensively evaluating performance of the model, using a comprehensive evaluation dataset, and the processor divides the type-specific evaluation dataset into groups according to class, and further divides each group into subgroups according to type, and selects elements of the type-specific evaluation dataset from the evaluation dataset with the goal of equalizing the number of elements of each subgroup for each group.
[0021] According to the above configuration, it is possible to effectively utilize the image data included in the dataset to evaluate the performance of the model by type of image data, and to comprehensively evaluate the performance of the model.
[0022] An evaluation method according to a ninth aspect of the present invention includes a set creation process in which at least one processor creates an evaluation dataset from a dataset consisting of image data to which a label indicating any one of a predetermined number of classes and any one of a predetermined number of types has been assigned, and a model evaluation process in which the processor uses the evaluation dataset created in the set creation process to evaluate performance of a model that takes image data as input and outputs any one of the plurality of classes, the model evaluation process including a type-specific evaluation process that uses a type-specific evaluation dataset to evaluate performance of the model by type, and a comprehensive evaluation process that uses a comprehensive evaluation dataset to comprehensively evaluate performance of the model, the processor dividing the type-specific evaluation dataset into groups according to class, and further dividing each group into subgroups according to type, selecting elements of the type-specific evaluation dataset from the evaluation dataset with the goal of equalizing the number of elements in each subgroup for each group.
[0023] According to the above configuration, it is possible to effectively utilize the image data included in the dataset to evaluate the performance of the model by type of image data, and to comprehensively evaluate the performance of the model.
[0024] An evaluation program according to a tenth aspect of the present invention is a program for causing a computer to operate as the evaluation device according to the eighth aspect, and is a program for causing a processor included in the computer to execute each of the above-mentioned processes.
[0025] According to the above configuration, the evaluation device can be realized using a computer. Effect of the Invention
[0026] According to one aspect of the present invention, it is possible to realize a machine learning technique that is less susceptible to degradation of model performance due to bias in the types of image data contained in a training dataset. [Brief description of the drawings]
[0027] [Figure 1] 1 is a block diagram showing a configuration of a machine learning device according to an embodiment of the present invention. [Diagram 2] 2 is a flowchart showing the flow of a machine learning method implemented by the machine learning device of FIG. 1. [Diagram 3] FIG. 11 is a diagram showing examples of images represented by image data classified into types defined with attention paid to attributes of background, object, and part. [Figure 4] 1 is a diagram showing an embodiment of the present invention. (a) is an example of an image represented by image data to which a label indicating class C1 (normal) has been added. (b) is an example of an image represented by other image data to which a label indicating class C1 (normal) has been added. (c) is an example of an image represented by image data to which a label indicating class C2 (abnormal) has been added. [Diagram 5] 1 is a diagram showing an embodiment of the present invention, which is a histogram showing the number of image data classified into each type for image data whose class is C1 (normal). [Figure 6] 1 is a diagram showing an embodiment of the present invention, which is a histogram showing the number of image data classified into each type for image data whose class is C2 (abnormal). DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0028] (Machine learning device configuration) The configuration of a machine learning device 1 according to an embodiment of the present invention will be described with reference to Fig. 1. Fig. 1 is a block diagram showing the configuration of the machine learning device 1.
[0029] The machine learning device 1 is a device for implementing a machine learning method S for constructing and evaluating a model M using a dataset D. As shown in Fig. 1, the machine learning device 1 includes a memory 11, a processor 12, a storage 13, and a bus 14. The memory 11, the processor 12, and the storage 13 are connected to each other via the bus 14.
[0030] The memory 11 is configured to record a machine learning program P for implementing the machine learning method S, and a model M that is constructed and evaluated in the machine learning method S. Note that as the memory 11, for example, a semiconductor RAM (Random Access Memory) or the like can be used.
[0031] The processor 12 is configured to execute a machine learning method S in accordance with a machine learning program P stored in the memory 11. As the processor 12, for example, a central processing unit (CPU), a graphic processing unit (GPU), a microprocessor, a digital signal processor, a microcontroller, an application specific integrated circuit (ASIC) such as a tensor processing unit (TPU), or a combination of these can be used.
[0032] The storage 13 is configured to store a dataset D referenced in the machine learning method S. As the storage 13, for example, a flash memory, a hard disk drive (HDD), a solid state drive (SSD), or a combination of these can be used.
[0033] Although the configuration in which the machine learning method S is executed by a single processor 12 provided in a single computer has been described here, the present invention is not limited to this. In other words, it is also possible to adopt a configuration in which the machine learning method S is executed jointly by multiple processors provided in a single computer or distributed across multiple computers.
[0034] Also, although the configuration in which the data set D is stored in a single storage 13 provided in a single computer has been described here, the present invention is not limited to this. In other words, it is also possible to adopt a configuration in which the data set D is stored in a single computer or in a distributed manner in multiple storages provided in multiple computers.
[0035] The machine learning program P for causing the processor 12 to execute the machine learning method S may be recorded in a computer-readable, non-transitory, tangible recording medium. This recording medium may be the memory 11, the storage 13, or another recording medium. For example, a tape, a disk, a card, a semiconductor memory, or a programmable logic circuit may be used as the other recording medium.
[0036] (Machine learning method flow) The flow of the machine learning method S performed by the machine learning device 1 will be described with reference to Fig. 2. Fig. 2 is a flow diagram showing the flow of the machine learning method S.
[0037] As described above, the machine learning method S is a method for constructing and evaluating a model M using a dataset D. As shown in Fig. 2, the machine learning method S includes a set creation process S1, a model construction process S2, and a model evaluation process S3.
[0038] The data set D is a set of image data to which a label indicating any one of n predetermined classes C1, C2, ..., Cn and any one of m predetermined types T1, T2, ..., Tm is assigned. The model M is an algorithm that receives image data as input and outputs any one of n classes C1, C2, ..., Cn. In this embodiment, a convolutional neural network (CNN) is used as the model M, but a neural network other than CNN, a logistic regression model, a support vector machine, a random forest, or the like may be used as the model M.
[0039] The set creation process S1 is a process for creating a training data set DL to be referenced in the model construction process S2 and an evaluation data set DT to be referenced in the model evaluation process S3 from the data set D. The set creation process S1 is executed by the processor 12, and the created training data set DL and evaluation data set T are stored in the memory 11.
[0040] The learning dataset DL is a subset of the dataset D, i.e., a set of image data selected from the dataset D. The elements of the learning dataset DL are selected with the objectives of (a) equalizing the number of elements in each group DLi and (b) equalizing the number of elements in each subgroup DLij (j=1, 2, ..., m) for each group when the learning dataset DL is divided into groups DL1, DL2, ..., DLn according to class and each group DLi (i=1, 2, ..., n) is further divided into subgroups DLi1, DLi2, ..., DLim according to type. On the other hand, the evaluation dataset DT is a complement of the learning dataset DL in the dataset D, i.e., a set of image data that is not selected as an element of the learning dataset DL among the image data belonging to the dataset D.
[0041] An example of an algorithm for selecting elements of the learning dataset DL from the dataset D is as follows. First, the dataset D is divided into groups D1, D2, ..., Dn according to the class. Next, each group Di is divided into subgroups Di1, Di2, ..., Dim according to the type. Next, a threshold αi is set for each group Di, and for each subgroup Dij of the group Di, (1) if the number of elements of the subgroup Dij is equal to or less than the threshold αi, all elements of the subgroup Dij are selected, and (2) if the number of elements of the subgroup Dij is greater than the threshold αi, αi elements are randomly selected from the subgroup Dij. Here, the thresholds α1, α2, ..., αn are set so that the variance of the number of image data selected from each group Di as elements of the learning dataset DL is sufficiently small (ideally minimized).
[0042] The model construction process S2 is a process of constructing a model M using the learning dataset DL created in the set creation process S1. The model construction process S2 is executed by the processor 12, and the constructed model M is stored in the memory 11.
[0043] The model construction process S2 according to this embodiment includes a coefficient setting process and a parameter setting process. The coefficient setting process is a process of setting weight coefficients that define the inter-node connections of the model M using a coefficient setting data set DLa. The parameter setting process is a process of setting hyperparameters that define the network structure of the model M using a parameter setting data set DLb.
[0044] The parameter setting dataset DLb is a subset of the learning dataset DL, i.e., a set of image data selected from the learning dataset DL. The selection of elements of the parameter setting dataset DLb is performed with the goal of (a) equalizing the number of elements in each group DLbi and equalizing the number of elements in each subgroup DLbij for each group when the parameter setting dataset DLb is divided into groups DLb1, DLb2, ..., DLbn according to class, and each group DLbi is further divided into subgroups DLbi1, DLbi2, ..., DLbim according to type. On the other hand, the coefficient setting dataset DLa is a complement of the parameter setting dataset DLb in the learning dataset DL, i.e., a set of image data that is not selected as an element of the parameter setting dataset DLb among the image data belonging to the learning dataset DL.
[0045] An example of an algorithm for selecting elements of the parameter setting data set DLb from the learning data set DL is as follows. First, the learning data set DL is divided into groups DL1, DL2, ..., DLn according to class. Next, each group DLi is divided into subgroups DLi1, DLi2, ..., DLim according to type. Then, for each group DLi, a threshold βi=cαi is set, and for each subgroup DLij of the group DLi, (1) if the number of elements of the subgroup DLij is equal to or less than the threshold βi, all elements of the subgroup DLij are selected, and (2) if the number of elements of the subgroup DLij is greater than the threshold βi, βi elements are randomly selected from the subgroup DLij. Here, c is a real number less than 1, for example, 0.2.
[0046] The model evaluation process S3 is a process for evaluating the performance of the model M constructed in the model construction process S2 by using the evaluation data set DT created in the set creation process S1. The model construction process S2 is executed by the processor 12, and the evaluation result is stored in the memory 11.
[0047] The model evaluation process S3 according to this embodiment includes a type-specific evaluation process and a comprehensive evaluation process. The type-specific evaluation process is a process for evaluating the performance of the model M for each type of image data by using a type-specific evaluation dataset DTa. The comprehensive evaluation process is a process for evaluating the performance of the model M comprehensively regardless of the type of image data by using a comprehensive evaluation dataset DTb.
[0048] The type-specific evaluation dataset DTa is a subset of the evaluation dataset DT, i.e., a set of image data selected from the evaluation dataset DT. The selection of elements of the type-specific evaluation dataset DTa is performed with the goal of equalizing the number of elements in each subgroup DTaij for each group when the type-specific evaluation dataset DTa is divided into groups DTa1, DTa2, ..., DTan according to class, and each group DTai is further divided into subgroups DTai1, DTai2, ..., DTaim according to type. On the other hand, the comprehensive evaluation dataset DTb is a complement of the type-specific evaluation dataset DTa in the evaluation dataset DT, i.e., a set of image data that is not selected as an element of the type-specific evaluation dataset DTa among the image data belonging to the evaluation dataset DT.
[0049] An example of an algorithm for selecting elements of the type-specific evaluation dataset DTa from the evaluation dataset DT is as follows. First, the evaluation dataset DT is divided into groups DT1, DT2, ..., DTn according to the class. Next, each group DTi is divided into subgroups DTi1, DTi2, ..., DTim according to the type. Then, a threshold value γ is set, and for each subgroup DTij, (1) if the number of elements of the subgroup DTij is equal to or less than the threshold value γ, all elements of the subgroup DTij are selected, and (2) if the number of elements of the subgroup DTij is greater than the threshold value γ, γ elements are randomly selected from the subgroup DTij.
[0050] (Specific examples of types) When the input of the model M is image data representing an image including a specific item as a subject, and the output of the model M is classes C1, C2, ..., Cn indicating the quality of a specific part of the item, the types T1, T2, ..., Tm can be defined, for example, by focusing on the attributes of the background, the item, and the part. For example, when focusing on the attributes and attribute values shown in Table 1, 2 x 2 x 2 = 8 types T1, T2, ..., T8 are defined as shown in Figure 3. [Table 1]
[0051] The attributes to be focused on in defining the types T1, T2, ..., Tm may be all attributes of the background, the object, and the part, or some attributes of the background, the object, and the part. Instead of all or some attributes of the background, the object, and the part, or in addition to all or some attributes of the background, the object, and the part, the types T1, T2, ..., Tm may be defined by focusing on all or some attributes of the camera, the manufacturer, the manufacturing time, the manufacturing environment (e.g., temperature), the image quality (e.g., resolution), the product, and the light source.
[0052] (Examples) A collection of image data including linear components as subjects was prepared as dataset D. Each image data in dataset D was given a label indicating its class and type. The class is either class C1, which indicates that the symbol representing a numerical value printed on the linear component is normal, or class C2, which indicates that the symbol is abnormal. The type is any one of 3 x 2 x 2 x 3 x 9 x 2 = 648 types T1, T2, ..., T648 defined focusing on the attributes and attribute values shown in Table 2. [Table 2]
[0053] FIG. 4(a) is an example of an image represented by image data to which a label indicating class C1 (normal) is added. This image data is classified into a type corresponding to background darkening=none, subject color=white, whiteout=none, line blur=none, symbol display value=3, and number of symbols=6. FIG. 4(b) is an example of an image represented by image data to which a label indicating class C1 (normal) is added. This image data is classified into a type corresponding to background darkening=all, subject color=white, whiteout=none, line blur=none, symbol display value=3, and number of symbols=6. FIG. 4(c) is an example of an image represented by image data to which a label indicating class C2 (abnormal) is added. This image data is classified into a type corresponding to background darkening=none, subject color=white, whiteout=yes, line blur=none, symbol display value=3, and number of symbols=1.
[0054] According to the above-mentioned algorithm, the coefficient setting data set DLa, the parameter setting data set DLb, the type-specific evaluation data set DTa, and the comprehensive evaluation data set DTb were created from the data set D. The thresholds α1 and α2 used when creating the learning data set DL were α1=10 and α2=50. The thresholds β1 and β2 used when creating the parameter setting data set DLb were β1=2 and β2=10. The threshold γ used when creating the type-specific evaluation data set DTa was γ=2. The number of elements of the obtained coefficient setting data set DLa, parameter setting data set DLb, type-specific evaluation data set DTa, and comprehensive evaluation data set DTb for each class is shown in Table 3. [Table 3]
[0055] FIG. 5 is a histogram showing the number of image data of each type for image data of class C1 (normal). FIG. 6 is a histogram showing the number of image data of each type for image data of class C2 (abnormal). In FIG. 5 and FIG. 6, the number of image data belonging to each type is shown by purpose for 121 types actually included in the dataset DS. According to FIG. 5 and FIG. 6, when the learning dataset DL (coefficient setting dataset DLa and parameter setting dataset DLb) is divided into groups L1 and L2 according to class, and each group Li is further divided into subgroups Li1, Li2, ..., Li648 according to type, (a) the number of elements in each group Li is roughly equalized, and (b) the number of elements in each subgroup Lij for each group is roughly equalized. In addition, when the parameter setting data set DLb is divided into groups DLb1, DLb2 according to class, and each group DLbi is further divided into subgroups DLbi1, DLbi2, ..., DLbi648 according to type, (a) the number of elements in each group DLbi is roughly equalized, and (b) the number of elements in each subgroup DLbij for each group is roughly equalized. In addition, when the type-specific evaluation data set DTa is divided into groups DTa1, DTa2 according to class, and each group DTai is further divided into subgroups DTai1, DTai2, ..., DTai648 according to type, it is found that the number of elements in each subgroup DTaij for each group is roughly equalized.
[0056] The results of the type-specific evaluation and comprehensive evaluation are shown in Table 4. Table 4 shows that, both when viewed by type and comprehensively, the actual results (classes indicated by the labels) and the predictions (classes output by model M) are in perfect agreement, achieving a 100% accuracy rate. [Table 4]
[0057] In addition, when selecting a learning dataset, if the objective is not to equalize the number of elements in each subgroup Lij for each group, but to equalize the number of elements in each group Li, the results of the type-specific evaluation and comprehensive evaluation will be as shown in Table 5. Table 5 shows that the actual results and predictions do not match when viewed by type or comprehensively, and a 100% accuracy rate has not been achieved. [Table 5]
[0058] (Additional Notes) The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. Embodiments obtained by appropriately combining the technical means disclosed in the different embodiments are also included in the technical scope of the present invention. [Explanation of symbols]
[0059] 1 Machine learning device 11. Memory 12 processors 13. Storage 14 Bus S Machine Learning Methods S1 Set Creation Process S2 Model building process S3 Model Evaluation Process D Dataset DL training dataset DLa coefficient setting data set DLb Parameter setting data set DT evaluation dataset DTa type-specific evaluation data set DTb Comprehensive Evaluation Dataset
Claims
1. At least one processor; The processor executes a set creation process of creating a learning dataset from a dataset consisting of image data to which a label indicating any one of a plurality of predetermined classes and any one of a plurality of predetermined types has been assigned, and a model construction process of constructing a model using the learning dataset created in the set creation process, in which image data is input and any one of the plurality of classes is output; In the set creation process, the processor divides the training data set into groups according to classes, and further divides each group into subgroups according to type, in order to select elements of the training data set from the data set with the goal of equalizing the number of elements in each group and equalizing the number of elements in each subgroup for each group. The processor divides the data set into groups according to classes, divides each group into subgroups according to type, sets a threshold for each group, and for each subgroup of the group, (1) if the number of elements of the subgroup is equal to or less than the threshold, selects all elements of the subgroup as elements of the training data set, and (2) if the number of elements of the subgroup is greater than the threshold, selects from the subgroup a number of elements equal to the value of the threshold as elements of the training data set. A machine learning device characterized by:
2. The model construction process includes a parameter setting process for setting hyperparameters that define a network structure of the model using a parameter setting data set; The processor divides the parameter setting dataset into groups according to classes, and further divides each group into subgroups according to types, in order to select the parameter setting dataset from the learning dataset with the goal of equalizing the number of elements in each group and equalizing the number of elements in each subgroup for each group, the processor divides the learning dataset into groups according to classes, divides each group into subgroups according to types, sets a second threshold for each group, and for each subgroup of the group, (1) if the number of elements of the subgroup is equal to or less than the second threshold, selects all elements of the subgroup as elements of the parameter setting dataset, and (2) if the number of elements of the subgroup is greater than the second threshold, selects from the subgroup a number of elements equal to the value of the second threshold as elements of the parameter setting dataset. The machine learning device according to claim 1 .
3. The processor further performs a model evaluation process to evaluate performance of the model using an evaluation dataset; In the set creation process, the processor selects, from among the image data belonging to the dataset, image data that has not been selected as an element of the training dataset, as an element of the evaluation dataset. The machine learning device according to claim 1 or 2.
4. The model evaluation process includes a type-by-type evaluation process for evaluating performance of the model by type using a type-by-type evaluation data set, The processor divides the type-specific evaluation data set into groups according to classes, and further divides each group into subgroups according to type, in order to select elements of the type-specific evaluation data set from the evaluation data set with a goal of equalizing the number of elements of each subgroup for each group, the processor divides the evaluation data set into groups according to classes, divides each group into subgroups according to type, sets a third threshold, and for each subgroup, (1) if the number of elements of the subgroup is equal to or less than the third threshold, selects all elements of the subgroup as elements of the type-specific evaluation data set, and (2) if the number of elements of the subgroup is greater than the third threshold, selects from the subgroup a number of elements equal to the value of the third threshold as elements of the type-specific evaluation data set. The machine learning device according to claim 3 .
5. The input of the model is image data including a specific article as a subject, and the output of the model is a class indicating the quality of a specific portion of the article; The type is a type defined by focusing on attributes of a background, the object, and some or all of the parts. The machine learning device according to any one of claims 1 to 4.
6. A set creation process in which at least one processor creates a learning dataset from a dataset consisting of image data to which labels indicating any one of a plurality of predetermined classes and any one of a plurality of predetermined types are assigned; A model construction process in which the processor constructs a model using the learning dataset created in the set creation process, with image data as input and one of the plurality of classes as output, In the set creation process, the processor divides the training data set into groups according to classes, and further divides each group into subgroups according to type, in order to select elements of the training data set from the data set with the goal of equalizing the number of elements in each group and equalizing the number of elements in each subgroup for each group. The processor divides the data set into groups according to classes, divides each group into subgroups according to type, sets a threshold for each group, and for each subgroup of the group, (1) if the number of elements of the subgroup is equal to or less than the threshold, selects all elements of the subgroup as elements of the training data set, and (2) if the number of elements of the subgroup is greater than the threshold, selects from the subgroup a number of elements equal to the value of the threshold as elements of the training data set. A machine learning method comprising:
7. A machine learning program for operating a computer as the machine learning device described in any one of claims 1 to 5, the machine learning program causing a processor provided in the computer to execute each of the processes.
8. At least one processor; The processor executes a set creation process of creating an evaluation dataset from a dataset consisting of image data to which a label indicating any one of a plurality of predetermined classes and any one of a plurality of predetermined types has been assigned, and a model evaluation process of evaluating performance of a model that uses the evaluation dataset created in the set creation process, with image data as input and with any one of the plurality of classes as output; The model evaluation process includes a type-specific evaluation process for evaluating performance of the model by type using a type-specific evaluation dataset, and a comprehensive evaluation process for comprehensively evaluating performance of the model using a comprehensive evaluation dataset, The processor divides the type-specific evaluation dataset into groups according to classes, and further divides each group into subgroups according to type, in order to select elements of the type-specific evaluation dataset from the evaluation dataset with a goal of equalizing the number of elements of each subgroup for each group, the processor divides the evaluation dataset into groups according to classes, divides each group into subgroups according to type, sets a threshold, and for each subgroup, (1) if the number of elements of the subgroup is equal to or less than the threshold, selects all elements of the subgroup as elements of the type-specific evaluation dataset, and (2) if the number of elements of the subgroup is greater than the threshold, selects from the subgroup a number of elements equal to the threshold as elements of the type-specific evaluation dataset. An evaluation device comprising:
9. A set creation process in which at least one processor creates an evaluation dataset from a dataset consisting of image data to which labels indicating any one of a plurality of predetermined classes and any one of a plurality of predetermined types have been assigned; A model evaluation process in which the processor uses the evaluation data set created in the set creation process to evaluate performance of a model that receives image data as input and outputs any one of the plurality of classes, The model evaluation process includes a type-specific evaluation process for evaluating performance of the model by type using a type-specific evaluation dataset, and a comprehensive evaluation process for comprehensively evaluating performance of the model using a comprehensive evaluation dataset, The processor divides the type-specific evaluation dataset into groups according to classes, and further divides each group into subgroups according to type, in order to select elements of the type-specific evaluation dataset from the evaluation dataset with a goal of equalizing the number of elements of each subgroup for each group, the processor divides the evaluation dataset into groups according to classes, divides each group into subgroups according to type, sets a threshold, and for each subgroup, (1) if the number of elements of the subgroup is equal to or less than the threshold, selects all elements of the subgroup as elements of the type-specific evaluation dataset, and (2) if the number of elements of the subgroup is greater than the threshold, selects from the subgroup a number of elements equal to the threshold as elements of the type-specific evaluation dataset.
13. An evaluation method comprising:
10. 9. An evaluation program for causing a computer to operate as the evaluation device according to claim 8, the evaluation program causing a processor included in the computer to execute each of the processes.
Citation Information
Patent Citations
Method and system for aligning and classifying images
JP2007536644A
Control device for plant and control device for fire power generation plant
JP2012141862A
Classification device, classification method, classification program, and inspection device
JP2020042754A
Residual characteristic estimation model creation method and residual characteristic estimation model creation system
JP2020149209A
Generating and training machine learning systems using stored training datasets
US20190102675A1
