Disease discrimination model training method and device and computer readable storage medium
Patent Information
- Application Number
- CN202110724665.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-29
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2041-06-29
AI Technical Summary
然而,目前通过人工智能进行医学影像识别仍存在精度低、适应性差等问题
[0039]本申请实施方式提供的疾病辨别模型训练方法、装置及存储介质,能够基于不同规格的医学影像资料对疾病辨别模型进行训练,训练出的疾病辨别模型能够适应不同的医学影像并具有高识别率。
Smart Images

Figure CN115547481B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of medical image recognition technology, and in particular to a method, apparatus, device, and computer-readable storage medium for training a disease identification model. Background Technology
[0002] With the advancement of medical technology, medical imaging technology has become an indispensable tool in modern medical diagnosis and treatment. Because subtle disease features in medical images are easily overlooked during manual identification, the use of artificial intelligence (AI) for medical image recognition is becoming increasingly widespread. However, current AI-based medical image recognition still suffers from problems such as low accuracy and poor adaptability. Summary of the Invention
[0003] In view of this, it is necessary to provide a disease identification model training method, device and computer-readable storage medium that can train a highly adaptable and accurate disease identification model.
[0004] In a first aspect, one embodiment of this application provides a method for training a disease identification model, comprising:
[0005] A disease identification model is established, which includes a convolutional neural network and a pyramid attention mechanism, wherein the pyramid attention mechanism is set at the output of the convolutional neural network;
[0006] Obtain the total set of feature map samples and divide the total set of feature map samples into training set and validation set;
[0007] The training set is input into the disease identification model to train the disease identification model based on the training set and output a disease confidence value;
[0008] The disease identification model is validated based on the validation set.
[0009] In one possible implementation of this application, obtaining the feature map sample set includes:
[0010] Acquire a preset number of medical images; and
[0011] The acquired medical images of a predetermined number are preprocessed to obtain the feature map sample set.
[0012] In one possible implementation of this application, the preprocessing of the acquired preset number of medical images includes:
[0013] Resampling of medical images;
[0014] The resampled medical images are converted into RGB three-dimensional images;
[0015] The RGB 3D image is converted into the medical image feature map.
[0016] In one possible implementation of this application, the preprocessing of the acquired preset number of medical images further includes:
[0017] The converted RGB 3D image is then normalized.
[0018] The normalized RGB 3D image is then subjected to image enhancement processing and converted into the medical image feature map.
[0019] In one possible implementation of this application, the establishment of the disease identification model includes:
[0020] Select the convolutional neural network;
[0021] Select the pyramid attention mechanism;
[0022] Determine whether the pyramid attention mechanism needs to be used. If it is determined that the pyramid attention mechanism needs to be used, then the pyramid attention mechanism outputs the disease confidence value.
[0023] In one possible implementation of this application, if it is determined that the pyramid attention mechanism is not needed, the output of the convolutional neural network is input into a preset function to output the disease confidence value through the preset function.
[0024] In one possible implementation of this application, the training method further includes:
[0025] Determine whether the disease confidence score is higher than a threshold;
[0026] If the value is higher than the threshold, the disease name corresponding to the disease confidence value will be output.
[0027] Secondly, one embodiment of this application provides a disease identification model training device comprising:
[0028] A module is established to build a disease identification model, which includes a convolutional neural network and a pyramid attention mechanism, wherein the pyramid attention mechanism is set at the output of the convolutional neural network.
[0029] The acquisition module is used to obtain the total set of feature map samples and divide the total set of feature map samples into training set and validation set;
[0030] The training module is used to input the training set into the disease identification model, so as to train the disease identification model according to the training set and obtain the disease confidence value;
[0031] The validation module is used to validate the disease identification model based on the validation set.
[0032] In one possible implementation of this application, the disease identification model training device further includes an image preprocessing module, which is used to acquire a preset number of medical images and preprocess the acquired preset number of medical images to obtain the feature map sample set.
[0033] The preprocessing of the acquired preset number of medical images includes:
[0034] Resampling of medical images;
[0035] The resampled medical images are converted into RGB three-dimensional images;
[0036] The RGB 3D image is converted into the medical image feature map.
[0037] Thirdly, one embodiment of this application provides a computer-readable storage medium having a computer program stored thereon, the computer program being implemented when executed by a processor:
[0038] The disease identification model training method described in the first aspect.
[0039] The disease identification model training method, apparatus, and storage medium provided in this application can train a disease identification model based on medical image data of different specifications. The trained disease identification model can adapt to different medical images and has a high recognition rate. Attached Figure Description
[0040] Figure 1 This is a schematic flowchart of a disease identification model training method provided in an embodiment of this application.
[0041] Figure 2 This is a flowchart illustrating a disease identification model training method provided in another embodiment of this application.
[0042] Figure 3 This is a flowchart illustrating a disease identification model training method provided in another embodiment of this application.
[0043] Figure 4 This is a schematic diagram of a disease identification model training device provided in an embodiment of this application.
[0044] Figure 5 A schematic diagram of a disease identification model training device provided in another embodiment of this application.
[0045] Explanation of main component symbols
[0046] Disease identification model training device 10; 10a
[0047] Module 100
[0048] Get Module 200
[0049] Image preprocessing module 210
[0050] Training Module 300
[0051] Verification module 400
[0052] The following detailed description, in conjunction with the accompanying drawings, will further illustrate this application. Detailed Implementation
[0053] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0054] It should be noted that, in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0055] It should be noted that in the embodiments of this application, the terms "first," "second," etc., are used only for descriptive purposes and should not be construed as indicating or implying relative importance, nor as indicating or implying order. Features specified as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0056] Based on the embodiments described in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0057] The following detailed description of some embodiments of the application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0058] Figure 1This is a flowchart illustrating a disease identification model training method provided in an embodiment of this application, as shown below. Figure 1 As shown, the disease identification model training method includes at least the following steps:
[0059] S100: Establish a disease identification model.
[0060] In this embodiment, a disease identification model can be established based on a convolutional neural network and pyramid attention mechanisms. The pyramid attention mechanism is set at the output of the convolutional neural network.
[0061] Understandably, attention mechanisms are a means in neural networks to quickly sift through a large amount of information using limited attentional resources. The pyramid attention mechanism is one type of attention mechanism. While the use of attention mechanisms is typically limited to a single layer in a neural network, the pyramid attention mechanism can utilize the attention mechanisms of each layer within the pyramid.
[0062] In this embodiment, the input to the disease identification model is a preprocessed medical image (i.e., a feature map), and the output is a confidence value for the disease. The confidence value represents the degree of similarity between image features in the image and image features in the disease state. The confidence value can be set to a number from 0 to 100, with higher values indicating higher similarity.
[0063] In this embodiment, the disease identification model is used to identify whether there are image features corresponding to diseases in medical images. The disease identification model can identify multiple diseases simultaneously and output a confidence value for each disease.
[0064] In this embodiment, a threshold judgment can also be set at the output of the disease identification model. For example, if the confidence value is higher than the threshold, the corresponding disease is output. The threshold can be set according to the confidence value. For example, when the confidence value of the disease is a number between 0 and 100, the threshold can be set to 60, that is, when the confidence value of the disease is greater than 60, it is determined that the person has the disease.
[0065] In this embodiment, the threshold can be calculated using precision, recall, and F1 score. Precision is the percentage of correctly predicted results out of the total sample. Recall is the probability of a sample that is actually positive being predicted as positive. The F1 score is the PR (precision-recall) curve. Since precision and recall are negatively correlated, it's impossible to achieve high values for both. The F1 score considers both precision and recall simultaneously, aiming to maximize both and achieve a balance.
[0066] In this embodiment, the corresponding number of diseases can be 0, representing that no disease can be identified from the medical images. Alternatively, the corresponding number of diseases can be N (N is a positive integer greater than 0), representing that N diseases can be identified from the medical images.
[0067] S200: Obtain the total set of feature map samples and divide the total set of feature map samples into training set and validation set.
[0068] It is understood that in this embodiment of the application, the data in the training set will be used to train the disease identification model, and then the effectiveness of the disease identification model will be verified using the validation set.
[0069] It is understood that the size of the training set can be greater than the size of the validation set. For example, the ratio of the training set to the validation set can be 3:1 or 4:1.
[0070] In this embodiment of the application, the feature map sample set can be obtained through the following methods:
[0071] First, acquire a preset number of medical images.
[0072] The medical images may include, but are not limited to, X-ray films, computed tomography (CT) images, magnetic resonance imaging (MR) images, ultrasound images, and nuclear medicine images. Clearly, the disease identification model training method proposed in this application can train the disease identification model based on medical images from different sources.
[0073] Next, the acquired preset number of medical images are preprocessed to obtain the feature map sample set.
[0074] In this embodiment, since medical images may come from different models of scanning equipment and may have different specifications, parameters, and contrast, it is necessary to preprocess the medical image information to obtain image feature maps of uniform specifications.
[0075] It can be understood that the uniformly formatted images obtained after preprocessing are the feature maps. Therefore, the uniformly formatted image feature maps obtained after preprocessing can constitute the feature map sample set. The feature maps in the feature map sample set are then divided into the training set and the validation set, so as to train the disease identification model using the feature map data of the training set, and then use the feature map data of the validation set to validate the performance of the disease identification model.
[0076] It is understood that, since the medical image information is converted into feature maps, the disease identification model only needs to be trained based on the feature maps of a fixed format, without needing to adjust the image parameters input to the disease identification model. Therefore, the disease identification model training method proposed in this application can improve the training speed and the accuracy of disease identification by preprocessing images.
[0077] It is understood that in this embodiment of the application, the feature map of the medical image can be stored using a 32-bit floating-point data format. A floating-point number is represented in exponential form, including four parts: a sign bit, a mantissa, an exponent sign bit, and an exponent. The sign bit is 1 binary bit, representing the positive or negative sign of the number. The exponent sign bit is 1 binary bit, representing the positive or negative sign of the exponent. The mantissa represents the significant digits of the floating-point number. The exponent bit represents the significant digits of the exponent.
[0078] Please refer to the following: Figure 2 The preprocessing of the acquired preset number of medical images includes at least the following sub-steps:
[0079] S210: Resample medical images.
[0080] In this embodiment, resampling the medical image can involve resizing the medical image to obtain a uniform-sized medical image. The resampling includes upsampling (enlarging the image) and downsampling (reducing the image size).
[0081] S220: Converts resampled medical images into RGB 3D images.
[0082] In this embodiment, the RGB three-dimensional image is composed of a matrix representing the height, width, and number of channels of the RGB three-dimensional image. For example, a 6*6*3 RGB three-dimensional image represents an RGB three-dimensional image with a height of 6, a width of 6, and a number of channels of 3. During calculations, the number of RGB channels is equal to the number of channels of the filter.
[0083] It is understood that functions in languages such as Python, Java, and Matlab can be used to convert the medical images into RGB three-dimensional images in the embodiments of this application, and this application does not impose any restrictions on this.
[0084] S230: Normalize the converted RGB 3D image.
[0085] In this embodiment of the application, the feature values of the RGB three-dimensional image can be mapped to the range of [0,1] or [-1,1] to complete the normalization processing of the RGB three-dimensional image.
[0086] It is understandable that data normalization can make the search for the optimal solution smoother and make it easier to converge to the optimal solution correctly.
[0087] Optionally, after step S230, the RGB 3D image is further flipped. It is understood that flipping the RGB 3D image can increase image diversity. For example, when the number of medical images in the feature map sample set obtained in step S200 is insufficient, flipping the RGB 3D image can increase the number of images available during training, improving the training effect of the disease identification model.
[0088] S240: Perform image enhancement processing on the normalized RGB 3D image and convert it into the medical image feature map.
[0089] In this embodiment, image enhancement processing methods may include, but are not limited to, Gaussian filtering, blurring, sharpening, adjusting brightness and contrast, etc. The image enhancement processing method can be set according to the defects of the RGB three-dimensional image. For example, if Gaussian noise exists in the RGB three-dimensional image, a Gaussian filter is applied to perform a weighted average on the entire image. That is, in the RGB three-dimensional image output by Gaussian filtering, the value of each pixel is obtained by weighted averaging of its own value and the values of other pixels in its neighborhood. It is understood that using Gaussian filtering to process the RGB three-dimensional image can reduce Gaussian noise in the RGB three-dimensional image and improve its clarity.
[0090] S300: Train the disease identification model and output a disease confidence score.
[0091] In this embodiment of the application, feature maps from the training set are input into the disease identification model to train the disease identification model.
[0092] It is understood that, in the embodiments of this application, taking a total number of samples of 1000, a batch size of 10 samples selected for a single training session, and 100 epochs for training all samples as an example, each time a batch size of samples is input into the disease identification model to obtain the output disease confidence value, a total of 100 epochs are required to complete one round of all samples.
[0093] Understandably, after all epochs have been calculated, the method also includes statistically outputting disease confidence values and corresponding disease identification models for model validation analysis.
[0094] S400: Validate the disease identification model.
[0095] In this embodiment, the disease identification model is validated using feature maps from a validation set and a preset classifier. For example, the disease identification model can be validated using Receiver Operating Characteristic (Roc) curves, disease identification accuracy, or correct information loss rate.
[0096] After obtaining several disease identification models validated through multiple rounds of S400 steps, the models can be selected based on the validation results, and models with high disease identification rates can be retained. For example, models with the optimal area under the Roc curve (AUC) can be retained. The Roc curve reflects the sensitivity to the same signal stimulus. AUC, as a numerical value, can intuitively evaluate the classifier's performance; a higher value is better.
[0097] In some embodiments of this application, the disease identification model with the highest accuracy may also be retained.
[0098] In some embodiments of this application, the model with the lowest rate of loss of correct information may also be retained.
[0099] In this embodiment of the application, the disease identification model can extract the features of lung diseases in X-ray films, and then identify different lung diseases that may appear in X-ray films.
[0100] In this embodiment, after the disease identification model screening is completed, a trained disease identification model is obtained. Thus, when using the trained disease identification model for disease diagnosis, the medical image to be diagnosed can be directly input into the disease identification model to perform the diagnosis and output a disease confidence value.
[0101] It is understood that the disease identification model can use heatmap visualization (Class Activation Map) and the confidence value to generate heatmaps of disease categories. It is also understood that generating heatmaps of disease categories allows for a visual observation of the types of various diseases.
[0102] Figure 3 yes Figure 1 The specific flowchart of establishing a disease identification model (i.e., step S100) in the disease identification model training method is shown below. Figure 3 As shown, the establishment of the disease identification model includes at least the following steps:
[0103] S110: Select a convolutional neural network.
[0104] In this embodiment, the convolutional neural network can be any one of DenseNet, ResNeXt, InceptionNet, and SeNet. In this embodiment, the convolutional neural network can also be the computer vision transfer model BigTransfer (BiT).
[0105] It is understandable that after selecting the type of convolutional neural network, the number of layers in the convolutional neural network can be selected based on the feature maps and the amount of data. For example, when building a disease identification model based on DenseNet, DenseNet121, DenseNet169, or DenseNet201 can be selected.
[0106] S120: Select the pyramid attention mechanism.
[0107] In this embodiment, the pyramid attention mechanism architecture includes one of the following: Feature Pyramid Attention, Path Aggregation Feature Pyramid Attention, Bidirectional Feature Pyramid Attention, and Recursive Feature Pyramid Attention. The layers in the pyramid attention mechanism are combined using a Fast Normalized fusion technique.
[0108] It is understandable that when convolutional neural networks fail to correctly identify the location of lesions in medical images, setting up a pyramid attention mechanism in the disease identification model can improve the training efficiency of the model.
[0109] S130: Determine whether to use the pyramid attention mechanism.
[0110] In this embodiment, a set of data can be input into the disease identification model for model verification. Then, based on step S400, the training effect of the disease identification model is verified to determine whether a pyramid attention mechanism needs to be enabled in the model. If the pyramid attention mechanism is enabled, step S150 is executed; otherwise, step S140 is executed.
[0111] S140: The convolutional neural network outputs a disease confidence score.
[0112] In this embodiment of the application, when the pyramid attention mechanism is not required, the output of the convolutional neural network is input to a preset function to output the confidence value of various diseases through the preset function.
[0113] It is understood that the preset function can be the Sigmoid function. The Sigmoid function has properties such as monotonically increasing and monotonically increasing inverse functions. It is used as an activation function in neural networks to map variables to the range [0,1]. Therefore, the Sigmoid function can be used as a classifier, and it performs well when the disease features are complex or not particularly large.
[0114] S150: The pyramid attention mechanism outputs disease confidence scores.
[0115] In this embodiment of the application, when the pyramid attention mechanism is required, the output of the convolutional neural network is input into the pyramid attention mechanism so as to output confidence values for various diseases through the pyramid attention mechanism.
[0116] Figure 4 This is a schematic diagram of the modules of a disease identification model training device 10 provided in an embodiment of this application. The disease identification model training device 10 includes: a setup module 100, an acquisition module 200, a training module 300, and a verification module 400.
[0117] In this embodiment of the application, the establishment module 100 can be used to execute... Figure 1 Step S100, and Figure 3 Steps S110-S150 in the text are used to establish a disease identification model. Please refer to the documentation for the specific implementation details. Figure 1 and Figure 3 And its related descriptions.
[0118] In this embodiment of the application, the acquisition module 200 can be used to execute... Figure 1 Step S200 involves obtaining the total set of feature map samples and dividing it into a validation set and a training set. For details on its implementation, please refer to [link / reference needed]. Figure 1 And its related descriptions.
[0119] In this embodiment of the application, the training module 300 can be used to execute... Figure 1 Step S300 involves training the disease identification model and statistically analyzing the disease confidence score against the disease identification model for model validation. Please refer to the documentation for its specific implementation. Figure 1 , Figure 3 And its related descriptions.
[0120] In this embodiment of the application, the verification module 400 can be used to execute... Figure 1Step S400 in the process validates the disease identification model using feature maps from the validation set and a pre-defined classifier. For its specific implementation, please refer to [the relevant documentation / reference]. Figure 1 And its related descriptions.
[0121] Figure 5 This is a schematic diagram of the modules of a disease identification model training device 10a provided in an embodiment of this application. Figure 4 compared to, Figure 5 The disease identification model training device 10a described herein also includes an image preprocessing module 210.
[0122] In this embodiment, the image preprocessing module 210 is used to acquire a preset number of medical images and preprocess the acquired preset number of medical images to obtain the feature map sample set. The specific implementation method is detailed in the following reference. Figure 1 , Figure 2 And its related descriptions.
[0123] In this embodiment of the application, the disease identification model training device 10 / 10a can train the disease identification model based on medical image data of different specifications. The trained disease identification model can adapt to different medical images and has a high recognition rate.
[0124] An embodiment of this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the following: Figure 1 Middle steps S100 to S400; Figure 2 In steps S210 to S300, and Figure 3 The disease identification model training method in steps S110 to S150.
[0125] Computer-readable storage media can be readable signal media or readable storage media. Readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0126] Those skilled in the art should recognize that the above embodiments are only used to illustrate this application and are not intended to limit this application. Any appropriate changes and variations made to the above embodiments within the essential spirit and scope of this application fall within the scope of protection claimed in this application.
Claims
1. A method for training a disease identification model, characterized in that, include: A disease identification model is established, comprising: selecting a convolutional neural network; selecting a pyramid attention mechanism; the disease identification model includes the convolutional neural network and the pyramid attention mechanism, wherein the pyramid attention mechanism is set at the output end of the convolutional neural network; Obtain the total set of feature map samples, and divide the total set of feature map samples into a training set and a validation set; The training set is input into the disease identification model to train the disease identification model based on the training set and output a disease confidence value; The training effect of the disease identification model is verified based on the validation set to determine whether the pyramid attention mechanism needs to be enabled; if it is determined that the pyramid attention mechanism needs to be enabled, the disease confidence value is output by the pyramid attention mechanism. If it is determined that the pyramid attention mechanism is not needed, the output of the convolutional neural network is input into a preset function to output the disease confidence value through the preset function.
2. The disease identification model training method as described in claim 1, characterized in that, The acquisition of the feature map sample set includes: Acquire a preset number of medical images; and The acquired medical images of a predetermined number are preprocessed to obtain the feature map sample set.
3. The disease identification model training method as described in claim 2, characterized in that, The preprocessing of the acquired preset number of medical images includes: Resampling of medical images; The resampled medical images are converted into RGB three-dimensional images; The RGB 3D image is converted into a medical image feature map.
4. The disease identification model training method as described in claim 3, characterized in that, The preprocessing of the acquired preset number of medical images further includes: The converted RGB 3D image is then normalized. The normalized RGB 3D image is then subjected to image enhancement processing and converted into the medical image feature map.
5. The disease identification model training method as described in claim 1, characterized in that, The training method also includes: Determine whether the disease confidence score is higher than a threshold; If the value is higher than the threshold, the disease name corresponding to the disease confidence value will be output.
6. A disease identification model training device, characterized in that, include: A module is established for building a disease identification model. The establishment of the disease identification model includes: selecting a convolutional neural network; selecting a pyramid attention mechanism; the disease identification model includes the convolutional neural network and the pyramid attention mechanism, and the pyramid attention mechanism is set at the output end of the convolutional neural network. The acquisition module is used to acquire a total set of feature map samples and divide the total set of feature map samples into a training set and a validation set. The training module is used to input the training set into the disease identification model, so as to train the disease identification model according to the training set and obtain the disease confidence value; The verification module is used to verify the training effect of the disease identification model based on the verification set, so as to determine whether the pyramid attention mechanism needs to be used; if it is determined that the pyramid attention mechanism needs to be used, the pyramid attention mechanism outputs the disease confidence value. If it is determined that the pyramid attention mechanism is not needed, the output of the convolutional neural network is input into a preset function to output the disease confidence value through the preset function.
7. The disease identification model training device as described in claim 6, characterized in that, The disease identification model training device further includes an image preprocessing module, which is used to acquire a preset number of medical images and preprocess the acquired preset number of medical images to obtain the feature map sample set. The preprocessing of the acquired preset number of medical images includes: Resampling of medical images; The resampled medical images are converted into RGB three-dimensional images; The RGB 3D image is converted into a medical image feature map.
8. A computer-readable storage medium having a computer program stored thereon, the computer program being implemented when executed by a processor: The disease identification model training method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
CNN and transfer learning based disease intelligent identification method and system
AU2020103613A4
Pyramid pooling multi-scale feature learning method adopting attention mechanism
CN110705562A