CN116759076A - Unsupervised disease diagnosis method and system based on medical image - Google Patents

Unsupervised disease diagnosis method and system based on medical image Download PDF

Info

Publication number
CN116759076A
CN116759076A CN202310847724.9A CN202310847724A CN116759076A CN 116759076 A CN116759076 A CN 116759076A CN 202310847724 A CN202310847724 A CN 202310847724A CN 116759076 A CN116759076 A CN 116759076A
Authority
CN
China
Prior art keywords
medical image
disease diagnosis
network
medical
representing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310847724.9A
Other languages
Chinese (zh)
Inventor
白亮
郭烨成
杜航原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanxi University
Original Assignee
Shanxi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanxi University filed Critical Shanxi University
Priority to CN202310847724.9A priority Critical patent/CN116759076A/en
Publication of CN116759076A publication Critical patent/CN116759076A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H50/00ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics
    • G16H50/20ICT specially adapted for medical diagnosis, medical simulation or medical data mining; ICT specially adapted for detecting, monitoring or modelling epidemics or pandemics for computer-aided diagnosis, e.g. based on medical expert systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/762Arrangements for image or video recognition or understanding using pattern recognition or machine learning using clustering, e.g. of similar faces in social networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • G16H30/20ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Medical Informatics (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • Public Health (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Multimedia (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • Biomedical Technology (AREA)
  • Primary Health Care (AREA)
  • Epidemiology (AREA)
  • Data Mining & Analysis (AREA)
  • Pathology (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Radiology & Medical Imaging (AREA)
  • Measuring And Recording Apparatus For Diagnosis (AREA)
  • Image Analysis (AREA)
  • Medical Treatment And Welfare Office Work (AREA)

Abstract

The invention discloses an unsupervised disease diagnosis method and system based on medical images, and belongs to the technical field of big data artificial intelligence and digital medical treatment. The non-supervision disease diagnosis method based on the medical image utilizes the medical image data to train a disease network model, obtains the category information of the patient to be diagnosed by using the trained disease diagnosis network model, presents the medical image to be diagnosed and the category information to a doctor, helps the doctor to improve the diagnosis efficiency and reduces the misdiagnosis rate. The non-supervision disease diagnosis system based on the medical image comprises a computer processor, a memory and a graphic processor; a medical image data storage unit; a medical image preprocessing unit; a disease diagnosis network model training unit; the disease diagnosis unit is used for directly outputting the category information of the patient to be diagnosed based on the non-supervision disease diagnosis system of the medical image, helping doctors to diagnose the disease and improving the diagnosis efficiency.

Description

Unsupervised disease diagnosis method and system based on medical image
Technical Field
The invention relates to the technical field of artificial intelligence and digital medical treatment, in particular to an unsupervised disease diagnosis method and system based on medical images.
Background
Along with the continuous development of informatization and artificial intelligence big data, the medical industry also develops informatization, intellectualization and electronization, and the electronic medical industry utilizes information technology and electronic equipment to process and manage medical information, so that the utilization efficiency of medical images is improved. Traditional disease diagnosis mainly depends on physical examination, blood examination, urine test and other means, and the methods can only find surface problems, but are relatively difficult for detecting internal tissues, organs and lesion areas. The use of modern electronic medical equipment can generate a large number of medical images, and the appearance of clinical medicine is greatly changed due to the appearance of medical image technology. The medical imaging technology reflects the change of the internal structure and the functional state of the human body through medical images, can rapidly and accurately detect various diseases, tumors and abnormal conditions, provides important guidance and reference for doctors in the operation and treatment process, has important significance in the medical field, and therefore, how to efficiently utilize the medical image data becomes a key problem of attention of researchers. Medical image data is common in the field of real medical treatment due to the defect of low quality of manual labeling, and the medical image data without labels is analyzed and utilized in an unsupervised clustering method, so that the medical image data can be fully utilized, the diagnosis efficiency of doctors is improved, and the burden of the doctors is reduced.
Traditional machine learning algorithms are limited by the ability of artificial intelligence to address disease diagnosis problems, have low disease diagnosis accuracy and robustness, and lack the use of large-scale medical images. With the development of deep learning and neural networks, disease diagnosis using medical image analysis techniques can automatically analyze and process medical images by a deep learning method, process and analyze a large number of medical images in a short time, and extract useful feature and category information. At present, most of medical image diagnosis is carried out under the supervision condition, but due to the low quality of manual labeling, a large amount of non-labeled medical image data is faced at the same time. In a word, the disease diagnosis is carried out on the medical image data by a deep clustering method, so that doctors can obtain more comprehensive and accurate diagnosis, and the medical level and quality are greatly improved.
In recent years, methods for diagnosing diseases from medical image data include: hybrid Neuro-Probabilistic Reasoning forAttribute-Based Medical Image Diagnosis, diagnose Like a Radiologist, describes a Hybrid Neuro-probabilistic reasoning algorithm for attribute-based medical image diagnosis. The method includes two parallel branches, one bayesian network branch, performing probabilistic causal relationship reasoning, and the other graph convolution network branch, performing more general relationship modeling and reasoning using feature representations. The tight coupling between the two branches is achieved by a fusion of the attention mechanism of the crossover network and their classification results. A prostate tumor diagnosis method based on a deep learning network PSP-Net+VGG16 is provided in Medical image diagnosis ofprostate tumor based on PSP-Net+VGG16deep learning network. A space-free convolution residual error structural model extraction network is constructed by a PSP-Net-based deep convolution neural network segmentation method, firstly, three-dimensional prostate MRI is converted into two-dimensional image slices, then, the two-dimensional images are trained based on the PSP-Net neural network for inputting the slices, and a VGG16 network is used for analyzing the region of interest and classifying prostate cancer and normal prostate.
The patent with publication number CN111430025A, a disease diagnosis method based on medical image data amplification, firstly maps original image data into a depth feature space, and extracts features with highly linearized semantic information; then, according to the distribution of the data corresponding to different categories in the medical image in the feature space, a feature covariance matrix for data amplification is obtained; and calculating a data amplification loss function, and obtaining a model with stronger feature extraction capability by continuously optimizing the loss. The data augmentation method is only used when a model is trained, and the fixed medical image data is effectively augmented, so that the requirement of the deep neural network on the quantity of the marked patient data is reduced, the problems of difficult acquisition of the medical image data and high marking cost are effectively solved, and the accuracy rate of disease diagnosis is improved. The patent with publication number CN111488912B, namely a laryngeal disease diagnosis system based on a deep learning neural network, solves the problems of low diagnosis efficiency and low diagnosis accuracy of laryngoscope images in the traditional method. The laryngeal disease diagnosis network model is built, and the built laryngeal disease diagnosis network model can be used for an intelligent system for laryngeal disease diagnosis, so that laryngoscope images can be better diagnosed, doctors can be helped to improve the disease diagnosis efficiency and diagnosis accuracy, and missed diagnosis and misdiagnosis rate are reduced.
In summary, it is possible and efficient to diagnose diseases using deep learning and deep neural networks. The use of medical image category information is lacking in existing unsupervised medical diagnostic methods, i.e., most disease diagnostic methods are "pull" the distance between two augmented samples of a medical image, and "push" and other medical image augmented samples. In an unsupervised environment, a pseudo tag can be applied to solve the problem, but the tag information is difficult to obtain in the unsupervised environment, and the invention provides a self-learning pair-constraint matrix method based on medical image data to supervise the contrast learning among medical image samples, so that more discriminative medical image sample characterization and better disease diagnosis results are learned, and higher disease diagnosis efficiency is obtained.
Disclosure of Invention
The invention aims to solve the problem that the prior method for unsupervised medical diagnosis lacks of using medical image category information and is difficult to acquire tag information in an unsupervised environment, and provides an unsupervised disease diagnosis method and system based on medical images. The method and the system can train the disease diagnosis network model by using the medical image data, obtain the category information of the unmarked medical images of the patient through the trained disease diagnosis network model, and present the category information to the doctor, so that the doctor can be helped to better know the difference between each medical image and the relevance between different diseases, and the doctor can be helped to improve the diagnosis efficiency and the diagnosis accuracy of the disease.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
the invention provides an unsupervised disease diagnosis method based on medical images. Firstly, preprocessing and augmenting medical image data, secondly, constructing and randomly initializing and training a disease diagnosis network model, and finally, diagnosing the disease of a patient to be diagnosed by using the disease diagnosis network model. The main parameters of the invention include: temperature super-parameters, batch size, optimizer parameters, training round number of model, threshold. The temperature super-parameters are used for adjusting similarity measurement in the comparison learning process of the instance level and the cluster level; the batch size is used for controlling the number of samples sampled simultaneously in the process of training the model; the optimizer parameters comprise an optimizer type, an initial learning rate and a learning rate attenuation method, and are used for setting an optimizer in the training model process; the training round number of the model is used for setting the ending condition of model training; the threshold is used to derive a sparse pair-wise constraint matrix. The method comprises the following steps:
s1, preprocessing medical image data, cleaning the medical image data, and screening the medical image data with clear front;
s2, amplifying the medical image preprocessed in the S1;
s3, constructing a randomly initialized disease diagnosis network model, wherein the disease diagnosis network model comprises a feature extraction network, an instance level projection head, a cluster level projection head, a pair constraint network and a discriminator network;
s4, training the disease diagnosis network model in the S3, and updating the disease diagnosis network model by designing an optimizer and a loss function;
s5, using a disease diagnosis network model, clustering diseases according to medical images of patients to be diagnosed, and presenting results to doctors for disease diagnosis;
the step S1 specifically comprises the following steps:
s11, designing a disease diagnosis network model in an unsupervised disease diagnosis method based on medical images to diagnose the disease, and collecting a medical image data set in order to sufficiently train the disease diagnosis network model;
s12, cleaning a medical Image data set, and selecting medical Image data with clear front by using software Image Magick, wherein the medical Image data is expressed as X= { X 1 ,…x i ,…x n );
Wherein n represents the total number of selected medical image samples.
The step S2 specifically includes the following steps:
s21, in order to improve the generalization performance of the network, computing resources are fully utilized, a proper batch size M is set for a medical image data set, medical image data is divided into n/M batches, and n/M small batch medical images are obtained;
s22, sequentially performing image augmentation pretreatment on each medical image x in each small batch of medical images in the step S21 for two times to obtain an image augmentation sample x u 、x v The image augmentation preprocessing operation is to sequentially perform random cutting, overturning, noise adding, random color dithering and random gray level transformation operation on the medical image so as to expand a data set, improve the robustness and generalization capability of a model, and ensure that the medical image is converted into a vector which can be input into a disease diagnosis network model to obtain medical image data after two augmentation;
as shown in fig. 1, the disease diagnosis network model constructed in the step S3 mainly includes: the system comprises a feature extraction network, an instance level projection head, a cluster level projection head, a pair constraint network and a discriminator network. The step S3 mainly comprises the following steps:
s31, constructing a feature extraction network f (-) by utilizing Resnet-34;
s32, constructing an instance level projection head. Example level projection head g ins (. Cndot.) is a multi-layer perceptron network, the network structure is a linear layer, a Relu activation function, a linear layer in sequence;
s33, constructing a cluster level projection head. Cluster level projection head g cls (. Cndot.) is a multi-layer perceptron network with a linear layer, relu activated in sequenceFunction, linear layer, softmax activate function;
s34, constructing a constraint network. Paired constraint network g con (. Cndot.) is a multi-layer perceptron network composed of a linear layer, a Relu activation function, a linear layer and a Sigmoid activation function in sequence;
s35, constructing a discriminator network. Discriminator network g dis (. Cndot.) is a multi-layer perceptron network consisting of, in order, a linear layer, a LeakyRelu activation function, a linear layer, a Tanh activation function.
The step S4 specifically includes the following steps:
s41, inputting the medical image data amplified twice in the step S22 into a feature extraction network f (-) in the step S31 in a small batch mode to respectively obtain feature characterization of the sample and />Wherein M is batch size>Characterization of the first randomly amplified sample representing the ith medical image, ++>A feature characterization representing a second randomly augmented sample of the ith medical image;
s42, characterizing the characteristics and />Inputting into an example level projection head and a cluster level projection head to obtain corresponding potential characterization +.>Pseudo tag wherein /> A latent representation of a first randomly amplified sample representing an ith medical image, ++>A latent representation of a second randomly amplified sample representing an ith medical image, ++>Pseudo tag representing the first randomly amplified sample of the ith medical image, ++>Pseudo tag representing a second randomly augmented sample of an ith medical image, y ui Class assignment of class i representing first randomly augmented sample of a batch of medical images, y vi Class assignment of class i representing a second randomly augmented sample of a batch of medical images having dimensions [1, K]K is the category number;
s43, constructing example level contrast learning loss, wherein the example level contrast loss zooms in two random augmentation samples of the same medical image and zooms out distances from the random augmentation samples of other medical images, and the definition is as follows:
where M represents the batch size and,a latent representation of a first randomly amplified sample representing an ith medical image, ++>A latent representation of a second randomly amplified sample representing an ith medical image, ++>A latent representation of a first randomly amplified sample representing a kth medical image, ++>Latent characterization, τ, of a second randomly augmented sample representing a kth medical image z Comparing the learned temperature parameters for the instance level;
s44, constructing cluster level comparison learning loss, wherein the cluster level comparison loss classifies similar medical images into the same category, and learns consistency and discriminant between the categories. The cluster level contrast learning penalty is defined as follows:
preventing all medical images from aggregating into the same class, defining auxiliary losses as follows:
wherein K represents the category of the disease, y ui Class assignment of class i representing first randomly augmented sample of a batch of medical images, y vi Class assignment of class i representing a second randomly augmented sample of a batch of medical images, y uj Class assignment of class j representing the first randomly augmented sample of a batch of medical images, y vj Class assignment, τ, of class j representing a second randomly augmented sample of a batch of medical images y Comparing the learned temperature parameters for the cluster level;
s45, obtaining a pair constraint matrix C=g through a pair constraint network con (Φ) the input is the latent token similarity matrix Φ=z of the first augmented sample u Z uT The output is a pair-wise constraint matrix C, the dimensions of C are [ M, M]The pair-wise constraint matrix loss is as shown in (8):
wherein the mean square error loss is usedLoss of consistency->Latent characterization constraint loss->The pair constraint network is trained together. Specifically, to enable the pair constraint matrix to capture the information contained in the pseudo tag, a mean square error penalty is introduced
wherein cij Values of the ith row and jth column elements representing C, ψ=y u Y uT Is the semantic similarity matrix of the first augmentation sample except for the mean square error lossIn addition, a consistency loss is introduced>To maintain consistency between pairs of constraint matrices obtained in two augmented samples of medical images, consistency loss ∈ ->The definition is as follows:
wherein cij For the values of the j-th column element of the i-th row of the constraint matrix C,is->Line i of (2) j Values of column elements, wherein-> In order to make the paired constraint matrix and the latent character similarity matrix of paired samples correspond, the latent character constraint loss is introduced>
wherein A latent representation of a first randomly amplified sample representing an ith medical image, ++>A latent representation of the first randomly amplified sample representing the jth medical image, ++>Representation->Is a transposed vector of (2);
s46, constraining the medical images of the same category by using a pair constraint matrix to enable the medical images to have similar latent characterization and pseudo labels. Specifically, after self-learning the pair-wise constraint matrices, the pair-wise constraint matrices are used to identify the same class of medical images. A constraint matrix in pairs greater than a given threshold delta 1 Should be considered as samples of the same class. Defining sparse pair constraint matricesDimension [ M, M ]]The values at the ith row and jth column are given by equation (12):
s47, in order to ensure the accuracy of the pair constraint matrix, the invention provides a discriminator network. Splicing Z and Y as a discriminator network g dis Input of (-), ith medical image and />The positive samples taken as input are spliced together, wherein +.>Is converted into one-hot vector +.>I-th medical image +.>And other K-1 one-hot vectors are stitched together as negative samples of the input. In the process of training the discriminator network, only the high confidence sample is used for training, namelyThe discriminator loss is as shown in (13):
wherein Representing other K-1 one-hot vectors, and judging the confidence coefficient of the medical image sample after the network training of the discriminator is completed, wherein the confidence coefficient is as shown in (14):
wherein Latent characterization of first randomly augmented sample representing medical image, < >>A one-hot vector representing the corresponding pseudo tag;
s48, defining the latent characterization constraint loss as follows in order to enable samples from the same group to have similar latent characterization:
introducing a pseudo tag constraint loss to constrain the pseudo tag, wherein the pseudo tag constraint loss is defined as:
the loss of the final total training model is:
s49, repeating the steps S41-S48 in an iterative mode, setting the learning rate and the weight attenuation rate of the optimizers of each network, and training the disease diagnosis network model by adopting a random gradient descent strategy to reach the set iteration times.
The step S5 specifically includes the following steps:
s51, performing size-changing augmentation operation on medical images of patients to be diagnosed;
s52, inputting the amplified medical image into a disease diagnosis network model, outputting a disease diagnosis result of the medical image data, and presenting the disease diagnosis result to a doctor to help the doctor to diagnose the disease.
The invention also provides an unsupervised disease diagnosis system based on the medical image, which is used for realizing the unsupervised disease diagnosis method based on the medical image and comprises a computer processor, a memory and a graphic processor; a medical image data storage unit; a medical image data preprocessing unit; a disease diagnosis network model training unit; and a disease diagnosis unit.
Further, the medical image data storage unit stores the medical image data set in the step S1 and loads the medical image data set into a memory of a computer; the medical image data preprocessing unit extracts medical image samples with batch size from the memory step by step, executes the step S2 to carry out medical image augmentation to obtain random augmentation samples of medical images, and loads the random augmentation samples into the image processor; the disease diagnosis network model training unit uses the random augmentation medical image sample to execute the steps S3-S4 to train the model in the graphic processor, and determines the parameters of the disease diagnosis network model; the disease diagnosis unit clusters the medical image data to be diagnosed through the disease diagnosis network model, determines the category to which each medical image belongs, presents category information to doctors, and helps the doctors to diagnose the disease. Specific data processing and computing work is performed by the computer processor.
Compared with the prior art, the invention has the beneficial effects that:
1. the unsupervised disease diagnosis method and system based on the medical image designed by the invention can effectively improve the utilization rate of the medical image data and the quality of disease diagnosis. Specifically, the method trains the disease diagnosis network model by using the unlabeled medical image data, and effectively improves the utilization rate of the medical image data by using two random enhancements of each medical image as self-supervision signals;
2. the medical image sample with high confidence coefficient is searched by setting a discriminator network, so that uncertainty caused by introducing the paired constraint matrix can be reduced, and the performance of disease diagnosis can be improved;
3. the invention provides an end-to-end method, which can directly obtain category information through the cluster level projection head in the disease diagnosis network model, is convenient to operate and less in time consumption, and can greatly improve the efficiency of disease diagnosis and reduce the error rate of medical diagnosis by directly giving the category information to doctors.
Drawings
FIG. 1 is a diagram of a disease diagnosis network model in an unsupervised disease diagnosis method based on medical images according to the present invention;
FIG. 2 is a diagram showing a medical diagnosis module in the method for diagnosing an unsupervised disease based on medical images according to the present invention;
FIG. 3 is a block diagram of a computer implemented system for an unsupervised disease diagnosis method based on medical images according to the present invention;
fig. 4 is a flowchart of an unsupervised disease diagnosis method based on medical images according to the present invention.
Detailed Description
The method for diagnosing the unsupervised disease based on the medical image is implemented by a computer program, and fig. 3 is a system structure diagram of the computer implementation, wherein a graphic processor only represents a computing resource type, and can be an independent graphics card supporting GPU computing, a local server supporting GPU computing, a cloud server and the like. The following describes the technical solution in the embodiment of the present invention in detail by taking chest X-ray image in CheXpert as an example, with reference to the model structure diagrams shown in fig. 1 and 2 and the method flowchart in fig. 4. The implementation mainly comprises the following key contents:
s1, preprocessing medical image data, preprocessing the medical image data, cleaning the medical image data, and screening out the medical image data with clear front face to form a new data set. The method specifically comprises the following steps:
s11, medical image data in CheXpert are adopted in the invention. In particular, cheXpert is a medical image dataset issued by the university of stenford computer sciences and the institute of technology of the millboard for automated analysis of chest X-ray examinations. The dataset contained 224316 chest radiographs from 65240 patients, covering 14 diseases. In the invention, the required chest X-ray image data is obtained through the downloading of a Chexpert official network without any label information;
s12, cleaning medical image data. First, the medical image data is traversed and the name "view1_front" is selectedFrontal medical image. Secondly, selecting a clear data set by using an Image map, loading medical data Image data into the Image map, outputting each medical Image attribute such as resolution, size information and the like, and selecting a medical Image sample with the resolution larger than 2000X 2000 as the data set used by the invention by software, wherein the data set is denoted as X= { X 1 ,…,x,…,x 189600 189600 is the total.
S2, the medical image data in the preprocessed S1 is amplified, and the method specifically comprises the following steps:
s21, selecting a small batch method commonly used for deep learning to train the deep neural network model. Setting a batch size (batch size) to 256 to obtain small batch medical image data, and sending the data set into a model in 741 steps;
s22, processing medical image data. And (3) performing image augmentation pretreatment on each medical image sample x in the small-batch medical image data in the step S21 twice to obtain two augmentation samples. Specifically, for each image sample, random cropping is performed sequentially, wherein the size of cropping is [224,224], random inversion, random color dithering with a parameter of 0.8, and augmentation of random gray scale processing with a parameter of 0.2, and finally small batches of medical image data are converted into tensor data with a dimension of [256,3,224,224] for use by the disease diagnosis network model, wherein 256 is the batch size, 3 is the RGB channel number, and [224,224] is the medical image size.
S3, constructing and initializing each module in the disease diagnosis network model, wherein the overall structure of each module is shown in the figure 1, and the method specifically comprises the following steps:
s31, constructing a feature extraction network f (-) by utilizing ResNet-34. Specifically, the ResNet-34 model is entered as a small batch of medical image samples of dimension [256,3,224,224], where 256 is the batch size, 3 is the color channel of the medical image, and [224,224] is the medical image size. The output of the device is the medical image characteristic characterization tensor of the dimension [256,512 ];
s32, constructing an instance level projection head g ins (. Cndot.) the use of a catalyst. The first layer of the example level projection head is a linear layer and the second layer is a Relu nonlinear active layerA third linear layer, the input dimension and the output dimension are set to be 256,512],[156,128];
S33, constructing a cluster-level projection head network g cls (. Cndot.) the use of a catalyst. The first layer of the cluster-level projection head is a linear layer, the second layer is a Relu nonlinear activation layer, the third layer is a linear layer, the fourth layer is a Softmax nonlinear activation layer, and the input dimension and the output dimension are set to be [256,512]]、[256,K]K represents a specific class;
s34, constructing a constraint network g con (. Cndot.) the use of a catalyst. The first layer of the pair constraint network is a linear layer, the second layer is a Relu nonlinear activation function, the third layer is a linear layer, the fourth layer is a Sigmoid nonlinear activation layer, and the input dimension, the intermediate dimension and the output dimension are set as [256,256 ]],[256,512],[256,256]Finally, a [256,256 ] is obtained]A pair constraint matrix C of dimensions;
s35, constructing a discriminator network g dis (. Cndot.) the use of a catalyst. The discriminator network sequentially comprises a linear layer, a LeakyReLu nonlinear activation layer, a linear layer, a LeakyRelu layer, a linear layer and a Tanh nonlinear activation layer, wherein the dimensions of an input layer, an intermediate layer and an output layer are set as [256,142 ]]、[256,64]、[256,32]、[256,1]。
And S4, training the disease diagnosis network model in the step S3 for 1000 rounds by using the medical image in the step S2 in a multi-round small batch iteration optimization mode, and determining parameters of the disease diagnosis network model, wherein each round is divided into 741 steps for iterative training, and 256 medical image samples are used for each step of training. Taking a single-step training as an example, the method comprises the following specific steps:
s41, two augmentation samples of the small-batch (256 pairs) medical image data in the step S22Respectively inputting the medical images into a feature extraction network f (-) in the step S31 to obtain feature characterization of the medical images +.>And wherein />A characterization of the first randomly augmented sample representing the ith medical image,a second randomly augmented sample feature representation representing an ith medical image. In the actual training process, the tensor dimension of the input small-batch medical image samples is [256,3,224,224]]. Extracting feature information through a feature extraction network f (·) to obtain tensor dimension [256,512]]Medical image augmented sample characterization H u and Hv
S42, characterizing Hw and H of small-batch (256 pairs) medical images v Input to instance level projector head network g ins In (-), latent characterization is obtained and /> wherein />A latent representation of a first randomly amplified sample representing an ith medical image, ++>A second randomly augmented sample potential representation representing an ith medical image. Characterization of small batches (256 pairs) of medical images H v 、H u Input to the cluster-level projector head network g cls In (-), pseudo tag is obtained-> and /> wherein />Pseudo tag representing the first randomly amplified sample of the ith medical image, ++>A second randomly augmented sample pseudo tag representing an ith medical image, y ui Class assignment of class i representing first randomly augmented sample of a batch of medical images, y vi Class assignment of class i representing a second randomly augmented sample of a batch of medical images. Wherein, example level projection head g ins Input medical image feature characterization h v Tensor dimension is [256,512]Output medical image latent representation z v Tensor dimension is [256,128 ]]Cluster-level projection head network g cls Input medical image feature characterization h v Tensor dimension is [256,512]Output medical image latent representation z v Tensor dimension is [256,14 ]];
S43, first randomly augmented sample latent representation z using small batches (256 pairs) of medical images u And a second randomly augmented sample latent representation z of the medical image v The example level contrast loss is calculated as defined in equation (1):
wherein M represents the batch size,latent characterization of first randomly augmented sample representing ith medical image,/>A latent representation of a second randomly amplified sample representing an ith medical image, ++>A latent representation of a first randomly amplified sample representing a kth medical image, ++>Latent characterization, τ, of a second randomly augmented sample representing a kth medical image z Comparing the learned temperature parameters for the instance level;
s44, calculating cluster level contrast loss by using small-batch (256 pairs) medical image sample class allocation, wherein the definition is as shown in the formula (4):
to prevent all medical images from aggregating into the same class, the auxiliary loss is defined as follows:
wherein y ui Class assignment of class i representing first randomly augmented sample of a batch of medical images, y vi Second randomly augmented sample representing a batch of medical imagesClass allocation of class i, y uj Class assignment of class j representing the first randomly augmented sample of a batch of medical images, y vj Class assignment, τ, of class j representing a second randomly augmented sample of a batch of medical images y Comparing the learned temperature parameters for the cluster level;
s45, obtaining a pair constraint matrix C=g through a pair constraint network con (Φ), input is medical image latent representation similarity matrix Φ=z u Z uT ,Z u Is of dimension [256,128 ]]The output of the pairwise constraint network is the pairwise constraint matrix C, the dimension of which is [256,256 ]]During training of the pairwise constraint network, other networks of the disease diagnosis network model are all frozen and only the pairwise constraint network is updated. The pairwise constraint matrix penalty is as shown in (8):
wherein mean square error loss is usedLoss of consistency->Latent characterization constraint loss->The pair constraint network is trained together. Specifically, to enable the pair constraint matrix to capture the information contained in the pseudo tag, a mean square error penalty is introduced
wherein Ψ=Yu Y uT Is the semantic similarity matrix of the first augmentation sample except for the mean square error lossIn addition, a consistency loss is introduced>To maintain consistency between pairs of constraint matrices obtained in two augmented samples of medical images, consistency loss ∈ ->The definition is as follows:
wherein cij For the values of the ith row and jth column of the pair-wise constraint matrix C,is->The value of row i and column j of (2), whereinIn order to make the paired constraint matrix C of paired samples correspond to the latent character similarity matrix, a latent character constraint loss is introduced>
wherein A latent representation of a first randomly amplified sample representing an ith medical image, ++>A latent representation of the first randomly amplified sample representing the jth medical image, ++>Representation->Is a transposed vector of (2);
s46, after the pair constraint matrix is provided, in order to obtain the similar medical image samples, the invention provides a threshold delta 1 =0.85, samples above this threshold are considered homogeneous samples, defining a sparse pairwise constraint matrixDimension is [256,256 ]]The values of the i-th row and j-th column are given by equation (12):
s47, in order to ensure the accuracy of the pair constraint matrix, the invention designs a discriminator network to select a high-confidence medical image sample. Let the concatenation of Z and Y be the arbiter network g dis Input of (-), the dimension of the arbiter network input is [256,142 ]]The ith sample and />The positive samples taken as input are spliced together, wherein +.>Is converted into one-hot vector +.>Sample i->And the other 13 one-hot vectors are stitched together as negative samples of the input. />Dimension [256,128 ]]The one-hot vector has a dimension of [256,14 ]]The output dimension is [256,1]The discriminator loss is as shown in (13):
the trained discriminator network judges the confidence coefficient of the medical image, as shown in (14):
s48, defining instance constraint loss in order to enable samples of the same group to have similar latent characterization:
in addition, the invention also introduces a pseudo tag constraint loss to constraint the pseudo tag, and defines the pseudo tag constraint loss:
the loss of the final total training model is:
s49, repeating the steps S41 to S48 in an iterative mode, and optimizing the pair constraint network and the discriminator network by using an Adam optimizer with an initial learning rate of 0.0003, wherein the optimizer used in updating the feature extraction network and the projection head is SGD, the initial learning rate is 0.4, the weight attenuation is 0.0001, and the momentum coefficient is 0.9. The learning rate is attenuated by using a cosine scheduler, the attenuation rate is 0.1, the disease diagnosis network model is trained for l=1000 rounds, and after training is finished, parameters of the disease diagnosis network model are determined.
S5, as shown in FIG. 2, after the disease diagnosis network model is trained after the step S4, the trained model is used for disease diagnosis of medical image data, and the specific steps are as follows:
s51, performing an augmentation operation on medical image data of a patient to be diagnosed, wherein the augmentation operation on a data set is to convert the size of the medical image of the patient into [224,224] and perform a normalization operation;
s52, inputting the medical image amplified in the S51 into a medical image disease diagnosis network model, and obtaining a disease diagnosis result through a feature extraction network and a cluster level projection head;
and S53, presenting the disease diagnosis result to a doctor to help the doctor to diagnose the disease.
As shown in FIG. 3, an unsupervised disease diagnosis method and system based on medical image comprises a computer processor, a memory and a graphic processor; a medical image data storage unit; a medical image data preprocessing unit; a disease diagnosis network model training unit; and a disease diagnosis unit. The medical image data storage unit stores the medical image data set in the step S1 and loads the medical image data set into a memory of a computer; the medical image data preprocessing unit extracts medical image samples with batch size from the memory step by step, and executes the step S2 to amplify the medical images to obtain random amplified samples, and the random amplified samples are loaded into the graphic processor; the disease diagnosis network model training unit uses the random augmentation samples of the medical images to execute the steps S3-S4 in the graphic processor, and the disease diagnosis unit clusters the medical image data of the patient to be diagnosed through the disease diagnosis network model, determines the category to which each medical image belongs, and presents the medical image data to a doctor to complete disease diagnosis. Specific data processing and computing work is performed by the computer processor.
Finally, the foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the invention, and various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (3)

