CN112784884A - Medical image classification method, system, medium and electronic terminal - Google Patents
Medical image classification method, system, medium and electronic terminal Download PDFInfo
- Publication number
- CN112784884A CN112784884A CN202110018207.1A CN202110018207A CN112784884A CN 112784884 A CN112784884 A CN 112784884A CN 202110018207 A CN202110018207 A CN 202110018207A CN 112784884 A CN112784884 A CN 112784884A
- Authority
- CN
- China
- Prior art keywords
- samples
- classification
- medical image
- sample
- class
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 238000013527 convolutional neural network Methods 0.000 claims abstract description 52
- 238000012549 training Methods 0.000 claims abstract description 41
- 230000008569 process Effects 0.000 claims abstract description 27
- 238000005457 optimization Methods 0.000 claims abstract description 25
- 238000013145 classification model Methods 0.000 claims abstract description 24
- 238000000605 extraction Methods 0.000 claims abstract description 22
- 238000013135 deep learning Methods 0.000 claims abstract description 17
- 239000013598 vector Substances 0.000 claims description 64
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012545 processing Methods 0.000 claims description 13
- 230000015572 biosynthetic process Effects 0.000 claims description 8
- 238000003786 synthesis reaction Methods 0.000 claims description 8
- 239000011159 matrix material Substances 0.000 claims description 7
- 238000007781 pre-processing Methods 0.000 claims description 6
- 230000005764 inhibitory process Effects 0.000 claims description 4
- 238000011176 pooling Methods 0.000 description 9
- 238000004891 communication Methods 0.000 description 5
- 238000010606 normalization Methods 0.000 description 5
- 238000004195 computer-aided diagnosis Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000003745 diagnosis Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000011218 segmentation Effects 0.000 description 2
- 102100033620 Calponin-1 Human genes 0.000 description 1
- 102100033591 Calponin-2 Human genes 0.000 description 1
- 102100033592 Calponin-3 Human genes 0.000 description 1
- 101000945318 Homo sapiens Calponin-1 Proteins 0.000 description 1
- 101000945403 Homo sapiens Calponin-2 Proteins 0.000 description 1
- 101000945410 Homo sapiens Calponin-3 Proteins 0.000 description 1
- 230000004913 activation Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2413—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on distances to training or reference patterns
- G06F18/24133—Distances to prototypes
- G06F18/24137—Distances to cluster centroïds
- G06F18/2414—Smoothing the distance, e.g. radial basis function networks [RBFN]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/55—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/22—Matching criteria, e.g. proximity measures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Measuring And Recording Apparatus For Diagnosis (AREA)
- Image Analysis (AREA)
Abstract
The invention provides a medical image classification method, a medical image classification system, a medical image classification medium and an electronic terminal, wherein the medical image classification method comprises the following steps: constructing a convolutional neural network based on deep learning; inputting the acquired medical image data set into a convolutional neural network for training to obtain a classification model, wherein the training process comprises the following steps: feature extraction and classification, and class distribution imbalance optimization; the step of optimizing the class distribution imbalance comprises the following steps: according to the number of samples in different categories, obtaining the weight parameters and/or the unbalance proportion of the samples of the different categories, and further carrying out class unbalance optimization; inputting medical images to be classified into a classification model, and classifying the medical images; the medical image classification method of the invention is characterized in that a medical image data set is input into a convolutional neural network based on deep learning for training, and the training process comprises the following steps: the feature extraction and classification and the unbalanced class distribution optimization are carried out, so that a better classification model is obtained, the problem of unbalanced distribution of image samples can be effectively avoided, and the classification accuracy is improved.
Description
Technical Field
The present invention relates to the field of image classification, and in particular, to a medical image classification method, system, medium, and electronic terminal.
Background
With the development of machine diagnosis, computer-aided diagnosis (CAD) systems have received more and more attention, and are widely applied to segmentation, classification, and retrieval of anatomical medical images to reduce the workload of doctors, however, at present, the method for retrieving anatomical medical images mainly adopts a text-based retrieval method, and retrieves based on the representation text of one or more images, and text manual text information needs to be summarized and recorded by experts and doctors with abundant experience and knowledge for a large amount of time, so that the implementation is difficult, the operation is complex, and when the distribution of the obtained image samples is unbalanced, accurate classification is difficult to achieve, and the classification efficiency is low.
Disclosure of Invention
The invention provides a medical image classification method, a medical image classification system, a medical image classification medium and an electronic terminal, and aims to solve the problems that in the prior art, a text-based method is adopted to search medical images, the operation is complex, and when image samples are not distributed evenly, the image classification accuracy is low.
The invention provides a medical image classification method, which comprises the following steps:
constructing a convolutional neural network based on deep learning;
inputting the acquired medical image data set into the convolutional neural network for training to obtain a classification model, wherein the training process comprises the following steps: feature extraction and classification, and class distribution imbalance optimization;
the step of class distribution imbalance optimization comprises: according to the number of samples in different categories, obtaining the weight parameters and/or the unbalance proportion of the samples of the different categories, and further carrying out class unbalance optimization;
and inputting the medical image to be classified into the classification model to classify the medical image.
Optionally, the step of feature extraction and classification includes:
inputting the medical image data set into the convolutional neural network, and performing feature extraction to obtain a feature matrix;
vectorizing the feature matrix to obtain a feature vector;
classifying the feature vectors through a full connection layer of the convolutional neural network to obtain a first classification result;
inputting the characteristic vector into a softmax classifier for classification, and obtaining a second classification result;
and comparing the second classification result with the first classification result, and training the convolutional neural network according to the comparison result.
Optionally, the step of obtaining the weight parameters of different categories according to the number of samples in different categories includes:
obtaining weight parameters of different classes according to the number of samples in the different classes, wherein the samples comprise: the feature vector and the category label corresponding to the feature vector;
optimizing the number imbalance of the samples of different classes according to the weight parameters;
according to the weight parameters, the mathematical expression for optimizing the number imbalance of the samples of different classes is as follows:
FL(pt)=-αt(1-pt)γlog(pt)
wherein p istFor the prediction value, α is a weight parameter, (1-p)t)γThe sample difficulty weighting adjustment factor is, and gamma is the inhibition parameter.
Optionally, the step of obtaining the imbalance ratio of the samples according to the number of the samples in different categories further includes:
presetting a sample quantity threshold;
obtaining a class to be optimized according to the number of samples in different classes and the sample number threshold, wherein the number of samples in the class to be optimized is smaller than the feature vector number threshold, and the samples comprise: the feature vector and the category label corresponding to the feature vector;
and acquiring a new synthesized sample according to the samples in the class to be optimized, and further optimizing the distribution imbalance of different classes.
Optionally, the step of obtaining a new synthesized sample according to the sample in the class to be optimized includes:
defining a sample in the class to be optimized as an initial sample;
obtaining Euclidean distances from the initial sample to other samples in the class to be optimized;
acquiring one or more neighbor samples according to a preset distance threshold and the Euclidean distance, wherein the neighbor samples correspond to the initial samples, and the Euclidean distance from the initial samples to the corresponding neighbor samples is smaller than the distance threshold;
determining the imbalance proportion of the samples according to the number of the samples in different categories and the sample number threshold;
and acquiring a new synthesized sample according to the unbalance proportion, thereby reducing the distribution unbalance of different classes.
Optionally, the step of obtaining a new synthesized sample according to the imbalance ratio includes:
acquiring the required number of the synthesized samples according to the unbalance proportion;
obtaining samples to be synthesized according to the required number, wherein the number of the samples to be synthesized is the same as the required number;
and acquiring a new synthesis sample according to the sample to be synthesized, wherein the mathematical expression of the new synthesis sample is as follows:
wherein,for new synthetic samples, XiFor the initial sample, σ is uniformly distributed at [0,1 ]]Random number in the range, XtIs a sample to be synthesized, k is a sample to be synthesizedThe number of samples.
Optionally, the training process further includes: feature encoding, the step of feature encoding comprising:
self-coding the obtained sample to obtain a coding result, wherein the sample comprises: the feature vector and the category label corresponding to the feature vector;
inputting the coding result into a decoder for decoding to obtain a decoding result;
and adjusting the encoding parameters in the convolutional neural network according to the decoding result and the sample corresponding to the decoding result.
The present invention also provides a medical image classification system, comprising:
the preprocessing module is used for constructing a convolutional neural network based on deep learning;
the processing module is used for inputting the acquired medical image data set into the convolutional neural network for training to obtain a classification model, wherein the training process comprises the following steps: feature extraction and classification, and class distribution imbalance optimization, wherein the class distribution imbalance optimization comprises the following steps: according to the number of samples in different categories, obtaining the weight parameters and/or the unbalance proportion of the samples of the different categories, and further carrying out class unbalance optimization;
and the image classification module is used for inputting the medical image to be classified into the classification model to classify the medical image, and the preprocessing module and the processing module are connected with the image classification module.
The invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method as defined in any one of the above.
The present invention also provides an electronic terminal, comprising: a processor and a memory;
the memory is adapted to store a computer program and the processor is adapted to execute the computer program stored by the memory to cause the terminal to perform the method as defined in any one of the above.
The invention has the beneficial effects that: the medical image classification method of the invention is characterized in that a medical image data set is input into a convolutional neural network based on deep learning for training, and the training process comprises the following steps: the feature extraction and classification and the unbalanced class distribution are optimized, so that a better classification model is obtained, the medical image classification process is directly oriented to image content, the medical image is prevented from being retrieved and classified by adopting a text-based method, meanwhile, the problem of unbalanced distribution of image samples can be effectively avoided, and the classification accuracy is improved.
Drawings
FIG. 1 is a first flowchart illustrating a medical image classification method according to an embodiment of the present invention;
FIG. 2 is a second flowchart illustrating a medical image classification method according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a convolutional neural network of a medical image classification method according to an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of an auto-encoder of the medical image classification method according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a medical image classification system in an embodiment of the invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present invention, and the components related to the present invention are only shown in the drawings rather than drawn according to the number, shape and size of the components in actual implementation, and the type, quantity and proportion of the components in actual implementation may be changed freely, and the layout of the components may be more complicated.
The inventor finds that with the development of machine diagnosis, a Computer Aided Diagnosis (CAD) system receives more and more attention, and is widely applied to segmentation, classification, and retrieval of anatomical medical images for reducing the workload of doctors, however, at present, the method for retrieving anatomical medical images mainly adopts a text-based retrieval method, and the retrieval is performed based on the representation text of one or more images, and text manual text information needs to be summarized and recorded by expert doctors with abundant experience and knowledge for a lot of time, so that the implementation is difficult, the operation is complex, errors are easily caused by human factors, and when the distribution of the obtained image samples is unbalanced, accurate classification is difficult to achieve, and the classification efficiency is low, therefore, the inventor proposes a medical image classification method, a system, a medium and an electronic terminal, which are trained by inputting medical image data into a convolutional neural network based on deep learning, the training process comprises the following steps: the method comprises the steps of feature extraction and classification, class distribution imbalance optimization and feature coding, so that a classification model is obtained, the medical image classification process is directly oriented to image content, the medical image is prevented from being retrieved and classified by a text-based method, meanwhile, the problem of unbalanced distribution of image samples can be effectively avoided, and the classification accuracy is improved.
As shown in fig. 1, the medical image classification method in the present embodiment includes:
s101: constructing a convolutional neural network based on deep learning;
s102: inputting the acquired medical image data set into the convolutional neural network for training to obtain a classification model, wherein the training process comprises the following steps: feature extraction and classification, and class distribution imbalance optimization, wherein the class distribution imbalance optimization comprises the following steps: according to the number of samples in different categories, obtaining the weight parameters and/or the unbalance proportion of the samples of the different categories, and further carrying out class unbalance optimization; for example: acquiring a medical image dataset, the medical image dataset comprising: different numbers of anatomical medical images of different parts of an organism can acquire deep features with strong identification capability by inputting medical image data sets into a convolutional neural network based on deep learning for feature extraction, simultaneously reduce the number of the features, retain more important information, reduce the complexity of data processing and improve the classification efficiency, because the classification of the anatomical medical images is a special technical field, the usually acquired medical image data sets are unbalanced, namely the number of samples of different classes is different, which easily reduces the accuracy of the classification of the medical images, therefore, the problem of unbalanced distribution of the features of the samples of different classes can be effectively solved by adding training of unbalanced distribution optimization in the training process, the classification accuracy is improved, the anti-interference capability is strong, and related personnel such as doctors carry out retrieval, in the training process, the feature coding is carried out, so that the practicability is strong and the cost is low;
s103: inputting the medical image to be classified into the classification model, and classifying the medical image; training by inputting medical image data sets into a deep learning based convolutional neural network, the training process comprising: the method comprises the steps of feature extraction and classification, unbalanced optimization of class distribution and feature coding, so that a classification model is obtained, image content is directly oriented in the classification process of the medical images, the medical images are prevented from being retrieved and classified by adopting a text-based method, classification errors caused by human factors are reduced, meanwhile, the problem of unbalanced distribution of image samples can be effectively solved, classification accuracy is improved, and practicability is high.
As shown in fig. 2, the medical image classification method in some embodiments includes:
s201: constructing a convolutional neural network based on deep learning; for example: as shown in fig. 3, a 13-layer linear Convolutional Neural Network (CNN) is constructed, which includes: 4 convolutional layers, 4 batch normalization layers, 3 pooling layers and 2 Full Connected Layers (FCL), the convolutional neural network based on deep learning is constructed, so that the feature extraction can be better performed on the medical image, the efficiency is improved, the accuracy is higher, the pooling layers can perform feature dimension reduction, the number of data and parameters is compressed, the overfitting is reduced, and meanwhile, the fault tolerance of the model is improved; the mathematical expression of the output of each layer of the convolutional neural network (CNN1, CNN2, CNN3, CNN4) is:
f(x)=Pm×m(Lr(ω×I)+b)
wherein, P represents pooling, m is the size of the pool kernel, Lr () is a LeakyReLu activation function, ω is the weight of the layer, I is the input of the layer, and b is the offset of the layer;
s202: inputting the medical image data set into the convolutional neural network, and performing feature extraction to obtain a feature matrix; the medical image data set is input into the convolutional neural network for feature extraction, so that more important features in the medical image can be extracted, and the feature extraction efficiency is improved;
s203: vectorizing the feature matrix to obtain a feature vector;
s204: classifying the feature vectors through a full connection layer of the convolutional neural network to obtain a first classification result;
s205: inputting the characteristic vector into a softmax classifier for classification, and obtaining a second classification result;
s206: comparing the second classification result with the first classification result, and training the convolutional neural network according to the comparison result; for example: classifying the feature vectors through a full connection layer to obtain a first classification result, classifying through a softmax classifier to obtain a second classification result, performing error back propagation according to the second classification result and the second classification result, and training a convolutional neural network, so that the classification accuracy of medical images is effectively improved;
in some embodiments, further comprising:
normalizing the feature vector to obtain a normalized feature vector; because the distribution of the feature vectors of the medical image is unbalanced, the feature vectors are normalized, namely different channels of the same sample or the feature vectors are normalized, so that the influence on feature classification caused by the number of the samples is avoided, and because the depth of a deep learning neural network is uncertain, the calculation complexity of training can be reduced by performing normalization processing on different channels of the same feature vector;
classifying the normalized feature vectors through a full-link layer of the convolutional neural network to obtain a first classification result;
inputting the normalized feature vector into a softmax classifier for classification, and obtaining a second classification result;
comparing the second classification result with the first classification result, and training the convolutional neural network according to the comparison result;
the mathematical expression of the normalization process on the feature vector is as follows:
wherein μ is a mean value, σ is a variance, H is the number of hidden nodes in a layer, a is a normalized feature vector, and i is a feature coefficient.
S207: obtaining weight parameters of different classes according to the number of samples in the different classes, wherein the samples comprise: the feature vector and the category label corresponding to the feature vector;
s208: optimizing the number imbalance of the samples of different classes according to the weight parameters;
in some embodiments, the mathematical expression for optimizing the number imbalance of the samples of the different classes according to the weight parameter is:
FL(pt)=-αt(1-pt)γlog(pt)
wherein p istFor the prediction value, α is a weight parameter, (1-p)t)γThe sample difficulty weighting adjustment factor is, and gamma is the inhibition parameter. By optimizing the number imbalance of the samples of different categories according to the weight parameters of different categories, the loss of China caused by the imbalance of the categories in the classification process is reduced;
s209: obtaining a class to be optimized according to the number of samples in different classes and a preset sample number threshold, wherein the number of samples in the class to be optimized is smaller than the feature vector number threshold, and the samples comprise: the feature vector and the category label corresponding to the feature vector;
s210: obtaining a new synthesized sample according to the samples in the class to be optimized, and further optimizing the distribution imbalance of different classes;
in some embodiments, the step of obtaining a new synthesized sample from the samples in the class to be optimized comprises:
defining a sample in the class to be optimized as an initial sample;
obtaining Euclidean distances from the initial sample to other samples in the class to be optimized;
acquiring one or more neighbor samples according to a preset distance threshold and the Euclidean distance, wherein the neighbor samples correspond to the initial samples, and the Euclidean distance from the initial samples to the corresponding neighbor samples is smaller than the distance threshold;
determining the imbalance proportion of the samples according to the number of the samples in different categories and the sample number threshold;
and acquiring a new synthesized sample according to the unbalance proportion, thereby reducing the distribution unbalance of different classes.
In some embodiments, the step of obtaining a new synthesized sample according to the imbalance ratio comprises:
acquiring the required number of the synthesized samples according to the unbalance proportion;
obtaining samples to be synthesized according to the required number, wherein the number of the samples to be synthesized is the same as the required number;
and acquiring a new synthesis sample according to the sample to be synthesized, wherein the mathematical expression of the new synthesis sample is as follows:
wherein,for new synthetic samples, XiFor the initial sample, σ is uniformly distributed at [0,1 ]]Random number in the range, XtK is the number of samples to be synthesized. By acquiring a new synthetic sample, the feature vectors of the medical image with uniform class distribution can be obtained, and the accuracy is higher;
s211: self-coding the obtained sample to obtain a coding result, wherein the sample comprises: the feature vector and the category label corresponding to the feature vector;
s212: inputting the coding result into a decoder for decoding to obtain a decoding result;
s213: adjusting encoding parameters in the convolutional neural network according to the decoding result and a sample corresponding to the decoding result so as to obtain a classification model; as shown in fig. 4, in the self-encoding process, firstly performing convolution operation, then performing maximum pooling operation on the result after convolution, where the size of a pooling window can be selected according to circumstances, data is transmitted to a full connection layer after passing through a convolution-pooling layer and a result is output, and simultaneously, the result output by the full connection layer can be decoded, a decoder finally outputs a decoding result through the full connection layer and a reverse sampling layer, and according to the decoding result and a sample corresponding to the decoding result, the encoding parameters in the convolutional neural network are adjusted to improve the encoding accuracy, which is beneficial for relevant personnel to search medical image classification, and by training the constructed convolutional neural network through the above steps, a better classification model can be obtained, the problem of imbalance among classes is solved, the accuracy is higher, and the anti-interference capability is stronger, the practicability is strong.
S214: and inputting the medical image to be classified into the classification model to classify the medical image.
As shown in fig. 5, the present embodiment further provides a medical image classification system, including:
the preprocessing module is used for constructing a convolutional neural network based on deep learning;
the processing module is used for inputting the acquired medical image data set into the convolutional neural network for training to obtain a classification model, wherein the training process comprises the following steps: feature extraction and classification, and class distribution imbalance optimization, wherein the class distribution imbalance optimization comprises the following steps: according to the number of samples in different categories, obtaining the weight parameters and/or the unbalance proportion of the samples of the different categories, and further carrying out class unbalance optimization;
and the image classification module is used for inputting the medical images to be classified into the classification model to classify the medical images, and the preprocessing module, the processing module and the image classification module are sequentially connected. Training by inputting medical image data sets into a deep learning based convolutional neural network, the training process comprising: the feature extraction and classification and the unbalanced class distribution are optimized, so that a classification model is obtained, the medical image classification process is directly oriented to image content, the medical image is prevented from being retrieved and classified by adopting a text-based method, meanwhile, the problem of unbalanced distribution of image samples can be effectively avoided, and the classification accuracy is improved.
In some embodiments, the step of the processing module performing feature extraction and classification comprises: vectorizing the feature matrix to obtain a feature vector;
classifying the feature vectors through a full connection layer of the convolutional neural network to obtain a first classification result;
inputting the characteristic vector into a softmax classifier for classification, and obtaining a second classification result;
comparing the second classification result with the first classification result, and training the convolutional neural network according to the comparison result; for example: classifying the feature vectors through a full connection layer to obtain a first classification result, classifying through a softmax classifier to obtain a second classification result, performing error back propagation according to the second classification result and the second classification result, and training a convolutional neural network, so that the classification accuracy of medical images is effectively improved;
in some embodiments, further comprising:
normalizing the feature vector to obtain a normalized feature vector; because the distribution of the feature vectors of the medical image is unbalanced, the feature vectors are normalized, namely different channels of the same sample or the feature vectors are normalized, so that the influence on feature classification caused by the number of the samples is avoided, and because the depth of a deep learning neural network is uncertain, the calculation complexity of training can be reduced by performing normalization processing on different channels of the same feature vector;
classifying the normalized feature vectors through a full-link layer of the convolutional neural network to obtain a first classification result;
inputting the normalized feature vector into a softmax classifier for classification, and obtaining a second classification result;
comparing the second classification result with the first classification result, and training the convolutional neural network according to the comparison result;
the mathematical expression of the normalization process on the feature vector is as follows:
wherein μ is a mean value, σ is a variance, H is the number of hidden nodes in a layer, a is a normalized feature vector, and i is a feature coefficient.
In some embodiments, the step of the processing module performing class distribution imbalance optimization comprises:
obtaining weight parameters of different classes according to the number of samples in the different classes, wherein the samples comprise: the feature vector and the category label corresponding to the feature vector;
and optimizing the number imbalance of the samples of different classes according to the weight parameters.
In some embodiments, the mathematical expression for optimizing the number imbalance of the samples of the different classes according to the weight parameter is:
FL(pt)=-αt(1-pt)γlog(pt)
wherein p istFor the prediction value, α is a weight parameter, (1-p)t)γThe sample difficulty weighting adjustment factor is, and gamma is the inhibition parameter. By optimizing the number imbalance of the samples of different categories according to the weight parameters of different categories, the loss of China caused by the imbalance of the categories in the classification process is reduced;
obtaining a class to be optimized according to the number of samples in different classes and a preset sample number threshold, wherein the number of samples in the class to be optimized is smaller than the feature vector number threshold, and the samples comprise: the feature vector and the category label corresponding to the feature vector;
and acquiring a new synthesized sample according to the samples in the class to be optimized, and further optimizing the distribution imbalance of different classes.
In some embodiments, the step of obtaining a new synthesized sample from the samples in the class to be optimized comprises:
defining a sample in the class to be optimized as an initial sample;
obtaining Euclidean distances from the initial sample to other samples in the class to be optimized;
acquiring one or more neighbor samples according to a preset distance threshold and the Euclidean distance, wherein the neighbor samples correspond to the initial samples, and the Euclidean distance from the initial samples to the corresponding neighbor samples is smaller than the distance threshold;
determining the imbalance proportion of the samples according to the number of the samples in different categories and the sample number threshold;
and acquiring a new synthesized sample according to the unbalance proportion, thereby reducing the distribution unbalance of different classes.
In some embodiments, the step of obtaining a new synthesized sample according to the imbalance ratio comprises:
acquiring the required number of the synthesized samples according to the unbalance proportion;
obtaining samples to be synthesized according to the required number, wherein the number of the samples to be synthesized is the same as the required number;
and acquiring a new synthesis sample according to the sample to be synthesized, wherein the mathematical expression of the new synthesis sample is as follows:
wherein,for new synthetic samples, XiFor the initial sample, σ is uniformly distributed at [0,1 ]]Random number in the range, XtK is the number of samples to be synthesized. By obtaining a new synthesized sample, the feature vectors of the medical image with uniform class distribution can be obtained, and the accuracy is high.
In some embodiments, the training process of the processing module further comprises: feature encoding, the step of feature encoding comprising:
self-coding the obtained sample to obtain a coding result, wherein the sample comprises: the feature vector and the category label corresponding to the feature vector;
inputting the coding result into a decoder for decoding to obtain a decoding result;
adjusting encoding parameters in the convolutional neural network according to the decoding result and a sample corresponding to the decoding result so as to obtain a classification model; as shown in fig. 4, in the self-encoding process, firstly performing convolution operation, then performing maximum pooling operation on the result after convolution, where the size of a pooling window can be selected according to circumstances, data is transmitted to a full connection layer after passing through a convolution-pooling layer and a result is output, and simultaneously, the result output by the full connection layer can be decoded, a decoder finally outputs a decoding result through the full connection layer and a reverse sampling layer, and according to the decoding result and a sample corresponding to the decoding result, the encoding parameters in the convolutional neural network are adjusted to improve the encoding accuracy, which is beneficial for relevant personnel to search medical image classification, and by training the constructed convolutional neural network through the above steps, a better classification model can be obtained, the problem of imbalance among classes is solved, the accuracy is higher, and the anti-interference capability is stronger, the practicability is strong.
The present embodiments also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method as defined in any one of the above.
The present embodiment further provides an electronic terminal, including: a processor and a memory;
the memory is used for storing computer programs, and the processor is used for executing the computer programs stored by the memory so as to enable the terminal to execute the method in the embodiment.
The computer-readable storage medium in the present embodiment can be understood by those skilled in the art as follows: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The electronic terminal provided by the embodiment comprises a processor, a memory, a transceiver and a communication interface, wherein the memory and the communication interface are connected with the processor and the transceiver and are used for completing mutual communication, the memory is used for storing a computer program, the communication interface is used for carrying out communication, and the processor and the transceiver are used for operating the computer program so that the electronic terminal can execute the steps of the method.
In this embodiment, the Memory may include a Random Access Memory (RAM), and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or change the above-mentioned embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.
Claims (10)
1. A method of medical image classification, comprising:
constructing a convolutional neural network based on deep learning;
inputting the acquired medical image data set into the convolutional neural network for training to obtain a classification model, wherein the training process comprises the following steps: feature extraction and classification, and class distribution imbalance optimization;
the step of class distribution imbalance optimization comprises: according to the number of samples in different categories, obtaining the weight parameters and/or the unbalance proportion of the samples of the different categories, and further carrying out class unbalance optimization;
and inputting the medical image to be classified into the classification model to classify the medical image.
2. The medical image classification method according to claim 1, characterized in that the step of feature extraction and classification comprises:
inputting the medical image data set into the convolutional neural network, and performing feature extraction to obtain a feature matrix;
vectorizing the feature matrix to obtain a feature vector;
classifying the feature vectors through a full connection layer of the convolutional neural network to obtain a first classification result;
inputting the characteristic vector into a softmax classifier for classification, and obtaining a second classification result;
and comparing the second classification result with the first classification result, and training the convolutional neural network according to the comparison result.
3. A medical image classification method according to claim 1, characterized in that the step of obtaining weight parameters for different classes depending on the number of samples in the different classes comprises:
obtaining weight parameters of different classes according to the number of samples in the different classes, wherein the samples comprise: the feature vector and the category label corresponding to the feature vector;
optimizing the number imbalance of the samples of different classes according to the weight parameters;
according to the weight parameters, the mathematical expression for optimizing the number imbalance of the samples of different classes is as follows:
FL(pt)=-αt(1-pt)γlog(pt)
wherein p istFor the prediction value, α is a weight parameter, (1-p)t)γThe sample difficulty weighting adjustment factor is, and gamma is the inhibition parameter.
4. A medical image classification method according to claim 1, characterized in that the step of obtaining the imbalance ratio of the samples according to the number of samples in different classes comprises:
presetting a sample quantity threshold;
obtaining a class to be optimized according to the number of samples in different classes and the sample number threshold, wherein the number of samples in the class to be optimized is smaller than the feature vector number threshold, and the samples comprise: the feature vector and the category label corresponding to the feature vector;
and acquiring a new synthesized sample according to the samples in the class to be optimized, and further optimizing the distribution imbalance of different classes.
5. The medical image classification method according to claim 4, characterized in that the step of obtaining a new synthetic sample from the samples in the class to be optimized comprises:
defining a sample in the class to be optimized as an initial sample;
obtaining Euclidean distances from the initial sample to other samples in the class to be optimized;
acquiring one or more neighbor samples according to a preset distance threshold and the Euclidean distance, wherein the neighbor samples correspond to the initial samples, and the Euclidean distance from the initial samples to the corresponding neighbor samples is smaller than the distance threshold;
determining the imbalance proportion of the samples according to the number of the samples in different categories and the sample number threshold;
and acquiring a new synthesized sample according to the unbalance proportion, thereby reducing the distribution unbalance of different classes.
6. The medical image classification method according to claim 5, characterized in that the step of obtaining a new synthetic sample according to the imbalance ratio comprises:
acquiring the required number of the synthesized samples according to the unbalance proportion;
obtaining samples to be synthesized according to the required number, wherein the number of the samples to be synthesized is the same as the required number;
and acquiring a new synthesis sample according to the sample to be synthesized, wherein the mathematical expression of the new synthesis sample is as follows:
7. The medical image classification method according to claim 1, characterized in that the training process further comprises: feature encoding, the step of feature encoding comprising:
self-coding the obtained sample to obtain a coding result, wherein the sample comprises: the feature vector and the category label corresponding to the feature vector;
inputting the coding result into a decoder for decoding to obtain a decoding result;
and adjusting the encoding parameters in the convolutional neural network according to the decoding result and the sample corresponding to the decoding result.
8. A medical image classification system, comprising:
the preprocessing module is used for constructing a convolutional neural network based on deep learning;
the processing module is used for inputting the acquired medical image data set into the convolutional neural network for training to obtain a classification model, wherein the training process comprises the following steps: feature extraction and classification, and class distribution imbalance optimization, wherein the class distribution imbalance optimization comprises the following steps: according to the number of samples in different categories, obtaining the weight parameters and/or the unbalance proportion of the samples of the different categories, and further carrying out class unbalance optimization;
and the image classification module is used for inputting the medical image to be classified into the classification model to classify the medical image, and the preprocessing module and the processing module are connected with the image classification module.
9. A computer-readable storage medium having stored thereon a computer program, characterized in that: the computer program, when executed by a processor, implements the method of any one of claims 1 to 7.
10. An electronic terminal, comprising: a processor and a memory;
the memory is for storing a computer program and the processor is for executing the computer program stored by the memory to cause the terminal to perform the method of any of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110018207.1A CN112784884A (en) | 2021-01-07 | 2021-01-07 | Medical image classification method, system, medium and electronic terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110018207.1A CN112784884A (en) | 2021-01-07 | 2021-01-07 | Medical image classification method, system, medium and electronic terminal |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112784884A true CN112784884A (en) | 2021-05-11 |
Family
ID=75756685
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110018207.1A Pending CN112784884A (en) | 2021-01-07 | 2021-01-07 | Medical image classification method, system, medium and electronic terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112784884A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113434685A (en) * | 2021-07-06 | 2021-09-24 | 中国银行股份有限公司 | Information classification processing method and system |
CN113456031A (en) * | 2021-08-09 | 2021-10-01 | 首都医科大学附属北京天坛医院 | Training device and prediction device of brain state prediction model and electronic equipment |
CN114613436A (en) * | 2022-05-11 | 2022-06-10 | 北京雅康博生物科技有限公司 | Blood sample Motif feature extraction method and cancer early screening model construction method |
WO2023009056A1 (en) * | 2021-07-29 | 2023-02-02 | 脸萌有限公司 | Image processing method, image processing device, and computer-readable medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107992905A (en) * | 2017-12-25 | 2018-05-04 | 东软集团股份有限公司 | Sample data equalization methods and device |
CN108491474A (en) * | 2018-03-08 | 2018-09-04 | 平安科技(深圳)有限公司 | A kind of data classification method, device, equipment and computer readable storage medium |
CN108921092A (en) * | 2018-07-02 | 2018-11-30 | 浙江工业大学 | A kind of melanoma classification method based on convolutional neural networks model Two-level ensemble |
US20190073569A1 (en) * | 2017-09-07 | 2019-03-07 | International Business Machines Corporation | Classifying medical images using deep convolution neural network (cnn) architecture |
CN109645983A (en) * | 2019-01-09 | 2019-04-19 | 南京航空航天大学 | A kind of uneven beat classification method based on multimode neural network |
CN111160163A (en) * | 2019-12-18 | 2020-05-15 | 浙江大学 | Expression recognition method based on regional relation modeling and information fusion modeling |
-
2021
- 2021-01-07 CN CN202110018207.1A patent/CN112784884A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190073569A1 (en) * | 2017-09-07 | 2019-03-07 | International Business Machines Corporation | Classifying medical images using deep convolution neural network (cnn) architecture |
CN107992905A (en) * | 2017-12-25 | 2018-05-04 | 东软集团股份有限公司 | Sample data equalization methods and device |
CN108491474A (en) * | 2018-03-08 | 2018-09-04 | 平安科技(深圳)有限公司 | A kind of data classification method, device, equipment and computer readable storage medium |
CN108921092A (en) * | 2018-07-02 | 2018-11-30 | 浙江工业大学 | A kind of melanoma classification method based on convolutional neural networks model Two-level ensemble |
CN109645983A (en) * | 2019-01-09 | 2019-04-19 | 南京航空航天大学 | A kind of uneven beat classification method based on multimode neural network |
CN111160163A (en) * | 2019-12-18 | 2020-05-15 | 浙江大学 | Expression recognition method based on regional relation modeling and information fusion modeling |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113434685A (en) * | 2021-07-06 | 2021-09-24 | 中国银行股份有限公司 | Information classification processing method and system |
CN113434685B (en) * | 2021-07-06 | 2024-05-28 | 中国银行股份有限公司 | Information classification processing method and system |
WO2023009056A1 (en) * | 2021-07-29 | 2023-02-02 | 脸萌有限公司 | Image processing method, image processing device, and computer-readable medium |
US20230034370A1 (en) * | 2021-07-29 | 2023-02-02 | Lemon Inc. | Image processing method, image processing device and computer readable medium |
US11928183B2 (en) * | 2021-07-29 | 2024-03-12 | Lemon Inc. | Image processing method, image processing device and computer readable medium, for acquiring image sample data for training an attribute recognition model |
CN113456031A (en) * | 2021-08-09 | 2021-10-01 | 首都医科大学附属北京天坛医院 | Training device and prediction device of brain state prediction model and electronic equipment |
CN114613436A (en) * | 2022-05-11 | 2022-06-10 | 北京雅康博生物科技有限公司 | Blood sample Motif feature extraction method and cancer early screening model construction method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US12118721B2 (en) | Systems and methods for image preprocessing | |
CN112784884A (en) | Medical image classification method, system, medium and electronic terminal | |
CN109711426B (en) | Pathological image classification device and method based on GAN and transfer learning | |
CN107220506A (en) | Breast cancer risk assessment analysis system based on deep convolutional neural network | |
CN111985228B (en) | Text keyword extraction method, text keyword extraction device, computer equipment and storage medium | |
JP7178513B2 (en) | Chinese word segmentation method, device, storage medium and computer equipment based on deep learning | |
CN112163114B (en) | Image retrieval method based on feature fusion | |
CN111475622A (en) | Text classification method, device, terminal and storage medium | |
CN110097096B (en) | Text classification method based on TF-IDF matrix and capsule network | |
US20220156489A1 (en) | Machine learning techniques for identifying logical sections in unstructured data | |
CN114359659B (en) | Attention disturbance-based automatic image labeling method, system and medium | |
Praveena et al. | [Retracted] Effective CBMIR System Using Hybrid Features‐Based Independent Condensed Nearest Neighbor Model | |
CN113486670B (en) | Text classification method, device, equipment and storage medium based on target semantics | |
CN111680755A (en) | Medical image recognition model construction method, medical image recognition device, medical image recognition medium and medical image recognition terminal | |
CN118468061B (en) | Automatic algorithm matching and parameter optimizing method and system | |
CN114444668A (en) | Network quantization method, network quantization system, network quantization apparatus, network quantization medium, and image processing method | |
Ouf | Leguminous seeds detection based on convolutional neural networks: Comparison of faster R-CNN and YOLOv4 on a small custom dataset | |
CN115392357A (en) | Classification model training and labeled data sample spot inspection method, medium and electronic equipment | |
CN114266927A (en) | Unsupervised saliency target detection method, system, equipment and medium | |
CN112445914A (en) | Text classification method, device, computer equipment and medium | |
CN115661828B (en) | Character direction recognition method based on dynamic hierarchical nested residual error network | |
CN116628594A (en) | User information management system and method based on AI intelligence | |
CN114565964B (en) | Emotion recognition model generation method, emotion recognition device, emotion recognition medium and emotion recognition equipment | |
CN113011163B (en) | Compound text multi-classification method and system based on deep learning model | |
Bi et al. | K-means clustering optimizing deep stacked sparse autoencoder |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210511 |