Construction method, device and medium for predicting pulmonary hypertension based on metric learning
By applying the adaptive triple learning-based mixed loss strategy of binary cross-entropy in pulmonary hypertension detection, the problems of low intelligence, poor detection performance in mild patients and insufficient heterogeneity of multicenter data are solved in the existing technology, and more efficient and accurate diagnosis of pulmonary hypertension is achieved.
Patent Information
- Application Number
- CN202410916466.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-09
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-07-09
AI Technical Summary
Existing machine learning-based computer-assisted programs have problems in detecting pulmonary hypertension (PH), inability to effectively distinguish patients with mild PH from non-PH patients, and inability to cope with heterogeneity of multicenter data.
Using a construction method based on metric learning, a fully automatic pulmonary arterial hypertension diagnostic classifier is constructed through adaptive triple learning and binary cross-entropy mixed loss strategy, which can be diagnosed in different field strength environments of different centers and different models.
Improve the learning ability of discriminant characteristics of pulmonary hypertension, especially in the detection of mild patients, enhance the accuracy and efficiency of diagnosis, and adapt to the heterogeneity of multicenter data.
Smart Images

Figure CN118898580B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent medical care, and more specifically, to a construction method, device, medium and program product for predicting pulmonary hypertension based on metric learning. Background Art
[0002] Pulmonary hypertension (PH) is a life-threatening pulmonary vascular disease that can lead to heart failure. In clinical practice, the standard diagnosis of PH is to measure pulmonary hemodynamics via right cardiac catheterization (RHC). Since RHC is an invasive technique, it is often used in patients with severe PH symptoms, resulting in delayed diagnosis of PH. Therefore, non-invasive methods are essential for detecting PH as early as possible.
[0003] Non-invasive detection of PH relies on imaging tests, including computed tomography pulmonary angiography (CTPA), echocardiography, and cardiovascular magnetic resonance (CMR). CTPA detects PH by calculating the ratio of the diameter of the pulmonary artery (PA) to the diameter of the ascending aorta. However, an abnormal ratio cannot distinguish PH from certain diseases, such as ascending aortic dilatation or ascending aortic aneurysm. Echocardiography detects PH by estimating pulmonary hemodynamics and anatomical changes, and it is the preferred technique for detecting PH in clinical practice. However, echocardiography relies on the experience and skills of the sonographer, and the results of echocardiography may vary from one sonographer to another. In addition, the penetration depth of echocardiography is limited, and it is difficult to clearly display the pulmonary artery and ventricle to accurately measure pulmonary hemodynamics in some patients. CMR detects PH by using cine CMR technology to noninvasively evaluate changes in cardiac structure and function. Cine CMR technology can provide dynamic cardiac images with standard anatomical structures and high resolution, so it has stable performance and high reproducibility in the diagnosis of PH. However, current PH detection methods based on cine CMR images are mainly based on cardiac structural changes, such as right ventricular hypertrophy (RVH) and right ventricular dilatation (RVD), which are often observed in patients with severe PH. Detecting mild PH patients based on cine CMR images is a challenge for radiologists. For experienced radiologists, observing abnormal cardiac structure and function to identify PH is very time-consuming. Therefore, developing an automated tool that can capture fine dynamic features based on cine CMR images to detect PH is beneficial to improve the detection accuracy and efficiency of radiologists.
[0004] There are two existing computer-assisted programs based on machine learning that can detect pulmonary hypertension through movie CMR. One is the MPCA dimensionality reduction technology proposed by AJSwift, which uses preprocessed outlined marker points in a single-center study to capture the characteristics of pulmonary hypertension on movie CMR images in a single-center study through multilinear principal component dimensionality reduction and feature screening to detect the disease. The other is the imaging omics technology proposed by S.Priya, which preprocesses and outlines the left ventricular myocardial regional disease and extracts imaging omics features from movie CMR images to construct a machine learning model to detect pulmonary hypertension. However, the above two technologies have low automation, cannot verify the impact of image heterogeneity on the algorithm based on single-center modeling, and the algorithm has poor detection performance for patients with mild pulmonary hypertension, which affects the overall accuracy of pulmonary hypertension disease diagnosis.
[0005] There are three disadvantages in the existing technology: 1) The current computer-aided diagnosis programs for pulmonary hypertension based on movie CMR are all based on semi-automatic models, and their intelligence level is not high. The MPCA technology proposed by AJSwift requires radiologists to manually outline 3-4 marker points for the ventricular area of the movie CMR image before training its feature extraction model to improve the area of interest of the computer program. The radiomics technology proposed by S.Priya requires radiologists to manually mark the myocardial area of the left ventricle for the movie CMR before training its feature extraction model. These models still require radiologists to manually outline the area of interest to a certain extent, so that the algorithm is still subject to human intervention, and the performance of the algorithm is affected by the quality of the manually outlined area of interest. At the same time, outlining the area of interest will further increase the workload of radiologists and reduce the substantial auxiliary function of the computer-assisted program. 2) The current technology is based on the establishment of a model under a medical center, and the model is trained and verified in a single medical center. For CMR images, the distribution of images generated by different MRI machine manufacturers (Siemens, Philips, GE, etc.) at different field strengths (1.5T, 3.0T) does not show a normal distribution, so building a model in one center cannot show the universality of the method. 3) Existing technologies cannot accurately detect mild pulmonary hypertension, thereby reducing the overall detection performance of pulmonary hypertension. Although the machine learning-based model can extract features for detecting pulmonary hypertension from movie CMR images, because the machine learning algorithm relies on manual feature engineering, it cannot effectively capture the subtle feature differences between movie CMR images used to distinguish patients with mild pulmonary hypertension from those without pulmonary hypertension, resulting in misjudgment of patients with mild pulmonary hypertension. Summary of the invention
[0006] In view of the above problems, the present invention provides a method for constructing a metric learning-based prediction method for pulmonary hypertension. A fully automatic pulmonary hypertension diagnosis classifier is constructed based on a set of magnetic resonance images obtained from different models and different field strength environments in multiple medical centers. The feature extraction part of the pulmonary hypertension classifier is combined with the idea of metric learning to enhance the learning of the discriminant features of pulmonary hypertension.
[0007] The present application (first aspect) discloses a construction method for predicting pulmonary hypertension based on metric learning, comprising:
[0008] S101: Acquire a cardiac magnetic resonance image set and labels, wherein the labels include normal subjects and patients with pulmonary hypertension;
[0009] S102: the magnetic resonance image set is subjected to an embedding layer to obtain a feature vector;
[0010] S103: The feature vector is passed through a linear layer to obtain a predicted label, and a classification loss is obtained based on the gap between the label and the predicted label;
[0011] S104: The feature vector is input into a metric learning layer to perform metric learning to obtain a metric learning loss;
[0012] S105: Based on the classification loss and the metric learning loss, a pulmonary hypertension classifier is obtained after iterative training, wherein the pulmonary hypertension classifier includes an embedding layer and a linear layer.
[0013] Furthermore, the metric learning is adaptive triplet learning, where the triplet includes an anchor sample, a positive sample, and a negative sample;
[0014] Optionally, the loss of the adaptive triplet is calculated based on the distance between each triplet anchor sample, positive sample, and negative sample in the triplet set;
[0015] Optionally, the loss of the adaptive triplet learning is defined as:
[0016]
[0017] in, represents the loss of adaptive triplet learning in the t-th iteration, m∈[1,M] represents the i-th triplet, M represents the number of triplets,
[0018] φ an Represents the cosine similarity between the anchor sample and the negative sample of the mth triple;
[0019] φ ap Represents the cosine similarity between the anchor sample and the positive sample of the mth triple;
[0020] Max() means finding the maximum value;
[0021] ε(t) and β(t) represent the adaptive margin hyperparameters at the tth iteration, and λ is a hyperparameter.
[0022] Further, the calculation of the cosine similarity is expressed as:
[0023]
[0024] in represents the features generated based on magnetic resonance imaging; || ||2 represents the 2-norm;
[0025] Optionally, ε(t) and β(t) are defined as
[0026]
[0027] where μ Δ (t) represents {Δ=φ ap -φ an |(x a , x p , x n )∈G}, μ an (t) represents the average distance between anchor samples and negative samples, K Δ and K an is a hyperparameter.
[0028] Further, based on the classification loss and the metric learning loss, the pulmonary hypertension classifier obtained after iterative training is expressed as:
[0029]
[0030] Among them, loss is the objective function of iterative training, represents the classification loss, represents the loss of metric learning; λ1 and λ2 represent the weights of classification loss and metric learning loss respectively;
[0031] Optionally, the classification loss includes any one or more of the following: square loss, logarithmic loss, cross entropy loss;
[0032] Optionally, the training model adopts DenseNet, and the DenseNet includes an embedding layer and a linear layer;
[0033] Optionally, the DenseNet is DenseNet121.
[0034] Furthermore, a semi-hard negative sample mining strategy is used to obtain triplets, which are defined as:
[0035]
[0036] β(t)<φ ap
[0037] Among them, φ an Represents the cosine similarity between the anchor sample and the negative sample of the triple;
[0038] φ ap Represents the cosine similarity between the anchor sample and the positive sample of the triple;
[0039] ε(t) and β(t) represent the adaptive margin hyperparameters at the tth iteration.
[0040] Further, the cardiac magnetic resonance image set includes magnetic resonance images from one or more data centers;
[0041] Optionally, a region of interest of the magnetic resonance image is acquired to obtain a set of magnetic resonance images of the region of interest, and the set of magnetic resonance images of the region of interest is passed through an embedding layer to obtain the feature vector;
[0042] Optionally, the cardiac magnetic resonance image set is preprocessed to obtain a preprocessed cardiac magnetic resonance image set, and the preprocessed cardiac magnetic resonance image set is passed through an embedding layer to obtain the feature vector;
[0043] Optionally, use nnU-Net to obtain the end-diastolic mask of the heart;
[0044] Optionally, acquiring the region of interest includes: extracting a ventricular region based on the end-diastolic magnetic resonance image multiplied by the end-diastolic mask;
[0045] Optionally, acquiring the region of interest further comprises: calculating a maximum border width value of an end-diastolic image based on the magnetic resonance image set, and filling edges of all end-diastolic images with the maximum border width;
[0046] Optionally, acquiring the region of interest further comprises: multiplying images of all phases of magnetic resonance imaging by the end-diastolic mask to extract the ventricular region, and then filling the edges of all end-diastolic images with the maximum border width;
[0047] Optionally, the preprocessing includes one or more of the following processing: voxel size resampling, time dimension resampling, image dimension resampling, normalization, data enhancement;
[0048] Optionally, the data enhancement includes one or more of the following: random flipping, random affine transformation, random bias, random noise, and random gamma correction;
[0049] Optionally, the pulmonary hypertension includes one or more of the following: mild pulmonary hypertension, moderate pulmonary hypertension, and severe pulmonary hypertension.
[0050] The second aspect of the present application discloses a pulmonary hypertension detection method based on metric learning, comprising:
[0051] S201: Acquire a cardiac magnetic resonance image of the subject;
[0052] S202: The magnetic resonance image is passed through a pulmonary hypertension classifier to obtain a prediction label, and whether the subject suffers from pulmonary hypertension is determined based on the prediction label. The pulmonary hypertension classifier is trained based on the construction method for predicting pulmonary hypertension based on metric learning.
[0053] The third aspect of the present application discloses a computer device, which includes: a memory and a processor; the memory is used to store program instructions; the processor is used to call the program instructions, and when the program instructions are executed, it is used to execute the steps of the above method.
[0054] A fourth aspect of the present application discloses a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0055] A fifth aspect of the present application discloses a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0056] A system for predicting pulmonary hypertension based on metric learning, comprising:
[0057] Data acquisition module 301: used to acquire cardiac magnetic resonance image sets and labels, wherein the labels include normal subjects and patients with pulmonary hypertension;
[0058] Feature extraction module 302: used to obtain feature vectors from the magnetic resonance image set through an embedding layer;
[0059] Training module 303: used to obtain a predicted label by passing the feature vector through a linear layer, and obtain a classification loss based on the gap between the label and the predicted label; the feature vector is input into a metric learning layer for metric learning to obtain a metric learning loss; based on the classification loss and the metric learning loss, a pulmonary hypertension classifier is obtained after iterative training, and the pulmonary hypertension classifier includes an embedding layer and a linear layer.
[0060] A pulmonary hypertension detection system based on metric learning, comprising:
[0061] Acquisition module 401: acquiring a cardiac magnetic resonance image of a subject;
[0062] Prediction module 402: The magnetic resonance image is passed through a pulmonary hypertension classifier to obtain a prediction label, and whether the subject suffers from pulmonary hypertension is determined based on the prediction label. The pulmonary hypertension classifier is trained based on the construction method for predicting pulmonary hypertension based on metric learning.
[0063] This application has the following beneficial effects:
[0064] 1. We proposed a metric learning method with an adaptive triplet and binary cross entropy mixed loss strategy, which can optimize the discriminative feature learning stage of the neural network in the iterative process, thereby improving the ability to capture subtle features and further improving the detection performance of pulmonary arterial hypertension.
[0065] 2. This application improves the loss function of the adaptive triplet based on pulmonary hypertension. When the cosine distance between the anchor point and the positive class and the anchor point and the negative class samples are close to 0, the existing technology cannot distinguish the distance metric, especially for mild pulmonary hypertension samples. Therefore, this application overcomes the problem of indistinguishable distance metric in the process of triplet acquisition through mandatory constraints, and enhances the learning of pulmonary hypertension discrimination features, especially mild pulmonary hypertension discrimination features.
[0066] 3. The model of the present application can automatically capture the area of interest and send the acquired area to the feature extraction module to automatically output the detection results.
[0067] 4. The present invention can realize automatic detection of pulmonary hypertension disease through movie magnetic resonance images.
[0068] 5. In order to overcome the heterogeneity of multi-center data, we designed a multi-center preprocessing data flow so that this application can achieve better training results based on larger training data. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0070] Figure 1 is a schematic diagram of a construction method provided by the first aspect of an embodiment of the present invention;
[0071] Figure 2 is a schematic diagram of a method provided by the second aspect of an embodiment of the present invention;
[0072] Figure 3 is a schematic diagram of a computer device provided by an embodiment of the present invention;
[0073] Figure 4 is a schematic diagram of the architecture of an exemplary computing device provided by an embodiment of the present invention;
[0074] Figure 5 is a schematic diagram of a storage medium provided by an embodiment of the present invention;
[0075] Figure 6 is a schematic diagram of a system for predicting pulmonary hypertension based on metric learning provided by an embodiment of the present invention;
[0076] Figure 7 is a schematic diagram of a system for predicting pulmonary hypertension based on metric learning provided by an embodiment of the present invention;
[0077] Figure 8 is a flow chart of automated pulmonary hypertension detection provided by an embodiment of the present invention;
[0078] Fig. 9 is a schematic diagram of a cardiac region of interest extraction module provided by an embodiment of the present invention;
[0079] Fig.10 It is a data processing flow diagram of a multi-center data processing module provided by an embodiment of the present invention;
[0080] Fig.11 is a schematic diagram of a feature extraction module provided by an embodiment of the present invention;
[0081] Fig.12 is an AUC comparison diagram of various neural network systems provided by an embodiment of the present invention;
[0082] Fig.13 is a schematic diagram of the generalization capabilities of different models when a public data set provided by an embodiment of the present invention is externally tested in a third center;
[0083] Fig.14 It is a schematic diagram provided by an embodiment of the present invention, which shows that after using an adaptive triplet and binary cross entropy hybrid strategy, the detection error rate of patients with mild pulmonary hypertension in various models can be significantly reduced. DETAILED DESCRIPTION
[0084] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0085] In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The sequence numbers of the operations, such as S101, S102, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0086] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0087] Figure 1 1 is a flow chart of a construction method for predicting pulmonary hypertension based on metric learning provided by an embodiment of the present invention. Specifically, the method comprises the following steps:
[0088] S101: Acquire a cardiac magnetic resonance image set and labels, wherein the labels include normal subjects and patients with pulmonary hypertension;
[0089] In some embodiments, the set of cardiac magnetic resonance images includes cardiac magnetic resonance images from a single center.
[0090] In some embodiments, the cardiac magnetic resonance image set includes cardiac magnetic resonance image sets from multiple centers, and the data from the multiple centers are normalized to achieve multi-center data standardization and optimize the model training effect, and the normalization includes: image resolution normalization; image TR moment normalization; so that the normalized magnetic resonance image data has consistent image resolution, consistent acquisition time frequency, and consistent total number of images included.
[0091] In some embodiments, a region of interest is extracted from a cardiac magnetic resonance image set. The region of interest in the present invention is a ventricular region, and the influence of the region of interest in the cardiac magnetic resonance image set is used as a training data set.
[0092] In some embodiments, data enhancement technology is used to enhance the signal of the magnetic resonance image set, which is more conducive to subsequent model training. The data enhancement technology includes: random flipping, random affine transformation, random bias, random noise, and random gamma correction.
[0093] S102: The magnetic resonance image set is embedded in an embedding layer to obtain a feature vector;
[0094] In some embodiments, AlexNet is used as an embedding layer to extract features from the magnetic resonance image set to obtain a feature vector.
[0095] In some embodiments, RestNet is used as an embedding layer to extract features from the magnetic resonance image set to obtain a feature vector.
[0096] In some embodiments, GhostNet is used as an embedding layer to extract features from the magnetic resonance image set to obtain a feature vector.
[0097] In some embodiments, RepVGG is used as an embedding layer to extract features from the magnetic resonance image set to obtain a feature vector.
[0098] In some embodiments, FasterNet is used as an embedding layer to extract features from the magnetic resonance image set to obtain a feature vector.
[0099] In some embodiments, DenseNet is used as an embedding layer to extract features from the magnetic resonance image set to obtain a feature vector.
[0100] In some embodiments, the backbone structure of DenseNet 121 is used for automatically extracting CMR image features.
[0101] S103: The feature vector is passed through a linear layer to obtain a predicted label, and a classification loss is obtained based on the gap between the label and the predicted label;
[0102] In some embodiments, the classification loss is a binary cross entropy loss, expressed as:
[0103]
[0104] In some embodiments, the classification loss is a squared error loss, expressed as:
[0105]
[0106] S104: The feature vector is input into a metric learning layer to perform metric learning to obtain a metric learning loss;
[0107] The core of metric learning is to learn the similarity between two samples and to measure the distance between two samples. For example, if there are multiple categories of data, we hope to use metric learning to bring the distance between samples of the same category closer and the distance between samples of different categories farther apart, so as to form a reasonable metric of sample similarity. In order to achieve this goal, the metric learning method based on deep learning mainly includes three modules: sample selection, model structure and loss function. Among them, the goal of sample selection is to find positive and negative sample data suitable for metric learning; the model structure is generally based on a multi-sample input and output structure of a twin network or a triple network to achieve representation distance comparison between samples; the loss function combines the distance metric function to give the model a suitable supervision signal.
[0108] The model structures of metric learning mainly include two types: Siamese Network and Triplet Network. The main difference lies in the input samples and loss calculation. For Siamese Network, two samples are input at a time. The two samples pass through the encoder with shared parameters to obtain their respective vector representations, and then the distance between the two vectors is calculated. The overall goal is to make the distance between positive sample pairs close and the distance between negative sample pairs small.
[0109] The Triplet Network inputs three samples each time, including an anchor sample, a positive sample, and a negative sample. These three samples are still input into the encoder with shared parameters separately to obtain their respective representations, and the distances between the anchor sample and the positive sample and the negative sample are calculated. The loss function requires that the distance between positive samples must be greater than the distance between negative samples by a threshold.
[0110] In this paper, the adaptive triplet loss is used as a regularization term in this task, aiming to extract discriminative features by reducing the similarity between positive and negative samples and expanding the similarity of positive samples. Assume G = {(x a , x p , x n )|y a =y p =1,x n =0} represents the set of all triples where x a , x p , x n denote anchor samples, positive samples, and negative samples respectively. For each x in G a , x p , x n , the adaptive triplet loss is defined as:
[0111]
[0112] where φ abrepresents the cosine similarity of two samples (a and b) in the feature embedding space, so,
[0113] φ an Represents the cosine similarity between the anchor sample and the negative sample of the mth triple;
[0114] φ ap Represents the cosine similarity between the anchor sample and the positive sample of the mth triple;
[0115] Max() means finding the maximum value;
[0116] represents the loss of adaptive triplet learning during the t-th iteration,
[0117] m∈[1,M] represents the i-th triplet, M represents the number of triples,
[0118] ε(t) and β(t) represent the adaptive margin hyperparameters in the tth iteration, M represents the number of triplets, and λ is a hyperparameter. φ ab is defined as:
[0119]
[0120] in Represents the features generated based on the movie CMR image. The first term in formula (3) aims to minimize the similarity between the anchor sample and the negative sample, and maximize the similarity between the anchor sample and the negative sample. However, when the cosine distances between the anchor point and the positive class and the anchor point and the negative class samples are close to 0, the distance metric cannot be distinguished using only the first term of formula (4), especially for samples with mild pulmonary hypertension (because mild pulmonary hypertension is close to both diseased samples and normal samples, and the cosine distances are close to 0). Therefore, the second term in formula (3) is used to solve this problem. Specifically, we introduce a threshold β(t) to enforce the constraint φ an ≤β(t). This can overcome the above problems in the process of triple acquisition. ε(t) and β(t) are defined as:
[0121]
[0122] where μ Δ (t) represents {Δ=φ ap -φ an |(x a , x p , x n )∈G}, μ an represents the average distance between anchor samples and negative samples, K Δ and K an is a hyperparameter.
[0123] The adaptive triplet loss uses a semi-hard negative sample mining strategy to obtain triplets, which is defined as:
[0124]
[0125] β(t)<φ ap (9)
[0126] For this task, positive samples are defined as people with PH, and negative samples are defined as people without PH. The method of selecting triplets is to iterate over all positive samples in each mini-batch of the current epoch as anchor samples. If equations (7) and (8) are satisfied, we calculate the cosine distance between the anchor point and all other samples to form a set of triplet pairs. A mini-batch can generate multiple triplet pairs.
[0127] S105: Based on the classification loss and the metric learning loss, a pulmonary hypertension classifier is obtained after iterative training, wherein the pulmonary hypertension classifier includes an embedding layer and a linear layer.
[0128] In one embodiment, a cardiac magnetic resonance image set and labels are obtained, the labels are mild pulmonary hypertension and normal subjects, and a mild pulmonary hypertension classifier is obtained after iterative training.
[0129] In one embodiment, a cardiac magnetic resonance image set and labels are obtained, the labels are moderate pulmonary hypertension and normal subjects, and a moderate pulmonary hypertension classifier is obtained after iterative training.
[0130] In one embodiment, a cardiac magnetic resonance image set and labels are obtained, the labels are severe pulmonary hypertension and normal subjects, and a severe pulmonary hypertension classifier is obtained after iterative training.
[0131] In a specific embodiment, the pulmonary hypertension detection system provided by the present invention is as follows: Figure 8 As shown in the figure, cardiovascular magnetic resonance movie images are obtained as the input of the system through the data acquisition module, and the areas where the left ventricle and right ventricle are located, which are meaningful for diagnosing pulmonary hypertension, are obtained through the cardiac region of interest (ROI) extraction module. Next, the pixel distribution and size of the data are unified through the multi-center preprocessing module, and data enhancement is performed to improve the stability of the data. Finally, the data enters the feature classification module based on the metric learning strategy, and the prediction probability is obtained through the diagnosis output module.
[0132] (1) Data acquisition module:
[0133] When a patient undergoes a cardiovascular MRI examination through an MRI machine, several sequences will be generated in the data generation device of the MRI machine. Our goal is to collect MRI movie short-axis imaging images based on free steady-state precession. We connect to the medical image archiving and communication system and read the metadata of all the patient's dcm (a format of medical images) format data. We extract the metadata identifier (0008,103E) and the text data value of the TAG description Series Description. We match the text keywords to adapt to the naming of the sequence by different MRI manufacturers (CINE, SAX, B-TFEM2D), and copy all dcm data that meet the keywords to the transition folder.
[0134] (2) Cardiac Region of Interest (ROI) Extraction Module
[0135] Obtain all patient data in the transition folder. We unified the spatial resolution of multi-center data to the same size of 1.00×1.00mm 2 . We took out all the short-axis CMR images in the end-diastolic phase as the input data of the cardiac region of interest extraction module. We used the nnU-Net algorithm as an artificial intelligence segmentation model to automatically obtain the region of interest. When the data is input into the segmentation model, the model will automatically extract the statistical parameters of the image (maximum, minimum, median, etc. of the image pixels) and the image properties (shape, spatial resolution, etc. of the current image). After obtaining the image parameters, we used the public data set ACDC2017 to train 1000 rounds of pre-trained weights in nnU-Net to extract the cardiac region of interest for our data, that is, to extract the cardiac mask at the end of diastole, because magnetic resonance cardiac movie technology can obtain the heart movement within a cardiac cycle. The end of diastole is the moment when the heart is at its largest morphologically, so the mask obtained in this period can cover the ventricle area in other periods. We extend the mask obtained at this moment to other moments.
[0136] After obtaining the masks for the end-diastolic phase, we multiplied the end-diastolic cine CMR images by their corresponding masks to extract the desired ventricular regions. Next, we calculated the maximum border width value of the cropped end-diastolic images in all patient data. We used this maximum border width to zero-fill the edges of all end-diastolic images. Next, we applied the same mask multiplication and cropping process to the other stages of the cine short-axis CMR images ( Fig. 9 ).
[0137] (3) Multi-center preprocessing module
[0138] After the cardiac ROI extraction module, we performed a series of multi-center data normalization and augmentation. To reduce distortion in the temporal dimension, we used B-spline interpolation to interpolate the motion to the median level of all centers. To be compatible with the accuracy and efficiency of resampling, we applied bilinear interpolation to resample the height and width of the image to 224×224 as a suitable input size for the feature extraction module. In order to exclude outliers generated by CMR images, multi-center data normalization was performed using Z-score normalization. The data augmentation strategies we adopted included random flipping, random affine transformation with a mean of 0 and a standard deviation of 0.1, random deviation with a mean of 0 and a standard deviation of 0.5, random noise with a mean of zero and a standard deviation of 0.1, and random gamma transformation with a mean of 1 and a standard deviation of 0.1 ( Fig.10 ).
[0139] (4) Feature extraction module
[0140] The feature extraction module consists of two parts: Fig.11 ): 1. Based on the DenseNet121 neural network backbone structure. 2. A hybrid loss strategy based on adaptive triples and binary cross entropy.
[0141] 1. Based on the DenseNet1 21 neural network backbone structure
[0142] The backbone structure based on DenseNet121 is used to automatically extract CMR image features. The model consists of an initialized convolutional layer, four dense block layers, three transition layers, a maximum pooling layer, an embedding layer, and a linear layer. The selected data after multi-center preprocessing first enters the initialized convolutional layer, which uses a three-dimensional convolution kernel size of (7×7×7). Initialize the convolutional layer. Dense connections are established between these blocks, allowing the fourth layer to receive the output feature maps of all previous layers.
[0143] x l =H l ([x0, x1, ..., x l-1 ]). (1)
[0144] Among them, [x0, x1, ..., x l-1] represents the concatenation of feature maps generated in the dense block layer. Each dense block connects the feature maps of all previous dense layers in each dense block through a shortcut. The dense layer consists of two 3×3×3 convolutional layers, two instance normalization layers, and two activation layers. This approach ensures that each layer has access to feature information from all previous layers, promoting efficient information flow throughout the network. Between two dense blocks, a transition layer is added, including a 3×3×3 convolutional layer, an instance normalization layer, an activation layer, and a pooling layer with a kernel size of 2×2×2 and a stride of 2×2×2. After the last dense block, a maximum pooling layer, an embedding layer, and a linear layer classifier are added to reduce the feature dimension.
[0145] 2. Hybrid loss strategy based on adaptive triples and binary cross entropy
[0146] As a kind of metric learning, adaptive triplet learning makes the distance between similar samples smaller and the distance between dissimilar samples larger by learning an effective metric space. The purpose of this hybrid loss strategy is to optimize the discriminative feature learning process and constrain the optimization direction by affecting the gradient descent process in back propagation.
[0147] The hybrid loss of adaptive triplet (adaTriplet-loss) and binary cross entropy (BCE-loss) is defined as:
[0148]
[0149] where λ1 and λ2 represent the loss weights for binary cross entropy and adaptive triplet loss, respectively.
[0150] The binary cross entropy loss formula is:
[0151]
[0152] where p i represents the predicted probability of patient i, y i Represents the binary label of the sample, 0 or 1; N represents the total number of samples.
[0153] The adaptive triplet loss is used as a regularizer in this task, aiming to extract discriminative features by reducing the similarity between positive and negative samples and enlarging the similarity of positive samples. Assume G = {(x a , x p , x n )|y a =y p =1,x n =0} represents the set of all triples where x a , x p , x ndenote anchor samples, positive samples, and negative samples respectively. For each x in G a , x p , x n , the adaptive triplet loss is defined as:
[0154]
[0155] where φ ab represents the cosine similarity of two samples (a and b) in the feature embedding space, so,
[0156] φ an Represents the cosine similarity between the anchor sample and the negative sample of the mth triple;
[0157] φ ap Represents the cosine similarity between the anchor sample and the positive sample of the mth triple;
[0158] Max() means finding the maximum value;
[0159] represents the loss of adaptive triplet learning during the t-th iteration,
[0160] m∈[1,M] represents the i-th triplet, M represents the number of triples,
[0161] ε(t) and β(t) represent the adaptive margin hyperparameters in the tth iteration, M represents the number of triplets, and λ is a hyperparameter. φ ab is defined as:
[0162]
[0163] in Represents the features generated based on movie CMR images. The first term in formula (3) aims to minimize the similarity between anchor samples and negative samples, and maximize the similarity between anchor samples and negative samples. However, when the cosine distances between the anchor point and the positive class and the anchor point and the negative class samples are close to 0, the distance metric cannot be distinguished using only the first term of formula (4), especially for samples with mild pulmonary hypertension. Therefore, the second term in formula (3) is used to solve this problem. Specifically, we introduce a threshold β(t) to enforce the constraint φ an ≤β(t). This can overcome the above problems in the process of triple acquisition. ε(t) and β(t) are defined as:
[0164]
[0165] where μ Δ (t) represents {Δ=φ ap -φ an |(x a , xp , x n )∈G}, μ an represents the average distance between anchor samples and negative samples, K Δ and K an is a hyperparameter.
[0166] The adaptive triplet loss uses a semi-hard negative sample mining strategy to obtain triplets, which is defined as:
[0167]
[0168] β(t)<φ ap (9)
[0169] For this task, positive samples are defined as people with PH, and negative samples are defined as people without PH. The method of selecting triplets is to iterate over all positive samples in each mini-batch of the current epoch as anchor samples. If equations (7) and (8) are satisfied, we calculate the cosine distance between the anchor point and all other samples to form a set of triplet pairs. A mini-batch can generate multiple triplet pairs.
[0170] (5) Diagnosis and treatment result output module
[0171] After feature extraction, we set the output of the linear layer in the feature extraction module to 0 or 1, where 0 means no disease and 1 means pulmonary hypertension. The probability of calculation is obtained through binary cross entropy. In order to better evaluate the performance of the model and provide quantitative indicators for radiologists, we use subject sensitivity (SE), specificity (SP), positive predictive value (PPV), negative predictive value (NPV), F1 value, accuracy (ACC), F1 value and under-the-line curve area (AUC) to evaluate the model:
[0172]
[0173] The present invention was trained and internally validated on a pulmonary hypertension dataset obtained from two medical centers. We compared two of the latest machine learning-based models and four typical neural network models. Our model uses the AdamW optimizer and sets the initial learning rate to 3×10 -4 The learning rate strategy is exponential decay. The training is carried out for 50 epochs and the batch size is set to 8, using five-fold cross validation.
[0174] Table 1. Comparison of the performance of machine learning models based on deep learning models under different evaluation indicators
[0175]
[0176] Table Note: MPCA-LR means that the feature extraction is based on the multilinear principal component analysis (MPCA) algorithm proposed by AJSwift, and the output result is obtained through the logistic regression classifier (LR);
[0177] Texture-MLP refers to the feature extraction based on radiomic texture proposed by S.Priya, and the output result is obtained through the multi-layer perceptron classifier (MLP);
[0178] - means: it means that the hybrid adaptive triplet and binary cross entropy loss strategy is not used, that is, only the binary cross entropy loss is used as the loss function;
[0179] HSATBCL stands for Hybrid Strategy of Adaptive Triplet and Binary Cross-entropy Losses (HSATBCL).
[0180] Fig.12 The results show that the AUC result of the neural network system PHNet designed by the present invention is very high, so the system is expected to accurately identify pulmonary hypertension.
[0181] External testing was performed at a third center using public datasets to verify the generalization capabilities of different models ( Fig.13 ), the results show that the generalization ability of PHNet designed by the present invention in diagnosing pulmonary hypertension is stronger than that of traditional machine learning algorithms.
[0182] The use of the adaptive triplet and binary cross entropy hybrid strategy can significantly reduce the detection error rate of patients with mild pulmonary hypertension, and significantly reduce the detection error rate of patients with moderate pulmonary hypertension, while the detection error rate of patients with severe pulmonary hypertension is slightly reduced ( Fig.14 ). This may be because the output of the cross entropy loss has a characteristic that when the model is very confident that the prediction is correct, it will output a value very close to 0 or 1. Fig.14 In the above example, we assume that the binary cross entropy output probability is greater than 0.5 for patients with pulmonary hypertension, and less than 0.5 for patients without pulmonary hypertension. There may be some patients with pulmonary hypertension whose predicted probability is slightly lower than 0.5 and therefore they are considered not to have pulmonary hypertension. However, for model prediction, the probability of 0.4 is actually much greater than the probability of 0. As long as the threshold is reselected, such patients can also be marked as having the disease.
[0183] In the set of predicted probabilities for severe pulmonary hypertension, even with the hybrid strategy, the probability value of the case, which is similar to the probability value of 0.4, cannot be increased to above 0.5, so it is still marked as a prediction error in the figure. Our hybrid strategy optimizes the decision hyperplane, so when the threshold is 0.5, some of the predicted probabilities that are less than 0.5 when using the hybrid strategy can be increased to greater than 0.5, that is, we can see that both mild and moderate error rates have decreased. At the same time, because the error rate of severe patients is already less than 5% without using this strategy, it may also be due to other reasons such as the imaging quality of these patients that lead to incorrect identification.
[0184] The present invention designs a metric learning idea to combine the classic binary cross entropy loss for classification with the metric learning loss function, with the aim of integrating clinical prior knowledge into the neural network training process. This study designs an adaptive triplet and binary cross entropy hybrid loss strategy, based on which the network performance can be further optimized or improved in the following ways:
[0185] (1) Replacing the network framework and applying the hybrid strategy to more advanced neural network structures may improve actual performance;
[0186] (2) Combine a variety of different neural network structures or machine learning structures with the hybrid strategy and use ensemble learning ideas to build a fusion model;
[0187] (3) Combine this hybrid strategy with the subtypes of pulmonary hypertension for hierarchical prediction;
[0188] (4) Replace the adaptive triplet loss with other metric losses;
[0189] (5) Adding different data augmentation strategies in the preprocessing part may improve the algorithm performance;
[0190] (6) Using different transfer learning methods to obtain cardiac regions of interest, more accurate segmentation of the cardiac ROI region may improve algorithm performance;
[0191] (7) Optimizing the gradient descent algorithm and replacing the Adam-W algorithm with, for example, the SGD algorithm may improve network performance.
[0192] Figure 2 is a schematic diagram of a method provided by the second aspect of an embodiment of the present invention;
[0193] A pulmonary hypertension detection method based on metric learning, comprising:
[0194] Acquiring cardiac magnetic resonance images of the subject;
[0195] The magnetic resonance image is passed through a pulmonary hypertension classifier to obtain a prediction label, and whether the subject suffers from pulmonary hypertension is determined based on the prediction label. The pulmonary hypertension classifier is trained based on the method of the first aspect of the present invention.
[0196] In some embodiments, a cardiac magnetic resonance image of the subject is obtained; the magnetic resonance image is passed through a pulmonary hypertension classifier to obtain a prediction label, and based on the prediction label, it is determined whether the subject suffers from pulmonary hypertension; if the subject suffers from pulmonary hypertension, the severity of the subject's pulmonary hypertension is obtained by further inputting the image into an integrated learning classifier of a mild pulmonary hypertension classifier, a moderate pulmonary hypertension classifier, and a severe pulmonary hypertension classifier.
[0197] In some embodiments, a cardiac magnetic resonance image of the subject is acquired; the magnetic resonance image is passed through a mild pulmonary hypertension classifier to obtain a prediction label, and whether the subject suffers from mild pulmonary hypertension is determined based on the prediction label.
[0198] In some embodiments, a cardiac magnetic resonance image of the subject is acquired; the magnetic resonance image is passed through a moderate pulmonary hypertension classifier to obtain a predicted label, and whether the subject suffers from moderate pulmonary hypertension is determined based on the predicted label.
[0199] In some embodiments, a cardiac magnetic resonance image of the subject is acquired; the magnetic resonance image is passed through a severe pulmonary hypertension classifier to obtain a prediction label, and whether the subject suffers from severe pulmonary hypertension is determined based on the prediction label.
[0200] Figure 3 is a schematic diagram of a computer device provided by an embodiment of the present invention, such as Figure 3 As shown, the device may include: one or more processors, and one or more memories; wherein the memories store computer-readable codes, and when the computer-readable codes are run by the one or more processors, the method described above may be executed.
[0201] The processor in this embodiment can be an integrated circuit chip with signal processing capabilities. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, operations and logic block diagrams in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc., which can be an X86 architecture or an ARM architecture.
[0202] In general, various example embodiments of the present disclosure may be implemented in hardware or dedicated circuits, software, firmware, logic, or any combination thereof. Certain aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device. When various aspects of the disclosed embodiments are illustrated or described as block diagrams, flow charts, or using some other graphical representation, it will be understood that the blocks, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general purpose hardware or controllers or other computing devices, or some combination thereof as non-limiting examples.
[0203] For example, the method or device according to the embodiment of the present disclosure may also be implemented by Figure 4 The architecture of the computing device 3000 shown in FIG. Figure 4 As shown, the computing device 3000 may include a bus 3010, one or more CPUs 3020, a read-only memory (ROM) 3030, a random access memory (RAM) 3040, a communication port 3050 connected to a network, an input / output component 3060, a hard disk 3070, etc. The storage device in the computing device 3000, such as ROM 3030 or hard disk 3070, may store various data or files used for processing and / or communication of the method provided by the present disclosure and program instructions executed by the CPU. The computing device 3000 may also include a user interface 3080. Of course, Figure 4 The architecture shown is only exemplary and can be omitted according to actual needs when implementing different devices. Figure 4 One or more components of a computing device are shown.
[0204] The embodiment of the present invention also provides a computer-readable storage medium, such as Figure 5As shown, it is a schematic diagram of a storage medium provided by an embodiment of the present invention, and a computer readable instruction 4010 is stored on the computer storage medium 4020. When the computer readable instruction 4010 is executed by the processor, the method according to the embodiment of the present disclosure described with reference to the above figures can be executed. The computer readable storage medium in the embodiment of the present disclosure can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. The non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM) or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that the memory of the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory. It should be noted that the memory of the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0205] The embodiments of the present disclosure also provide a computer program product or a computer program, which implements the steps of the above method when executed by a processor.
[0206] like Figure 6 As shown, a system for predicting pulmonary hypertension based on metric learning includes:
[0207] Data acquisition module 301: used to acquire cardiac magnetic resonance image sets and labels, wherein the labels include normal subjects and patients with pulmonary hypertension;
[0208] Feature extraction module 302: used to obtain feature vectors from the magnetic resonance image set through an embedding layer;
[0209] Training module 303: used to obtain a predicted label by passing the feature vector through a linear layer, and obtain a classification loss based on the gap between the label and the predicted label; the feature vector is input into a metric learning layer for metric learning to obtain a metric learning loss; based on the classification loss and the metric learning loss, a pulmonary hypertension classifier is obtained after iterative training, and the pulmonary hypertension classifier includes an embedding layer and a linear layer.
[0210] like Figure 7A pulmonary hypertension detection system based on metric learning is shown, comprising:
[0211] Acquisition module 401: acquiring a cardiac magnetic resonance image of a subject;
[0212] Prediction module 402: The magnetic resonance image is passed through a pulmonary hypertension classifier to obtain a prediction label, and whether the subject suffers from pulmonary hypertension is determined based on the prediction label. The pulmonary hypertension classifier is trained based on the construction method for predicting pulmonary hypertension based on metric learning.
[0213] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment, or a part of a code, and the module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0214] In general, various example embodiments of the present disclosure may be implemented in hardware or dedicated circuits, software, firmware, logic, or any combination thereof. Certain aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device. When various aspects of the disclosed embodiments are illustrated or described as block diagrams, flow charts, or using some other graphical representation, it will be understood that the blocks, devices, systems, techniques, or methods described herein may be implemented in hardware, software, firmware, dedicated circuits or logic, general purpose hardware or controllers or other computing devices, or some combination thereof as non-limiting examples.
[0215] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0216] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0217] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0218] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0219] The exemplary embodiments of the present disclosure described in detail above are merely illustrative and not restrictive. It should be understood by those skilled in the art that various modifications and combinations may be made to these embodiments or their features without departing from the principles and spirit of the present disclosure, and such modifications should fall within the scope of the present disclosure.
Claims
1. A method for predicting pulmonary hypertension based on metric learning, characterized in that: The method comprises: S101: Acquire a cardiac magnetic resonance image set and labels, wherein the labels include normal subjects and patients with pulmonary hypertension; S102: The magnetic resonance image set is embedded in an embedding layer to obtain a feature vector; S103: The feature vector is passed through a linear layer to obtain a predicted label, and a classification loss is obtained based on the gap between the label and the predicted label; S104: the feature vector is input into a metric learning layer for metric learning to obtain a metric learning loss; the metric learning is adaptive triplet learning, where the triplet includes an anchor sample, a positive sample, and a negative sample; The loss of the adaptive triplet is calculated based on the distance between each triplet anchor sample, positive sample, and negative sample in the triplet set; The loss of the adaptive triplet learning is defined as: in, represents the loss of adaptive triplet learning during the t-th iteration, represents the i-th triple, M represents the number of triples, Represents the cosine similarity between the anchor sample and the negative sample of the mth triple; Represents the cosine similarity between the anchor sample and the positive sample of the mth triple; It means to find the maximum value; and represents the adaptive margin hyperparameter at the tth iteration, is a hyperparameter; S105: Based on the classification loss and the metric learning loss, a pulmonary hypertension classifier is obtained after iterative training, wherein the pulmonary hypertension classifier includes an embedding layer and a linear layer.
2. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: The calculation of the cosine similarity is expressed as: in represents features generated based on magnetic resonance imaging; represents the 2-norm.
3. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: and They are defined as: in express The sample mean of , , Represent anchor samples, positive samples and negative samples respectively, represents the average distance between anchor samples and negative samples, and is a hyperparameter.
4. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: Based on the classification loss and the metric learning loss, the pulmonary hypertension classifier obtained after iterative training is expressed as: Among them, loss is the objective function of iterative training, represents the classification loss, represents the loss of metric learning; and Represent the weights of classification loss and metric learning loss respectively.
5. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: The classification loss includes any one or more of the following: square loss, logarithmic loss, and cross entropy loss.
6. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: The training model adopts DenseNet, which includes an embedding layer and a linear layer.
7. The method for predicting pulmonary hypertension based on metric learning according to claim 6, characterized in that: The DenseNet is DenseNet121.
8. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: A semi-hard negative sample mining strategy is used to obtain triplets, which are defined as: in, Represents the cosine similarity between the anchor sample and the negative sample of the triple; Represents the cosine similarity between the anchor sample and the positive sample of the triple; and represents the adaptive margin hyperparameter at the tth iteration.
9. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: The cardiac magnetic resonance image set includes magnetic resonance images from one or more data centers.
10. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: The region of interest of the magnetic resonance image is acquired to obtain a magnetic resonance image set of the region of interest, and the magnetic resonance image set of the region of interest is passed through an embedding layer to obtain the feature vector.
11. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: The cardiac magnetic resonance image set is preprocessed to obtain a preprocessed cardiac magnetic resonance image set, and the preprocessed cardiac magnetic resonance image set is passed through an embedding layer to obtain the feature vector.
12. The method for predicting pulmonary hypertension based on metric learning according to claim 10, characterized in that: The method for obtaining the region of interest includes: using deep learning to obtain a mask at the end of diastole, and extracting a ventricular region based on multiplying a magnetic resonance image at the end of diastole by the mask at the end of diastole.
13. The method for predicting pulmonary hypertension based on metric learning according to claim 12, characterized in that: Obtain the mask of end-diastole using nnU-Net.
14. The method for predicting pulmonary hypertension based on metric learning according to claim 10, characterized in that: The method for acquiring the region of interest further includes: calculating a maximum border width value of an end-diastolic image based on the magnetic resonance image set, and using the maximum border width value to fill the edges of all end-diastolic images.
15. The method for predicting pulmonary hypertension based on metric learning according to claim 14, characterized in that: The method for obtaining the region of interest further includes: multiplying the images of all phases of the magnetic resonance imaging by the end-diastolic mask to extract the ventricular region, and then filling the edges of all the end-diastolic images with the maximum border width.
16. The method for predicting pulmonary hypertension based on metric learning according to claim 11, characterized in that: The preprocessing includes one or more of the following processes: voxel size resampling, time dimension resampling, image dimension resampling, normalization, and data enhancement.
17. The method for predicting pulmonary hypertension based on metric learning according to claim 16, characterized in that: The data enhancement includes one or more of the following: random flipping, random affine transformation, random bias, random noise, and random gamma correction.
18. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: The pulmonary hypertension includes one or more of the following: mild pulmonary hypertension, moderate pulmonary hypertension, and severe pulmonary hypertension.
19. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: The labels described in S101 include normal subjects and patients with mild pulmonary hypertension. After iterative training in S105, a mild pulmonary hypertension classifier is obtained.
20. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: The labels described in S101 include normal subjects and patients with moderate pulmonary hypertension. After iterative training in S105, a moderate pulmonary hypertension classifier is obtained.
21. The method for predicting pulmonary hypertension based on metric learning according to claim 1, characterized in that: The labels described in S101 include normal subjects and patients with severe pulmonary hypertension, and a severe pulmonary hypertension classifier is obtained after iterative training in S105.
22. A pulmonary hypertension detection method based on metric learning, characterized in that: The method comprises: Acquiring cardiac magnetic resonance images of the subject; The magnetic resonance image is passed through a pulmonary hypertension classifier to obtain a prediction label, and whether the subject suffers from pulmonary hypertension is determined based on the prediction label. The pulmonary hypertension classifier is trained based on the method of any one of claims 1-21.
23. The metric learning-based pulmonary hypertension detection method according to claim 22, characterized in that: The magnetic resonance image is passed through a mild pulmonary hypertension classifier to obtain a prediction label, and whether the subject suffers from mild pulmonary hypertension is determined based on the prediction label. The mild pulmonary hypertension classifier is trained based on the method of any one of claims 1-21.
24. The pulmonary hypertension detection method based on metric learning according to claim 22, characterized in that: The magnetic resonance image is passed through a moderate pulmonary hypertension classifier to obtain a predicted label, and whether the subject suffers from moderate pulmonary hypertension is determined based on the predicted label. The moderate pulmonary hypertension classifier is trained based on the method of any one of claims 1-21.
25. The metric learning-based pulmonary hypertension detection method according to claim 22, characterized in that: The magnetic resonance image is passed through a severe pulmonary hypertension classifier to obtain a prediction label, and whether the subject suffers from severe pulmonary hypertension is determined based on the prediction label. The severe pulmonary hypertension classifier is trained based on the method of any one of claims 1-21.
26. A computer device, characterized in that: The device comprises: a memory and a processor; the memory is used to store a computer program; the processor executes the computer program to implement the steps of the method according to any one of claims 1 to 25.
27. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 25 are implemented.
28. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 25 are implemented.
Citation Information
Patent Citations
Breast cancer molecular subtype prediction method based on model driver element learning
CN114187472A
Method and system for predicting fetal congenital heart disease risk based on artificial intelligence and storable medium
CN116912236A