1. An unsupervised disease diagnosis method based on medical image, which is characterized by comprising the following steps:
s1, preprocessing medical image data, cleaning the medical image data, and screening the medical image data with clear front surface, wherein the method specifically comprises the following steps of:
s11, collecting a medical image data set;
s12, cleaning a medical image data set, and selecting medical image data with clear front surface by using software ImageMagick, wherein the medical image data is expressed as X= { X 1 ,…x i ,…x n );
Wherein n represents the total number of selected medical image samples;
s2, the medical image data preprocessed in the step S1 is amplified, and the method specifically comprises the following steps:
s21, setting proper batch size M for a medical image data set, and dividing the medical image data into n/M batches to obtain n/M small-batch medical images;
s22, sequentially performing image augmentation pretreatment on each medical image x in each small batch of medical images in the step S21 for two times to obtain an image augmentation sample x u 、x v The image augmentation preprocessing operation is to sequentially perform random cutting, overturning, noise adding, random color dithering and random gray level transformation operation on the medical image so as to expand a data set, improve the robustness and generalization capability of a model, and ensure that the medical image is converted into a vector which can be input into a disease diagnosis network model to obtain medical image data after two augmentation;
s3, constructing a randomly initialized disease diagnosis network model, wherein the disease diagnosis network model comprises a feature extraction network, an instance level projection head, a cluster level projection head, a pair constraint network and a discriminator network, and specifically comprises the following steps of:
s31, constructing a feature extraction network f (-) by utilizing Resnet-34;
s32, constructing an instance level projection head; example level projection head g ins (. Cndot.) is a multi-layer perceptron network, the network structure is a linear layer, a Relu activation function, a linear layer in sequence;
s33, constructing a cluster level projection head; cluster level projection head g cls (. Cndot.) is a multi-layer perceptron network with a linear layer, a Relu activation function, a linear layer, and a Softmax activation function in that order;
s34, constructing a constraint network; paired constraint network g con (. Cndot.) is a multi-layer perceptron network composed of a linear layer, a Relu activation function, a linear layer and a Sigmoid activation function in sequence;
s35, constructing a discriminator network; discriminator network g dis (.) is a multi-layer perceptron network consisting of a linear layer, a LeakyRelu activation function, a linear layer, and a Tanh activation function in sequence;
s4, training the disease diagnosis network model obtained in the step S3, and updating the disease diagnosis network model by a design optimizer and a loss function, wherein the method specifically comprises the following steps of:
s41, inputting the medical image data obtained after the twice amplification in the step S22 into a feature extraction network f (-) in the step S31 in a small batch mode to respectively obtain feature characterization of the sample and />Wherein M is the size of the batch,characterization of the first randomly amplified sample representing the ith medical image, +.>Representing a characterization of a second randomly augmented sample of the ith medical image;
s42, characterizing the characteristics and />Inputting into an example level projection head and a cluster level projection head to obtain corresponding potential characterization +.>And pseudo tag-> wherein ,/>A latent representation of a first randomly amplified sample representing an ith medical image, ++>A latent representation of a second randomly amplified sample representing an ith medical image, ++>Pseudo tag representing the first randomly amplified sample of the ith medical image, ++>Pseudo tag representing a second randomly augmented sample of an ith medical image, y ui Class assignment of class i representing the first randomly amplified sample of a batch of medical images,/->Representing a second follow-up of a batch of medical imagesClass allocation of class i of machine augmented samples with dimension [1, K]K is the category number;
s43, constructing example level contrast learning loss, wherein the example level contrast loss zooms in two random augmentation samples of the same medical image and zooms out distances from other random augmentation samples of the medical image, and the definition is as follows:
wherein M represents the batch size,a latent representation of a first randomly amplified sample representing an ith medical image, ++>A latent representation of a second randomly amplified sample representing an ith medical image, ++>A latent representation of a first randomly amplified sample representing a kth medical image, ++>Latent characterization, τ, of a second randomly augmented sample representing a kth medical image z Comparing the learned temperature parameters for the instance level;
s44, constructing cluster level comparison learning loss, wherein the cluster level comparison learning loss divides similar medical images into the same category, and meanwhile learns consistency and discriminant between the categories, and the cluster level comparison learning loss is defined as follows:
preventing all medical images from aggregating into the same class, defining auxiliary losses as follows:
wherein ,k represents the category of disease, < >>Class assignment of class i representing the first randomly amplified sample of a batch of medical images,/->Class assignment of class i representing a second randomly amplified sample of a batch of medical images,/->Class assignment of class j representing the first randomly amplified sample of a batch of medical images,/>Class assignment, τ, of class j representing a second randomly augmented sample of a batch of medical images y Comparing the learned temperature parameters for the cluster level;
s45, obtaining a pair constraint matrix C=g through a pair constraint network con (phi) the input is a latent token similarity matrix for the first augmented sampleThe output is a pair-wise constraint matrix C, the dimensions of C are [ M, M]The pair-wise constraint matrix loss is as shown in (8):
wherein the mean square error loss is usedLoss of consistency->Latent characterization constraint loss->Co-training the pairwise constraint network, in order to enable the pairwise constraint matrix to capture the information contained in the pseudo tag, introduces a mean square error loss +.>
wherein ,cij Representing the value of the ith row and jth column element of C,is the semantic similarity matrix of the first augmentation sample except for the mean square error loss +.>In addition, a consistency loss is introduced>To maintain consistency between pairs of constraint matrices obtained in two augmented samples of medical images, consistency loss ∈ ->The definition is as follows:
wherein ,cij For the values of the j-th column element of the i-th row of the constraint matrix C,is->The value of the ith row and jth column element of (2), wherein In order to make the paired constraint matrix and the latent character similarity matrix of paired samples correspond, the latent character constraint loss is introduced>
wherein ,a latent representation of a first randomly amplified sample representing an ith medical image, ++>A latent representation of the first randomly amplified sample representing the jth medical image, ++>Representation->Is a transposed vector of (2);
s46, constraining the medical images of the same class by using a pair constraint matrix to enable the medical images to have similar latent characterization and pseudo labels, and after self-learning the pair constraint matrix, using the pair constraint matrix to identify the medical images of the same class, wherein the pair constraint matrix is larger than a given threshold delta 1 Is considered as a sample of the same class, defining a sparse pair-wise constraint matrixDimension [ M, M ]]The values at the ith row and jth column are given by equation (12):
s47, in order to ensure the accuracy of the pair constraint matrix, a discriminator network is provided, and Z and Y are spliced together to form a discriminator network g dis Input of (-), ith medical image and />The positive samples taken as input are stitched together, wherein +.>Is converted into one-hot vector +.>I-th medical image +.>And the K-1 one-hot vectors are spliced together to serve as negative samples of the input, and in the process of training the discriminator network, only high confidence samples are used for training, namely +.>The discriminator loss is as shown in (13):
wherein ,representing other K-1 one-hot vectors, and judging the confidence coefficient of the medical image sample after the network training of the discriminator is completed, wherein the confidence coefficient is as shown in (14):
wherein ,latent characterization of first randomly augmented sample representing medical image, < >>A one-hot vector representing the corresponding pseudo tag;
s48, defining the latent characterization constraint loss as follows in order to enable samples from the same group to have similar latent characterization:
introducing a pseudo tag constraint loss to constrain the pseudo tag, wherein the pseudo tag constraint loss is defined as:
the loss of the final total training model is:
s49, repeating the steps S41-S48 in an iterative mode, setting the learning rate and the weight attenuation rate of the optimizers of each network, and training the disease diagnosis network model by adopting a random gradient descent strategy to reach the set iteration times;
s5, using a disease diagnosis network model, clustering diseases according to medical images of patients to be diagnosed, and presenting results to doctors for diagnosing the diseases, wherein the method specifically comprises the following steps:
s51, performing size-changing augmentation operation on medical images of patients to be diagnosed;
s52, inputting the amplified medical image into a disease diagnosis network model, outputting a disease diagnosis result, and presenting the disease diagnosis result to a doctor to help the doctor to diagnose the disease.
2. An unsupervised disease diagnosis system based on medical image, wherein the unsupervised disease diagnosis system is used for implementing the unsupervised disease diagnosis method based on medical image as claimed in claim 1, and comprises a computer processor, a memory and a graphic processor; a medical image data storage unit; a medical image data preprocessing unit; a disease diagnosis network model training unit; and a disease diagnosis unit.
3. The system for unsupervised disease diagnosis based on medical image according to claim 2, wherein the medical image data preprocessing unit extracts medical image samples with batch size from the memory step by step, performs step S2 for medical image augmentation to obtain random augmented samples of medical images, and loads the random augmented samples into the graphic processor; the disease diagnosis network model training unit uses the random augmentation medical image sample to execute steps S3-S4 to train the model in the graphic processor, and determines parameters of the disease diagnosis network model; the disease diagnosis unit clusters the medical image data of the patient to be diagnosed through the disease diagnosis network model, determines the category to which each medical image belongs, presents category information to doctors, helps the doctors to diagnose the disease, and the specific data processing and calculating work is completed by the computer processor.
CN202310847724.9A 2023-07-12 2023-07-12 Unsupervised disease diagnosis method and system based on medical image Pending CN116759076A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310847724.9A CN116759076A (en) 2023-07-12 2023-07-12 Unsupervised disease diagnosis method and system based on medical image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310847724.9A CN116759076A (en) 2023-07-12 2023-07-12 Unsupervised disease diagnosis method and system based on medical image

