Detailed Description
Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers can indicate functionally identical or similar elements. While the various aspects of the embodiments are presented in drawings, the drawings are not necessarily drawn to scale unless specifically indicated.
The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a better understanding of the present disclosure. It will be understood by those skilled in the art that the present disclosure may be practiced without some of these specific details. In some instances, methods, means, elements and circuits that are well known to those skilled in the art have not been described in detail so as not to obscure the present disclosure.
Prior to the description of the embodiments of the present disclosure, a description of related art will be given for the purpose of aiding understanding of the embodiments of the present disclosure.
In a lung nodule benign and malignant detection method with the publication number of CN 107945179A and the name of the method being a convolutional neural network based on feature fusion, the method for detecting the pulmonary nodule benign and malignant based on the convolutional neural network based on the feature fusion is disclosed, firstly, a position area of a lung nodule is drawn in a lung CT image according to the marking of an expert, then, an interested area of the lung nodule is segmented according to position information, and an image which only contains the lung nodule and has the same size is obtained; secondly, extracting HOG characteristics and LBP characteristics of the lung nodule image to obtain a corresponding visual characteristic diagram; and then, taking the lung nodule image, the LBP characteristic diagram and the HOG characteristic diagram as the input of a convolutional neural network for convolution operation, further extracting the image characteristics, and finally obtaining the probability of the benign and malignant lung nodules through classification. The traditional characteristics and the CNN characteristics of the convolutional neural network are fused to perform benign and malignant lung nodule analysis, so that higher accuracy rate can be obtained, and better robustness is achieved.
The method comprises the steps of obtaining a lung nodule image of a lung of a patient and three-dimensional coordinates of a lung nodule in the lung nodule image, determining an ROI (region of interest) containing the lung nodule from the lung nodule image according to the three-dimensional coordinates of the lung nodule, inputting the ROI of the lung nodule and the three-dimensional coordinates of the lung nodule into a preset feature extraction neural network model for feature extraction to obtain a feature vector of the lung nodule image, and inputting the feature vector of the lung nodule image into a preset classification neural network model to obtain a lung nodule analysis result of the patient output by the preset classification neural network model. Compared with the traditional doctor diagnosis mode, the method can reduce the diagnosis error rate caused by doctor level difference, thereby improving the accuracy of the lung nodule analysis.
According to the above, the prior art has the following disadvantages:
1. most of the current technology is only a single 3D or 2D network model. For 2D networks, although the number of parameters is small, the data volume requirements are not high, the probability of model overfitting is relatively small, but the effect is relatively poor, and the ROI in the slice or labeled slice needs to be manually picked as input. For a 3D network, although the spatial correlation information of 3D data such as medical images and the like can be reserved, the reception field is limited due to the limitation of video memory, the image input size is limited, the network cannot be too complex under the condition of small data volume, and otherwise, the network is easy to over-fit;
2. most of the prior art depends on a single model, the reliability is low, and the diagnosis is easy to make mistakes like only one doctor;
3. most of the prior art does not consider the influence of label noise on a model, and the result is not robust;
4. most of the methods can only realize single disease multi-classification, and more practical scenes are multi-label multi-classification, for example, one patient may suffer from multiple diseases;
5. for lung images, only one or two focuses exist in one image, and the proportion of focus pixels in the whole image is small, so that online learning is difficult, the general scheme is that image blocks patch are taken around ROI for classification, the cost of manually labeling the focuses by doctors is increased, and most focus classification results are slice-level focus classification results and sometimes can not be used as patient-level disease diagnosis results;
6. in the prior art, a large amount of high-precision marking data is often needed, the data acquisition difficulty is high, the marking cost is high, and the practical application cannot be met.
The disclosed embodiments provide an image processing method, the main body of which may be an image processing apparatus, for example, the image processing method may be performed by a terminal device or a server or other processing device, wherein the terminal device may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, or the like. In some possible implementations, the image processing method may be implemented by a processor calling computer readable instructions stored in a memory.
Fig. 1 illustrates a flowchart of an image processing method according to an embodiment of the present disclosure, which may include, as illustrated in fig. 1:
s10: acquiring a medical image to be processed;
in some possible embodiments, the medical image may be any form of medical image, such as CT, MR, ultrasound, X-ray, etc. In addition, the medical image may be an image of any tissue structure, such as lung, brain, liver, spine, cervical vertebra, and the like, which is not limited in this disclosure. The following examples are presented using CT images of the lungs as examples.
In addition, the medical image of the embodiment of the present disclosure may be three-dimensional image data, and the three-dimensional image may be configured by a plurality of two-dimensional images, for example, the medical image may be 3D lung disease data, and the scale thereof may be (D, h, w), where D represents the number of layers of the two-dimensional image included in the three-dimensional image, and (h, w) represents the number of pixel points in the height and width directions of each layer of the two-dimensional image.
The manner of acquiring the medical image may include directly acquiring the captured medical image through communication connection with a medical image acquisition device, or may also receive the medical image sent by an external device or read any medical image from a storage device, and the manner of acquiring the medical image in the present disclosure is not particularly limited.
S20: inputting the medical image into a network module, and acquiring classification information about at least one type of preset focus in the medical image by using the network module, wherein the network module is trained and can detect the preset focus; the network module comprises at least two classifiers, in the process of training the network module, the weight of the (i + 1) th classifier on a training sample is adjusted according to the classification result of the ith classifier on the training sample, i is an integer which is greater than 1 and less than or equal to n, and n represents the number of the classifiers.
In some possible embodiments, the network module after deep learning training may be used to perform prediction and detection on a preset lesion in a medical image, so as to obtain classification information of the preset lesion. In clinical practice, the medical image may include image information corresponding to a plurality of diseases, and for example, the lung CT may include the following types of lung diseases: pneumonia (9 species, influenza, fungus, mycoplasma, giant cell, bacteria, carboplatin, SARS, adenovirus, avian influenza), tuberculosis (4 species, disseminated tuberculosis in blood, secondary tuberculosis, bronchotracheal tuberculosis, tuberculous pleurisy), and tumor (2 species, benign and malignant nodules/tumor). The type of the predicted lesion of the disclosed embodiments may include at least one of the above. The classification information obtained may be a prediction probability of the presence of each predicted lesion, and a type of a predetermined lesion having a prediction probability greater than a prediction threshold, wherein the prediction threshold may be a value greater than or equal to 50%.
In addition, the network module is a deep learning network which can be trained to perform classification detection on the preset focus and obtain classification information, and the deep learning network can be a convolutional neural network. In addition, the network module can comprise at least two classifiers, in the process of training the network module, at least one part of the training samples can be sequentially input into the classifiers, the weights of the training samples are adjusted according to the classification result of the classifier which performs classification prediction first, the training samples with the adjusted weights are input into the next classifier to perform classification prediction, and the like, and the whole network module is trained by combining the classification result of the classification prediction of each classifier. Therefore, in the training process, a plurality of weak classifiers are constructed by using Adaboost thought for reference, the following classifiers reduce the attention to the wrongly-classified samples (labeled noise samples are possible) judged by the previous classifier by adding sample weights, and finally a strong classifier is obtained through integration. The process is similar to the sequential film reading of a plurality of doctors and the giving of comprehensive diagnosis results, and the reliability of the network model can be improved.
Through the above description, the embodiment of the present disclosure may implement detection of at least one preset lesion in a medical image, and improve stability of a network model.
For a clearer understanding of the embodiments of the present disclosure, reference will now be made in detail to the embodiments of the present disclosure with reference to the accompanying drawings.
FIG. 2 shows an overall framework schematic of image processing according to an embodiment of the present disclosure. As shown in fig. 2, the network module in the embodiments of the present disclosure may include at least two classifiers. As shown in fig. 2, n classifiers may be included in an embodiment of the present disclosure. It should be noted here that the n classifiers (weak classifiers in fig. 2) are not end-to-end, i.e. the output feature of the previous classifier is not used as the input of the next classifier, and the arrow direction indicates that the result of the previous classifier affects the weight of the input sample of the next classifier.
In practical application, the n classifiers are trained classifiers capable of performing preset lesion detection. The detection of the predetermined lesion may be performed using at least one classifier in the network module. In particular, the input image may be three-dimensional lung data, such as lung CT data. The input image is input into any classifier (for example, the nth classifier) of the network module, so that a classification result about the predicted lesion in the lung image can be obtained, for example, whether each preset lesion exists or not and a corresponding existence probability of each preset lesion can be obtained, and when the existence probability is greater than a prediction threshold, it is determined that the corresponding preset lesion exists. Alternatively, the embodiment of the present disclosure may also determine a final classification result by combining the classification results of all classifiers, and if the classifiers exceeding the preset ratio in the classifiers all determine that the first lesion exists, it is determined that the first lesion exists, and a union of location areas of the classifiers exceeding the preset ratio with respect to the first lesion may be used as the location area of the first lesion, or an intersection of the location areas of the first lesion may be used as the location area of the first lesion, which is not specifically limited by the present disclosure.
The following describes a training process of the network module according to the embodiment of the present disclosure. Fig. 3 shows a flowchart of a training method of a network module in an image processing method according to an embodiment of the present disclosure. The method for training the network module comprises the following steps:
s100: acquiring a first training image set;
in some possible embodiments, the network module may be trained using a first training set, the first training set including a plurality of first training images, which may be medical images with disease labels, for example, the first training images may be CT images of lungs, which correspond to disease information associated with the first training images, which have lung diseases, such as pneumonia (9, influenza, fungus, mycoplasma, giant cells, bacteria, carica, SARS, adenovirus, avian influenza), tuberculosis (4, disseminated tuberculosis, secondary tuberculosis, tracheobronchial tuberculosis, tuberculous pleurisy), tumors (2, benign nodules/tumors, malignant nodules/tumors). Each disease may uniquely correspond to a disease label, such as may be A, B, C, D …, etc., but is not a specific limitation of the present disclosure.
The first training image and the corresponding disease label may be used as a supervision in the training process.
S200: preprocessing the first training image set to obtain a second training image set;
in some possible embodiments, preprocessing may be performed on the first training image to complete normalization and data enhancement of the first training image, and improve the anti-interference capability of the network module. The preprocessing of embodiments of the present disclosure may include image deformation, truncation, and extension of training samples.
S300: training the network module using the second training image set, the training samples comprising the first training image set and/or the second training image set.
In some possible embodiments, in the case of obtaining the second training image set, the network module may be trained using the second training image set accordingly.
FIG. 4 illustrates a schematic diagram of preprocessing a first training image set in accordance with an embodiment of the present disclosure. The first training image may be a CT image.
Specifically, the preprocessing is performed on the first training image set to obtain a second training image set, and the method includes at least one of the following manners:
a) normalizing the first training image set;
wherein the normalization processing is performed on the first training image set, and comprises at least one of the following modes: converting pixel values of a first training image in the first training image set to be within a preset range; and intercepting a first training image in the first training image set into a preset size.
Specifically, HU value conversion can be performed on a CT image in a Dicom format, a CT value is obtained, and normalization processing is performed on the image after HU value conversion by using a preset function, so that the pixel value of the image is normalized to be in a [0,1] range. Wherein the preset function may include a mapimax function, but is not a specific limitation of the present disclosure.
In the embodiment of the present disclosure, the image truncation may be performed on the basis of the normalized result, or directly on the first training image, and an image block of a preset size is truncated around the image center coordinate, where the preset size may be 448 × 448, but is not limited in particular by the present disclosure.
In the disclosed embodiments, the image block may also be downsampled, such as further downsampling the image block by one time to a (224 ) size.
The image interception, normalization, up-sampling or down-sampling may be all steps of a preprocessing process, and this disclosure does not specifically limit this.
b) And performing data enhancement on the first training image set.
And in the data enhancement stage under the line, at least one of the following data enhancement modes is introduced to effectively improve the generalization performance of the network and eliminate the influence of data class imbalance on the model. And circularly enhancing the data of each combined label until reaching a preset value, wherein the preset value is determined according to the quantity value of the most combined label types of the data and a certain extra quantity value. The specific data enhancement mode can comprise at least one of the following modes:
rotating the at least one first training image by an angle of rotation, wherein the range of the angle of rotation is [ -10.0,10.0] degrees;
secondly, performing scaling processing on the first training image according to a preset multiple, wherein the range of the scaling multiple is [0.9,1.1 ];
executing translation processing on a first training image in the first training image set, wherein the range of translation size is [ -10,10] pixel;
and fourthly, performing turnover processing on the first training image in the first training image set. The overturning mode comprises the steps of respectively overturning vertically and horizontally along the cross sections (h and w);
fifthly, elastic deformation processing is carried out on the first training images in the first training image set.
And sixthly, performing linear transformation on the sample labels of at least two first training images in the first training image set, wherein the method for linear transformation comprises a Mixup method, and performing linear transformation on the at least two first training images in the first training set. For example, (x)k1,yh1) And (x)k2,yh2) Is the image and corresponding label of two samples (first training image) randomly drawn from the training data, λ ∈ [0,1 ∈ []Obeying the beta distribution, the generated sample formula is as follows:
wherein x is
k1And x
k2Are two samples randomly drawn from the training data (
k 1 th first training image and k2 th first training image, y)
h1Is the label (one-hot label) corresponding to the k1 th first training image
h2The label representing the h2 th first training image, λ is the coefficient of the linear transformation,
the pixel values of the pixel points of the training image generated after the linear transformation. The Mixup of the embodiment of the disclosure expands the training distribution by combining the prior knowledge, namely the linear interpolation of the feature vector should lead to the linear interpolation of the related label, and simultaneously can eliminate the memory of the model to the wrong label and reduce the sensitivity to the resisting sample.
Through the configuration, the embodiment of the disclosure can complete the preprocessing of the first training image in the first training set to obtain the second training set, and train the network module through the second training set until the training requirements are met, so as to improve the stability and the anti-sensitivity of the network module.
In the following, a process of training a network module is described, and fig. 5 shows a flowchart of training a network module according to an embodiment of the present disclosure, where training the network module includes:
s301: inputting the training sample into an ith classifier of the network module to obtain a classification result of the classifier aiming at the preset focus;
in some possible embodiments, the present disclosure may select a part of images from the first training image set or the second training image set as training samples, and sequentially input the training samples into each classifier to obtain a classification result, where the classification result includes a probability that each preset lesion exists.
In addition, the embodiment of the present disclosure may further obtain a corresponding hamming loss by using the classification result, that is, after each classifier performs the classification processing on the training sample, a cross entropy loss (focal loss) corresponding to the classification result may be obtained by using the classification result and the real disease label. The specific calculation process of focal loss is as follows:
FL(pt)=-αt(1-pt)γlog(pt)
wherein p istProbability value, alpha, representing preset lesions of the t-th classtTerm controls positive class weight, (1-p)t) Increasing the weight of the samples which are difficult to classify, and reducing the weight of the samples which are easy to classify; gamma controls the importance of hard to classify samples. When applied by alphatAnd gamma back-varying adjustments to obtain the optimal configuration.
And obtaining the classification loss of the classifier aiming at the training samples by utilizing the cross entropy loss corresponding to the sample weight of the training samples and the classification result of the training samples.
S302: adjusting the weight of the training sample aiming at the preset focus by using the classification result of the ith classifier, and inputting the training sample with the adjusted weight to the (i + 1) th classifier until the nth classifier obtains a classification result;
in some possible embodiments, in a case that the first classifier is obtained to correctly classify the preset lesion in the training sample, that is, correctly classify the preset lesion type in the training sample, the sample weight of the training sample may be increased, and if the classification result is incorrect, the sample weight of the training sample may be decreased.
Or, in some possible embodiments, in the case of obtaining a classification result of the first classifier for a training sample, the classification accuracy of the classifier may be determined, and if the classification accuracy is higher than or equal to an accuracy threshold, the weight of the training sample may be increased, and if the classification accuracy is lower than the accuracy threshold, the weight of the training sample may be decreased. And then inputting the training sample after the weight is adjusted into a second classifier, executing classification of the preset focus, and so on until a classification result is obtained through the last classifier. The precision threshold may be a value greater than or equal to 0.5 and less than 1. Under the condition that the classification precision of the ith classifier on the training samples is greater than or equal to a precision threshold, increasing the weight of the training samples, and inputting the training samples with the adjusted weight to the (i + 1) th classifier; and when the classification precision of the ith classifier on the training samples is smaller than a precision threshold, reducing the weight of the training samples, and inputting the training samples with the adjusted weight to the (i + 1) th classifier.
In some possible embodiments, different weights may also be set for the training samples for each preset lesion. In the embodiment of the present disclosure, the classification accuracy of the training sample for the preset lesion may be obtained, if the classification accuracy is greater than the accuracy threshold, the weight of the training sample for the preset lesion may be increased, for example, increased by 0.1 time, and if the classification accuracy is less than the accuracy threshold, the weight of the training sample for the preset lesion may be decreased, for example, decreased by 0.1 time. According to the method, corresponding weights can be set for the training samples aiming at each preset focus, and the training samples with the adjusted weights are input into the next classifier for prediction.
S303: obtaining network loss by using the classification loss of all classifiers of the network module;
in the case where each classifier performs classification prediction, the classification loss of each classifier can be used to derive the network loss of the network module. The loss of each classifier for the training sample can be focal loss, and the network loss is determined by combining the weighted average of the focal loss of all the classifiers. That is, the product of the weight of the training sample in the classifier and the corresponding focal loss can be used to obtain the classification loss of the classifier, and the sum of the classification losses of each classifier can be used to obtain the network loss. S304: and adjusting parameters of each classifier in the network module based on the network loss until the training condition is met.
In some possible embodiments, in the case that the network loss is less than or equal to the loss threshold, the training is stopped, resulting in a network module whose net meets the training requirements. In the case that the network loss is greater than the loss threshold, a part of the training samples from the first training set or the second training set may be selected again to repeat the training process until the precision for all the training samples is greater than or equal to the loss threshold. The loss threshold is a value greater than or equal to 0.6 and less than 1.
In the embodiment of the disclosure, the network module uses the idea of Adaboost for reference, and reduces the misclassification sample (which is a labeled noise sample with high possibility) judged by the previous weak classifier by constructing n weak classifiers and adding the sample weight to the next weak classifier. For the multi-label classification problem, the misdividing sample takes whether the labels are matched inaccurately as a judgment standard: after training and classification by a previous weak classifier, if the sample labels are accurately matched, adding 0.1 time of weight to the sample, and changing the weight into 1.1 times; if the sample labels are not accurately matched, the samples are wrongly divided, and the weight of the samples is reduced by 0.1 time and is changed into 0.9 time. And finally, integrating all weak classifiers to obtain a strong classifier. In the application test stage, the classification results of all weak classifiers can be used to obtain the output result of the strong classifier, the output result is the hamming loss weighted average of all weak classifiers, and if the classification precision of the output result to the label value is greater than 0.5, the label is determined to exist. The prediction probability of the network module for the preset focus can be expressed as
Wherein i represents the ith classifier and is an integer greater than or equal to 1 and less than or equal to N, j represents the jth preset lesion and is an integer greater than or equal to 1 and less than N, N represents the total number of the preset lesions, and HLiRepresenting the hamming loss for the ith classifier. YpredjRepresenting the prediction probability of the ith classifier for the jth pre-defined lesion. Based on the configuration, the classification precision of the whole network can be obtained.
The prediction process of the predetermined lesion for each classifier in the embodiments of the present disclosure is described below. Fig. 6 shows a flowchart of a method for obtaining a classification loss of each classifier according to an embodiment of the present disclosure, wherein the obtaining of the classification loss of each classifier includes: performing feature extraction and full-connection processing on the training samples input into the classifier to obtain a first classification result aiming at the preset focus; and obtaining the classification loss of the classifier by using the corresponding losses of the first classification result and a second classification result obtained by clustering the training samples.
As shown in fig. 6, in the process of training the classifier according to the embodiment of the disclosure, a part of the first training set and/or the second training set is used as a training sample, a feature extraction module in the classifier is used to perform feature extraction processing to obtain a first sample feature, and then full join processing is performed to obtain a first classification result. And then, the feature extraction module can be used for extracting features of all the first training sets and/or the second training sets, and then clustering processing is carried out on the obtained features to obtain a clustering label aiming at the preset focus and obtain a second classification result. All the first or second training image sets can be input into the feature extraction module, and second sample features for cluster analysis are correspondingly obtained. And obtaining the total classification loss by using the weighted sum of the losses corresponding to the first classification result and the second classification result, at the moment, updating the parameters of the feature extraction module by using the classification loss feedback, returning a part of the first training set and/or the second training set as a new training sample, performing feature extraction for classification to obtain a first classification result, performing feature extraction on all the first training set and/or the second training set, performing clustering processing to obtain a second classification result, and so on until the obtained classification loss is less than a loss threshold value, and finishing the training of the classifier.
Fig. 7 shows a schematic structural diagram of a classifier according to an embodiment of the present disclosure, and fig. 8 shows a schematic flow diagram of an attention mechanism according to an embodiment of the present disclosure. Fig. 9 shows a schematic diagram of the DenseNet structure in the classifier. The classifier may include a three-dimensional processing module and a two-dimensional processing module. The three-dimensional processing module is used for executing three-dimensional image processing on the input training sample, and the two-dimensional processing module is used for executing two-dimensional image processing on the input training sample. In the embodiment of the present disclosure, the performing feature extraction and full-join processing on the training sample input to the classifier by using the weight of the training sample to obtain a first classification result for the preset lesion includes: performing feature extraction and global pooling of three-dimensional images on the training samples to obtain first features; performing feature extraction and global pooling of two-dimensional images on the training samples to obtain second features; performing feature fusion on the first feature and the second feature to obtain a fusion feature; and executing full-connection processing on the fusion features to obtain the first classification result.
The feature extraction module in the classifier of the embodiment of the disclosure may include a convolution layer, and the corresponding first sample feature may be obtained through processing of the convolution layer. In the three-dimensional image processing process, the feature extraction can be performed on the three-dimensional image by using the convolution layer 3DConvlayer of the three-dimensional image to obtain the three-dimensional feature, and in the two-dimensional image processing process, the feature extraction can be performed on the two-dimensional image by using the convolution layer 2DConvlayer of the two-dimensional image to obtain the two-dimensional feature. And then, in the three-dimensional image processing, multilayer convolution processing is carried out on the three-dimensional features, a plurality of DenseNet3D can be connected in sequence after the feature extraction module, and then the global pooling layer is connected to carry out pooling processing to obtain first pooling features. In the two-dimensional image processing, an Attention module is utilized to execute convolution processing based on an Attention value by adopting an Attention mechanism (Attention mechanism), then a plurality of DenseNet2D are connected in sequence, and then a global pooling layer is connected to execute pooling processing to obtain a second pooling characteristic. Based on the result of the connection of the first pooled feature and the second pooled feature, a fused feature (first sample feature) is obtained. And then, a first classification result is obtained by utilizing a full connection layer and sigmoid processing.
Then, the weight of each preset lesion in the input training sample can be determined according to the first classification result obtained by each classifier, and then the classification processing of the next classifier is continued.
The embodiment of the present disclosure may perform feature transformation by using the product of the weight of the training sample and the corresponding feature.
The basic structure of the network is a Denseblock structure, the internal structure of the network is shown in FIG. 8, and the characteristic reuse is realized through dense connection, so that the problem of gradient disappearance is relieved. After the 2D network and the 3D network are subjected to feature splicing in the global pooling layer, the 2D network and the 3D network are connected through a full-connection layer and are output after sigmoid activation, the number of output nodes is 15, and the output nodes correspond to the number of disease tags. For the multi-label classification model, the Loss function of each output node adopts two classification Focal lengths, and the Loss function of the whole model is the average value of the Loss functions of all nodes, so that the model pays attention to the difficultly-classified samples and a few samples in the training process, and the precision is improved. The Focal local formula is as follows:
FL(pt)=-αt(1-pt)γlog(pt)
wherein p istProbability value, alpha, representing the predicted lesion of class ttRepresents the weight of the control positive class, (1-p)t) The method comprises the steps of increasing the weight of a sample which is difficult to classify, and reducing the weight of a sample which is easy to classify; γ represents the importance of controlling hard-to-classify samples. When applied by alphatAnd gamma back-varying adjustments to obtain the optimal configuration.
The multi-label classification model also needs to determine an optimal threshold value during testing, and different from the traditional experience setting scheme, the method uses an adaptive threshold value method to determine the optimal threshold value of each label. The specific implementation method comprises the following steps: setting threshold intervals (0.01,0.99), wherein the interval is 0.01, respectively calculating and finding out the optimal accuracy of each label type in the threshold intervals, wherein the threshold corresponding to the accuracy is the optimal threshold of the label type. When the model is applied, the optimal threshold corresponding to the test set closest to the target data distribution can be directly used.
In addition, in order to further improve the robustness of the model to the tag noise, the one-hot tag is subjected to smoothing processing during model training. For the N classes of pre-defined lesions, the Label smoothening formula is as follows:
wherein alpha is a number in the range of (0, 1),yiindicating the presence or absence of a predetermined lesion, and N indicates the number of predetermined lesions.
For each label in the multi-label category, there are two categories that exist or do not exist, so the above formula can be translated as:
at each training iteration, it amounts to training the sample (x) with a probability of 1- α/2i,yi) Substituting the training with a probability of alpha/2 to convert (x)i,1-yi) The training is substituted, and the input of both the correct label and the wrong label is carried out, so that the model can not be matched with each label at all but is matched to a certain extent, the tolerance of the model to noise is improved, and the influence on the model is relatively small when the real wrong label is met.
The embodiment of the disclosure sequentially performs data preprocessing, offline enhancement (5 enhancement modes are selected according to the rules and proportion of the invention) and online enhancement (Mixup) on a training image set. Building a plurality of weak classifiers by using a system framework built by the Adaboost idea for reference, reducing misclassification samples (labeled noise samples are possible) judged by a previous classifier by adding sample weights to a subsequent classifier, and finally integrating the result based on a weighted voting method to obtain a strong classifier; and combining an Attention mechanism 2D convolution and 3D convolution to fuse a network structure. A single weak classifier is used for integrating a data cleaning module (clustering processing) in the training process to screen or correct the label; similar multi-label classification noise countermeasure design combinations are used: adding a training data Label into Label smoothening; adding a sample into the Mixup online data enhancement; the single weak classifier is integrated into a data cleaning module to screen or correct the label in the training process; the model testing process determines the optimal Threshold for the multi-label category by Adaptive Threshold.
For example, lung diseases are usually diagnosed by experts, and the patient-level lung disease label is limited by experience knowledge and working state of the experts, so that some stubborn miscellaneous diseases are difficult to diagnose and absolute correctness of the label cannot be guaranteed, and therefore misdiagnosis to a certain extent exists, namely label noise often exists in data for a model. The technology of the invention can realize robustness to the label noise, and can finish the training and the acquisition of a high-precision model by only a small amount of data, so that the technology is used for diagnosing all possible lung diseases suffered by a patient. The embodiment of the disclosure can reach the diagnosis level of a specialist doctor in practical application, effectively reduces the burden of imaging department doctors, improves the disease diagnosis efficiency and increases the medical bearable capacity. And local medical level can be improved for remote areas with poor medical conditions.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Fig. 10 shows a block diagram of an image processing apparatus according to an embodiment of the present disclosure, which includes, as shown in fig. 10:
an acquisition module 10, configured to acquire a medical image to be processed;
a classification module 20, configured to input the medical image into a network module, and acquire classification information about at least one type of preset lesion in the medical image by using the network module, where the network module is trained and is capable of detecting the preset lesion; the network module comprises at least two classifiers, in the process of training the network module, the weight of the (i + 1) th classifier on a training sample is adjusted according to the classification result of the ith classifier on the training sample, i is an integer which is greater than 1 and less than or equal to n, and n represents the number of the classifiers.
In some embodiments, functions of or modules included in the apparatus provided in the embodiments of the present disclosure may be used to execute the method described in the above method embodiments, and specific implementation thereof may refer to the description of the above method embodiments, and for brevity, will not be described again here.
It is understood that the above-mentioned method embodiments of the present disclosure can be combined with each other to form a combined embodiment without departing from the logic of the principle, which is limited by the space, and the detailed description of the present disclosure is omitted.
In addition, the present disclosure also provides an image processing apparatus, an electronic device, a computer-readable storage medium, and a program, which can be used to implement any one of the image processing methods provided by the present disclosure, and the descriptions and corresponding descriptions of the corresponding technical solutions and the corresponding descriptions in the methods section are omitted for brevity.
Embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the above-mentioned method. The computer readable storage medium may be a non-volatile computer readable storage medium.
An embodiment of the present disclosure further provides an electronic device, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured as the above method.
The electronic device may be provided as a terminal, server, or other form of device.
Fig. 11 illustrates a block diagram of an electronic device 800 in accordance with an embodiment of the disclosure. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, or the like terminal.
Referring to fig. 11, electronic device 800 may include one or more of the following components: processing component 802, memory 804, power component 806, multimedia component 808, audio component 810, input/output (I/O) interface 812, sensor component 814, and communication component 816.
The processing component 802 generally controls overall operation of the electronic device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing components 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
The power supply component 806 provides power to the various components of the electronic device 800. The power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.
The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the electronic device 800 is in an operation mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the electronic device 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the electronic device 800. For example, the sensor assembly 814 may detect an open/closed state of the electronic device 800, the relative positioning of components, such as a display and keypad of the electronic device 800, the sensor assembly 814 may also detect a change in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, orientation or acceleration/deceleration of the electronic device 800, and a change in the temperature of the electronic device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the electronic device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a non-transitory computer-readable storage medium, such as the memory 804, is also provided that includes computer program instructions executable by the processor 820 of the electronic device 800 to perform the above-described methods.
Fig. 12 shows a block diagram of another electronic device 1900 according to an embodiment of the disclosure. For example, the electronic device 1900 may be provided as a server. Referring to fig. 12, electronic device 1900 includes a processing component 1922 further including one or more processors and memory resources, represented by memory 1932, for storing instructions, e.g., applications, executable by processing component 1922. The application programs stored in memory 1932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 1922 is configured to execute instructions to perform the above-described method.
The electronic device 1900 may also include a power component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input/output (I/O) interface 1958. The electronic device 1900 may operate based on an operating system stored in memory 1932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In an exemplary embodiment, a non-transitory computer readable storage medium, such as the memory 1932, is also provided that includes computer program instructions executable by the processing component 1922 of the electronic device 1900 to perform the above-described methods.
The present disclosure may be systems, methods, and/or computer program products. The computer program product may include a computer-readable storage medium having computer-readable program instructions embodied thereon for causing a processor to implement various aspects of the present disclosure.
The computer readable storage medium may be a tangible device that can hold and store the instructions for use by the instruction execution device. The computer readable storage medium may be, for example, but not limited to, an electronic memory device, a magnetic memory device, an optical memory device, an electromagnetic memory device, a semiconductor memory device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a Static Random Access Memory (SRAM), a portable compact disc read-only memory (CD-ROM), a Digital Versatile Disc (DVD), a memory stick, a floppy disk, a mechanical coding device, such as punch cards or in-groove projection structures having instructions stored thereon, and any suitable combination of the foregoing. Computer-readable storage media as used herein is not to be construed as transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission medium (e.g., optical pulses through a fiber optic cable), or electrical signals transmitted through electrical wires.
The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or to an external computer or external storage device via a network, such as the internet, a local area network, a wide area network, and/or a wireless network. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. The network adapter card or network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in the respective computing/processing device.
The computer program instructions for carrying out operations of the present disclosure may be assembler instructions, Instruction Set Architecture (ISA) instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider). In some embodiments, the electronic circuitry that can execute the computer-readable program instructions implements aspects of the present disclosure by utilizing the state information of the computer-readable program instructions to personalize the electronic circuitry, such as a programmable logic circuit, a Field Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA).
Various aspects of the present disclosure are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the disclosure. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer-readable program instructions.
These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer-readable medium storing the instructions comprises an article of manufacture including instructions which implement the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer, other programmable apparatus or other devices implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
Having described embodiments of the present disclosure, the foregoing description is intended to be exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein were chosen in order to best explain the principles of the embodiments, the practical application, or technical improvements to the techniques in the marketplace, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.