Atrial Fibrillation Auxiliary Analysis Method Based on Cross-Model Mutual Teaching Semi-Supervision
By adopting cross-model mutual teaching semi-supervised method and deformable Transformer model in atrial fibrillation-assisted analysis, the problems of inaccurate calculation of left atrial index value and semi-supervised learning difficulties in the prior art are solved, and high-precision left atrial segmentation and atrial fibrillation-assisted analysis are achieved.
Patent Information
- Application Number
- CN202211264344.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-14
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-10-14
AI Technical Summary
The prior art is difficult to accurately calculate the index value of the left atrium in atrial fibrillation-assisted analysis, and the image segmentation method based on deep learning faces the problems of consistency regularization constraints and insufficient model spatial information acquisition ability in semi-supervised learning.
Atrial fibrillation-assisted analysis method based on cross-model mutual teaching and semi-supervised analysis, a deformable Transformer is introduced to construct a left atrial segmentation model, and a semi-supervised training framework for cross-model mutual teaching is built, using mutual teaching and pseudo-label filtering between teacher-student models to improve segmentation accuracy.
The accurate segmentation of 3D cardiac MRI images is achieved, the segmentation accuracy of the left atrium segmentation model is improved, the dependence on label data is reduced, and the time and energy of doctors are reduced.
Smart Images

