WO2024034451A1 - 学習済みモデルの生成方法、判定装置、判定方法、及びプログラム - Google Patents
学習済みモデルの生成方法、判定装置、判定方法、及びプログラム Download PDFInfo
- Publication number
- WO2024034451A1 WO2024034451A1 PCT/JP2023/027975 JP2023027975W WO2024034451A1 WO 2024034451 A1 WO2024034451 A1 WO 2024034451A1 JP 2023027975 W JP2023027975 W JP 2023027975W WO 2024034451 A1 WO2024034451 A1 WO 2024034451A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- negative
- error
- data
- positive
- determination
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
- G06N20/10—Machine learning using kernel methods, e.g. support vector machines [SVM]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
Definitions
- the present disclosure relates to a learned model generation method, determination device, determination method, and program.
- Patent Document 1 discloses that a plurality of object images are used as learning data, and the average, variance, and height of a distribution approximated by a specific distribution are calculated for each unit pixel so that the error between input and output is small.
- a technique is disclosed for training a variational autoencoder to output an order statistic.
- a trained model for binary classification may be used for testing to determine pass/fail of a product.
- binary classification not only true positives (TP) and true negatives (TN), but also false positives (FP) and false negatives (FN) can occur (see Figure 2). ).
- False positive is classifying something that is negative (fail) as positive (pass).
- False positive rate is expressed as FP/(FP+TN).
- a false negative is the classification of something that is positive (pass) as negative (fail).
- False Negative Rate is expressed as FN/(FN+TP).
- FNR false negative rate
- the present disclosure has been made in view of the above problems.
- the main purpose of the present disclosure is to provide a trained model generation method, determination device, determination method, and program that can reduce at least one of a false positive rate and a false negative rate to a predetermined value or less.
- a method for generating a trained model is a method for generating a trained model for binary classification, in which the error and learning when the training data is positive is positive is At least one of the weighting parameter that weights one error more than the other error in the loss function that adds up the errors when the data for which the data is negative, and the determination threshold for determining whether the data is positive or negative are set to Hyper.
- Set as a parameter perform machine learning on the learning model to output the probability that the learning data is positive or negative using the loss function, and make sure that at least one of the false positive rate and false negative rate is below a predetermined value. Then, the hyperparameter search is performed. According to this, it is possible to reduce at least one of the false positive rate and the false negative rate to a predetermined value or less.
- the loss function may include a corrected probability in which the probability output by the trained model is corrected by the determination threshold. According to this, it is possible to obtain a threshold value suitable for classification.
- the generation of the trained model includes a learning step in which the judgment threshold is provisionally set and a learning model is trained using the loss function determined by the judgment threshold, and a false positive is detected from the classification result of the learning model.
- the weighting parameter is set to weight an error when the learning data is negative in the loss function more than an error when the learning data is positive, and the determination threshold is set as a predetermined fixed value.
- the weighting parameter may be searched until the false positive rate becomes equal to or less than a predetermined value. According to this, it is possible to generate a trained model that guarantees that the false positive rate is below a predetermined value.
- a common determination threshold can be used even when a plurality of trained models are generated, and management can be simplified.
- the determination threshold to a fixed value, there is no need to search for the determination threshold.
- the weighting in the search for the weighting parameter, may be increased each time the weighting parameter is updated. According to this, by increasing the weighting each time an update is made, it is possible to quickly search for a weighting parameter whose false positive rate is equal to or less than a predetermined value.
- a plurality of the weighting parameters may be prepared, machine learning of the learning model may be performed in parallel for the plurality of weighting parameters, and a trained model having the false positive rate below a predetermined value may be extracted. According to this, by performing machine learning on a learning model in parallel for a plurality of weighting parameters, it is possible to reduce the number of searches.
- the trained model may output a determination result of pass/fail of a product included in the image data. According to this, it is possible to determine whether a product is acceptable or not so that at least one of the false positive rate and the false negative rate is below a predetermined value.
- a determination device includes an acquisition unit that acquires determination data, and a loss function that adds an error when the learning data is positive and an error when the learning data is negative. At least one of a weighting parameter that weights one error more than the other error and a determination threshold for determining whether the error is positive or negative is set as a hyperparameter, and the learning data is calculated using the loss function.
- a trained model that is generated by performing machine learning on a learning model to output a positive or negative probability, and searching for the hyperparameters so that at least one of the false positive rate and false negative rate is below a predetermined value.
- a determination unit that determines whether the determination data is positive or negative using the determination data. According to this, it is possible to reduce at least one of the false positive rate and the false negative rate to a predetermined value or less.
- the loss function includes a corrected probability in which the probability output by the learned model is corrected by the determination threshold, and the determination unit is configured to determine whether the determination data output from the trained model is corrected by the determination threshold.
- the probability of being positive or negative may be compared to the threshold. According to this, it is possible to obtain a threshold value suitable for determination.
- the learned model may output a judgment result of pass/fail of the product included in the image data. According to this, it is possible to determine whether a product is acceptable or not so that at least one of the false positive rate and the false negative rate is below a predetermined value.
- determination data is acquired, and one of the errors in a loss function is obtained by adding an error when the learning data is positive and an error when the learning data is negative.
- At least one of a weighting parameter that weights one error more than another error and a determination threshold for determining whether the error is positive or negative is set as a hyperparameter, and the loss function is used to determine whether the learning data is positive or negative.
- Machine learning of the learning model is performed to output a probability of , it is determined whether the determination data is positive or negative. According to this, it is possible to reduce at least one of the false positive rate and the false negative rate to a predetermined value or less.
- a program includes obtaining determination data, and one part of a loss function that adds an error when the learning data is positive and an error when the learning data is negative.
- At least one of a weighting parameter that weights one error more than the other error and a determination threshold for determining whether the error is positive or negative is set as a hyperparameter, and the loss function is used to determine whether the learning data is positive or negative.
- the present disclosure it is possible to reduce either the false positive rate or the false negative rate to a predetermined value or less.
- FIG. 1 is a diagram showing a configuration example of a determination system.
- FIG. 3 is a diagram for explaining binary classification. It is a figure for explaining an ROC curve.
- FIG. 3 is a diagram illustrating a procedure example of a method for generating a trained model.
- FIG. 3 is a diagram for explaining a loss function.
- FIG. 3 is a diagram for explaining a determination method. It is a figure which shows the example of a procedure of a determination method.
- FIG. 3 is a diagram for explaining an example of a determination result.
- FIG. 3 is a diagram illustrating a procedure example of a method for generating a trained model.
- FIG. 3 is a diagram for explaining a search for weighting parameters. It is a figure which shows the example of a procedure of a determination method.
- FIG. 1 is a block diagram showing an example of the configuration of the determination system 10. As shown in FIG.
- the determination system 10 includes a determination device 1, a storage section 2, a camera 3, and a display section 4.
- the determination system 10 is an appearance inspection system in which the determination device 1 determines whether a product imaged by the camera 3 is acceptable or not.
- the determination device 1 is a computer including a CPU, RAM, ROM, nonvolatile memory, input/output interface, and the like.
- the CPU of the determination device 1 executes information processing according to a program loaded into the RAM from the ROM or nonvolatile memory.
- the program may be supplied via an information storage medium such as an optical disk or a memory card, or may be supplied via a communication network such as the Internet or LAN.
- the storage unit 2 is a storage device such as an HDD or an SDD.
- the storage unit 2 stores learned models, threshold values, and the like used for determination by the determination device 1.
- the learned model and threshold are generated in the learning phase described below.
- the camera 3 is a digital camera that images the product and generates image data.
- the camera 3 outputs the generated image data to the determination device 1.
- the display unit 4 is a display device such as a liquid crystal display.
- the display unit 4 outputs the determination result by the determination device 1 on a screen.
- the determination device 1 includes an acquisition section 11 and a determination section 12. These functional units are realized by the CPU of the determination device 1 executing information processing according to a program loaded into the RAM from the ROM or nonvolatile memory.
- the acquisition unit 11 acquires determination data. Specifically, the acquisition unit 11 acquires image data generated by the camera 3.
- the image data is an example of determination data and includes a product to be determined.
- the determination unit 12 determines whether the determination data is positive or negative using the learned model. Specifically, the determination unit 12 uses the trained model and threshold value stored in the storage unit 2 to determine whether the product included in the image data is acceptable. Details of the determination will be described later.
- the trained model is a trained model for binary classification.
- the trained model is, for example, an image discrimination model such as a convolutional neural network (CNN).
- CNN convolutional neural network
- a deep neural network in which neurons are combined in multiple stages is suitable for the neural network.
- the trained model When the trained model receives image data as judgment data, it outputs a judgment result of pass/fail of the product included in the image data. For example, a sigmoid function is used as the output element of the learned model, and a value between 0 and 1 representing the probability of acceptance of the product is output.
- a failing product may be judged as passing (false positive, i.e., FP), or an acceptable product may be judged as failing (false negative, i.e., FN) (see Figure 2). ).
- FPR false positive rate
- FPR false negative rate
- the present embodiment aims to suppress the false positive rate (FPR) to a predetermined value a1 or less from the viewpoint of quality assurance, and at the same time suppress the false negative rate (FNR) as much as possible.
- the recall rate (TPR) may not be sufficient in the range of FPR ⁇ a 1 , so in this embodiment, FPR ⁇ a 1
- the purpose is to improve the recall rate (TPR) as much as possible within the range of , that is, to suppress the false negative rate (FNR) as much as possible.
- FIG. 4 is a flow diagram illustrating a procedure example of a method for generating a trained model. Each step shown in the figure is realized by information processing by a computer.
- the TNR tends to increase. Therefore, in this embodiment, in order to preferentially improve the TPR, that is, to suppress the FNR preferentially, the error when the learning data is passed (positive) is compared to the error when the learning data is failed (negative).
- the model is trained using a loss function that is weighted more than the error at a certain time.
- the probability of passing (positive) or failing (negative) is set in the loss function according to the relationship with a given threshold value ⁇ .
- the corrected probability is included.
- the threshold value ⁇ is a threshold value for determining failure (negative)
- threshold value 1 ⁇ is a threshold value for determining pass (positive)
- the learning data is divided into model parameter learning data and tuning data (S11).
- the learning data is a data set in which learning images are associated with pass/fail labels.
- the learning data may further include verification data for verifying the accuracy of the model.
- verification data for verifying the accuracy of the model.
- 80% may be model parameter learning data
- 10% may be tuning data
- 10% may be verification data (overfitting evaluation data).
- the threshold value ⁇ model is temporarily set to a certain value (S12).
- the threshold value ⁇ model may be determined, for example, as a positive constant times a value based on a weighting coefficient in the loss function, as described later.
- a learning step is performed using the model parameter learning data (S13).
- the model is trained using a loss function determined by the temporarily set threshold value ⁇ model .
- a loss function is calculated from the pass/fail probability obtained by inputting the training image into the model and the pass/fail label associated with the training image, and the model parameters are set to minimize the loss function. This is done by updating.
- an adjustment step is executed using the tuning data (S14).
- an adjustment threshold ⁇ tune that satisfies FPR ⁇ a 1 is determined from the determination result of the model.
- the determination result of the model is the probability of pass/fail obtained by inputting the learning image of the tuning data into the model. Based on the obtained pass/fail probability and the pass/fail label associated with the learning image, the boundary of the probability that FPR ⁇ a 1 can be determined as the adjustment threshold ⁇ tune .
- the threshold ⁇ model is a hyperparameter and cannot be searched using a loss function
- the threshold ⁇ model is updated using, for example, a dichotomy method. Specifically, ( ⁇ model + ⁇ tune )/2 is used as the new threshold value ⁇ model .
- ⁇ model + ⁇ tune a dichotomy method.
- the learning step (S13) and the adjustment step (S14) are repeated until the difference between the threshold value ⁇ model and the adjustment threshold value ⁇ tune becomes equal to or less than the predetermined value c. That is, the process is repeated until the threshold value ⁇ model approaches the adjustment threshold value ⁇ tune within an appropriate range.
- this embodiment uses a loss function that can weight the error when the learning data is passed (positive) more than the error when the learning data is failed (negative).
- a loss function that can weight the error when the learning data is passed (positive) more than the error when the learning data is failed (negative).
- BCE Binary Cross Entropy
- Logistic Loss which allows such weighting
- p is a weighting coefficient, and by selecting a value larger than 1, the first term can be weighted. Note that if a value smaller than 1 is selected for p, the second term will be weighted. Since p is a hyperparameter and cannot be searched using this loss function, it may be set to an appropriate value that satisfies the conditions described below.
- x is the output value of the model, and ⁇ (x) is the probability of predicting passing (correct).
- the first term in the square brackets of Equation 1 represents the error when the learning data is passed (positive), and the second term represents the error when the learning data is failed (negative).
- the weighting coefficient p is included in the first term.
- This loss function is configured so that the loss increases as the model's prediction differs from the correct answer in the class (that is, FP or FN), and when p is a value larger than 1, the loss increases as the predicted class is FN. .
- ⁇ n ( ⁇ ) is a corrected probability obtained by correcting ⁇ 0 according to the relationship with the threshold value ⁇ .
- ⁇ n ( ⁇ ) is discontinuous before and after the threshold value 1 ⁇ .
- Equation 5 the condition for the weighting coefficient p such that the loss function monotonically decreases is expressed by Equation 5.
- FIG. 6 is a diagram for explaining the determination method.
- FIG. 7 is a flow diagram showing an example of the procedure of the determination method.
- FIG. 8 is a diagram for explaining an example of the determination result.
- the determination device 1 functions as an acquisition unit 11 and a determination unit 12 by executing the information processing shown in FIG. 6 according to a program.
- the determination device 1 acquires image data captured by the camera 3 (S21, function as the acquisition unit 11).
- the determination device 1 determines whether the product included in the image data is OK (passed) using the learned model and threshold value ⁇ generated in the learning phase and stored in the storage unit 2 (see FIG. 1). It is determined whether the result is NG (fail) (S22-S26, function as the determination unit 12).
- the determination device 1 inputs the image data into the learned model and calculates the OK probability p2 that the product is OK (passed) (S22).
- the output element of the trained model is composed of a sigmoid function, and the OK probability p2 is output as a value of 0 or more and 1 or less.
- the determination device 1 calculates the NG probability p 1 that the product is NG (rejected) from the OK probability p 2 (S23).
- the NG probability p 1 is expressed as 1-p 2 .
- the OK probability p 2 or the NG probability p 1 is an example of the result of determining whether the product included in the image data is acceptable.
- the determination device 1 compares the NG probability p 1 with the threshold value ⁇ , and makes a determination based on the magnitude relationship between the NG probability p 1 and the threshold value ⁇ (S24).
- the determination device 1 determines that the product is NG (rejected) (S25).
- the determination device 1 determines that the product is OK (passed) (S26).
- images A and D for which the NG probability p 1 is 5% or more are determined to be NG (fail), and the NG probability p 1 is less than 5%.
- Images B and C are determined to be OK (pass).
- the purpose is to suppress the false positive rate (FPR) to a predetermined value a1 or less while also suppressing the false negative rate (FNR).
- the purpose may be to suppress the false positive rate (FPR) while suppressing the predetermined value b to 1 or less.
- TPR tends to increase. Therefore, in this modification, in order to preferentially improve the TNR, that is, to preferentially suppress the FPR, the error when the learning data is a fail (negative) is replaced by the error when the learning data is a pass (positive). ), the model is trained using a loss function that is weighted more than the error when .
- the weighting coefficient p is included not in the first term but in the second term in square brackets that represents the error when the training data is failed (negative). .
- the model is trained using such a loss function.
- an adjustment threshold ⁇ tune that satisfies FNR ⁇ b 1 is determined from the model determination result.
- image data is used as the determination data, but the present invention is not limited to this, and various types of data can be used as the determination data.
- the NG probability p 1 is calculated and compared with the threshold ⁇ for determining NG (fail), but the present invention is not limited to this. ) may be compared with a threshold value 1- ⁇ for determining.
- a loss function in which the error when the training data is passed (positive) is weighted more than the error when the training data is failed (negative) is used to develop the model so that the FNR is below a predetermined value. You can also study.
- FIG. 9 is a flow diagram illustrating a procedure example of a method for generating a trained model according to the second embodiment. Each step shown in the figure is realized by information processing by a computer.
- a weighting parameter r is set as a hyperparameter that weights the error when the training data is rejected (negative) more than the error when the training data is passed (positive) in the loss function.
- the determination threshold ⁇ is set as a predetermined fixed value. Then, machine learning is performed on the learning model using the loss function, and a search for the weighting parameter r is performed until the FPR becomes equal to or less than the predetermined value ⁇ .
- the learning data is divided into model learning data, tuning data, and test data (S31).
- the learning data is a data set in which learning images are associated with pass/fail labels.
- 80% may be model learning data
- 10% may be tuning data
- 10% may be test data (overfitting evaluation data).
- the weighting parameter r is set to a certain value r0 (S32). r 0 is a value greater than 1.
- model parameters are learned using the model learning data (S33). Specifically, learning is performed based on a loss function that includes a weighting parameter r that weights the error when the training data is failed (negative) more than the error when the training data is passed (positive). , the learned parameter k r (hat is omitted in the main text) is obtained.
- the learned parameter k r is expressed by Equation 6 below.
- DT represents all learning data.
- r is a weighting parameter and has a value greater than 1.
- Y l is a pass/fail label of the learning data (1: pass, 0: fail).
- l 0 is the number of failed (negative) learning data
- l 1 is the number of passed (positive) learning data. Since it is difficult to prepare the passing learning data and the failing learning data equally, the weights l 0 and l 1 of the number of data are adopted for the purpose of suppressing the influence caused by the bias.
- This formula 6 is configured so that the weighting parameter r is set to be larger than 1, so that when the learning data fails and the prediction deviates, the loss becomes relatively large. Therefore, under this loss function, learning is performed to make the FPR as small as possible.
- Equation 7 the value of y for FPR confirmation is calculated from the determination result using the tuning data based on the model including the learned parameter k ro (S34). y is represented by Equation 7 below.
- FPR is the FPR calculated from the determination result of the model including the learned parameter k ro .
- ⁇ is a preset value, and is appropriately selected based on the level of FPR required for the model.
- a search for the weighting parameter r is performed.
- the search for the weighting parameter r is performed until the value of y can be approximately regarded as 0 (S35: YES), that is, until the FPR becomes equal to or less than a predetermined value.
- a method such as a straight line search method is used to search for the weighting parameter r.
- the value of y often oscillates due to fluctuations in data selection, etc., so multiple weighting parameters r are prepared and learning is performed on them in parallel.
- the weighting parameter r may be determined by comparing the values of y. In this case, it is expected that the number of search loops can be reduced.
- the weighting parameter r should be kept at the minimum value within the range that satisfies FPR ⁇ . , it is desirable to suppress the increase in FNR. This makes it possible to suppress FNR while ensuring that FPR ⁇ .
- the search ends.
- it is preferable to compare with a value smaller than that in S35 above. For example, when it is determined in S35 above whether the value of y is less than or equal to 0, it is determined in S38 whether or not the value of y is less than or equal to a value a that is slightly smaller than 0 (for example, a -0.01). is preferred.
- FIG. 11 is a diagram illustrating a procedure example of a determination method according to the second embodiment using a trained model generated by the trained model generation method according to the second embodiment.
- the determination device 1 executes the information processing shown in the figure according to a program.
- the determination device 1 acquires image data captured by the camera 3 (S41, function as the acquisition unit 11).
- the determination device 1 determines whether the product included in the image data is OK (pass) or NG (fail) using the learned model (S42-S45, the function as the determination unit 12 ).
- the determination device 1 inputs the image data into the learned model and calculates the OK probability p2 that the product is OK (passed) (S42).
- the output element of the trained model is composed of a sigmoid function, and the OK probability p2 is output as a value of 0 or more and 1 or less.
- the determination device 1 compares the OK probability p 2 with the determination threshold value ⁇ f and determines the OK probability p 2 based on the magnitude relationship of the determination threshold value ⁇ f (S43).
- the determination threshold value ⁇ f is a predetermined fixed value.
- the determination device 1 determines that the product is OK (passed) (S44).
- the determination device 1 determines that the product is NG (rejected) (S45).
- the judgment was made by comparing the OK probability p 2 and the judgment threshold ⁇ f , but the invention is not limited to this, and similarly to the first embodiment, the NG probability p 1 and the judgment threshold 1 - ⁇ f are compared. The determination may be made by comparison.
- a method for generating a trained model according to the present disclosure includes: A method for generating a trained model for binary classification, the method comprising: A weighting parameter that weights one error more than the other error in a loss function that adds the error when the training data is positive and the error when the training data is negative, and determines whether it is positive or negative.
- a weighting parameter that weights one error more than the other error in a loss function that adds the error when the training data is positive and the error when the training data is negative, and determines whether it is positive or negative.
- the loss function may include a corrected probability in which the probability output by the learning model is corrected by the determination threshold.
- Aspect 3 The method for generating the trained model of Aspect 2 is as follows: a learning step of provisionally setting the determination threshold and learning a learning model using the loss function determined by the determination threshold; an adjustment step of determining an adjustment determination threshold at which a false positive rate or a false negative rate is below a predetermined value from the classification results of the learning model; including; The learning step and the adjusting step may be repeated until the difference between the determination threshold and the adjustment determination threshold becomes a predetermined value or less.
- the method for generating a trained model according to any one of aspects 1 to 3 is as follows: setting the weighting parameter that weights an error when the learning data is negative in the loss function more than an error when the learning data is positive; setting the determination threshold as a predetermined fixed value; The weighting parameter may be searched until the false positive rate becomes equal to or less than a predetermined value.
- Aspect 6 The method for generating the trained model of Aspect 4 or Aspect 5 is as follows: Prepare a plurality of weighting parameters, Machine learning of the learning model is performed in parallel for a plurality of the weighting parameters, A trained model whose false positive rate is less than or equal to a predetermined value may be extracted.
- the determination device (1) includes: an acquisition unit (11) that acquires determination data; A weighting parameter that weights one error more than the other error in a loss function that adds the error when the training data is positive and the error when the training data is negative, and determines whether it is positive or negative. At least one of the judgment threshold and the judgment threshold for a determination unit (12) that determines whether the determination data is positive or negative using a trained model generated by searching the hyperparameters so that at least one of the false negative rates is less than or equal to a predetermined value; )and, Equipped with.
- the loss function includes a corrected probability in which the probability output by the learned model is corrected by the determination threshold,
- the determination unit may compare a probability that the determination data output from the trained model is positive or negative with the determination threshold.
- Aspect 10 In the determination device (1) of Aspect 8 or Aspect 9, when image data as the determination data is input, the trained model determines the pass/fail determination result of the product included in the image data. You can also output it.
- the determination method includes: Obtain judgment data, A weighting parameter that weights one error more than the other error in a loss function that adds the error when the training data is positive and the error when the training data is negative, and determines whether it is positive or negative. At least one of the judgment threshold and the judgment threshold for It is determined whether the determination data is positive or negative using a trained model generated by searching the hyperparameters so that at least one of the false negative rates is equal to or less than a predetermined value.
- the program according to the present disclosure includes: Obtaining data for determination, and a weighting parameter that weights one error more than the other error in a loss function that adds the error when the training data is positive and the error when the training data is negative. and a determination threshold for determining that the data is positive or negative are set as hyperparameters, and the learning model is configured to output the probability that the training data is positive or negative using the loss function.
- a trained model generated by performing machine learning and searching for the hyperparameters so that at least one of the false positive rate and the false negative rate is below a predetermined value it is determined whether the determination data is positive or negative. to determine whether have the computer execute it.
- 1 Judgment device 1 Judgment device, 2 Storage unit, 3 Camera, 4 Display unit, 10 Judgment system, 11 Acquisition unit, 12 Judgment unit
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- Medical Informatics (AREA)
- Computing Systems (AREA)
- Artificial Intelligence (AREA)
- General Health & Medical Sciences (AREA)
- Databases & Information Systems (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Image Analysis (AREA)
Abstract
Description
以下、本開示の第1実施形態について、図面を参照しながら説明する。
図1は、判定システム10の構成例を示すブロック図である。判定システム10は、判定装置1、記憶部2、カメラ3、及び表示部4を備えている。判定システム10は、カメラ3により撮像された製品の合否を判定装置1により判定する外観検査システムである。
学習済みモデルの生成方法を説明する前に、本実施形態の目的について説明する。
以下、機械学習による学習済みモデルの生成方法について説明する。図4は、学習済みモデルの生成方法の手順例を示すフロー図である。同図に示す各工程は、コンピュータによる情報処理によって実現される。
以下、学習ステップ(S13)に用いられる損失関数について説明する。
以下、判定システム10(図1参照)において実現される、学習フェーズで生成された学習済みモデル及び閾値θを用いた判定方法について説明する。図6は、判定方法を説明するための図である。図7は、判定方法の手順例を示すフロー図である。図8は、判定結果の例を説明するための図である。
上記第1実施形態では、偽陽性率(FPR)を所定値a1以下に抑えつつ偽陰性率(FNR)も抑えることを目的としたが、これとは反対に、偽陰性率(FNR)を所定値b1以下に抑えつつ偽陽性率(FPR)も抑えることを目的としてもよい。
以下、第2実施形態について説明する。図9は、第2実施形態に係る学習済みモデルの生成方法の手順例を示すフロー図である。同図に示す各工程は、コンピュータによる情報処理によって実現される。
以上の説明から明らかなように、本開示は、下記の態様を含む。以下では、実施形態との対応関係を明示するためだけに、符号を括弧付きで付している。
二値分類のための学習済みモデルの生成方法であって、
学習用データが正であるときの誤差と学習用データが負であるときの誤差を足し合わせた損失関数における一方の誤差を他方の誤差よりも重み付けする重み付けパラメータと、正又は負であると判定するための判定閾値と、の少なくとも一方をハイパーパラメータとして設定し、
前記損失関数を用いて学習用データが正又は負である確率を出力するように学習モデルの機械学習を行い、
偽陽性率及び偽陰性率の少なくとも一方が所定以下となるように前記ハイパーパラメータの探索を行う。
前記判定閾値を仮設定し、前記判定閾値により定まる前記損失関数を用いて学習モデルの学習を行う学習ステップと、
前記学習モデルの分類結果から偽陽性率又は偽陰性率が所定以下となる調整用判定閾値を求める調整ステップと、
を含み、
前記学習ステップと前記調整ステップは、前記判定閾値と前記調整用判定閾値の差が所定以下となるまで繰り返されてもよい。
前記損失関数において学習用データが負であるときの誤差を学習用データが正であるときの誤差よりも重み付けする前記重み付けパラメータを設定し、
前記判定閾値を所定の固定値として設定し、
前記偽陽性率が所定以下となるまで前記重み付けパラメータの探索を行ってもよい。
複数の前記重み付けパラメータを用意し、
複数の前記重み付けパラメータについて並列して学習モデルの機械学習を行い、
前記偽陽性率が所定以下となる学習済みモデルを抽出してもよい。
判定用データを取得する取得部(11)と、
学習用データが正であるときの誤差と学習用データが負であるときの誤差を足し合わせた損失関数における一方の誤差を他方の誤差よりも重み付けする重み付けパラメータと、正又は負であると判定するための判定閾値と、の少なくとも一方をハイパーパラメータとして設定し、前記損失関数を用いて学習用データが正又は負である確率を出力するように学習モデルの機械学習を行い、偽陽性率及び偽陰性率の少なくとも一方が所定以下となるように前記ハイパーパラメータの探索を行って生成された学習済みモデルを用いて、前記判定用データが正であるか負であるか判定する判定部(12)と、
を備える。
前記損失関数は、前記学習済みモデルが出力する前記確率が前記判定閾値によって補正された補正確率を含み、
前記判定部は、前記学習済みモデルから出力される、前記判定用データが正又は負である確率を、前記判定閾値と比較してもよい。
判定用データを取得し、
学習用データが正であるときの誤差と学習用データが負であるときの誤差を足し合わせた損失関数における一方の誤差を他方の誤差よりも重み付けする重み付けパラメータと、正又は負であると判定するための判定閾値と、の少なくとも一方をハイパーパラメータとして設定し、前記損失関数を用いて学習用データが正又は負である確率を出力するように学習モデルの機械学習を行い、偽陽性率及び偽陰性率の少なくとも一方が所定以下となるように前記ハイパーパラメータの探索を行って生成された学習済みモデルを用いて、前記判定用データが正であるか負であるか判定する。
判定用データを取得すること、及び
学習用データが正であるときの誤差と学習用データが負であるときの誤差を足し合わせた損失関数における一方の誤差を他方の誤差よりも重み付けする重み付けパラメータと、正又は負であると判定するための判定閾値と、の少なくとも一方をハイパーパラメータとして設定し、前記損失関数を用いて学習用データが正又は負である確率を出力するように学習モデルの機械学習を行い、偽陽性率及び偽陰性率の少なくとも一方が所定以下となるように前記ハイパーパラメータの探索を行って生成された学習済みモデルを用いて、前記判定用データが正であるか負であるか判定すること、
をコンピュータに実行させる。
本出願は、2022年8月8日に日本特許庁に出願された特願2022-126088号に対する優先権を主張し、その内容は参照によりその全体が本明細書に組み込まれる。本出願は、2022年11月15日に日本特許庁に出願された特願2022-182474号に対する優先権を主張し、その内容は参照によりその全体が本明細書に組み込まれる。
Claims (12)
- 二値分類のための学習済みモデルの生成方法であって、
学習用データが正であるときの誤差と学習用データが負であるときの誤差を足し合わせた損失関数における一方の誤差を他方の誤差よりも重み付けする重み付けパラメータと、正又は負であると判定するための判定閾値と、の少なくとも一方をハイパーパラメータとして設定し、
前記損失関数を用いて学習用データが正又は負である確率を出力するように学習モデルの機械学習を行い、
偽陽性率及び偽陰性率の少なくとも一方が所定以下となるように前記ハイパーパラメータの探索を行う、
学習済みモデルの生成方法。 - 前記損失関数は、前記学習モデルが出力する前記確率が前記判定閾値によって補正された補正確率を含む、
請求項1に記載の学習済みモデルの生成方法。 - 前記学習済みモデルの生成は、
前記判定閾値を仮設定し、前記判定閾値により定まる前記損失関数を用いて学習モデルの学習を行う学習ステップと、
前記学習モデルの分類結果から偽陽性率又は偽陰性率が所定以下となる調整用判定閾値を求める調整ステップと、
を含み、
前記学習ステップと前記調整ステップは、前記判定閾値と前記調整用判定閾値の差が所定以下となるまで繰り返される、
請求項2に記載の学習済みモデルの生成方法。 - 前記損失関数において学習用データが負であるときの誤差を学習用データが正であるときの誤差よりも重み付けする前記重み付けパラメータを設定し、
前記判定閾値を所定の固定値として設定し、
前記偽陽性率が所定以下となるまで前記重み付けパラメータの探索を行う、
請求項1に記載の学習済みモデルの生成方法。 - 前記重み付けパラメータの探索では、前記重み付けパラメータを更新する度に重み付けを大きくする、
請求項4に記載の学習済みモデルの生成方法。 - 複数の前記重み付けパラメータを用意し、
複数の前記重み付けパラメータについて並列して学習モデルの機械学習を行い、
前記偽陽性率が所定以下となる学習済みモデルを抽出する、
請求項4に記載の学習済みモデルの生成方法。 - 前記学習済みモデルは、画像データが入力されると、前記画像データに含まれる製品の合否の判定結果を出力する、
請求項1に記載の学習済みモデルの生成方法。 - 判定用データを取得する取得部と、
学習用データが正であるときの誤差と学習用データが負であるときの誤差を足し合わせた損失関数における一方の誤差を他方の誤差よりも重み付けする重み付けパラメータと、正又は負であると判定するための判定閾値と、の少なくとも一方をハイパーパラメータとして設定し、前記損失関数を用いて学習用データが正又は負である確率を出力するように学習モデルの機械学習を行い、偽陽性率及び偽陰性率の少なくとも一方が所定以下となるように前記ハイパーパラメータの探索を行って生成された学習済みモデルを用いて、前記判定用データが正であるか負であるか判定する判定部と、
を備える、判定装置。 - 前記損失関数は、前記学習済みモデルが出力する前記確率が前記判定閾値によって補正された補正確率を含み、
前記判定部は、前記学習済みモデルから出力される、前記判定用データが正又は負である確率を、前記判定閾値と比較する、
請求項8に記載の判定装置。 - 前記学習済みモデルは、前記判定用データとしての画像データが入力されると、前記画像データに含まれる製品の合否の判定結果を出力する、
請求項8に記載の判定装置。 - 判定用データを取得し、
学習用データが正であるときの誤差と学習用データが負であるときの誤差を足し合わせた損失関数における一方の誤差を他方の誤差よりも重み付けする重み付けパラメータと、正又は負であると判定するための判定閾値と、の少なくとも一方をハイパーパラメータとして設定し、前記損失関数を用いて学習用データが正又は負である確率を出力するように学習モデルの機械学習を行い、偽陽性率及び偽陰性率の少なくとも一方が所定以下となるように前記ハイパーパラメータの探索を行って生成された学習済みモデルを用いて、前記判定用データが正であるか負であるか判定する、
判定方法。 - 判定用データを取得すること、及び
学習用データが正であるときの誤差と学習用データが負であるときの誤差を足し合わせた損失関数における一方の誤差を他方の誤差よりも重み付けする重み付けパラメータと、正又は負であると判定するための判定閾値と、の少なくとも一方をハイパーパラメータとして設定し、前記損失関数を用いて学習用データが正又は負である確率を出力するように学習モデルの機械学習を行い、偽陽性率及び偽陰性率の少なくとも一方が所定以下となるように前記ハイパーパラメータの探索を行って生成された学習済みモデルを用いて、前記判定用データが正であるか負であるか判定すること、
をコンピュータに実行させるためのプログラム。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202380055017.4A CN119522446A (zh) | 2022-08-08 | 2023-07-31 | 学习完毕模型的生成方法、判定装置、判定方法以及程序 |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2022-126088 | 2022-08-08 | ||
| JP2022126088 | 2022-08-08 | ||
| JP2022182474A JP7731641B2 (ja) | 2022-08-08 | 2022-11-15 | 学習済みモデルの生成方法、判定装置、判定方法、及びプログラム |
| JP2022-182474 | 2022-11-15 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024034451A1 true WO2024034451A1 (ja) | 2024-02-15 |
Family
ID=89851636
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2023/027975 Ceased WO2024034451A1 (ja) | 2022-08-08 | 2023-07-31 | 学習済みモデルの生成方法、判定装置、判定方法、及びプログラム |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN119522446A (ja) |
| WO (1) | WO2024034451A1 (ja) |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8798378B1 (en) * | 2009-12-07 | 2014-08-05 | Google Inc. | Scene classification for place recognition |
| JP2021144314A (ja) * | 2020-03-10 | 2021-09-24 | 株式会社Screenホールディングス | 学習装置、画像検査装置、学習済みパラメータ、学習方法、および画像検査方法 |
-
2023
- 2023-07-31 WO PCT/JP2023/027975 patent/WO2024034451A1/ja not_active Ceased
- 2023-07-31 CN CN202380055017.4A patent/CN119522446A/zh active Pending
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8798378B1 (en) * | 2009-12-07 | 2014-08-05 | Google Inc. | Scene classification for place recognition |
| JP2021144314A (ja) * | 2020-03-10 | 2021-09-24 | 株式会社Screenホールディングス | 学習装置、画像検査装置、学習済みパラメータ、学習方法、および画像検査方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN119522446A (zh) | 2025-02-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11580456B2 (en) | System to correct model drift in machine learning application | |
| US9189750B1 (en) | Methods and systems for sequential feature selection based on significance testing | |
| US20220129758A1 (en) | Clustering autoencoder | |
| US12141238B2 (en) | Deep neural network hardener | |
| CN104539484B (zh) | 一种动态评估网络连接可信度的方法及系统 | |
| Haroush et al. | A statistical framework for efficient out of distribution detection in deep neural networks | |
| JP2021184139A (ja) | 管理計算機、管理プログラム、及び管理方法 | |
| CN110322055B (zh) | 一种提高数据风险模型评分稳定性的方法和系统 | |
| CN113899577A (zh) | 异常声音探测装置、异常声音生成装置及异常声音生成方法 | |
| JP7040619B2 (ja) | 学習装置、学習方法及び学習プログラム | |
| US20210326755A1 (en) | Learning model creation device, material property prediction device, and learning model creation method and program | |
| US10803403B2 (en) | Method for adaptive tuning via automated simulation and optimization | |
| CN108764290B (zh) | 模型异动的原因确定方法及装置和电子设备 | |
| US12585918B2 (en) | ML model drift detection using modified GAN | |
| Orriols-Puig et al. | Bounding XCS's parameters for unbalanced datasets | |
| JP2024023115A (ja) | 学習済みモデルの生成方法、判定装置、判定方法、及びプログラム | |
| Hwang et al. | T-cil: Temperature scaling using adversarial perturbation for calibration in class-incremental learning | |
| US20260141284A1 (en) | Trained model generation method, determination device, determination method, and program | |
| CN119522446A (zh) | 学习完毕模型的生成方法、判定装置、判定方法以及程序 | |
| US20220222546A1 (en) | Evaluating Supervised Learning Models Through Comparison of Actual and Predicted Model Outputs | |
| JP7495874B2 (ja) | プラント制御システム、プラント制御方法及びプログラム | |
| JP7668726B2 (ja) | シミュレーションモデルの推定方法及び推定装置 | |
| JP7535475B2 (ja) | プラント制御システム、プラント制御方法及びプログラム | |
| JP7687518B2 (ja) | 推定装置 | |
| Sulaiman et al. | Gflc: Graph-based fairness-aware label correction for fair classification |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 23852423 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18879315 Country of ref document: US |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 202380055017.4 Country of ref document: CN |
|
| WWP | Wipo information: published in national office |
Ref document number: 202380055017.4 Country of ref document: CN |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 23852423 Country of ref document: EP Kind code of ref document: A1 |




