CN117132806A - Model training method and device, storage medium and electronic equipment - Google Patents

Model training method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN117132806A
CN117132806A CN202310967730.8A CN202310967730A CN117132806A CN 117132806 A CN117132806 A CN 117132806A CN 202310967730 A CN202310967730 A CN 202310967730A CN 117132806 A CN117132806 A CN 117132806A
Authority
CN
China
Prior art keywords
model
machine learning
result
training
processing results
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.)
Pending
Application number
CN202310967730.8A
Other languages
Chinese (zh)
Inventor
石峰
曹泽红
周翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai United Imaging Intelligent Healthcare Co Ltd
Original Assignee
Shanghai United Imaging Intelligent Healthcare Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai United Imaging Intelligent Healthcare Co Ltd filed Critical Shanghai United Imaging Intelligent Healthcare Co Ltd
Priority to CN202310967730.8A priority Critical patent/CN117132806A/en
Publication of CN117132806A publication Critical patent/CN117132806A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/20Ensemble learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/70Labelling scene content, e.g. deriving syntactic or semantic representations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/03Recognition of patterns in medical or anatomical images
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)

Abstract

The specification discloses a model training method, a device, a storage medium and electronic equipment, firstly, a human body medical image to be predicted is obtained, the human body medical image to be predicted is input into a first model to be trained, and a first result of processing the human body medical image to be predicted, which is output by the first model, is obtained. The first result is then input into the reward model, resulting in a second result output by the reward model, wherein the second result is used to characterize the accuracy of the first model. And finally, carrying out fine tuning training on the first model by taking the value of the second result as a target to obtain a trained first model. According to the method, fine adjustment training is carried out on the first model through the rewarding model, so that the accuracy of the first model is improved.

Description