Publications (1)

Publication Number Publication Date
CN116759076A true CN116759076A (en) 2023-09-15

Family

ID=87957090

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310847724.9A Pending CN116759076A (en) 2023-07-12 2023-07-12 Unsupervised disease diagnosis method and system based on medical image

Country Status (1)

Country Link
CN (1) CN116759076A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116935329A (en) * 2023-09-19 2023-10-24 山东大学 Weak supervision text pedestrian retrieval method and system for class-level comparison learning

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116935329A (en) * 2023-09-19 2023-10-24 山东大学 Weak supervision text pedestrian retrieval method and system for class-level comparison learning
CN116935329B (en) * 2023-09-19 2023-12-01 山东大学 Weak supervision text pedestrian retrieval method and system for class-level comparison learning

Similar Documents

Publication Publication Date Title
CN110459287B (en) Structured report data from medical text reports
CN112101451B (en) Breast cancer tissue pathological type classification method based on generation of antagonism network screening image block
WO2016192612A1 (en) Method for analysing medical treatment data based on deep learning, and intelligent analyser thereof
CN112365980B (en) Brain tumor multi-target auxiliary diagnosis and prospective treatment evolution visualization method and system
CN106599549A (en) Computer-aided diagnosis system and method, and medical system
CN113129309A (en) Medical image semi-supervised segmentation system based on object context consistency constraint
CN114693933A (en) Medical image segmentation device based on generation of confrontation network and multi-scale feature fusion
CN112819831B (en) Segmentation model generation method and device based on convolution Lstm and multi-model fusion
CN112508884A (en) Comprehensive detection device and method for cancerous region
CN116759076A (en) Unsupervised disease diagnosis method and system based on medical image
CN116883768A (en) Lung nodule intelligent grading method and system based on multi-modal feature fusion
Xing et al. Bidirectional mapping-based domain adaptation for nucleus detection in cross-modality microscopy images
Liu et al. AHU-MultiNet: Adaptive loss balancing based on homoscedastic uncertainty in multi-task medical image segmentation network
CN115147640A (en) Brain tumor image classification method based on improved capsule network
Xia et al. Cross-domain brain CT image smart segmentation via shared hidden space transfer FCM clustering
CN116665896A (en) Model building method for predicting breast cancer axillary lymph node metastasis
CN112086174B (en) Three-dimensional knowledge diagnosis model construction method and system
US20220036136A1 (en) Computer-implemented method for parametrizing a function for evaluating a medical image dataset
CN115035346A (en) Classification method for Alzheimer disease based on cooperative learning method enhancement
CN113902738A (en) Heart MRI segmentation method and system
CN113889235A (en) Unsupervised feature extraction system for three-dimensional medical image
Li et al. CAGAN: Classifier‐augmented generative adversarial networks for weakly‐supervised COVID‐19 lung lesion localisation
Reddy et al. Different algorithms for lung cancer detection and prediction
TWI792751B (en) Medical image project management platform
Arshad Choudhry et al. Detection of Lung Nodules on X-ray Using Transfer Learning and Manual Features.

Legal Events

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