Method for performing class classification processing using machine learning model, information processing device, and computer program
By using multiple machine learning models with distinct classes, the method addresses the inefficiencies of constructing a VAE for each class, achieving faster and more efficient classification processing.
Patent Information
- Application Number
- JP2020182206
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2020-10-30
- Publication Date
- 2024-10-16
- Estimated Expiration
- 2040-10-30
AI Technical Summary
The existing technique for classifying input data using VAEs requires constructing a model for each class, leading to increased processing load and prolonged calculation times.
A method involving multiple machine learning models, each with distinct classes, is employed for classification processing, allowing for faster classification by utilizing a combination of models to determine the class of input data.
This approach reduces processing time and improves classification efficiency by distributing the classification task across multiple models, enabling accurate classification of input data into various classes.
Smart Images

Figure 0007567371000003 
Figure 0007567371000004 
Figure 0007567371000005
Abstract
Description
[Technical field]
[0001] The present disclosure relates to a method, an information processing device, and a computer program for performing a class classification process using a machine learning model. [Background technology]
[0002] Patent Document 1 discloses a technique for classifying input data using a VAE (Variational Autoencoder). In this technique, a VAE is constructed for each class to be determined, and the input data is compared with data output from one VAE to determine whether the input data corresponds to the class corresponding to the VAE. If the input data does not correspond to the class corresponding to the VAE, another VAE is used to perform the determination again. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2019-204321 A Summary of the Invention [Problem to be solved by the invention]
[0004] However, the above-mentioned technology requires building a VAE for each class, which requires a large amount of processing and takes a long time to calculate. [Means for solving the problem]
[0005] According to a first aspect of the present disclosure, there is provided a method for performing a class classification process on classified data using a machine learning model, the method including the steps of: (a) preparing N machine learning models, where N is an integer equal to or greater than 2, each of the N machine learning models comprising: The N machine learning models are commonly inputThe method includes (a) configuring input data to be classified into one of a plurality of classes and having at least one class different from other machine learning models among the N machine learning models; and (b) performing a class classification process on the classified data using the N machine learning models.
[0006] According to a second aspect of the present disclosure, there is provided an information processing device that executes a class classification process for classified data using a machine learning model. The information processing device includes a memory that stores N machine learning models, where N is an integer equal to or greater than 2, and a processor that executes a calculation using the N machine learning models. Each of the N machine learning models includes: The N machine learning models are commonly input The N machine learning models are configured to classify input data into one of a plurality of classes, with at least one class being different from other machine learning models among the N. The processor is configured to perform a class classification process on the classified data using the N machine learning models.
[0007] According to a third aspect of the present disclosure, there is provided a computer program for causing a processor to execute a class classification process for classified data using a machine learning model. When N is an integer equal to or greater than 2, the machine learning model includes N machine learning models, each of which includes: The N machine learning models are commonly input The N machine learning models are configured to classify input data into one of a plurality of classes, with at least one class being different from other machine learning models among the N. The computer program causes the processor to execute a process of performing a class classification process on the classified data using the N machine learning models. [Brief description of the drawings]
[0008] [Figure 1] FIG. 1 is a block diagram of an information processing apparatus according to an embodiment. [Diagram 2] FIG. [Diagram 3] An explanatory diagram showing the configuration of a first machine learning model. [Figure 4] An explanatory diagram showing the configuration of a second machine learning model. [Diagram 5] 11 is a flowchart showing a processing procedure of a preparation process. [Figure 6] FIG. [Figure 7] FIG. 4 is an explanatory diagram showing the configuration of a group of known characteristic spectra. [Figure 8] 11 is a flowchart showing the processing procedure of a classifying step. [Figure 9] 11 is a flowchart showing the procedure of a machine learning model update process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0009] A. Embodiment: FIG. 1 is a block diagram showing the functions of a printer 10 as an information processing device in an embodiment. The printer 10 includes a control device 20, a print mechanism 30, a print medium holder 40, and a spectrometer 50. The print medium holder 40 holds the print medium PM. The spectrometer 50 performs spectroscopic measurement of the print medium PM held in the print medium holder 40 to obtain spectroscopic data. The spectrometer 50 includes, for example, a variable wavelength interference spectrometer filter and a monochrome image sensor. The spectroscopic data obtained by the spectrometer 50 is used as input data or classified data for a machine learning model described later. As described later, the control device 20 executes a class classification process of the spectroscopic data using the machine learning model to classify the print medium PM into which of a plurality of classes it belongs. The "class of the print medium PM" refers to the type of the print medium PM. The control device 20 controls the print mechanism 30 to execute printing under appropriate printing conditions according to the type of the print medium PM. The present disclosure is also applicable to various information processing devices other than the printer 10.
[0010] 2 is a block diagram showing the functions of the control device 20. The control device 20 has a processor 110, a memory 120, an interface circuit 130, and an input device 140 and a display unit 150 connected to the interface circuit 130. For example, but not limited to, the processor 110 not only has a function of executing the processes described in detail below, but also has a function of displaying data obtained by the processes and data generated in the course of the processes on the display unit 150. The spectrometer 50 and the printing mechanism 30 are also connected to the interface circuit 130.
[0011] The processor 110 functions as a print control unit 112 that controls the print mechanism 30, and also functions as a class classification processing unit 114 that executes class classification processing of input data. These units 112, 114 are realized by the processor 110 executing a computer program stored in the memory 120. However, these units 112, 114 may be realized by a hardware circuit. The term processor in this specification includes such a hardware circuit. In addition, the processor that executes the class classification processing may be a processor included in a remote computer connected to the printer 10 via a network. The memory 120 stores a plurality of machine learning models 201, 202, a plurality of teacher data groups TD1, TD2, a plurality of known feature spectrum groups KS1, KS2, and classified data Di. The machine learning models 201, 202 are used for calculations by the class classification processing unit 114. An example of the configuration and operation of the machine learning models 201, 202 will be described later. The teacher data groups TD1 and TD2 are collections of labeled spectral data used to train the machine learning models 201 and 202. The known feature spectrum groups KS1 and KS2 are collections of feature spectra obtained when the teacher data groups TD1 and TD2 are input again to the trained machine learning models 201 and 202. The feature spectra will be described later. The classified data Di is the spectral data of a new printing medium PM to be subjected to the class classification process.
[0012] 3 is an explanatory diagram showing the configuration of the first machine learning model 201. The machine learning model 201 includes, in order from the input data IM side, a convolution layer 211, a primary vector neuron layer 221, a first convolution vector neuron layer 231, a second convolution vector neuron layer 241, and a classification vector neuron layer 251. Of these five layers 211 to 251, the convolution layer 211 is the lowest layer, and the classification vector neuron layer 251 is the highest layer. In the following description, the layers 211 to 251 are also referred to as the "Conv layer 211", the "PrimeVN layer 221", the "ConvVN1 layer 231", the "ConvVN2 layer 241", and the "ClassVN layer 251", respectively.
[0013] In this embodiment, the input data IM is spectral data, and is therefore one-dimensional array data. For example, the input data IM is data obtained by extracting 36 representative values at intervals of 10 nm from spectral data in the range of 380 nm to 730 nm. However, two-dimensional array data such as an image may also be used as the input data IM.
[0014] 3, two convolution vector neuron layers 231 and 241 are used, but the number of convolution vector neuron layers is arbitrary, and the convolution vector neuron layer may be omitted. However, it is preferable to use one or more convolution vector neuron layers.
[0015] 3 further includes a similarity calculation unit 261 that generates similarities. The similarity calculation unit 261 can calculate similarities S1_ConvVN1, S1_ConvVN2, and S1_ClassVN, which will be described later, from the outputs of the ConvVN1 layer 231, the ConvVN2 layer 241, and the ClassVN layer 251. However, the similarity calculation unit 261 may be omitted.
[0016] The configuration of each of the layers 211 to 251 can be described as follows. <Description of the configuration of the first machine learning model 201> ·Conv layer 211: Conv[32,6,2] ·PrimeVN layer 221: PrimeVN[26,1,1] ·ConvVN1 layer 231:ConvVN1[20,5,2] ·ConvVN2 layer 241:ConvVN2[16,4,1] ·ClassVN layer 251:ClassVN[n1+1,3,1] Vector dimension VD: VD=16 In the description of each of these layers 211 to 251, the character string before the parentheses is the layer name, and the numbers in the parentheses are, in order, the number of channels, the kernel size, and the stride. For example, the layer name of the Conv layer 211 is "Conv", the number of channels is 32, the kernel size is 1x6, and the stride is 2. In FIG. 3, these descriptions are shown under each layer. The hatched rectangles drawn in each layer represent the kernels used when calculating the output vector of the adjacent upper layer. In this embodiment, since the input data IM is data of a one-dimensional array, the kernel also has a one-dimensional array. Note that the parameter values used in the description of each of the layers 211 to 251 are merely examples and can be changed arbitrarily.
[0017] The Conv layer 211 is a layer composed of scalar neurons. The other four layers 221 to 251 are layers composed of vector neurons. A vector neuron is a neuron that takes a vector as input and output. In the above description, the dimension of the output vector of each vector neuron is constant at 16. In the following, the term "node" is used as a superordinate concept of scalar neurons and vector neurons.
[0018] In FIG. 3, for the Conv layer 211, a first axis x and a second axis y that define the planar coordinates of the node array, and a third axis z that represents the depth are shown. Also, it is shown that the sizes of the Conv layer 211 in the x, y, and z directions are 1, 16, and 32. The sizes in the x and y directions are called "resolutions." In this embodiment, the resolution in the x direction is always 1. The size in the z direction is the number of channels. These three axes x, y, and z are also used as coordinate axes indicating the position of each node in other layers. However, in FIG. 3, the illustration of these axes x, y, and z is omitted in layers other than the Conv layer 211.
[0019] As is well known, the resolution W1 in the y direction after convolution is given by the following equation: W1 = Ceil{(W0 - Wk + 1) / S} (1) Here, W0 is the resolution before convolution, Wk is the kernel size, S is the stride, and Ceil{X} is a function that rounds up X. The resolution of each layer shown in FIG. 3 is an example in which the resolution in the y direction of the input data IM is 36, and the actual resolution of each layer is changed appropriately depending on the size of the input data IM.
[0020] The ClassVN layer 251 has (n1+1) channels. In the example of FIG. 3, (n1+1)=11. From these channels, judgment values Class1-1 to Class1-10 for a plurality of known classes and a judgment value Class1-UN indicating an unknown class are output. The class having the largest value among these judgment values Class1-1 to Class1-10 and Class1-UN corresponds to the class to which the input data IM belongs. In general, n1 is an integer of 1 or more, and is the number of known classes that can be classified using the first machine learning model 201. In any one machine learning model, it is preferable that an upper limit value nmax is set in advance for the number n1 of known classes that can be classified. In the example of FIG. 3, the number n1 of known classes is equal to 10, which is the upper limit value nmax. The upper limit value nmax may be a theoretical upper limit value that can satisfy a predetermined classification accuracy, or may be an operational upper limit value having a value smaller than the theoretical upper limit value. Basically, the operational upper limit value brings about a higher classification accuracy than the theoretical upper limit value. Furthermore, the upper limit value nmax can be set independently for the multiple machine learning models 201 and 202, and can be set to different values for each.
[0021] The judgment value Class1-UN indicating an unknown class may be omitted. In this case, if the largest value among the judgment values Class1-1 to Class1-10 for the known classes is less than a predetermined threshold, the class of the input data IM is judged to be unknown.
[0022] 4 is an explanatory diagram showing the configuration of the second machine learning model 202. Like the first machine learning model 201, this machine learning model 202 has a Conv layer 212, a PrimeVN layer 222, a ConvVN1 layer 232, a ConvVN2 layer 242, a ClassVN layer 252, and a similarity calculation unit 262.
[0023] The configuration of each of the layers 212 to 252 can be described as follows. <Description of the configuration of the second machine learning model 202> ·Conv layer 212: Conv[32,6,2] ·PrimeVN layer 222: PrimeVN[26,1,1] ·ConvVN1 layer 232:ConvVN1[20,5,2] ·ConvVN2 layer 242:ConvVN2[16,4,1] ·ClassVN layer 252:ClassVN[n2+1,3,1] Vector dimension VD: VD=16
[0024] As can be understood by comparing FIG. 3 and FIG. 4, among the layers 212 to 252 of the second machine learning model 202, the lower four layers 212 to 242 have the same configuration as the layers 211 to 241 of the first machine learning model 201. On the other hand, the top layer 252 of the second machine learning model 202 differs from the top layer 251 of the first machine learning model 201 only in the number of channels. In the example of FIG. 4, the ClassVN layer 252 has (n2+1) channels, where (n2+1)=3. From these channels, judgment values Class2-1 to Class2-2 for a plurality of known classes and a judgment value Class2-UN indicating an unknown class are output. In the second machine learning model 202, it is preferable that the number n2 of known classes is set to the same upper limit value nmax as that of the first machine learning model 201. In the example of FIG. 4, the number n2 of known classes is smaller than the upper limit value nmax. In this case, the second machine learning model 202 is expressed as having a number of classes less than the upper limit nmax. However, the upper limit nmax of the number of classes can be set to different values in the multiple machine learning models 201 and 202.
[0025] The second machine learning model 202 is configured to have at least one known class different from the first machine learning model 201. In addition, since the first machine learning model 201 and the second machine learning model 202 have different classifiable classes, the values of the elements of the kernel are also different from each other. In the present disclosure, when N is an integer equal to or greater than 2, any one of the N machine learning models is configured to have at least one known class different from the other machine learning models.
[0026] FIG. 5 is a flowchart showing the processing procedure of the machine learning model preparation process. In step S110, the user creates a machine learning model to be used in the class classification process and sets its parameters. In this embodiment, two machine learning models 201 and 202 shown in FIG. 3 and FIG. 4 are created and their parameters are set. However, in step S110, only one machine learning model may be created, or three or more machine learning models may be created. In step S120, the class classification processing unit 114 executes learning of the machine learning models 201 and 202 using the teacher data groups TD1 and TD2. Each teacher data is given a label in advance. For example, since the first machine learning model 201 has 10 known classes, a label with a value of 1 to 10 is given to the teacher data. When learning is completed, the learned machine learning models 201 and 202 are stored in the memory 120.
[0027] In step S130, the class classification processing unit 114 again inputs the multiple teacher data groups TD1 and TD2 into the trained machine learning models 201 and 202 to generate known feature spectrum groups KS1 and KS2. The known feature spectrum groups KS1 and KS2 are collections of feature spectra, which will be described below. Below, a method for generating the known feature spectrum group KS1 associated with the machine learning model 201 will be mainly described.
[0028] FIG. 6 is an explanatory diagram showing a feature spectrum Sp obtained by inputting arbitrary input data to the trained machine learning model 201. Here, the feature spectrum Sp obtained from the output of the ConvVN1 layer 231 will be described. The horizontal axis in FIG. 6 is a spectral position represented by a combination of an element number ND of an output vector of a node at one planar position (x, y) of the ConvVN1 layer 231 and a channel number NC. In this embodiment, since the vector dimension of the node is 16, the element number ND of the output vector is 16, ranging from 0 to 15. In addition, since the number of channels in the ConvVN1 layer 231 is 20, the channel number NC is 20, ranging from 0 to 19.
[0029] The vertical axis of Fig. 6 is the feature value C at each spectral position. V In this example, the feature value C V is the value of each element of the output vector V ND Note that the feature value C V The value of each element of the output vector V ND Alternatively, the activation value may be used as it is. In the latter case, the feature value C included in the feature spectrum Sp may be used as it is. V The number of nodes is equal to the number of channels, which is 20. The activation value is the value corresponding to the vector length of the output vector of the node.
[0030] The number of feature spectra Sp obtained from the output of the ConvVN1 layer 231 for one piece of input data is equal to the number of planar positions (x, y) of the ConvVN1 layer 231, that is, 1×6=6. Similarly, for one piece of input data, three feature spectra Sp are obtained from the output of the ConvVN2 layer 241, and one feature spectrum Sp is obtained from the output of the ClassVN layer 251.
[0031] When the teacher data group TD1 is input again to the trained machine learning model 201, the similarity calculation unit 261 calculates the feature spectrum Sp shown in FIG. 6 and registers it in the known feature spectrum group KS1.
[0032] 7 is an explanatory diagram showing the configuration of the known feature spectrum group KS1. In this example, the known feature spectrum group KS1 includes a known feature spectrum group KS1_ConvVN1 obtained from the output of the ConvVN1 layer 231, a known feature spectrum group KS1_ConvVN2 obtained from the output of the ConvVN2 layer 241, and a known feature spectrum group KS1_ConvVN1 obtained from the output of the ClassVN layer 251.
[0033] Each record of the known feature spectrum group KS1_ConvVN1 includes a record number, a layer name, a label Lb, and a known feature spectrum KSp. The known feature spectrum KSp is the same as the feature spectrum Sp in FIG. 6 obtained in response to the input of the training data. In the example of FIG. 7, the training data group TD1 is input to the trained machine learning model 201, and the known feature spectrum KSp associated with each value of the label Lb is generated and registered from the output of the ConvVN1 layer 231. For example, N1_1max known feature spectrum KSp is registered in association with the label Lb=1, N1_2max known feature spectrum KSp is registered in association with the label Lb=2, and N1_n1max known feature spectrum KSp is registered in association with the label Lb=n1. N1_1max, N1_2max, and N1_n1max are each an integer equal to or greater than 2. As described above, each label Lb corresponds to a known class different from each other. Therefore, it can be understood that each known feature spectrum KSp in the known feature spectrum group KS1_ConvVN1 is registered in association with one of a plurality of known classes. The same is true for the other known feature spectrum groups KS1_ConvVN2, KS1_ConvVN1.
[0034] The teacher data used in step S130 does not need to be the same as the teacher data groups TD1 and TD2 used in step S120. However, if part or all of the teacher data groups TD1 and TD2 used in step S120 are used in step S130, there is an advantage in that there is no need to prepare new teacher data.
[0035] 8 is a flowchart showing the processing procedure of the classification process using a trained machine learning model. In step S120, the classification processing unit 114 determines whether the print medium holder 40 has been opened or closed, and waits until it is opened or closed. This determination is made according to an output signal from an opening / closing switch (not shown) installed on the print medium holder 40. If the print medium holder 40 has been opened or closed, the process proceeds to step S130, where the classification processing unit 114 causes the spectrometer 50 to perform spectroscopic measurement of the print medium PM, thereby acquiring spectral data. This spectral data becomes classified data Di, which is the target of the classification process.
[0036] In step S230, the class classification processing unit 114 inputs the classified data Di to the existing trained machine learning models 201, 202 to perform a class classification process on the classified data Di. In this case, either a first processing method in which the multiple machine learning models 201, 202 are used one by one in sequence, or a second processing method in which the multiple machine learning models 201, 202 are used simultaneously, can be used. In the first processing method, the class classification process is first performed using one machine learning model 201, and when it is determined that the classified data Di belongs to an unknown class as a result, the class classification process is performed using the other machine learning model 202. In the second processing method, the two machine learning models 201, 202 are used simultaneously to perform class classification processes on the same classified data Di in parallel, and the class classification processing unit 114 integrates the processing results. According to an experiment by the inventor of the present disclosure, the second processing method is more preferable because it requires a shorter processing time than the first processing method.
[0037] In step S240, the class classification processing unit 114 determines whether the classified data Di belongs to an unknown class or a known class based on the result of the class classification processing in step S230. If the classified data Di belongs to an unknown class, the process proceeds to step S300 (described later) where an update process of the machine learning model is executed. On the other hand, if the classified data Di belongs to a known class, the process proceeds to step S250.
[0038] In step S250, the similarity to the known feature spectrum group is calculated using one machine learning model that has been determined to belong to a known class from among the multiple machine learning models 201 and 202. For example, when the processing of the first machine learning model 201 determines that the classified data Di belongs to a known class, the similarity calculation unit 261 calculates the similarities S1_ConvVN1, S1_ConvVN2, and S1_ClassVN to the known feature spectrum group KS1 from the outputs of the ConvVN1 layer 231, the ConvVN2 layer 241, and the ClassVN layer 251. On the other hand, when the processing of the second machine learning model 202 determines that the classified data Di belongs to a known class, the similarity calculation unit 262 calculates the similarities S2_ConvVN1, S2_ConvVN2, and S2_ClassVN to the known feature spectrum group KS2. A method for calculating the similarity S1_ConvVN1 from the output of the ConvVN1 layer 231 of the first machine learning model 201 will be described below.
[0039] The similarity S1_ConvVN1 can be calculated, for example, using the following formula. S1_ConvVN1(Class)=max[G{Sp(i,j),KSp(Class,k)}] Here, "Class" is an ordinal number for multiple classes, G{a,b} is a function for calculating the similarity between a and b, Sp(i,j) is a feature spectrum at all planar positions (i,j) obtained according to the classified data Di, KSp(Class,k) is all known feature spectra associated with the ConvVN1 layer 231 and a specific "Class", and max[X] is a logical operation for taking the maximum value of X. That is, the similarity S1_ConvVN1 is the maximum value of the similarities calculated between each of the feature spectra Sp(i,j) at all planar positions (i,j) of the ConvVN1 layer 231 and each of all known feature spectra KSp(k) corresponding to a specific class. Such a similarity S1_ConvVN1 is calculated for each of multiple classes corresponding to multiple labels Lb. The similarity S1_ConvVN1 represents the degree to which the classified data Di is similar to the features of each class.
[0040] Similarities S1_ConvVN2 and S1_ClassVN related to the outputs of the ConvVN2 layer 241 and the ClassVN layer 251 are also generated in the same manner as the similarity S1_ConvVN1. It is not necessary to generate all three similarities S1_ConvVN1, S1_ConvVN2, and S1_ClassVN, but it is preferable to generate one or more of them. In the present disclosure, the layer used to generate the similarity is also referred to as a "specific layer."
[0041] In step S260, the classification processing unit 114 presents the similarity obtained in step S250 to the user, and the user checks whether the similarity is consistent with the result of the classification process. Since the similarities S1_ConvVN1, S1_ConvVN2, and S1_ClassVN represent the degree to which the classified data Di is similar to the characteristics of each class, the result of the classification process can be checked from at least one of these similarities S1_ConvVN1, S1_ConvVN2, and S1_ClassVN. For example, when at least one of the three similarities S1_ConvVN1, S1_ConvVN2, and S1_ClassVN does not match the result of the classification process, it can be determined that the two are not consistent. In another embodiment, when all of the three similarities S1_ConvVN1, S1_ConvVN2, and S1_ClassVN do not match the result of the classification process, it may be determined that the two are not consistent. In general, when a predetermined number of similarities among the multiple similarities generated from the outputs of multiple layers do not match the result of the classification process, it may be determined that the two are inconsistent. Note that the determination in step S260 may be performed by the classification processing unit 114.
[0042] If the similarity is consistent with the result of the classification process, the classification process of Fig. 8 is terminated. On the other hand, if the similarity is not consistent with the result of the classification process, the process proceeds to step S300 described below, where an update process of the machine learning model is performed.
[0043] FIG. 9 is a flowchart showing the procedure of the process of updating a machine learning model. In step S310, it is determined whether or not a machine learning model with the number of classes being less than the upper limit exists among the existing machine learning models. When N is an integer equal to or greater than 2, if there are N existing machine learning models, it is determined whether or not a machine learning model with the number of classes being less than the upper limit exists among them. However, the number N of existing machine learning models may be 1. In this embodiment, there are two existing machine learning models 201 and 202 shown in FIG. 3 and FIG. 4, and the first machine learning model 201 has the number of classes equal to the upper limit, and the second machine learning model 202 has the number of classes being less than the upper limit. If there is no machine learning model with the number of classes being less than the upper limit among the existing machine learning models, the process proceeds to step S340 described later, where a new machine learning model is added. On the other hand, if there is a machine learning model with the number of classes being less than the upper limit, the process proceeds to step S320, where the machine learning model is updated.
[0044] In step S320, the class classification processing unit 114 updates the machine learning model with the number of classes less than the upper limit value so as to increase the number of channels in the top layer by one. In this embodiment, the number of channels (n2+1) in the top layer of the second machine learning model 202 is changed from 3 to 4. In step S330, the class classification processing unit 114 executes learning of the machine learning model updated in step S320. In this learning, the classified data Di acquired in step S220 of FIG. 8 is used as new teacher data together with the teacher data group TD2 for the second machine learning model 202 that has been used until then. Note that, as the new teacher data, in addition to the classified data Di acquired in step S220, it is preferable to also use a plurality of other spectroscopic data obtained from spectroscopic measurement of the same printing medium PM. For this reason, it is preferable that the spectrometer 50 is configured to acquire spectroscopic data at a plurality of positions of one printing medium PM. When the learning is completed in this manner, the updated machine learning model 202 has a known class corresponding to the classified data Di. Therefore, it is possible to use the updated machine learning model 202 to recognize the type of this print medium PM.
[0045] In step S340, the class classification processing unit 114 adds a new machine learning model having a class corresponding to the classified data Di and sets its parameters. This new machine learning model preferably has the same configuration as the first machine learning model 201 shown in FIG. 3 except for the number of channels in the top layer. This new machine learning model preferably has two or more known classes, for example, similar to the second machine learning model 202 shown in FIG. 4. One of the two or more known classes is a class corresponding to the classified data Di. In addition, it is preferable that at least one of the two or more known classes is the same as at least one known class of the existing machine learning model. Making one class of the new machine learning model the same as the known class of the existing machine learning model is realized by learning the new machine learning model using the same teacher data as the teacher data used in learning the existing machine learning model for that known class. The reason for providing two or more known classes in the new machine learning model is that if there is only one known class, the learning may not be performed with sufficient accuracy.
[0046] The class of existing machine learning model to be adopted for the new machine learning model is preferably selected from, for example, the following classes: (a) Among multiple known classes in an existing machine learning model, the class corresponding to the optical spectrum data that is most similar to the data to be classified Di. (b) Among multiple known classes in the existing machine learning model, the class corresponding to the optical spectrum data that has the lowest similarity to the classified data Di. (c) A class to which the classified data Di is misclassified in step S240 of FIG. 7, among a plurality of known classes in an existing machine learning model. Among these, by adopting the above class (a) or (c), it is possible to reduce misclassification in the new machine learning model, while by adopting the above class (b), it is possible to shorten the learning time of the new machine learning model.
[0047] In step S350, the class classification processing unit 114 executes learning of the added machine learning model. In this learning, the classified data Di acquired in step S220 in FIG. 8 is used as new training data. In addition to the classified data Di acquired in step S220, it is preferable to use other multiple spectroscopic data obtained from spectroscopic measurement of the same print medium PM as the new training data. In addition, when one or more classes of the new machine learning model are made the same as known classes of the existing machine learning model, the training data used in the training of the existing machine learning model for the known classes is also used.
[0048] When the number of known classes of the second machine learning model 202 reaches the upper limit, a third machine learning model is added by steps S340 and S350 in FIG. 8. The same applies to the fourth and subsequent machine learning models. Thus, in this embodiment, when N is an integer equal to or greater than 2, the (N-1) machine learning models have classes equal to the upper limit, and the remaining machine learning model has classes equal to or less than the upper limit. In addition, when a class classification process is performed on the classified data Di using the N machine learning models, and it is determined that the classified data Di belongs to an unknown class, one of the following processes is executed. (1) If the other machine learning model has a number of classes less than the upper limit, steps S320 and S330 are processed to add a new class for the classified data Di to the other machine learning model by training the other machine learning model using training data including the classified data Di. (2) If the other machine learning model has a number of classes equal to the upper limit, a new machine learning model having a class corresponding to the classified data Di is added by the processes of steps S340 and S350. According to these processes, even if the N machine learning models are unable to classify the classified data Di successfully, it is possible to classify the classified data Di into a class corresponding to the classified data Di.
[0049] The machine learning model update process shown in FIG. 9 can also be executed when the number of existing machine learning models is one. When the number of existing machine learning models is one, for example, the second machine learning model 202 shown in FIG. 4 is not prepared, and the process of FIG. 8 is executed using only the first machine learning model 201 shown in FIG. 3. In this case, steps S340 and S350 in FIG. 9 are processes of adding the second machine learning model 202 as a new machine learning model. In this way, in the classification process performed using only the first machine learning model 201, the process of adding the second machine learning model 202 as a new machine learning model when it is determined that the input data belongs to an unknown class can also be understood as an example of a process of preparing two machine learning models 201 and 202.
[0050] In step S360, the class classification processing unit 114 generates a group of known feature spectra by inputting the teaching data again into the updated or added machine learning model. This process is the same as the process in step S230 in Fig. 8, and therefore a description thereof will be omitted.
[0051] As described above, in this embodiment, when N is an integer equal to or greater than 2, class classification processing is performed using N machine learning models, so that processing can be performed faster than when classification processing into multiple classes is performed using one machine learning model. Furthermore, when an existing machine learning model is unable to classify data to be classified well, it becomes possible to perform classification into a class corresponding to the data to be classified by adding a class to the existing machine learning model or by adding a new machine learning model.
[0052] In the above embodiment, a vector neural network type machine learning model using vector neurons is used, but instead, a machine learning model using scalar neurons such as a normal convolutional neural network may be used. However, the vector neural network type machine learning model is preferable in that it has higher accuracy of class classification processing than the machine learning model using scalar neurons.
[0053] B. How to calculate the output vector of each layer of the machine learning model: The method of calculating the output of each layer in the first machine learning model 201 shown in Fig. 3 is as follows. The second machine learning model 202 is similar.
[0054] Each node of the PrimeVN layer 221 regards the scalar output of the 1×1×32 nodes of the Conv layer 211 as a 32-dimensional vector, and obtains the vector output of the node by multiplying this vector by a transformation matrix. This transformation matrix is an element of a 1×1 kernel, and is updated by learning of the machine learning model 201. Note that it is also possible to integrate the processing of the Conv layer 211 and the PrimeVN layer 221 and configure them as one primary vector neuron layer.
[0055] When the PrimeVN layer 221 is referred to as the "lower layer L" and the ConvVN1 layer 231 adjacent to the upper side is referred to as the "upper layer L+1", the output of each node in the upper layer L+1 is determined using the following formula.
number
[0056] As the normalization function F(X), for example, the following formula (4a) or (4b) can be used.
number
[0057] In the above formula (4a), the sum vector u j Norm of |u j The activation value a is normalized by the softmax function j On the other hand, in equation (4b), the sum vector u j Norm of |u j | is the norm |u j Activation value a by dividing by the sum of | j It should be noted that the normalization function F(X) may be a function other than equation (4a) or (4b).
[0058] The ordinal number i in the above equation (3) is the output vector M L+1 j The integer n is a number that is assigned for convenience to the nodes in the lower layer L used to determine the output vector M L+1 j is the number of nodes in the lower layer L used to determine . Thus, the integer n is given by n = Nk × Nc (6) Here, Nk is the number of elements of the kernel, and Nc is the number of channels in the lower layer, the PrimeVN layer 221. In the example of FIG.
[0059] A kernel used to calculate the output vector of the ConvVN1 layer 231 has 1×3×26=78 elements, with the kernel size 1×3 as the surface size and the number of channels in the lower layer being 26 as the depth. Each of these elements is a prediction matrix W L ij In addition, 20 sets of this kernel are required to generate output vectors for 20 channels of the ConvVN1 layer 231. Therefore, the prediction matrix W L ij The number of prediction matrices W is 78 × 20 = 1560. L ij is updated by learning of the machine learning model 201.
[0060] As can be seen from the above equations (2) to (5), the output vector M L+1 j is calculated by the following calculation: (a) The output vector M of each node in the lower layer L L i The prediction matrix W L ij Multiplying by the predicted vector v ij Seeking (b) Prediction vector v obtained from each node in the lower layer L ij The sum vector u is the sum, i.e., linear combination, of j Seeking (c) Sum vector u j Norm of |u j The activation value a, which is a normalization factor by normalizing | j Seeking (d) Sum vector u j The norm |u j Divide by | and then the activation value a j Multiply by.
[0061] In addition, the activation value a j is the norm |u j is the normalization factor obtained by normalizing |. Therefore, the activation value a j can be considered as an index showing the relative output strength of each node among all nodes in the upper layer L+1. The norm used in (4), (4a), (4b), and (5) is typically the L2 norm, which represents the vector length. In this case, the activation value a j is the output vector M L+1 j The activation value a corresponds to the vector length of j Since it is only used in the above equations (4) and (5), it does not need to be output from the node. However, the activation value a j It is also possible to configure the upper layer L+1 to output to the outside.
[0062] The configuration of a vector neural network is almost the same as that of a capsule network, and the vector neurons of a vector neural network correspond to the capsules of a capsule network. However, the calculations according to the above formulas (2) to (5) used in a vector neural network are different from those used in a capsule network. The biggest difference between the two is that in a capsule network, the predicted vector v ij Each of the vector neural networks in this embodiment is multiplied by a weight, and the weight is searched for by repeating dynamic routing multiple times. On the other hand, in the vector neural network of this embodiment, the output vector M L+1 jSince the above is obtained, there is no need to repeat dynamic routing, and the calculation speed is faster. In addition, the vector neural network of this embodiment has the advantage that the amount of memory required for calculation is smaller than that of a capsule network, and according to an experiment by the inventor of the present disclosure, the amount of memory required is about 1 / 2 to 1 / 3.
[0063] A vector neural network is the same as a capsule network in that it uses nodes that use vectors as input and output. Therefore, the advantage of using vector neurons is also common to capsule networks. In addition, the multiple layers 211 to 251 are the same as normal convolutional neural networks in that the higher the layer, the larger the area of the feature represented, and the lower the layer, the smaller the area of the feature represented. Here, "feature" means a characteristic part included in the input data to the neural network. A vector neural network or capsule network is superior to a normal convolutional neural network in that the output vector of a certain node contains spatial information that represents the spatial information of the feature represented by the node. That is, the vector length of the output vector of a certain node represents the probability of the existence of the feature represented by the node, and the vector direction represents spatial information such as the direction and scale of the feature. Therefore, the vector direction of the output vectors of two nodes belonging to the same layer represents the positional relationship of each feature. Alternatively, it can be said that the vector direction of the output vectors of the two nodes represents the variation of the feature. For example, if a node corresponds to the feature of "eyes", the direction of the output vector can represent variations such as the thinness of the eyes and the way they are lifted. In a conventional convolutional neural network, it is said that spatial information of features is lost due to pooling processing. As a result, vector neural networks and capsule networks have the advantage of being superior in the performance of identifying input data compared to conventional convolutional neural networks.
[0064] The advantages of vector neural networks can also be considered as follows. That is, the advantage of vector neural networks is that the output vectors of nodes express the features of the input data as coordinates in a continuous space. Therefore, output vectors can be evaluated such that if the vector directions are close, the features are similar. Another advantage is that even if the features contained in the input data are not covered by the training data, the features can be determined by interpolation. On the other hand, normal convolutional neural networks have the disadvantage that the features of the input data cannot be expressed as coordinates in a continuous space because of the chaotic compression caused by the pooling process.
[0065] The output of each node of the ConvVN2 layer 241 and the ClassVN layer 251 is determined similarly using the above-mentioned formulas (2) to (5), so detailed explanations are omitted. The resolution of the top layer, the ClassVN layer 251, is 1×1, and the number of channels is (n1+1).
[0066] The output of the ClassVN layer 251 is converted into a plurality of judgment values Class1-1 to Class1-2 for known classes, and a judgment value Class1-UN indicating an unknown class. These judgment values are usually normalized by a softmax function. Specifically, for example, a judgment value for each class can be obtained by performing an operation in which the vector length of the output vector of each node of the ClassVN layer 251 is calculated from the output vector of that output vector, and the vector length of each node is further normalized by a softmax function. As described above, the activation value a obtained by the above formula (4) is j is the output vector M L+1 j The activation value a at each node in the ClassVN layer 251 is a normalized value that corresponds to the vector length of j may be output and used as the judgment value for each class.
[0067] In the above-described embodiment, a vector neural network that obtains an output vector by the calculation of the above formulas (2) to (5) is used as the machine learning models 201 and 202. However, instead of this, a capsule network disclosed in U.S. Patent No. 5,210,798 or International Publication WO 2019 / 083553 may be used. Also, a neural network that uses only scalar neurons may be used.
[0068] Other embodiments: The present disclosure is not limited to the above-mentioned embodiment, and can be realized in various forms without departing from the spirit of the present disclosure. For example, the present disclosure can be realized in the following aspects. The technical features in the above-mentioned embodiments corresponding to the technical features in each aspect described below can be appropriately replaced or combined in order to solve some or all of the problems of the present disclosure, or to achieve some or all of the effects of the present disclosure. Furthermore, if the technical feature is not described as essential in this specification, it can be appropriately deleted.
[0069] (1) According to a first aspect of the present disclosure, there is provided a method for performing a class classification process on classified data using a machine learning model, the method including: (a) preparing N machine learning models, where N is an integer equal to or greater than 2, each of the N machine learning models being configured to classify input data into one of a plurality of classes and having at least one class different from other machine learning models among the N machine learning models; and (b) performing a class classification process on the classified data using the N machine learning models. According to this method, class classification processing is performed using N machine learning models, so the processing can be performed faster than when classification processing into multiple classes is performed using a single machine learning model.
[0070] (2) In the above method, an upper limit is set for the number of classes that can be classified by any one machine learning model, and the step (a) may include: (a1) preparing a first machine learning model having a number of classes equal to the upper limit; and (a2) adding a second machine learning model having a class corresponding to the input data when the input data is determined to belong to an unknown class when the class classification process is performed on the input data using the first machine learning model. According to this method, when the first machine learning model is unable to classify the input data successfully, by adding a second machine learning model, it becomes possible to classify the input data into a class corresponding to the input data.
[0071] (3) In the above method, the step (a2) includes a step of executing learning of the second machine learning model using training data including the input data used in the step (a2); The training data may further include existing training data for learning about at least one class included in the first machine learning model. According to this method, the second machine learning model is trained using not only training data for learning new classes, but also existing training data for learning existing classes, making it possible to perform more accurate class classification using the second machine learning model.
[0072] (4) In the above method, an upper limit is set for the number of classes that can be classified by any one machine learning model, and among the N machine learning models, (N-1) machine learning models have a number of classes equal to the upper limit, and the other machine learning model has a number of classes equal to or less than the upper limit. When the classified data is determined to belong to an unknown class when the class classification process is performed on the classified data using the N machine learning models, (b1) if the other machine learning model has a number of classes less than the upper limit, a new class for the classified data is added to the other machine learning model by learning the other machine learning model using teacher data including the classified data, and (b2) if the other machine learning model has a number of classes equal to the upper limit, a new machine learning model having a class corresponding to the classified data is added. It may include a process. According to this method, when N machine learning models are unable to classify the data to be classified, it is possible to classify the data into a class corresponding to the data to be classified by adding a class to an existing machine learning model or by adding a new machine learning model.
[0073] (5) In the above method, the step (b2) may include a step of performing training of the new machine learning model using training data including the classified data used in the step (b), and the training data may further include existing training data for training at least one class included in the N machine learning models. According to this method, in addition to training data for new classes, a new machine learning model is trained using existing training data for existing classes, making it possible to perform more accurate class classification with the new machine learning model.
[0074] (6) In the above method, each of the N machine learning models may include a vector neural network having a plurality of vector neuron layers, and the method may further include the steps of: preparing a group of known feature vectors obtained from the output of at least one specific layer of the plurality of vector neuron layers when a plurality of teacher data are input to the N machine learning models that have been trained; calculating a similarity indicating which of the plurality of classes the classified data is similar to using the group of known feature vectors and a feature vector obtained from the output of the specific layer when the classified data is input to the N machine learning models; and determining that the classified data belongs to an unknown class when a result of the class classification process by the N machine learning models is not consistent with the similarity. According to this method, the similarity of feature vectors can be used to confirm whether the results of class classification processing using N machine learning models are correct.
[0075] (7) In the above method, the specific layer may have a configuration in which vector neurons arranged on a plane defined by two axes, a first axis and a second axis, are arranged as a plurality of channels along a third axis in a direction different from the two axes. The feature vector is The spectrum may be any one of: (i) a first type of feature spectrum in which multiple element values of an output vector of a vector neuron at one planar position in the specific layer are arranged across the multiple channels along the third axis; (ii) a second type of feature spectrum obtained by multiplying each element value of the first type of feature spectrum by an activation value corresponding to the vector length of the output vector; and (iii) a third type of feature spectrum in which the activation values at one planar position in the specific layer are arranged across the multiple channels along the third axis. According to this method, the feature vector can be easily obtained.
[0076] (8) According to a second aspect of the present disclosure, there is provided an information processing device that performs a class classification process on classified data using a machine learning model. The information processing device includes a memory that stores N machine learning models, where N is an integer equal to or greater than 2, and a processor that executes a calculation using the N machine learning models. Each of the N machine learning models is configured to classify input data into one of a plurality of classes, and is configured to have at least one class that is different from other machine learning models among the N machine learning models. The processor is configured to perform a class classification process on the classified data using the N machine learning models. According to this information processing device, class classification processing is performed using N machine learning models, so that processing can be performed faster than when classification processing into a large number of classes is performed using one machine learning model.
[0077] (9) According to a third aspect of the present disclosure, there is provided a computer program for causing a processor to execute a class classification process for classified data using a machine learning model. When N is an integer equal to or greater than 2, the machine learning models include N machine learning models, each of which is configured to classify input data into one of a plurality of classes and to have at least one class different from other machine learning models among the N machine learning models. The computer program causes the processor to execute a process for performing a class classification process for the classified data using the N machine learning models. According to this computer program, class classification processing is performed using N machine learning models, so the processing can be performed faster than when classification processing into multiple classes is performed using a single machine learning model.
[0078] The present disclosure may be realized in various forms other than those described above, such as a computer program for implementing the functions of a classification device, a non-transitory storage medium on which the computer program is recorded, and the like. [Explanation of symbols]
[0079] 10... printer, 20... control device, 30... printing mechanism, 40... print medium holder, 50... spectrometer, 110... processor, 112... print control unit, 114... class classification processing unit, 120... memory, 130... interface circuit, 150... display unit, 201, 202... machine learning model, 211, 212... convolution layer, 221, 222... primary vector neuron layer, 231, 232... first convolution vector neuron layer, 241, 242... second convolution vector neuron layer, 251, 252... classification vector neuron layer, 261, 262... similarity calculation unit
Claims
1. A method for performing a class classification process on classified data using a machine learning model, comprising: (a) preparing N machine learning models, where N is an integer equal to or greater than 2, each of the N machine learning models being configured to classify input data commonly input to the N machine learning models into one of a plurality of classes, and each of the N machine learning models being configured to have at least one class different from other machine learning models among the N machine learning models; (b) performing a class classification process on the classified data using the N machine learning models; A method comprising:
2. 2. The method of claim 1 , There is an upper limit on the number of classes that can be classified by any one machine learning model. The step (a) (a1) preparing a first machine learning model having a number of classes equal to the upper limit; (a2) adding a second machine learning model having a class corresponding to the input data when the input data is determined to belong to an unknown class when the class classification process is performed on the input data using the first machine learning model; A method comprising:
3. 3. The method of claim 2, The step (a2) includes a step of executing learning of the second machine learning model using teacher data including the input data used in the step (a2); The method, wherein the training data further includes existing training data for learning about at least one class included in the first machine learning model.
4. The method according to any one of claims 1 to 3, There is an upper limit on the number of classes that can be classified by any one machine learning model. Among the N machine learning models, (N-1) machine learning models have a number of classes equal to the upper limit, and the other machine learning model has a number of classes equal to or less than the upper limit, The step (b) When the classification process is performed on the classified data using the N machine learning models, it is determined that the classified data belongs to an unknown class. (b1) when the other one of the machine learning models has a number of classes less than the upper limit, adding a new class for the classified data to the other one of the machine learning models by performing learning using teacher data including the classified data; (b2) if the other one of the machine learning models has a number of classes equal to the upper limit, adding a new machine learning model having a class corresponding to the classified data; A method comprising the steps of:
5. 5. The method of claim 4, The step (b2) includes a step of executing learning of the new machine learning model using training data including the classified data used in the step (b); The method, wherein the training data further includes existing training data for learning about at least one class included in the N machine learning models.
6. The method according to any one of claims 1 to 5, Each of the N machine learning models includes a vector neural network having a plurality of vector neuron layers; The method further comprises: preparing a group of known feature spectra obtained from an output of at least one specific layer among the plurality of vector neuron layers when a plurality of teacher data are input to the N machine learning models that have been trained; calculating a similarity indicating which of the plurality of classes the classified data is similar to, using a feature spectrum obtained from an output of the specific layer when the classified data is input to the N machine learning models and the group of known feature spectra; determining that the classified data belongs to an unknown class when the result of the class classification process by the N machine learning models does not match the similarity; A method comprising:
7. 7. The method of claim 6, The specific layer has a configuration in which vector neurons arranged on a plane defined by two axes, a first axis and a second axis, are arranged as a plurality of channels along a third axis in a direction different from the two axes, The characteristic spectrum is (i) a first type of feature spectrum in which a plurality of element values of an output vector of a vector neuron at one plane position of the specific layer are arranged across the plurality of channels along the third axis; (ii) a second type feature spectrum obtained by multiplying each element value of the first type feature spectrum by an activation value corresponding to the vector length of the output vector; (iii) a third type of feature spectrum in which the activation values at one planar position of the specific layer are arranged across the multiple channels along the third axis; and The method is any one of the following:
8. An information processing device that executes a class classification process for classified data using a machine learning model, A memory that stores N machine learning models, where N is an integer equal to or greater than 2; A processor that executes calculations using the N machine learning models; Equipped with Each of the N machine learning models is configured to classify input data commonly input to the N machine learning models into one of a plurality of classes, and is configured to have at least one class different from other machine learning models among the N machine learning models; The information processing device, wherein the processor is configured to perform class classification processing of the classified data using the N machine learning models.
9. A computer program that causes a processor to execute a class classification process for classified data using a machine learning model, When N is an integer equal to or greater than 2, the machine learning models include N machine learning models, each of which is configured to classify input data commonly input to the N machine learning models into one of a plurality of classes, and is configured to have at least one class different from other machine learning models among the N machine learning models; The computer program comprises: A computer program that causes the processor to execute a process of performing a class classification process on the classified data using the N machine learning models.
Citation Information
Patent Citations
Measurement instrument and measurement method
JP2015172570A
Classification method for unknown compound using machine learning
JP2019039773A
Information processing method, information processor, and program
JP2019204321A
Sewage treatment operation status evaluation device and sewage treatment operation status evaluation method
JP2020032394A
Learning device, detection device, learning method, learning program, detection method, and detection program
JP2020064253A