Model training method and device, storage medium and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and apparatus for model training, a storage medium, and an electronic device.
Background
With the development of technology, artificial intelligence technology is rapidly developed. Artificial intelligence is also widely used in the medical field. In general, a large amount of marked data can be used for training a model, and in the training process, the model can be predicted more accurately by minimizing the difference between the model predicted value and the mark.
Typically, the model may be trained using generic data to obtain a pre-trained model, and then the pre-trained model is fine-tuned using the data set in the actual scene to obtain a model suitable for the actual scene. However, when the difference between the data set in the actual scene and the original data set when the model is pre-trained is large, the trained model suitable for the actual scene has poor performance.
Based on this, the present specification provides a training method of a model.
Disclosure of Invention
The present disclosure provides a method, apparatus, storage medium and electronic device for training a model, so as to at least partially solve the foregoing problems in the prior art.
The technical scheme adopted in the specification is as follows:
the specification provides a training method of a model, the method comprising:
acquiring a human medical image to be predicted;
inputting the human medical image to be predicted into a pre-trained first model to obtain a first result which is output by the first model and is used for processing the human medical image to be predicted;
inputting the first result into a reward model to obtain a second result output by the reward model; wherein the second result is used to characterize the accuracy of the first model;
And performing fine tuning training on the first model by taking the value of the second result as a target to obtain a trained first model.
Optionally, aiming at improving the value of the second result, performing fine tuning training on the first model, which specifically includes:
determining a class activation map when the first model outputs a first result;
and aiming at improving the value of the second result, and carrying out fine tuning training on the first model by taking constraint that the variation of the class activation map when the first model outputs the first result does not exceed a preset threshold.
Optionally, the reward model is trained using the following method:
acquiring a plurality of machine learning models and sample human medical images; wherein the plurality of machine learning models differ in accuracy;
respectively inputting the sample human medical images into the plurality of machine learning models to obtain processing results output by the plurality of machine learning models;
determining the accuracy labels of the obtained processing results according to the accuracy of the machine learning models;
and taking the processing results and the sample human medical images as training samples, and training the reward model to be trained according to the training samples and the accuracy labels of the training samples to obtain a trained reward model.
Optionally, the sample human body medical images are respectively input into the plurality of machine learning models to obtain processing results output by the plurality of machine learning models, which specifically includes:
respectively inputting the sample human body medical images into the plurality of machine learning models to obtain processing results of processing the sample human body medical images and confidence degrees of the processing results, which are output by the plurality of machine learning models;
taking the processing results and the sample human body medical image as training samples, wherein the training samples specifically comprise:
and taking the processing results, the confidence coefficient of the processing results and the sample human medical image as training samples.
Optionally, obtaining processing results output by the plurality of machine learning models specifically includes:
obtaining the processing results output by the machine learning models and the confidence of the processing results;
determining the precision label of each obtained processing result, which specifically comprises the following steps:
determining the precision weights of the plurality of machine learning models according to the precision of the plurality of machine learning models;
and weighting the confidence coefficient of each processing result according to the determined precision weights to obtain the precision label of each processing result.
Optionally, the precision weight at least includes: a first weight and a second weight;
weighting the confidence degrees of the processing results respectively to obtain the precision labels of the processing results, wherein the method specifically comprises the following steps:
for each machine learning model, weighting the confidence coefficient of the processing result output by the machine learning model according to the first weight of the machine learning model to obtain a first numerical value of the machine learning model, and weighting the confidence coefficient of the processing result output by the machine learning model according to the second weight of the machine learning model to obtain a second numerical value of the machine learning model;
and determining the precision label of the processing result of the machine learning model according to the obtained first numerical value and second numerical value of the machine learning model.
Optionally, determining the accuracy of the plurality of machine learning models specifically includes:
determining, for each machine learning model, an acquisition manner of labels when training the machine learning model;
and determining the precision of the plurality of machine learning models according to the determined obtaining mode of the labels of the plurality of machine learning models.
Optionally, the obtaining manner of the label at least includes:
Marking the standard processing result of the human medical image;
labeling the processing results of the human medical images by users of different categories;
the first model is obtained by training with standard processing results of human medical images as labels.
The present specification provides a training device of a model, comprising:
the acquisition module is used for acquiring medical images of the human body to be predicted;
the first input module is used for inputting the human body medical image to be predicted into a pre-trained first model to obtain a first result which is output by the first model and is used for processing the human body medical image to be predicted;
the second input module is used for inputting the first result into a reward model to obtain a second result output by the reward model; wherein the second result is used to characterize the accuracy of the first model;
and the training module is used for carrying out fine-tuning training on the first model by taking the value of the second result as a target to obtain a trained first model.
Optionally, the training module is specifically configured to determine a class activation map when the first model outputs a first result; and aiming at improving the value of the second result, and carrying out fine tuning training on the first model by taking constraint that the variation of the class activation map when the first model outputs the first result does not exceed a preset threshold.
Optionally, the reward model is trained using the following method:
the training module is specifically used for acquiring a plurality of machine learning models and sample human medical images; wherein the plurality of machine learning models differ in accuracy; respectively inputting the sample human medical images into the plurality of machine learning models to obtain processing results output by the plurality of machine learning models; determining the accuracy labels of the obtained processing results according to the accuracy of the machine learning models; and taking the processing results and the sample human medical images as training samples, and training the reward model to be trained according to the training samples and the accuracy labels of the training samples to obtain a trained reward model.
Optionally, the training module is specifically configured to input the sample human body medical images into the plurality of machine learning models respectively, so as to obtain processing results of processing the sample human body medical images and confidence degrees of the processing results, which are output by the plurality of machine learning models; taking the processing results and the sample human body medical image as training samples, wherein the training samples specifically comprise: and taking the processing results, the confidence coefficient of the processing results and the sample human medical image as training samples.
Optionally, the training module is specifically configured to obtain processing results output by the multiple machine learning models and confidence degrees of the processing results;
the training module is specifically configured to determine accuracy weights of the plurality of machine learning models according to the accuracy of the plurality of machine learning models; and weighting the confidence coefficient of each processing result according to the determined precision weights to obtain the precision label of each processing result.
Optionally, the precision weight at least includes: a first weight and a second weight;
the training module is specifically configured to weight, for each machine learning model, the confidence coefficient of the processing result output by the machine learning model according to a first weight of the machine learning model to obtain a first numerical value of the machine learning model, and weight the confidence coefficient of the processing result output by the machine learning model according to a second weight of the machine learning model to obtain a second numerical value of the machine learning model; and determining the precision label of the processing result of the machine learning model according to the obtained first numerical value and second numerical value of the machine learning model.
Optionally, the training module is specifically configured to determine, for each machine learning model, an obtaining manner of a label when the machine learning model is trained; and determining the precision of the plurality of machine learning models according to the determined obtaining mode of the labels of the plurality of machine learning models.
Optionally, the obtaining manner of the label at least includes: marking the standard processing result of the human medical image; labeling the processing results of the human medical images by users of different categories; the first model is obtained by training with standard processing results of human medical images as labels.
The present specification provides a computer readable storage medium storing a computer program which when executed by a processor implements the training method of the above model.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a training method for the above model when executing the program.
The above-mentioned at least one technical scheme that this specification adopted can reach following beneficial effect:
in the training method of the model provided in the specification, it can be seen that a human body medical image to be predicted is acquired, the human body medical image to be predicted is input into a first model to be trained, and a first result of processing the human body medical image to be predicted, which is output by the first model, is obtained. And then inputting the first result into the rewarding model to obtain a second result output by the rewarding model, wherein the second result is used for representing the accuracy of the first model, and performing fine tuning training on the first model with the aim of improving the value of the second result to obtain the trained first model. According to the method, fine adjustment training is carried out on the first model through the reward model, so that the accuracy of the trained first model is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification, illustrate and explain the exemplary embodiments of the present specification and their description, are not intended to limit the specification unduly. Attached at
In the figure:
FIG. 1 is a schematic flow chart of a training method of a model in the present specification;
FIG. 2 is a schematic diagram of a training device for a model provided in the present specification;
fig. 3 is a schematic view of the electronic device corresponding to fig. 1 provided in the present specification.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the present specification more apparent, the technical solutions of the present specification will be clearly and completely described below with reference to specific embodiments of the present specification and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present specification. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are intended to be within the scope of the present disclosure.
The following describes in detail the technical solutions provided by the embodiments of the present specification with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a training method of a model provided in the present specification, which specifically includes the following steps:
S100: and acquiring a medical image of the human body to be predicted.
S102: inputting the human medical image to be predicted into a pre-trained first model to obtain a first result which is output by the first model and is used for processing the human medical image to be predicted.
In general, a machine learning model may be trained by using a large amount of labeled data, that is, sample data and labels corresponding to the sample data, and in the training process, a deviation between a predicted value of the machine learning model and the labels may be minimized, so that the model may more accurately predict. However, for machine learning models that perform the same task, different criteria may be generated for determining the labeling of the sample data, as some social factors (e.g., age, gender, etc. of the user using the machine learning model), natural environmental factors (e.g., geographic location of the region in which the sample data set that trains the machine learning model is located, climate, etc.), and hardware device factors that run the machine learning model may vary. For example, in the medical field, the machine learning model may be an image processing model for processing human medical images (such as CT images and MRI images), and due to different geographic locations, different doctors, different medical resources, different ages of patients and the like, different hospitals have different criteria and/or insights on the criteria of medical image processing, and then the labels corresponding to the sample data are different, for example: the classification result of a certain 50 images by one hospital in asia is: 30 sheets are 1, 20 sheets are 0, and the classification result of the 50 images in one hospital in africa is: since 40 sheets are 1 and 10 sheets are 0, fine tuning training of the machine learning model is a difficult problem in some scenarios or on some new sample data sets.
Based on the above, the present disclosure provides a model training method, which uses a reward model to guide the learning direction, learning behavior and learning result of the original machine learning model, so that the machine learning model can output the optimal processing result in the current scene.
The execution body for executing the technical scheme of the specification can be any computing device (such as a server, a terminal and the like) with computing capability.
The computing device may acquire a biomedical image to be predicted, and input the biomedical image to be predicted into a pre-trained first model to obtain a first result of processing the biomedical image to be predicted, which is output by the first model. In one or more embodiments of the present disclosure, the first model may be a benign and malignant lung nodule classification model, the biomedical image to be predicted may be a CT image, and the description of the present disclosure will be made taking the first model as a benign and malignant lung nodule classification model and the biomedical image to be predicted may be a CT image as an example.
The computing device may input the CT image to be predicted into the lung nodule benign and malignant classification model to obtain a classification result, i.e., a first result, output by the lung nodule benign and malignant classification model, which is yes or no.
The first model, that is, the benign and malignant lung nodule classification model, may be a pre-trained model or an untrained model.
S104: inputting the first result into a reward model to obtain a second result output by the reward model; wherein the second result is used to characterize the accuracy of the first model.
S106: and performing fine tuning training on the first model by taking the value of the second result as a target to obtain a trained first model.
Further, the computing device may input a first result into the reward model, i.e., a classification result output by the lung nodule benign and malignant classification model into the reward model, and may obtain a second result output by the reward model, the second result being used to characterize the accuracy of the first model. The computing device may fine tune the classification model of benign and malignant lung nodules with the goal of increasing the value of the second result to obtain a trained classification model of benign and malignant lung nodules.
Since the second result output by the reward model characterizes the accuracy of the first model, or the second result output by the reward model determines the optimization direction of the first model, when the first model is subjected to fine tuning training, the higher the second result output by the reward model is expected to be, but at the same time, the higher the second result output by the reward model is, the more the prediction result is expected to be, the more the KL divergence between the CAM diagram generated when the initial first model (i.e. the first model when the fine tuning training is not performed) outputs the prediction result and the CAM diagram of the first model after the fine tuning training is ensured to be within a certain threshold range, so that the first model after the fine tuning training cannot generate the prediction result which deviates more practically for obtaining higher reward points.
When the lung nodule benign and malignant classification model is trained, a class activation map when the lung nodule benign and malignant classification model outputs a classification result can be determined, and fine tuning training can be performed on the lung nodule benign and malignant classification model by taking the value of the second result as a target and taking the change amount of the class activation map when the lung nodule benign and malignant classification model outputs the classification result as a constraint, wherein the change amount of the class activation map does not exceed a preset threshold value. Specifically, the fine tuning training can be performed on the lung nodule benign and malignant classification model according to the KL divergence between the CAM graph generated when the lung nodule benign and malignant classification model outputs the classification result and the CAM graph generated when the fine tuning trained lung nodule benign and malignant classification model outputs the classification result and a preset KL divergence threshold.
In addition, in the present specification, there is also provided a training method of a bonus model, as follows:
first, the computing device may acquire a plurality of machine learning models and a sample human medical image, wherein the plurality of machine learning models differ in accuracy. And then, respectively inputting the sample human medical images into a plurality of machine learning models to obtain processing results output by the plurality of machine learning models, and determining the accuracy labels of the obtained processing results according to the accuracy of the plurality of machine learning models. And finally, taking each processing result and the sample human body medical image as a training sample, and training the reward model to be trained according to the training sample and the precision label of the training sample to obtain the reward model after training.
When the computing device obtains the processing results output by the machine learning models, the computing device can also obtain the processing results output by the machine learning models and the confidence degrees of the processing results, then the accuracy weights of the machine learning models can be determined according to the accuracy of the machine learning models, and the confidence degrees of the processing results are weighted according to the determined accuracy weights, so that the accuracy labels of the processing results are obtained.
And, when the sample human medical image is input into the plurality of machine learning models, the confidence of each processing result can be obtained in addition to the processing results of the sample human medical image output by the plurality of machine learning models, and the computing device can take each processing result, the confidence of each processing result and the sample human medical image as training samples. And training the reward model to be trained according to the training sample and the precision label of the training sample to obtain the reward model after training.
In addition, when determining the accuracy of the plurality of machine learning models, the method for obtaining the labels for training the machine learning models may be determined for each machine learning model, and the accuracy of the plurality of machine learning models may be determined based on the determined method for obtaining the labels of the plurality of machine learning models. The obtaining mode of the label at least comprises the following steps: the standard processing result of the human medical image is used as a label, the processing result of the human medical image by different types of users is used as a label, and the first model is trained by using the standard processing result of the human medical image as a label, wherein the standard processing result refers to the real processing result of the human medical image, the different types of users can be set based on different requirements, and in the specification, for the processing result of the human medical image, the different types of users can comprise: high annual capital doctor and low annual capital doctor.
In one or more embodiments of the present specification, the plurality of machine learning models are trained based on the same sample data, but the labels of the sample data corresponding to the plurality of machine learning models are obtained in different manners. Taking the example that the plurality of machine learning models are all lung nodule benign and malignant classification models, and assuming that the plurality of machine learning models are three: specifically, the sample medical image can be obtained and the label corresponding to the sample medical image can be determined, namely, the real and correct classification result corresponding to the sample medical image is used as a first label, and the lung nodule benign and malignant classification model A is trained according to the sample data and the first label. And, it may be determined that the classification of the sample data by different users, for example, a classification result of classifying the sample medical image by a doctor with relatively high annual resources is used as a second label, a second lung nodule benign and malignant classification model B is trained according to the sample medical image and the second label, a classification result of classifying the sample medical image by a doctor with relatively low annual resources is used as a third label, and a lung nodule benign and malignant classification model C is trained according to the sample medical image and the third label. Then, since the labels of the sample medical images corresponding to the three models are different, the accuracy of the obtained classification models a to C for benign and malignant lung nodules is different.
Wherein, the low annual capital doctor and the high annual capital doctor are relative concepts, and the height refers to the length of the practical years of the doctors. In comparison, doctors with long practical years have more abundant experiences and knowledge than doctors with short practical years, and the processing result of human medical images is more reliable. Then, when training the reward model, the lung nodule image may be acquired and respectively input into the lung nodule benign and malignant classification models a-C to obtain the prediction results output by the lung nodule benign and malignant classification models a-C, and an accuracy weight for weighting each prediction result may be set, where the accuracy weight may be acquired according to the manner of acquiring the label when training each lung nodule benign and malignant classification model, and in one or more embodiments of the present specification, the label may be benign or malignant, and may correspond to 0 and 1, respectively. In other words, in the present specification, the accuracy of the model is related to the manner in which the label is obtained, and for a model with high accuracy, the accuracy weight should be set high. How to characterize the association between accuracy and label acquisition is not particularly limited in this specification. For example: the credibility of the labels of different sources can be preset according to specific scene requirements, and then the accuracy of the model trained on the basis of the sample data and the labels corresponding to the sample data is determined according to the preset credibility of each label and the sources of each label.
Obviously, the reliability of the obtaining mode of the labels corresponding to the benign and malignant lung nodule classification models A-C obtained based on the method is lower and lower, so that the precision weights corresponding to the prediction results of the benign and malignant lung nodule classification models A-C can be correspondingly set, and the assumption precision weights are respectively: 0.6,0.3,0.1, and assuming that the prediction results of the lung nodule benign and malignant classification models A to C are respectively: 0.0 and 1, and the confidence degrees of the corresponding prediction results are respectively as follows: 0.7, 0.6, the accuracy label of the prediction result, i.e., the processing result, corresponding to the benign and malignant lung nodule classification model a may be 0.6x0.7=0.42, the accuracy label corresponding to the benign and malignant lung nodule classification model B may be 0.3x0.7=0.21, and the accuracy label corresponding to the benign and malignant lung nodule classification model C may be: 0.6×0.1=0.06.
And training a reward model according to the lung nodule image and the precision label to obtain a trained reward model, wherein the reward model can output a reward score under the condition of inputting the lung nodule image and the benign and malignant prediction result, the reward model can score the precision of the lung nodule benign and malignant classification model, the reward model is used for evaluating the precision of the lung nodule benign and malignant classification model, and the output result of the reward model is used for representing the precision of the lung nodule benign and malignant classification model.
Further, when the precision weight of each prediction result is set, standards of different dimensions can be set. The accuracy of the model trained by using the labels of different sources is different, and the reliability of the labels of different sources is different, for example, the reliability of a doctor with relatively high annual resources is higher than the reliability of a doctor with relatively low annual resources, but the accuracy is uncertain, so that the accuracy corresponding to the labels of different sources can be determined according to the difference between the labels of different sources and standard labels corresponding to standard processing results. In this specification, the precision weight includes at least: the method comprises the steps of a first weight and a second weight, wherein the first weight is used for representing the weight of a label obtaining mode of a model in an accuracy dimension, and the second weight is used for representing the weight of the label obtaining mode of the model in a reliability dimension. The computing device may further weight, for each machine learning model of the plurality of machine learning models, a confidence level of a processing result output by the machine learning model according to a first weight of the machine learning model to obtain a first value of the machine learning model, and weight, for each machine learning model of the plurality of machine learning models, a confidence level of a processing result output by the machine learning model according to a second weight of the machine learning model to obtain a second value of the machine learning model. And determining the accuracy label of the processing result of the machine learning model according to the obtained first numerical value and second numerical value of the machine learning model. Of course, the precision weight may be divided into weights of other dimensions, and the specification is not limited.
In one or more embodiments of the present disclosure, when setting the first weights (which may be accuracy weights) corresponding to the plurality of machine learning models, the standard processing result may be used as a gold standard, and the accuracy of the prediction results of the plurality of machine learning models may be determined according to the gold standard, specifically, the absolute value of the probability of the prediction result and the probability of the gold standard may be determined according to the probability that the plurality of machine learning models output the prediction result (i.e., the confidence level of the prediction result), and the first weight corresponding to the plurality of machine learning models may be determined according to the absolute value, where the first weight is inversely related to the absolute value, and the probability of the gold standard defaults to 1. When the second weights (which may be reliability weights) corresponding to the plurality of machine learning models are set, the second weights corresponding to the plurality of machine learning models may be determined according to a preset standard. In the above-described examples, since the lung nodule benign and malignant classification model a is obtained by training the standard processing results corresponding to the sample medical image as the labels, the lung nodule benign and malignant classification model B is obtained by training the processing results of the senior citizens as the labels, and the lung nodule benign and malignant classification model C is obtained by training the processing results of the senior citizens on the sample medical image as the labels, the accuracy weight can be set by determining the absolute value of the difference between the probability of the predicted result and the probability of the gold standard from the lung nodule benign and malignant classification models a to C, and determining the first weight corresponding to the lung nodule benign and malignant classification models a to C from the absolute value, and the absolute value can be ranked, and the higher the first weight setting of the model corresponding to the absolute value before the ranking, that is, the first weight is inversely related to the absolute value. For the reliability weight, the preset standard of the reliability weight can be that the standard processing result is the highest reliability of the lung nodule benign and malignant classification model A obtained through labeling training, the processing result of the senior citizen is the next highest reliability of the lung nodule benign and malignant classification model B obtained through labeling training, and the processing result of the senior citizen is the lowest reliability of the lung nodule benign and malignant classification model C obtained through labeling training.
The prediction results of the lung nodule benign and malignant classification models a to C are assumed to be: 0.0, 1, the standard processing result is 0, and the probabilities of the corresponding predicted results (i.e. the confidence of the predicted results) are respectively: 0.9, 0.8, 0.7, the absolute value of the difference between the probability of the predicted result corresponding to the lung nodule benign and malignant classification model a and the probability of the gold standard is: 1-0.9=0.1, and the absolute value corresponding to the benign and malignant lung nodule classification model B is: 1-0.8=0.2, since the standard processing result is 0, the probability when the processing result corresponding to the lung nodule benign and malignant classification model C is the standard processing result is determined, and the absolute value of the difference between the probability and the probability of the gold standard is: 1- (1-0.7) =0.7, the accuracy weights corresponding to the benign and malignant lung nodule classification models a to C can be further set as follows: 0.6, 0.3 and 0.1, the corresponding reliability weights are respectively: 0.7, 0.2, 0.1, the accuracy label of the prediction result, i.e., the processing result, corresponding to the benign and malignant lung nodule classification model a may be 0.6x0.9+0.7x0.9=1.17, the accuracy label corresponding to the benign and malignant lung nodule classification model B may be 0.3x0.8+0.2x0.8=0.40, and the accuracy label corresponding to the benign and malignant lung nodule classification model C may be: 0.1×0.7+0.1×0.1=0.08.
In the training method based on the model provided in the present specification and shown in fig. 1, the computing device may first obtain a biomedical image to be predicted, input the biomedical image to be predicted into a first model to be trained, and obtain a first result of processing the biomedical image to be predicted, which is output by the first model. And then inputting the first result into the rewarding model to obtain a second result output by the rewarding model, wherein the second result is used for representing the accuracy of the first model. And finally, carrying out fine tuning training on the first model by taking the value of the second result as a target to obtain a trained first model. According to the method, fine adjustment training is carried out on the first model through the reward model, so that the accuracy of the trained first model is improved.
Specifically, the feedback mechanism is integrated into the training process of the first model, the reliability of labels of different sources can be comprehensively evaluated in multiple directions through the rewarding model, and grade labels are given, so that the first model can learn the differences among labels of different sources to help the first model learn the differences among labels better, and the first model is optimally trained, so that the prediction performance of the first model is better. And the first model can be subjected to fine tuning training through the reward model according to the individual requirements of different hospitals, doctors and patients, and the method can be better suitable for the change of data in different application scenes. That is, when the label of the model training data needs to be changed, the accuracy of the existing model can be evaluated through the rewarding model, so that the existing model is optimized, namely, the model can be trained by directly using a new data set, the labels in the original data set are not required to be updated, and therefore the model training method is easier to be suitable for new scenes and development of a general model.
Furthermore, it is noted that in one or more embodiments of the present description, each of the human medical images includes, but is not limited to, an MRI image, a CT image, and the like. Moreover, the tasks corresponding to the first model and the machine learning model may be all types of classification tasks, including but not limited to lung nodule benign and malignant classification, bone classification, alzheimer disease classification, and the like, and the classification network corresponding to the model includes but is not limited to ResNet, denseNet, efficientNet, and the like. Acquisition of bonus points in the bonus model includes, but is not limited to, rule-based methods, learning-based methods, EOL-based ranking methods, and the like. Criteria for the reward model in evaluating accuracy of other machine learning models include, but are not limited to, the manner in which different labels are obtained, i.e., the source credibility of the different labels, F1score, and the response of the model in the case of false negative and false positive.
Based on the above-mentioned training method of the model, the embodiment of the present disclosure further provides a schematic diagram of a training device for the model, as shown in fig. 2.
Fig. 2 is a schematic diagram of a training device for models according to an embodiment of the present disclosure, where the device includes:
An acquisition module 200, configured to acquire a medical image of a human body to be predicted;
a first input module 202, configured to input the biomedical image to be predicted into a pre-trained first model, and obtain a first result of processing the biomedical image to be predicted, which is output by the first model;
a second input module 204, configured to input the first result into a reward model, and obtain a second result output by the reward model; wherein the second result is used to characterize the accuracy of the first model;
and the training module 206 is configured to perform fine-tuning training on the first model with the aim of improving the value of the second result, so as to obtain a trained first model.
Optionally, the training module 206 is specifically configured to determine a class activation map when the first model outputs the first result; and aiming at improving the value of the second result, and carrying out fine tuning training on the first model by taking constraint that the variation of the class activation map when the first model outputs the first result does not exceed a preset threshold.
Optionally, the reward model is trained using the following method:
the training module 206 is specifically configured to obtain a plurality of machine learning models and sample human medical images; wherein the plurality of machine learning models differ in accuracy; respectively inputting the sample human medical images into the plurality of machine learning models to obtain processing results output by the plurality of machine learning models; determining the accuracy labels of the obtained processing results according to the accuracy of the machine learning models; and taking the processing results and the sample human medical images as training samples, and training the reward model to be trained according to the training samples and the accuracy labels of the training samples to obtain a trained reward model.
Optionally, the training module 206 is specifically configured to input the sample biomedical images into the plurality of machine learning models respectively, so as to obtain processing results of processing the sample biomedical images and confidence degrees of the processing results, which are output by the plurality of machine learning models; taking the processing results and the sample human body medical image as training samples, wherein the training samples specifically comprise: and taking the processing results, the confidence coefficient of the processing results and the sample human medical image as training samples.
Optionally, the training module 206 is specifically configured to obtain the processing results output by the multiple machine learning models and the confidence level of the processing results;
the training module 206 is specifically configured to determine accuracy weights of the plurality of machine learning models according to the accuracy of the plurality of machine learning models; and weighting the confidence coefficient of each processing result according to the determined precision weights to obtain the precision label of each processing result.
Optionally, the precision weight at least includes: a first weight and a second weight;
the training module 206 is specifically configured to weight, for each machine learning model, the confidence coefficient of the processing result output by the machine learning model according to the first weight of the machine learning model to obtain a first numerical value of the machine learning model, and weight the confidence coefficient of the processing result output by the machine learning model according to the second weight of the machine learning model to obtain a second numerical value of the machine learning model; and determining the precision label of the processing result of the machine learning model according to the obtained first numerical value and second numerical value of the machine learning model.
Optionally, the training module 206 is specifically configured to determine, for each machine learning model, a manner of obtaining a label when training the machine learning model; and determining the precision of the plurality of machine learning models according to the determined obtaining mode of the labels of the plurality of machine learning models.
Optionally, the obtaining manner of the label at least includes: marking the standard processing result of the human medical image; labeling the processing results of the human medical images by users of different categories; the first model is obtained by training with standard processing results of human medical images as labels.
The embodiments of the present specification also provide a computer readable storage medium storing a computer program, where the computer program is configured to perform the training method of the model described above.
Based on the training method of the model described above, the embodiment of the present disclosure further provides a schematic structural diagram of the electronic device shown in fig. 3. At the hardware level, as in fig. 3, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile storage, although it may include hardware required for other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to realize the training method of the model.
Of course, other implementations, such as logic devices or combinations of hardware and software, are not excluded from the present description, that is, the execution subject of the following processing flows is not limited to each logic unit, but may be hardware or logic devices.
In the 90 s of the 20 th century, improvements to one technology could clearly be distinguished as improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software (improvements to the process flow). However, with the development of technology, many improvements of the current method flows can be regarded as direct improvements of hardware circuit structures. Designers almost always obtain corresponding hardware circuit structures by programming improved method flows into hardware circuits. Therefore, an improvement of a method flow cannot be said to be realized by a hardware entity module. For example, a programmable logic device (Programmable Logic Device, PLD) (e.g., field programmable gate array (Field Programmable Gate Array, FPGA)) is an integrated circuit whose logic function is determined by the programming of the device by a user. A designer programs to "integrate" a digital system onto a PLD without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, such programming is mostly implemented by using "logic compiler" software, which is similar to the software compiler used in program development and writing, and the original code before the compiling is also written in a specific programming language, which is called hardware description language (Hardware Description Language, HDL), but not just one of the hdds, but a plurality of kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), lava, lola, myHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are currently most commonly used. It will also be apparent to those skilled in the art that a hardware circuit implementing the logic method flow can be readily obtained by merely slightly programming the method flow into an integrated circuit using several of the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable logic controllers, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, atmel AT91SAM, microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic of the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller in a pure computer readable program code, it is well possible to implement the same functionality by logically programming the method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. Such a controller may thus be regarded as a kind of hardware component, and means for performing various functions included therein may also be regarded as structures within the hardware component. Or even means for achieving the various functions may be regarded as either software modules implementing the methods or structures within hardware components.
The system, apparatus, module or unit set forth in the above embodiments may be implemented in particular by a computer chip or entity, or by a product having a certain function. One typical implementation is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being functionally divided into various units, respectively. Of course, the functions of each element may be implemented in one or more software and/or hardware elements when implemented in the present specification.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises the element.
It will be appreciated by those skilled in the art that embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the present specification may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present description can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing is merely exemplary of the present disclosure and is not intended to limit the disclosure. Various modifications and alterations to this specification will become apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, or the like, which are within the spirit and principles of the present description, are intended to be included within the scope of the claims of the present application.

