A deep medical image clustering method based on multi-scale structure learning
By combining the multi-scale structure learning method with autoencoders and graph convolutional networks, the problem of combining image representation learning with multi-scale neighborhood structure information in deep image clustering is solved, achieving efficient medical image clustering and improving diagnosis efficiency. and accuracy.
Patent Information
- Application Number
- CN202210354116.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-06
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-04-06
AI Technical Summary
Existing deep image clustering methods fail to effectively combine the representation learning of the image itself with the multi-scale neighborhood structure information between images, resulting in low diagnostic efficiency and accuracy in medical image clustering, and it is difficult for existing technologies to handle high dimensions. Medical image data.
A deep medical image clustering method based on multi-scale structure learning is adopted, through data enhancement, instance similarity module, joint cluster structure and instance reconstruction module, multi-scale graph convolution network and other technologies, combined with autoencoder and graph convolution network , learn the image sample's own information and multi-scale neighborhood structure information to achieve high-quality clustering of images.
It improves the accuracy and efficiency of medical image clustering, reduces the burden on doctors, can effectively process high-dimensional medical image data, improves the robustness and anti-interference ability of feature information, and is suitable for different deep neural network frameworks.
Smart Images

Figure CN114743037B
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of deep learning and image clustering, and in particular to a deep medical image clustering method based on multi-scale structure learning. Background Art
[0002] In the daily outpatient clinics of hospitals, a large number of patients take medical images during the examination. Doctors need to spend a lot of time analyzing and diagnosing these images. In the diagnosis process, there may be problems such as lack of experience of doctors and visual fatigue caused by long-term exposure to electronic screens, which may lead to wrong judgments by doctors and delay the treatment of patients. For example, when diagnosing ear diseases, taking otoscope images is an important diagnostic link, but there are still few clustering analysis technologies for the large number of otoscope images accumulated by hospitals. Combining deep image clustering technology with unsupervised classification of a large number of otoscope images can provide doctors with a new technical means for diagnosing ear diseases (such as cholesteatoma, otitis media, epitympanic cavity retraction bags, etc.) and discovering subtypes of the same type of ear diseases, thereby improving the decision-making efficiency and accuracy of doctors.
[0003] Clustering technology is an important branch of machine learning. Its task is to divide unlabeled data into multiple clusters, and the data samples of each cluster are as similar as possible. With the rapid development of the Internet and the upgrading of user needs, a large amount of messy image data has emerged on the Internet. However, image data is easy to obtain, but labeling image data is a labor-intensive task. Using unsupervised technology to perform cluster analysis on image data is of great significance for many data processing tasks. Taking urban traffic images as an example, in order to create different labels for various traffic scene image data for classification, personnel with professional knowledge of traffic need to spend a lot of time to view the images, manually segment, and finally add labels. This process is extremely labor-intensive. Through cluster analysis, an unsupervised learning technology, when the original data is not labeled, clustering can divide a large amount of image data into several small categories (each small category is called a cluster). Professionals only need to label these clusters separately, which greatly reduces the workload compared to labeling each image data. Traditional clustering algorithms such as K-means or Gaussian Mixture Model (GMM) are mainly designed for low-dimensional data and perform poorly on high-dimensional structured data such as medical images.
[0004] In order to effectively cluster high-dimensional image data samples, more and more researchers have combined deep learning with clustering technology. Through the feature extraction advantages of deep neural networks, clustering technology has been provided with the ability to process high-dimensional data. Clustering based on deep neural networks is also called deep clustering. For example, Deep Adaptive Image Clustering (DAC) trains neural networks through adaptive learning, thereby improving the similarity between self-enhanced samples. Deep Embedded Image Clustering (DEC) maps the feature information learned in the data space to a low-dimensional feature space through a neural network, and iteratively optimizes the clustering target in this feature space. In addition, Joint Unsupervised Learning (JULE) applies the clustering algorithm to convolutional neural networks, uses the good representation obtained by convolutional neural networks to adjust the clustering results, and further uses the results as pseudo labels to continuously supervise the learning of convolutional neural network models. Contrastive Clustering (CC) is a method based on contrastive learning to jointly learn image representation and cluster assignment in an end-to-end manner. These deep image clustering methods usually use convolutional neural networks to learn image representations, but do not consider the multi-scale neighborhood structure information between images. The Structural Deep Clustering Network (SDCN) uses a single K-nearest neighbor graph to express the neighborhood information of a single scale. However, on the one hand, it does not use convolutional network layers and uses vectorized data features as input, which makes it difficult to apply to the representation learning and clustering of complex images. On the other hand, it only uses single-scale neighborhood information, but does not consider the multi-scale neighborhood information between samples, and cannot perform collaborative learning of multi-scale neighborhood structures.
[0005] In summary, existing deep image clustering methods mainly consider the feature information of the image data itself; some methods consider the fixed (single) neighborhood information between data samples, but fail to break through the single-scale neighborhood structure, and fail to use graph neural networks including graph convolutional networks to learn multi-scale neighborhood structures between image data. There is currently no solution to how to combine the representation learning of the image itself with the neighborhood structure learning between images based on the deep learning framework, and to expand the single-scale neighborhood structure information to multi-scale neighborhood structure learning to achieve higher-quality clustering. Medical images are a special type of image data. Unsupervised clustering of them can effectively reduce the burden on doctors and improve diagnostic efficiency and accuracy. For example, when diagnosing ear diseases, clustering analysis of a large number of otoscope images can provide doctors with technical tools for diagnosing ear diseases (cholesteatoma, otitis media, epitympanic cavity retraction bags, etc.) and discovering subtypes of the same type of ear diseases. There is currently no deep clustering technology solution for medical images. Summary of the invention
[0006] The purpose of the present invention is to provide a deep medical image clustering method based on multi-scale structure learning to reduce the burden on doctors and improve diagnostic efficiency and accuracy.
[0007] In order to achieve the above tasks, the present invention adopts the following technical solutions:
[0008] A deep medical image clustering method based on multi-scale structure learning includes the following steps:
[0009] Collect N medical images to be clustered and construct a medical image dataset S. Randomly use two different data enhancement methods for each image Y in the medical image dataset to obtain enhanced sample images Ya and Yb corresponding to the image.
[0010] After the sample images Ya and Yb are respectively passed through the backbone network, they are trained in the instance similarity module and the joint cluster structure and instance reconstruction module; wherein, in the instance similarity module, the feature information matrix Z a and Z b After passing through two layers of fully connected multilayer perceptrons, the cosine similarity calculation, the instance contrast loss calculation and the instance similarity contrast loss optimization are completed, thereby optimizing the feature information matrix Z a and Z b Perform repeated iterations and updates; extract the Ya and Yb feature information matrix Z after repeated iterations and optimization through training a and Z b ;
[0011] According to the characteristic information matrix Z b Construct multi-scale neighborhood structure information, in the feature information matrix Z bConstruct an M-path K-nearest-neighbor graph;
[0012] The obtained multi-scale neighborhood structure information is put into the M-way graph convolutional network and combined with the autoencoder part of the trained instance reconstruction module for joint training, while learning the multi-scale neighborhood structure information of the image samples themselves and the image samples. After the training is completed, the feature results learned by the network are clustered to obtain the category prediction results of the medical image.
[0013] Furthermore, the data enhancement methods include random cropping, color jittering, grayscale, horizontal flipping and Gaussian blur.
[0014] Furthermore, the feature matrices of images Ya and Yb obtained after being processed by the backbone network are mapped into a low-dimensional subspace, and instance similarity structure learning is performed on them in this low-dimensional subspace;
[0015] The samples Ya and Yb obtained by different data enhancement of sample Y are regarded as a positive sample pair, and Ya and the remaining 2*(N-1) samples form 2*(N-1) negative sample pairs; the distance between positive sample pairs is reduced by contrast loss, while the distance between negative sample pairs is increased; the similarity between positive and negative sample pairs is measured by cosine similarity;
[0016] The instance contrast loss of image Ya is as follows:
[0017]
[0018] In the above formula, represents the cosine similarity between samples Ya and Yb, e is the base of the natural logarithm, τ I is the contrast temperature parameter representation for continuous image data, N represents the number of medical images in the medical image dataset S;
[0019] The contrast loss is calculated for samples that have undergone different data enhancements:
[0020]
[0021] in Represents the instance contrast loss of image sample Yb; the stochastic gradient descent algorithm is used to minimize the instance similarity contrast loss
[0022] Furthermore, the instance reconstruction module uses a four-layer autoencoder network structure, combining the cluster structure and two losses of the instance reconstruction module: the cluster structure loss and the instance reconstruction loss are:
[0023]
[0024]
[0025] In the above formula, the preliminary feature information matrix Z b The i-th behavior Represents the characteristic information of the i-th sample; Represents the feature information of the i-th sample reconstructed by the autoencoder, represents the feature information matrix reconstructed by the autoencoder, N represents the number of medical images in the image dataset, and NOC represents the number of categories in the image dataset;
[0026] H(W a ) and H(W b ) are two regularization terms, where:
[0027]
[0028]
[0029] More specifically:
[0030] Where W a and W b is the preliminary feature information matrix Z a and Z b The low-dimensional feature matrix obtained after dimensionality reduction by the autoencoder, Represents the matrix W a The i-th column of Represented in the matrix W k The i-th column of the t-th sample in ;
[0031] Loss of Joint Cluster Structure and Instance Reconstruction Module The final form is:
[0032]
[0033] Furthermore, according to the feature information matrix Z b Construct multi-scale neighborhood structure information, in the feature information matrix Z b Construct an M-path K-nearest neighbor graph on it, including:
[0034] Construct a similarity matrix; for image data sets, use the Gaussian kernel method to measure the similarity between samples:
[0035]
[0036] z i and z j Represents the feature information matrix Z bThe i-th and j-th rows in are the characteristic information of the i-th and j-th samples, and t is the time parameter in the heat conduction equation;
[0037] After constructing the similarity matrix, different K nearest neighbor graphs are constructed on the similarity matrix, and a total of M K nearest neighbor graphs are constructed, where M ≥ 2.
[0038] Furthermore, the autoencoder and graph convolution module in the joint cluster structure and instance reconstruction module are jointly trained. The number of autoencoder layers is set to l, and each layer is obtained from the feature information matrix Z by the following formula: b The self-information of the learning sample:
[0039]
[0040] where Φ(·) is the activation function of each layer of the autoencoder, and Represent the weight matrix and bias value of each layer of the autoencoder respectively. Represents the feature information matrix of the samples learned by the autoencoder layer l;
[0041] The autoencoder uses the following formula to make the feature information matrix Z b After dimensionality reduction, feature information with rich semantics can still be obtained:
[0042]
[0043] in is the feature information matrix recovered by the decoder layer l, that is
[0044] Furthermore, the graph convolutional network aggregates neighborhood information for a single sample in the following way:
[0045]
[0046]
[0047] Among them, V represents all nodes in the graph, I is the identity matrix, A is the adjacency matrix, Represents the neighborhood information of the aggregated i-th node; V j represents the jth node; represents the degree of the i-th node, represents the degree of the jth node, Indicates whether there is an edge connecting the i-th node and the j-th node. If so, it is 1; if not, it is 0.
[0048] Each layer of graph convolutional network aggregates neighborhood information in the following way;
[0049]
[0050] in Represents the information learned by the L-th layer graph convolutional network; represents the weight matrix of the (L-1)th layer; express The corresponding degree matrix, Φ(·) represents the activation function;
[0051] Then, the neighborhood structure information learned by each layer of the graph convolutional network is combined with the sample's own information learned by the autoencoder part through linear combination to obtain a feature information matrix containing two kinds of information. This is then passed to the next layer of graph convolutional network to start a new round of feature matrix updates:
[0052]
[0053] where σ and γ are hyperparameters, Represents the neighborhood information aggregated by the first graph convolutional network, Represents the neighborhood information aggregated by the second graph convolutional network. Here, the first and second paths are two-path graph convolutional networks when M=2. Represents the information of the sample itself learned from the autoencoder;
[0054] By connecting the two hyperparameters σ and γ, the multi-scale neighborhood structure information is combined with the data itself, and based on this, the backbone network and the autoencoder part of the joint cluster structure and instance reconstruction learning module are updated.
[0055] Furthermore, the Student's t distribution is used to convert the result obtained by the autoencoder into a probability distribution:
[0056]
[0057] Among them, h i is the data representation of the i-th image sample in the dataset S, μ j , μ j′ represents different cluster center vectors, t is the degree of freedom of Student's t distribution, q ij It represents the probability that the i-th image sample in the dataset S belongs to the j-th cluster, that is, the probability that the i-th sample is labeled with the j-th label; combining these distribution probabilities of all samples together gives a probability distribution Q,q ij ∈Q;
[0058] Using the probability distribution q ij To calculate the probability distribution pij :
[0059]
[0060] where f j =∑ i q ij , f j is the soft cluster allocation frequency;
[0061] Using the target distribution P = [p ij ] to supervise the update of Q distribution, using KL divergence:
[0062]
[0063] Similarly, the target distribution P is used to supervise the update of the graph convolutional network:
[0064]
[0065]
[0066] Where G1 = [g 1-ij ] and G2=[g 2-ij ] represent the probability distribution learned by one-way graph convolutional network and the probability distribution learned by two-way graph convolutional network respectively;
[0067] Finally, the loss function of the autoencoder part and the multi-scale graph convolutional network module as follows:
[0068]
[0069] A terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the deep medical image clustering method based on multi-scale structure learning are implemented.
[0070] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the deep medical image clustering method based on multi-scale structure learning.
[0071] Compared with the prior art, the present invention has the following technical features:
[0072] 1. The present invention applies the reconstruction loss function of the autoencoder and the global clustering structure loss function together to clustering structure learning, so as to learn better image representation.
[0073] 2. The present invention constructs multiple K nearest neighbor graphs based on the representation learned by the deep neural network, which respectively reflect the neighborhood structure information at multiple scales.
[0074] 3. In terms of neighborhood structured learning, this invention proposes for the first time a multi-scale neighborhood structure learning method between image data. On K-nearest neighbor graphs of different scales, a multi-path graph convolutional network (GCN) is used to collaboratively learn neighborhood information between images at different scales.
[0075] 4. The present invention collaboratively learns and updates the neighborhood structure information between images at different scales and the representation information of the image data itself, effectively improving the robustness and confidence of the feature information, and making up for the deficiency of the prior art of only using single-scale neighborhood structure information.
[0076] 5. This invention is the first to construct instance-level contrast learning, global clustering structure learning, and multi-scale neighborhood structure learning into a unified deep image clustering framework.
[0077] 6. The present invention is insensitive to hyperparameters. Even different parameter combinations do not affect the final clustering results. The effectiveness of the present invention has been confirmed on multiple image data sets.
[0078] 7. Because multi-scale neighborhood structure information is aggregated, the present invention has excellent anti-interference ability for image data. Even if there are missing, noisy, and unclear effects in the image data set, it does not affect the effectiveness of the final clustering result of the present invention.
[0079] 8. The present invention can be applied to different deep neural networks and adapted to different deep learning frameworks, significantly improving the clustering performance of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1 A logical flow diagram of the method of the present invention;
[0081] Figure 2 Schematic diagram of the network structure of the deep image clustering model based on multi-scale structure learning;
[0082] Figure 3 Schematic diagram of the structure of the instance similarity module in the present invention;
[0083] Figure 4 A schematic diagram of the structure of the combined cluster structure and instance reconstruction learning module in the present invention;
[0084] Figure 5 It is the multi-scale graph convolutional network module in the present invention. DETAILED DESCRIPTION
[0085] Existing deep image clustering methods mainly consider the feature information of the image data itself; some methods consider the fixed neighborhood information between image data, but fail to break through the single-scale neighborhood structure, and fail to use graph neural networks including graph convolutional networks to learn the multi-scale neighborhood structure between image data. There is currently no solution to how to combine the representation learning of the image itself with the neighborhood structure learning between images based on the deep learning framework, and to expand the single-scale neighborhood structure information to multi-scale neighborhood structure learning to design a more effective deep image clustering method.
[0086] The purpose of the present invention is to overcome the shortcomings and deficiencies of existing deep image clustering methods in multi-scale neighborhood structure learning, and to provide a deep medical image clustering method based on multi-scale structure learning. This method combines the representation learning of image data itself with the global multi-scale structure learning between images, and uses convolutional neural networks, autoencoders, and graph convolutional networks to jointly construct a deep medical image clustering method that can perform multi-scale structure learning, thereby improving the performance of deep image clustering.
[0087] See attached Figure 1 A deep medical image clustering method based on multi-scale structure learning of the present invention comprises the following steps:
[0088] S1, collect N medical images to be clustered and construct a medical image dataset S. The medical images in the dataset can be multi-channel color images or single-channel grayscale images. At the same time, discard the label information of the medical image dataset for unsupervised comparative learning training.
[0089] S2, perform data augmentation operations on each medical image Y in the medical image dataset S.
[0090] This scheme uses a total of 5 data enhancement methods, including random cropping, color jitter, grayscale, horizontal flip and Gaussian blur; each medical image Y randomly selects two data enhancement methods T a 、T b After different data enhancements, each medical image Y obtains two sample images Ya and Yb, so a total of 2*N images are obtained in the end.
[0091] S3, the two new images Ya and Yb obtained after data enhancement are respectively passed through the backbone network and trained in the instance similarity module, the joint cluster structure and the instance reconstruction module. After repeated iterative optimization of training, the feature information matrix Z is obtained. a and Z bIt is used for subsequent S4 and S5 operations. At the same time, the autoencoders in the joint cluster structure and instance reconstruction modules are pre-trained through this training. The trained autoencoders will participate in the subsequent S6 and S7 operations.
[0092] The first is the instance similarity module. In this module, the feature information matrix Z a and Z b After passing through two layers of fully connected multilayer perceptrons, the cosine similarity calculation, the instance contrast loss calculation and the instance similarity contrast loss optimization are completed. The feature information matrix Z a and Z b The above process has been repeatedly iterated and updated.
[0093] like Figure 2 As shown in , the two images Ya and Yb obtained after data enhancement are respectively passed through the backbone network (here the residual network is selected as the backbone network, ResNet34), and then trained in the instance similarity module, the joint cluster structure and the instance reconstruction module. Figure 3 As shown in the figure, it consists of two layers of fully connected multi-layer perceptrons, and the dimensions of the two layers are 512 and 128 respectively. After the multi-layer perceptron (MLP), the feature matrix obtained by the image Ya and Yb after being processed by the backbone network is mapped to a low-dimensional subspace through the function S(·), and the instance similarity structure learning is performed in this low-dimensional subspace.
[0094] Taking image sample Y as an example, samples Ya and Yb obtained by different data enhancement of sample Y are regarded as a positive sample pair, and Ya and the remaining 2*(N-1) samples form 2*(N-1) negative sample pairs; the distance between positive sample pairs is shortened by contrast loss, while the distance between negative sample pairs is increased; the similarity between positive and negative sample pairs is measured by cosine similarity:
[0095]
[0096] in They represent the matrices obtained after the feature matrices of images Ya and Yb are reduced by the function S(·). The instance contrast loss of image Ya is as follows:
[0097]
[0098] In the above formula, τ I It is a temperature parameter representation for contrast of continuous image data; for different data enhancements T a ,T b The samples are all subjected to the calculation of contrast loss:
[0099]
[0100] in Represents the instance contrast loss of image sample Yb. Use the stochastic gradient descent algorithm to minimize the instance similarity contrast loss.
[0101] Then there is the joint cluster structure and instance reconstruction module. The cluster structure represents the distribution structure of different cluster categories in the image sample. The instance reconstruction module is to ensure that the preliminary feature information matrix Za and Zb still have good feature information after dimensionality reduction. The preliminary feature information matrix Z is repeatedly updated by calculating the comparison cluster structure loss and instance reconstruction loss. a and Z b .
[0102] like Figure 4 As shown in the figure, the instance reconstruction module uses a four-layer autoencoder network structure. The neuron size of the autoencoder is set to: input-500-500-2000-NOC (Number of Clusters). The input dimension is determined by the output dimension of the backbone network. NOC represents the number of categories in the image dataset. Therefore, the two losses of the combined cluster structure and instance reconstruction modules are: the cluster structure loss and the instance reconstruction loss are:
[0103]
[0104]
[0105] The preliminary feature information matrix Z in the above formula b The i-th behavior Represents the characteristic information of the i-th sample; Represents the feature information of the i-th sample reconstructed by the autoencoder, Represents the feature information matrix reconstructed by the autoencoder, and N represents the number of medical images in the image dataset.
[0106] The loss In order to avoid the trivial solution of clustering results, that is, most images are divided into a few clusters, two regularization terms H(W) are added. a ) and H(W b ),in:
[0107]
[0108]
[0109] More specifically:
[0110] Where W a and W b is the preliminary feature information matrix Z a and Z b The low-dimensional feature matrix obtained after dimensionality reduction by the autoencoder, Represents the matrix W a The i-th column of Represented in the matrix W k The i-th column of the t-th sample in . Loss In order to reconstruct the feature information matrix Z b , so that the feature information matrix still has rich semantic information after being mapped to a low-dimensional subspace through a multi-layer network.
[0111] In summary, the loss of the joint cluster structure and instance reconstruction module The final form is:
[0112]
[0113] S4, extract the preliminary feature information matrix Z of samples Ya and Yb from the backbone network a and Z b .
[0114] After training the instance similarity module, joint cluster structure and instance reconstruction module, the preliminary feature information matrix Z of the data sample is extracted from the backbone network. a and Zb, the matrix Z a and Z b The size is N×512, where N represents the number of samples in the data set, and 512 represents the dimension of the feature vector obtained by each sample after passing through the backbone network.
[0115] S5, based on the feature information matrix Z b Construct multi-scale neighborhood structure information, in the feature information matrix Z b Construct an M-path K-nearest-neighbor graph on it, where M ≥ 2.
[0116] The feature information matrix Z extracted from the backbone network b After taking it out, multi-scale neighborhood structure information is constructed on it. In order to construct neighborhood information using the K nearest neighbor graph, it is first necessary to construct a similarity matrix. In the present invention, for the image data set, the Gaussian kernel method is used to measure the similarity between samples:
[0117]
[0118] z i and z j Represents the feature information matrix Z bThe i-th and j-th rows in are the characteristic information of the i-th sample and the j-th sample, and t is the time parameter in the heat conduction equation.
[0119] After constructing the similarity matrix, different K nearest neighbor graphs are constructed on the similarity matrix. The value of K varies from {1, 3, 5, 10, 15, 20}. A total of M K nearest neighbor graphs are constructed, and M ≥ 2. Different K nearest neighbor graphs contain neighborhood structure information with different confidence levels. Then, it is necessary to learn the different neighborhood information in these K nearest neighbor graphs and combine them.
[0120] S6 and S7, put the multi-scale neighborhood structure information obtained in S5, that is, the M-way K-nearest neighbor graph, into the M-way graph convolutional network (Graph Convolutional Network, GCN), and combine it with the autoencoder part of the instance reconstruction module pre-trained in step S3 for joint training, while learning the multi-scale neighborhood structure information between the image samples themselves and the image samples; after the training is completed, the feature results learned by the network are clustered to obtain the clustering results.
[0121] The autoencoder and graph convolution module in the joint cluster structure and instance reconstruction module are used for joint training. The number of autoencoder layers is set to l, and each layer learns the data sample’s own information through the following formula, that is, from the feature information matrix Z b The self-information of the learning sample:
[0122]
[0123] Where Φ(·) is the activation function of each layer of the autoencoder, and the activation function selected in the present invention is Relu; and Represent the weight matrix and bias value of each layer of the autoencoder respectively. Represents the feature information matrix of the samples learned by the autoencoder layer l.
[0124] The autoencoder uses the following formula to make the feature information matrix Z b After dimensionality reduction, feature information with rich semantics can still be obtained:
[0125]
[0126] in is the feature information matrix recovered by the decoder layer l, that is
[0127] Similarly, we need to learn the multi-scale neighborhood structure information obtained in S5. The M K nearest neighbor graphs obtained in step 5 mean that there are M different neighborhood structure information, so we need M-way graph convolutional networks to learn these different neighborhood structure information and finally combine them. The graph convolutional network aggregates the neighborhood information of a single sample in the following way:
[0128]
[0129]
[0130] Among them, V represents all nodes in the graph, I is the identity matrix, A is the adjacency matrix, D represents the degree matrix, This is equivalent to adding the identity matrix I to the adjacency matrix A. Symmetric normalization was performed; Represents the neighborhood information of the aggregated i-th node; V j represents the jth node; represents the degree of the i-th node, represents the degree of the jth node, Indicates whether there is an edge connecting the i-th node and the j-th node. If so, it is 1; if not, it is 0. If i is not equal to k, it is 0. If i is equal to k, that is, represents the degree of the i-th node; Similarly, each layer of the graph convolutional network aggregates neighborhood information in the following way;
[0131]
[0132] in Represents the information learned by the L-th layer graph convolutional network. Represents the weight matrix of the (L-1)th layer. I is the identity matrix and A is the adjacency matrix. express The corresponding degree matrix, Φ(·) represents the activation function; then the neighborhood structure information learned by each layer of the graph convolutional network is combined with the sample's own information learned by the autoencoder part through linear combination, and the feature information matrix containing two kinds of information is obtained. This is then passed to the next layer of graph convolutional network to start a new round of feature matrix updates.
[0133]
[0134] Here, M=2, i.e., a two-way graph convolutional network, is used to demonstrate the invented method. σ and γ are hyperparameters, which respectively represent the proportion of different information. Here, σ=0.4 and γ=0.2. Represents the neighborhood information aggregated by the first graph convolutional network, Represents the neighborhood information aggregated by the second-path graph convolutional network. Here, the first and second paths are two-path graph convolutional networks when M=2. Figure 5 , Figure 5 The figure shows a two-way horizontal graph convolutional network, omitting the case of a multi-way graph convolutional network with M>2. Represents the information of the sample itself learned from the autoencoder. Through the connection of the two hyperparameters σ and γ, the multi-scale neighborhood structure information is successfully combined with the data itself information, and based on this, the backbone network and the autoencoder part of the joint cluster structure and instance reconstruction learning module are updated.
[0135] Use Student's t-distribution to convert the result of the autoencoder into a probability distribution:
[0136]
[0137] Among them, h i is the data representation of the i-th image sample in the dataset S, μ j , μ j′ represents different cluster center vectors, t is the degree of freedom of Student's t distribution, q ij It represents the probability that the i-th image sample in the dataset S belongs to the j-th cluster, that is, the probability that the i-th sample is labeled with the j-th label; combining these distribution probabilities of all samples together gives a probability distribution Q,q ij ∈Q.
[0138] In order to make the result obtained by the autoencoder closer to the cluster center of the cluster, the probability distribution q ij To calculate the probability distribution p ij :
[0139]
[0140] where f j =∑ i q ij , because q ij is a soft assignment probability, so it is believed that f j is a soft cluster allocation frequency. j′ In order to j To distinguish, it indicates the soft cluster allocation frequency under different i conditions. Conversely, using the target distribution P = [pij ] to supervise the update of Q distribution, using KL divergence:
[0141]
[0142] Similarly, the target distribution P is used to supervise the update of the graph convolutional network:
[0143]
[0144]
[0145] Where G1 = [g 1-ij ] and G2=[g 2-ij ] represent the probability distribution learned by the first graph convolutional network and the probability distribution learned by the second graph convolutional network respectively. So the loss function of the autoencoder part and the multi-scale graph convolutional network module is as follows:
[0146]
[0147] By first updating the loss function Update the loss function again In this way, the model has achieved excellent experimental results in the deep image clustering neighborhood.
[0148] In practical applications, for a data set C consisting of a bunch of newly collected medical images, such as a bunch of newly collected otoscope medical image data sets, when classifying these medical images, first perform data enhancement operation through step S2, and then train the enhanced image in the instance similarity module, the joint cluster structure and the instance reconstruction module through step S3, extract the feature matrix, and then construct the multi-scale neighborhood structure information based on the feature matrix, and finally train through the multi-scale graph convolutional network module and the autoencoder part in steps S6 and S7, and finally divide these newly collected otoscope medical images into several clusters, each cluster is a different category, that is, the category prediction result of each medical image is obtained.
[0149] The present invention can perform unsupervised segmentation of a large number of images through a deep image clustering method based on multi-scale structure learning. For example, a large number of otoscope images can be deeply clustered to assist medicine in diagnosing ear diseases, and to discover subtypes of the same type of ear diseases, thereby improving the efficiency and accuracy of doctors' decision-making.
[0150] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A deep medical image clustering method based on multi-scale structure learning, characterized in that: The following steps are involved: Collect N medical images to be clustered and construct a medical image dataset S. Randomly use two different data enhancement methods for each medical image Y in the medical image dataset to obtain enhanced medical images Ya and Yb. After the medical images Ya and Yb are respectively passed through the backbone network, they are trained in the instance similarity module combined with the cluster structure and instance reconstruction module. In the instance similarity module, the feature information matrix Z a and Z b After passing through two layers of fully connected multilayer perceptrons, the cosine similarity calculation, the instance contrast loss calculation and the instance similarity contrast loss optimization are completed, thereby optimizing the feature information matrix Z a and Z b Perform repeated iterations and updates; extract the Ya and Yb feature information matrix Z after repeated iterations and optimization through training a and Z b ; According to the characteristic information matrix Z b Construct multi-scale neighborhood structure information, in the feature information matrix Z b Construct an M-path K-nearest-neighbor graph; The obtained multi-scale neighborhood structure information is put into the M-way graph convolutional network and combined with the trained autoencoder part of the instance reconstruction module for joint training, while learning the image sample's own information and the multi-scale neighborhood structure information between image samples; after the training is completed, the feature results learned by the network are clustered to obtain the category prediction results of the medical image; The feature matrices of medical images Ya and Yb obtained after being processed by the backbone network are mapped to a low-dimensional subspace, in which instance similarity structure learning is performed; The medical images Ya and Yb obtained by different data enhancement of medical image Y are regarded as a positive sample pair, and Ya and the remaining 2*(N-1) samples form 2*(N-1) negative sample pairs; the distance between positive sample pairs is reduced by contrast loss, while the distance between negative sample pairs is increased; the cosine similarity is used to measure the similarity between positive and negative sample pairs; The instance contrast loss of the medical image Ya is as follows: In the above formula, represents the cosine similarity between medical images Ya and Yb, e is the base of natural logarithm, τ I is the contrast temperature parameter representation for continuous image data, N represents the number of medical images in the medical image dataset S; The contrast loss is calculated for samples that have undergone different data enhancements: in Represents the instance contrast loss of the medical image Yb; the stochastic gradient descent algorithm is used to minimize the instance similarity contrast loss The instance reconstruction module uses a four-layer autoencoder network structure, combining the cluster structure and two losses of the instance reconstruction module: the cluster structure loss and the instance reconstruction loss are: Among them, the feature information matrix Z b The i-th behavior Represents the characteristic information of the i-th sample; Represents the feature information of the i-th sample reconstructed by the autoencoder, represents the feature information matrix reconstructed by the autoencoder, and NOC represents the number of categories of the image dataset; H(W a ) and H(W b ) are two regularization terms, where: More specifically: Where W a and W b is the feature information matrix Z a and Z b The low-dimensional feature matrix obtained after dimensionality reduction by the autoencoder, Represents the matrix W a The i-th column of Represented in the matrix W k The i-th column of the u-th sample in ; Loss of Joint Cluster Structure and Instance Reconstruction Module The final form is: According to the characteristic information matrix Z b Construct multi-scale neighborhood structure information, in the feature information matrix Z b Construct an M-path K-nearest neighbor graph on it, including: Construct a similarity matrix; for image data sets, use the Gaussian kernel method to measure the similarity between samples: z i and z j Represents the feature information matrix Z b The i-th and j-th rows in are the characteristic information of the i-th and j-th samples, and T is the time parameter in the heat conduction equation; After constructing the similarity matrix, construct different K nearest neighbor graphs on the similarity matrix, and construct M K nearest neighbor graphs in total, M ≥ 2; The autoencoder and graph convolution module in the joint cluster structure and instance reconstruction module are used for joint training. The number of autoencoder layers is set to l, and each layer is obtained from the feature information matrix Z by the following formula b The self-information of the learning sample: where Φ(·) is the activation function of each layer of the autoencoder, and Represent the weight matrix and bias value of each layer of the autoencoder, Represents the feature information matrix of the samples learned by the autoencoder layer l; The autoencoder uses the following formula to make the feature information matrix Z b After dimensionality reduction, feature information with rich semantics can still be obtained: in is the feature information matrix recovered by the decoder layer l, that is The graph convolutional network aggregates neighborhood information for a single sample in the following way: Among them, V represents all nodes in the graph, I is the identity matrix, A is the adjacency matrix, Represents the neighborhood information of the aggregated i-th node; V j represents the jth node; represents the degree of the i-th node, represents the degree of the jth node, Indicates whether there is an edge connecting the i-th node and the j-th node. If so, it is 1; if not, it is 0. Each layer of graph convolutional network aggregates neighborhood information in the following way: in Represents the information learned by the L-th layer graph convolutional network; represents the weight matrix of the (L-1)th layer; express The corresponding degree matrix, Φ(·) represents the activation function; Then, the neighborhood structure information learned by each layer of the graph convolutional network is combined with the sample's own information learned by the autoencoder part through linear combination to obtain a feature information matrix containing two kinds of information. This is then passed to the next layer of graph convolutional network to start a new round of feature matrix updates: where σ and γ are hyperparameters, Represents the neighborhood information aggregated by the first graph convolutional network, H represents the neighborhood information aggregated by the second graph convolutional network. Here, the first and second paths are two-path graph convolutional networks when M=2. (l-1) Represents the information of the sample itself learned from the autoencoder; Through the connection of two hyperparameters σ and γ, the multi-scale neighborhood structure information is combined with the data itself, and based on this, the backbone network and the autoencoder part of the joint cluster structure and instance reconstruction learning module are updated; Use the Student t distribution to convert the result obtained by the autoencoder into a probability distribution: Among them, h i is the data representation of the i-th image sample in the dataset S, μ j , μ j′ represents different cluster center vectors, t is the degree of freedom of Student's t distribution, q ij It represents the probability that the i-th image sample in the dataset S belongs to the j-th cluster, that is, the probability that the i-th sample is labeled with the j-th label; combining these distribution probabilities of all samples together gives a probability distribution Q,q ij ∈Q; Using the probability distribution q ij To calculate the probability distribution p ij : where f j =∑ i q ij , f j is the soft cluster allocation frequency; Using the target distribution P = [p ij ] to supervise the update of Q distribution, using KL divergence: Similarly, the target distribution P is used to supervise the update of the graph convolutional network: Where G1 = [g 1-ij ] and G2=[g 2-ij ] represent the probability distribution learned by one-way graph convolutional network and the probability distribution learned by two-way graph convolutional network respectively; Finally, the loss function of the autoencoder part and the multi-scale graph convolutional network module as follows:
2. The deep medical image clustering method based on multi-scale structure learning according to claim 1, characterized in that: The data enhancement methods include random cropping, color jittering, grayscale, horizontal flipping and Gaussian blur.
3. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the deep medical image clustering method based on multi-scale structure learning according to any one of claims 1-2 is implemented.
4. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the deep medical image clustering method based on multi-scale structure learning according to any one of claims 1-2 is implemented.