Figure CN115565671B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of atrial fibrillation assisted analysis, and particularly relates to an atrial fibrillation assisted analysis method based on cross-model mutual teaching semi-supervision. Background Art
[0002] Atrial fibrillation, as the most common heart disease, usually manifests as persistent arrhythmia and left atrial enlargement. Therefore, the anatomical structure of the left atrium can provide important information for the pathological analysis of atrial fibrillation. The four indicators of the diameter, volume, volume index, and sphericity of the left atrium can provide important bases for the evaluation and analysis of atrial fibrillation. Therefore, accurately calculating these indicator values plays an important role in the evaluation of atrial fibrillation. However, accurately calculating the indicator values depends on the accurate delineation of the left atrial contour. Currently, in clinical diagnosis, doctors mainly manually segment the left atrial region from cardiac magnetic resonance images, which not only takes time but also has a low segmentation accuracy.
[0003] With the development of deep learning technology, image segmentation methods based on deep learning have achieved good results. Currently, most available clinical databases are small in scale, so it is difficult to train models using fully supervised learning methods. For medical images, obtaining a large amount of labeled data is a time-consuming and laborious process, and the labeling results are greatly affected by doctors' subjectivity. Compared with labeled data, unlabeled data is easy to obtain and can be provided in large quantities. How to use limited labeled data and a large amount of unlabeled data for semi-supervised learning has become the focus of attention of many researchers. Currently, there are mainly two major difficulties in semi-supervised learning: 1) The problem of consistency regularization constraints. Consistency regularization constraints strengthen the consistency of the model during the prediction process or the intermediate feature extraction process by adding perturbations. For the same unlabeled data, by randomly augmenting the image during the perturbation process, the model obtains two different prediction results during forward propagation, and a consistency constraint is added between the predictions of the augmented images, so that the model pays more attention to low-density regions to improve the segmentation performance. Generally speaking, in most teacher-student model training frameworks, the teacher parameters are updated using the exponential moving average (EMA) method. However, the exponential moving average focuses more on weighting the parameters of the student model at each stage of the training process and does not evaluate the quality of the pseudo-labels generated by the model. As the number of training times increases, the teacher model will accumulate and learn the parameters of the student model, and at the same time, it will also accumulate the wrong knowledge in the parameters, which cannot ensure that the teacher model can provide better pseudo-labels for supervision. 2) Insufficient ability to obtain model spatial information. In most existing studies, medical image segmentation methods based on pure convolutional neural networks (CNNs) are adopted. Most of these models are derived from the U-Net / V-Net models and their variants. Although good results have been achieved in various tasks, due to the limitations of convolutional operations, CNN-based methods have limited ability to model global information and long-range dependency information. Moreover, most medical images are based on 3D structures, and there is a lot of spatial information between each image, which cannot be well obtained in the CNN model. Summary of the Invention
[0004] Aiming at the deficiencies of the prior art, the technical problem to be solved by the present invention is to propose an atrial fibrillation assisted analysis method based on cross-model mutual teaching semi-supervision.
[0005] The technical solution adopted by the present invention to solve the above technical problem is as follows:
[0006] An atrial fibrillation assisted analysis method based on cross-model mutual teaching semi-supervision, comprising the following steps:
[0007] S1. In the training stage, data augmentation is performed by including random flipping, contrast enhancement, and random cropping. In the inference stage, central cropping is used for data augmentation, and the 3D cardiac magnetic resonance image to be segmented is cropped to a specified size.
[0008] S2. Introduce a deformable Transformer to build a left atrial segmentation model. The left atrial segmentation model includes a convolutional neural network-based encoder, a 3D deformable Transformer encoder, and a convolutional neural network-based decoder.
[0009] The convolutional neural network-based encoder consists of multiple cascaded encoder layers. Each encoder layer contains a convolutional layer, a normalization layer, an activation layer, and a downsampling layer. The 3D cardiac magnetic resonance image to be segmented is subjected to feature extraction through the convolutional neural network-based encoder to obtain a multi-scale spatial feature map.
[0010] The 3D deformable Transformer encoder is stacked by multiple 3D deformable Transformer encoder layers. Each 3D deformable Transformer encoder layer includes cascaded self-attention layers, normalization layers, feed-forward layers, and normalization layers. Residual connections are used in the self-attention layer and the feed-forward layer.
[0011] The spatial feature map extracted by the convolutional neural network-based encoder is input into the 3D deformable Transformer encoder. The input spatial feature map is flattened through a 3D position encoder, and at the same time, the pixel points in the left atrial region of the spatial feature map are used as key points. The flattened spatial feature map and key points are input into the self-attention layer. The self-attention layer uses a 3D deformable multi-head self-attention mechanism to make the 3D deformable Transformer encoder only focus on some pixel points of the spatial feature map. The 3D deformable self-attention mechanism is obtained by expanding the attention mechanism in the Z-axis direction, and the expression is:
[0012]
[0013] In the formula, represents the 3D deformable multi-head attention mechanism, z q represents the coordinates of the pixel point, represents the normalized coordinates of z q , represents the multi-scale spatial feature map, m represents the self-attention head index number of the multi-head attention mechanism, M represents the number of self-attention heads, L represents the number of spatial feature maps, W m , W′ m both represent the identity matrix, K represents the number of pixel points, Δp mlqk and A mlqkrespectively represent the sampling offset and attention weight of the k-th pixel in the l-th spatial feature map of the m-th attention head; represents converting the normalized coordinates to the corresponding l-th spatial feature map;
[0014] The decoder based on the convolutional neural network includes the same number of decoder layers as the encoder layers. Except for the last decoder layer which is an upsampling layer, the remaining decoder layers are all transposed convolutions.
[0015] S3. Build a semi-supervised training framework based on cross-model mutual teaching; use the left atrial segmentation model as the teacher model and the V-Net model as the student model. The supervised loss L sup has the following expression:
[0016] L sup = 0.5×(L CE (y i , p i ) + L DICE (y i , p i )) (4)
[0017] In the formula, L CE (y i , p i ) and L DICE (y i , p i ) respectively represent the cross-entropy loss and dice coefficient loss between the left atrial segmentation prediction map p i and the true label y i ;
[0018] For unlabeled data, use semi-supervised training with cross-model mutual teaching. The 3D cardiac magnetic resonance images are input into the teacher model and the student model respectively to generate two pseudo-labels. Use the teacher model to provide pseudo-labels for the student model and the student model to provide pseudo-labels for the teacher model; filter the generated pseudo-labels. Use the confidence of the pixels in the left atrial segmentation prediction map as the filtering index. Set thresholds for the foreground and background of the left atrial segmentation prediction map respectively. For the foreground of the left atrial segmentation prediction map, select the pixels with a confidence higher than the foreground threshold, and for the background of the left atrial segmentation prediction map, select the pixels with a confidence less than the background threshold. Delete the remaining pixels in the left atrial segmentation prediction map to obtain the filtered left atrial segmentation prediction map; calculate the binary cross-entropy loss for model training using the filtered left atrial segmentation prediction map and the pseudo-labels as:
[0019]
[0020] Among them, respectively represent the foreground and background of the left atrium segmentation prediction map, γ and β respectively represent the foreground threshold and background threshold; denotes the pseudo-label, including the pseudo-label provided by the teacher model for the student model and the pseudo-label provided by the student model for the teacher model the left atrium segmentation prediction map p i includes the prediction results of the teacher model and the student model;
[0021] the strategy loss function L of cross-model mutual teaching cmt is defined as:
[0022]
[0023] In the formula, represents the binary cross-entropy loss between the prediction result of the teacher model and the pseudo-label, represents the binary cross-entropy loss between the prediction result of the student model and the pseudo-label;
[0024] The total loss function of model training is expressed as:
[0025] L total = L sup + αL cmt (11)
[0026] where, L sup represents the supervision loss, L cmt represents the strategy loss of cross-model mutual teaching, and α represents the balance factor;
[0027] The expression of the balance factor α is:
[0028]
[0029] In the formula, t represents the current training step of the model, t max represents the maximum training step of the model;
[0030] S4. Perform 3D reconstruction on multiple left atrium segmentation prediction maps generated from the same 3D cardiac magnetic resonance image according to the original positions to obtain the reconstructed left atrium segmentation prediction map; Based on the reconstructed left atrium segmentation prediction map, calculate four clinical indexes of the left atrium, namely diameter, volume, volume index and left atrium sphericity. The doctor compares these clinical indexes with the normal reference value range and combines clinical experience to judge whether the patient has atrial fibrillation, so as to realize the auxiliary analysis of atrial fibrillation.
[0031] Compared with the prior art, the beneficial effects of the present invention are:
[0032] 1. 3D cardiac magnetic resonance images contain rich spatial information, which is beneficial to the accurate segmentation of the left atrium. To segment 3D cardiac magnetic resonance images, the present invention introduces a deformable Transformer into the convolutional neural network to construct a left atrium segmentation model, making full use of the advantages of CNN to extract local features and Transformer to model long-range dependencies for extracting spatial information. Compared with traditional Transformer modules, the 3D deformable Transformer encoder of the present invention takes the pixel points in the left atrium region as key points, so that the 3D deformable Transformer encoder only focuses on the key points in the left atrium region, regardless of the spatial size of the feature map. By assigning only a small fixed number of keys to each query, the problems of convergence and feature space resolution can be alleviated, reducing the computational amount while accelerating the convergence speed.
[0033] 2. A semi-supervised mechanism for cross-model mutual teaching is built between the left atrium segmentation model and the V-Net model, which can take into account the information categories of different models on the same data. At the same time, foreground and background thresholds are set for the prediction results, and the generated pseudo-labels are filtered using the confidence of pixel points, thereby providing accurate and stable pseudo-labels, making the predictions of the two models gradually reach consistency, and thus improving the segmentation accuracy of the left atrium segmentation model. At the same time, it solves the problem in the existing teacher-student model semi-supervised training framework that as the number of training times increases, the teacher model will accumulate incorrect knowledge and cannot provide better pseudo-labels for supervision. During the segmentation process, a large amount of unlabeled data is fully utilized, greatly alleviating the dependence of the model on labeled data, reducing the annotation time and effort of doctors for 3D MRI data, and reducing labor costs.
[0034] 3. The present invention obtains the image of the left atrium region through the left atrium segmentation model, and obtains four clinical indicators, namely the left atrium diameter, volume, volume index, and left atrium sphericity, by 3D reconstructing the left atrium segmentation result, which can help doctors in the diagnosis of atrial fibrillation symptoms and heart diseases, and has important significance in clinical practice, facilitating the transformation of medical automatic diagnosis technology from the laboratory to clinical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 is the overall flowchart of the present invention;
[0036] Figure 2 is the structural diagram of the left atrium segmentation model of the present invention;
[0037] Figure 3 is the structural diagram of the encoder of the present invention;
[0038] Figure 4Structural diagram of the 3D deformable Transformer encoder layer of the present invention. Detailed implementation manners
[0039] The technical solutions of the present invention will be described in detail below in conjunction with the accompanying drawings and specific implementation manners, but the protection scope of this application is not limited thereby.
[0040] The present invention provides a method for auxiliary analysis of atrial fibrillation based on cross-model mutual teaching semi-supervision (hereinafter referred to as the method, see Figures 1 to 4 ), which specifically includes the following steps:
[0041] S1. Define the dataset: Follow the standard semi-supervised learning dataset setting, denote the dataset as D, and represent the labeled dataset as D l ={x l , y l}, and represent the unlabeled dataset as D u ={x u}, where x represents 3D cardiac magnetic resonance images, and y l represents the true label; select 20% of the labeled data and 80% of the unlabeled data for model training to achieve the purpose of training the model with samples composed of a small amount of labeled data and a large amount of unlabeled data;
[0042] Enhance the dataset: Currently, the dataset of medical images is very scarce compared with the dataset of natural images with thousands or tens of thousands of images. In order to make the model more robust, a combined method is used for data augmentation during the training stage, including random flipping by 15°, contrast enhancement, and random cropping, etc.; in the inference stage, central cropping is used for data augmentation, and the 3D cardiac magnetic resonance image to be segmented is cropped into 240*240*80 pixels;
[0043] S2. Introduce a deformable Transformer to construct a left atrium segmentation model; the left atrium segmentation model includes an encoder based on a convolutional neural network, a 3D deformable Transformer encoder, and a decoder based on a convolutional neural network, see Figure 2 ;
[0044] S21. The encoder based on the convolutional neural network includes four cascaded encoder layers, and each encoder layer includes a cascaded convolutional layer, normalization layer, activation layer, and downsampling layer; the convolutional kernel size of the convolutional layer is 2*2*2, and the stride is 2; the activation layer uses the PRELU activation function, and the normalization layer uses the BatchNorm layer normalization function; after passing through the convolutional layer and the downsampling layer, the number of channels of the feature map doubles and the resolution is halved; input the 3D cardiac magnetic resonance image to be segmented into the encoder based on the convolutional neural network for feature extraction to obtain a multi-scale spatial feature map, and the multi-scale spatial feature map Expressed as:
[0045]
[0046] Wherein: represents the spatial feature map extracted by the l-th encoder layer, C represents the number of channels, H l represents the height of the spatial feature map f l W l represents the width of the spatial feature map f l D l represents the depth of the spatial feature map f l ; L represents the number of encoder layers, F CNN (.) represents an encoder based on a convolutional neural network, and θ is the parameter of the encoder based on a convolutional neural network;
[0047] S22. The 3D deformable Transformer encoder is stacked by multiple 3D deformable Transformer encoder layers (8 in this embodiment). Each 3D deformable Transformer encoder layer includes a cascaded self-attention layer, a normalization layer, a forward feedback layer, and a normalization layer. Both the self-attention layer and the forward feedback layer adopt residual connections. See Figure 3 ; The spatial feature maps extracted by the second to fourth encoder layers of the encoder based on the convolutional neural network are input into the 3D deformable Transformer encoder to obtain the spatial feature map extracted by the Transformer encoder, and further the long-range dependence information between 3D cardiac magnetic resonance images is extracted;
[0048] Transformer is a network architecture based on the multi-head attention mechanism, mainly applied to natural language processing. Due to its advantages in long-dependent information, it has also achieved good results in processing visual tasks. In the Transformer module, given a query element (such as a pixel point in a segmentation region) and a set of key elements (such as pixel points in the image to be segmented), the multi-head attention mechanism adaptively aggregates the matching degree of the key element queries according to the attention weights. To enable the model to focus on content from different representation subspaces and different positions, the multi-head attention mechanism linearly aggregates the outputs of different attention heads with learnable attention weights. This application improves on the traditional Transformer module to obtain a 3D deformable Transformer module. On the one hand, it is to solve the problem that the traditional Transformer module requires a long training time before convergence, and the Transformer module converges slower than CNN and requires more data sets. On the other hand, it is to solve the problem that the traditional Transformer module calculates the weights of all data in the image, and the calculation and memory complexity of the multi-head attention are very high. If there are many queries and key elements, the calculation amount will be very large and it is difficult to apply to 3D medical images.
[0049] Therefore, the 3D deformable Transformer encoder first flattens the input spatial feature map through a 3D position encoder, and at the same time takes the pixel points in the left atrium region of the spatial feature map as key points. The expression of the 3D position encoder is:
[0050]
[0051] In the formula, PE(.) represents the 3D position encoder, pos represents the pixel point, v represents the position weight of the pixel point, and k represents the index number of the pixel point.
[0052] Then, the flattened spatial feature map and key points are input into the self-attention layer. The self-attention layer enables the 3D deformable Transformer encoder to only focus on some pixel points of the spatial feature map through the 3D deformable multi-head self-attention mechanism. The 3D deformable self-attention mechanism is obtained by expanding the attention mechanism in the Z-axis direction (i.e., adding a channel) to adapt to the 3D environment. The expression of the 3D deformable self-attention mechanism is:
[0053]
[0054] In the formula, represents the 3D deformable multi-head attention mechanism, z q represents the coordinates of the pixel point, represents z q 's normalized coordinates. represents the multi-scale spatial feature map, m represents the self-attention head index number of the multi-head attention mechanism, M represents the number of self-attention heads, L represents the number of spatial feature maps, and W m and W' m both represent the identity matrix, K represents the number of pixel points, and Δp mlqk and A mlqk respectively represent the sampling offset and attention weight of the k-th pixel point in the l-th spatial feature map of the m-th attention head; represents converting the normalized coordinates to the corresponding l-th spatial feature map;
[0055] S23. The decoder based on the convolutional neural network includes four cascaded decoder layers. The first three decoder layers all use transposed convolutions with a convolutional kernel size of 2*2*2 and a stride of 2 to return the spatial feature map extracted by the Transformer encoder to the input resolution; the last decoder layer is an upsampling layer for outputting the left atrium segmentation prediction map; in order to retain more underlying details, skip connections are used between the encoder and decoder based on the convolutional neural network.
[0056] S3. Build a semi-supervised training framework based on cross-model mutual teaching. In order to make full use of the advantages of the convolutional neural network in processing local information and the advantages of the Transformer module in long-range dependence information, the left atrium segmentation model constructed in step S2 is used as the teacher model, and the V-Net model is used as the student model. This can provide more accurate pseudo-labels during the training process, and thus can better segment the left atrium area in the case of scarce labeled data;
[0057] In order to ensure that both the teacher model and the student model in cross-model mutual teaching can learn the features of the labeled data, a supervision constraint is established for the labeled data; the labeled data set is input into the teacher model and the student model respectively for training, and the cross-entropy (CE) and dice coefficient (DICE) are used to calculate the supervision loss between the left atrium segmentation prediction map and the true label. The expression of the supervision loss is:
[0058] L sup = 0.5×(L CE (y i , p i ) + L DICE (y i , p i )) (4)
[0059] In the formula, L CE (y i , p i ), L DICE (y i , pi ) represent the cross-entropy loss and dice coefficient loss between the left atrial segmentation prediction map p i and the ground truth label y i respectively;
[0060] For unlabeled data, a semi-supervised training strategy of cross-model mutual teaching is used; specifically, any 3D cardiac magnetic resonance image in the unlabeled dataset is input into the teacher model and the student model respectively, generating two prediction results;
[0061]
[0062]
[0063] where, F T (.) represents the teacher model, and F S (.) represents the student model, represents the prediction result of the teacher model, represents the prediction result of the student model;
[0064] In the semi-supervised method, pseudo-labels are a way to advocate using the model itself to generate artificial labels for unlabeled data; for unlabeled data, the teacher model is used to provide pseudo-labels for the student model, and the student model is used to provide pseudo-labels for the teacher model. Let represent the pseudo-labels provided by the teacher model for the student model and the pseudo-labels provided by the student model for the teacher model respectively, then there are:
[0065]
[0066]
[0067] Although the pseudo-labels are independent of the modality of the images, there may be a large number of incorrect pseudo-labels during the training process. Therefore, the generated pseudo-labels are filtered to reduce the noise in the training and improve the overall performance; the confidence of the pixel points in the left atrial segmentation prediction map is used as the filtering index, and thresholds are set for the foreground and background of the left atrial segmentation prediction map respectively. For the foreground of the left atrial segmentation prediction map, pixel points with a confidence higher than the foreground threshold are selected, and for the background of the left atrial segmentation prediction map, pixel points with a confidence less than the background threshold are selected. The remaining pixel points in the left atrial segmentation prediction map are deleted to obtain the filtered left atrial segmentation prediction map; the binary cross-entropy loss for model training is calculated using the filtered left atrial segmentation prediction map and the pseudo-labels as:
[0068]
[0069] where, represent the foreground and background of the left atrial segmentation prediction map respectively, and γ and β represent the foreground threshold and the background threshold respectively; Denote the pseudo - labels, including the pseudo - labels provided by the teacher model for the student model and the pseudo - labels provided by the student model for the teacher model The left - atrium segmentation prediction map \(p\) in Equation (9) i includes the prediction results of the teacher model and the prediction results of the student model
[0070] The strategy loss \(L\) of cross - model mutual teaching cmt is defined as
[0071]
[0072] In the formula denotes the binary cross - entropy loss between the prediction results of the teacher model and the pseudo - labels denotes the binary cross - entropy loss between the prediction results of the student model and the pseudo - labels
[0073] The strategy loss function of cross - model mutual teaching combines the different prediction results of the teacher model and the student model for the same unlabeled data, which is beneficial to improving the prediction accuracy of the left - atrium segmentation model
[0074] To sum up, the total loss function for model training is expressed as
[0075] \(L\) total \(=\) \(L\) sup \(+\alpha L\) cmt (11)
[0076] where \(\alpha\) represents the balance factor between supervised learning and semi - supervised learning, which is used to ensure that the total loss function is mainly dominated by full supervision at the beginning to avoid model degradation during training. The expression of \(\alpha\) is
[0077]
[0078] In the formula, \(t\) represents the current training step of the model, and \(t\) max represents the maximum training step of the model
[0079] S4. The left - atrium segmentation prediction model uses a sliding - window method to segment and predict 3D cardiac magnetic resonance images. Therefore, multiple left - atrium segmentation prediction maps are generated for the same 3D cardiac magnetic resonance image. All the left - atrium segmentation prediction maps are 3D - reconstructed according to their original positions to obtain the reconstructed left - atrium segmentation prediction map. According to the reconstructed left - atrium segmentation prediction map, calculate the diameter \(LA\) of the left atrium dia volume \(LA\) v volume index \(LA\) vi and left - atrium sphericity \(LA\) spFor these four clinical indicators, doctors compare these clinical indicators with the normal reference value range and combine clinical experience to judge whether the patient has atrial fibrillation, so as to achieve the purpose of auxiliary analysis of atrial fibrillation;
[0080] In clinical applications, the size and shape of the atrium are often used to evaluate patients with atrial fibrillation. Therefore, the volume LA of the left atrium is obtained from the predicted segmentation map of the reconstructed left atrium v , the anteroposterior diameter LA of the left atrium dap , the left-right diameter LA of the left atrium dml , the superior-inferior diameter LA of the left atrium dsi , select the maximum value among LA dap , LA dml , LA dsi as the diameter of the left atrium (unit: mm), and its expression is:
[0081] LA dia = max(LA dap ; LA dml ; LA dsi ) (13)
[0082] The volume index LA of the left atrium vi is:
[0083] LA vi = LA v / B sa (14)
[0084] where the unit of the volume index is ml / m 2 , LA v represents the volume of the left atrium, and B sa represents the body surface area of the patient, and the calculation formula is:
[0085] B sa = 0.0061 × height + 0.0124 × weight – 0.0099 (15)
[0086] where the units of height and weight are cm and kg respectively;
[0087] The sphericity LA of the left atrium sp is:
[0088] LA sp (%) = V dia / LA dia (16)
[0089] where V dia represents the diameter of a sphere with the same volume as the left atrium, and the unit is mm.
[0090] Matters not described in this invention apply to the prior art.
Claims
1. An atrial fibrillation assisted analysis method based on cross-model mutual teaching semi-supervision, characterized in that The method includes the following steps: S1. During the training phase, data augmentation is performed by means of including random flipping, contrast enhancement, and random cropping. During the inference phase, central cropping is used for data augmentation, and the 3D cardiac magnetic resonance image to be segmented is cropped to a specified size. S2. A deformable Transformer is introduced to construct a left atrium segmentation model. The left atrium segmentation model includes an encoder based on a convolutional neural network, a 3D deformable Transformer encoder, and a decoder based on a convolutional neural network. The encoder based on a convolutional neural network includes multiple cascaded encoder layers. Each encoder layer contains a convolutional layer, a normalization layer, an activation layer, and a downsampling layer. The 3D cardiac magnetic resonance image to be segmented is subjected to feature extraction through the encoder based on a convolutional neural network to obtain a multi-scale spatial feature map. The 3D deformable Transformer encoder is stacked by multiple 3D deformable Transformer encoder layers. Each 3D deformable Transformer encoder layer includes cascaded self-attention layers, normalization layers, forward feedback layers, and normalization layers. Residual connections are used in the self-attention layers and the forward feedback layers. The spatial feature map extracted by the encoder based on a convolutional neural network is input into the 3D deformable Transformer encoder. The input spatial feature map is flattened by a 3D position encoder. At the same time, the pixel points in the left atrium region of the spatial feature map are used as key points. The flattened spatial feature map and the key points are input into the self-attention layer. The self-attention layer uses a 3D deformable multi-head self-attention mechanism to enable the 3D deformable Transformer encoder to only focus on some pixel points of the spatial feature map. The 3D deformable self-attention mechanism is obtained by expanding the attention mechanism in the Z-axis direction, and the expression is: In the formula, represents a 3D deformable multi-head attention mechanism, and z q represents the coordinates of a pixel point, represents the normalized coordinates of z q ; represents a multi-scale spatial feature map, m represents the self-attention head index number of the multi-head attention mechanism, M represents the number of self-attention heads, L represents the number of spatial feature maps, and W m , W m both represent the identity matrix, K represents the number of pixel points, Δp mlqk and A mtqk respectively represent the sampling offset and attention weight of the k-th pixel point in the l-th spatial feature map of the m-th attention head; represents converting the normalized coordinates to the corresponding l-th spatial feature map; The decoder based on a convolutional neural network includes the same number of decoder layers as the encoder layers. Except that the last decoder layer is an upsampling layer, the remaining decoder layers are all transposed convolutions. S3. Build a semi-supervised training framework based on cross-model mutual teaching; use the left atrium segmentation model as the teacher model and the V-Net model as the student model, and the expression of the supervision loss L sup is as follows: L sup = 0.5 × (L CE (y i , p i ) + L DICE (y i , p i )) (4) Wherein, L CE (y i , p i ), L DICE (y i , p i ) respectively represent the cross-entropy loss and the Dice coefficient loss between the left atrial segmentation prediction map p i and the ground truth label y i ; For unlabeled data, semi-supervised training using cross-model mutual teaching is performed. The 3D cardiac magnetic resonance image is input into the teacher model and the student model respectively to generate two pseudo-labels. The teacher model is used to provide pseudo-labels for the student model, and the student model is used to provide pseudo-labels for the teacher model. The generated pseudo-labels are filtered. The confidence of the pixel points in the left atrium segmentation prediction map is used as the filtering index. Thresholds are set for the foreground and background of the left atrium segmentation prediction map respectively. For the foreground of the left atrium segmentation prediction map, pixel points with a confidence higher than the foreground threshold are selected. For the background of the left atrium segmentation prediction map, pixel points with a confidence less than the background threshold are selected. The remaining pixel points in the left atrium segmentation prediction map are deleted to obtain a filtered left atrium segmentation prediction map. The binary cross-entropy loss for model training is calculated using the filtered left atrium segmentation prediction map and the pseudo-labels as: Among them, respectively represent the foreground and background of the left atrial segmentation prediction map, and γ and β respectively represent the foreground threshold and background threshold; represents the pseudo-label, including the pseudo-labels provided by the teacher model for the student model and the pseudo-labels provided by the student model for the teacher model the left atrial segmentation prediction map p i includes the prediction results of the teacher model and the student model; The strategy loss function L for cross-model mutual teaching cmt is defined as: Wherein, represents the binary cross-entropy loss between the prediction result of the teacher model and the pseudo-label, represents the binary cross-entropy loss between the prediction result of the student model and the pseudo-label; The total loss function for model training is expressed as: L total = L sup + αL cmt (11) Among them, L sup represents the supervision loss, and L cmt represents the strategy loss of cross-model mutual teaching, and α represents the balance factor; The expression for the balance factor α is: where t represents the current training step of the model, and t max represents the maximum training step of the model; S4. Perform 3D reconstruction on multiple left atrial segmentation prediction maps generated from the same 3D cardiac magnetic resonance image according to their original positions to obtain the reconstructed left atrial segmentation prediction map; based on the reconstructed left atrial segmentation prediction map, calculate four clinical indicators of the left atrium, namely diameter, volume, volume index, and left atrial sphericity. Doctors compare these clinical indicators with the normal reference value range and combine clinical experience to judge whether the patient has atrial fibrillation, thus realizing the auxiliary analysis of atrial fibrillation.
2. The atrial fibrillation assisted analysis method based on cross-model mutual teaching semi-supervision according to claim 1, wherein In step S4, the volume LA of the left atrium is obtained from the reconstructed left atrium segmentation prediction map v , the anteroposterior diameter LA of the left atrium dap , the left-right diameter LA of the left atrium dml , the superior-inferior diameter LA of the left atrium dsi , and the maximum value among LA dap , LA dml , LA dsi is selected as the diameter LA of the left atrium dia ; The volume index of the left atrium, LA vi is as follows: LA vi = LA v / B sa (14) where B sa represents the body surface area of the patient, and the calculation formula is: B sa = 0.0061 × height + 0.0124 × weight - 0.0099 (15) Left atrial sphericity LA sp is as follows: LA sp = V dia / LA dia (16) Among them, V dia represents the diameter of a sphere with the same volume as the left atrium.
3. The atrial fibrillation assisted analysis method based on cross-model mutual teaching semi-supervised learning according to claim 1 or 2, characterized in that The encoder based on the convolutional neural network includes four encoder layers, and the convolutional kernel size of the convolutional layer in the encoder layer is 2*2*2 with a stride of 2; the decoder based on the convolutional neural network includes four decoder layers, and the convolutional kernel size of the transposed convolution in the decoder layer is 2*2*2 with a stride of 2.
Citation Information
Patent Citations
Method of monocular depth estimation based on joint self-attention mechanism
AU2020103715A4
Three-dimensional hepatic duct image segmentation algorithm and system
CN114119547A