Claims (10)

1. A method of training a model, the method comprising:
acquiring a human medical image to be predicted;
inputting the human medical image to be predicted into a pre-trained first model to obtain a first result which is output by the first model and is used for processing the human medical image to be predicted;
inputting the first result into a reward model to obtain a second result output by the reward model; wherein the second result is used to characterize the accuracy of the first model;
And performing fine tuning training on the first model by taking the value of the second result as a target to obtain a trained first model.
2. The method of claim 1, wherein the fine-tuning training of the first model with the goal of increasing the value of the second result, in particular comprises:
determining a class activation map when the first model outputs a first result;
and aiming at improving the value of the second result, and carrying out fine tuning training on the first model by taking constraint that the variation of the class activation map when the first model outputs the first result does not exceed a preset threshold.
3. The method of claim 1, wherein the reward model is trained using the following method:
acquiring a plurality of machine learning models and sample human medical images; wherein the plurality of machine learning models differ in accuracy;
respectively inputting the sample human medical images into the plurality of machine learning models to obtain processing results output by the plurality of machine learning models;
determining the accuracy labels of the obtained processing results according to the accuracy of the machine learning models;
and taking the processing results and the sample human medical images as training samples, and training the reward model to be trained according to the training samples and the accuracy labels of the training samples to obtain a trained reward model.
4. The method of claim 3, wherein the step of inputting the sample human medical image into the plurality of machine learning models to obtain the processing results output by the plurality of machine learning models comprises:
respectively inputting the sample human body medical images into the plurality of machine learning models to obtain processing results of processing the sample human body medical images and confidence degrees of the processing results, which are output by the plurality of machine learning models;
taking the processing results and the sample human body medical image as training samples, wherein the training samples specifically comprise:
and taking the processing results, the confidence coefficient of the processing results and the sample human medical image as training samples.
5. The method of claim 3, wherein obtaining the processing results of the plurality of machine learning model outputs specifically comprises:
obtaining the processing results output by the machine learning models and the confidence of the processing results;
determining the precision label of each obtained processing result, which specifically comprises the following steps:
determining the precision weights of the plurality of machine learning models according to the precision of the plurality of machine learning models;
and weighting the confidence coefficient of each processing result according to the determined precision weights to obtain the precision label of each processing result.
6. The method of claim 5, wherein the precision weights comprise at least: a first weight and a second weight;
weighting the confidence degrees of the processing results respectively to obtain the precision labels of the processing results, wherein the method specifically comprises the following steps:
for each machine learning model, weighting the confidence coefficient of the processing result output by the machine learning model according to the first weight of the machine learning model to obtain a first numerical value of the machine learning model, and weighting the confidence coefficient of the processing result output by the machine learning model according to the second weight of the machine learning model to obtain a second numerical value of the machine learning model;
and determining the precision label of the processing result of the machine learning model according to the obtained first numerical value and second numerical value of the machine learning model.
7. The method of claim 3, wherein determining the accuracy of the plurality of machine learning models comprises:
determining, for each machine learning model, an acquisition mode of a label when training the machine learning model;
and determining the precision of the plurality of machine learning models according to the determined obtaining mode of the labels of the plurality of machine learning models.
8. The method of claim 7, wherein the obtaining of the annotation comprises at least:
marking the standard processing result of the human medical image;
labeling the processing results of the human medical images by users of different categories;
the first model is obtained by training with standard processing results of human medical images as labels.
9. A computer readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-8.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the preceding claims 1-8 when the program is executed.
CN202310967730.8A 2023-08-02 2023-08-02 Model training method and device, storage medium and electronic equipment Pending CN117132806A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310967730.8A CN117132806A (en) 2023-08-02 2023-08-02 Model training method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310967730.8A CN117132806A (en) 2023-08-02 2023-08-02 Model training method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN117132806A true CN117132806A (en) 2023-11-28

Family

ID=88857526

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310967730.8A Pending CN117132806A (en) 2023-08-02 2023-08-02 Model training method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN117132806A (en)

Similar Documents

Publication Publication Date Title
CN115618964B (en) Model training method and device, storage medium and electronic equipment
CN116502633A (en) Method and device for executing service, storage medium and electronic equipment
CN117409466A (en) Three-dimensional dynamic expression generation method and device based on multi-label control
CN116167431B (en) Service processing method and device based on hybrid precision model acceleration
CN116030247B (en) Medical image sample generation method and device, storage medium and electronic equipment
CN116824331A (en) Model training and image recognition method, device, equipment and storage medium
CN116402113A (en) Task execution method and device, storage medium and electronic equipment
CN116091895A (en) Model training method and device oriented to multitask knowledge fusion
CN117132806A (en) Model training method and device, storage medium and electronic equipment
CN112927815B (en) Method, device and equipment for predicting intracranial aneurysm information
CN116108163B (en) Text matching method, device, equipment and storage medium
CN116152246B (en) Image recognition method, device, equipment and storage medium
CN116384515B (en) Model training method and device, storage medium and electronic equipment
CN115017915B (en) Model training and task execution method and device
CN116501852B (en) Controllable dialogue model training method and device, storage medium and electronic equipment
CN113887326B (en) Face image processing method and device
CN116434787B (en) Voice emotion recognition method and device, storage medium and electronic equipment
CN117057442A (en) Model training method, device and equipment based on federal multitask learning
CN117077817B (en) Personalized federal learning model training method and device based on label distribution
CN116109008B (en) Method and device for executing service, storage medium and electronic equipment
CN117668543A (en) Model training method and device, storage medium and electronic equipment
CN117788953A (en) Method and device for identifying region of interest, storage medium and electronic equipment
CN117743824A (en) Model training and service execution method and device, storage medium and equipment
CN116453615A (en) Prediction method and device, readable storage medium and electronic equipment
CN116663676A (en) Model training method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination