Nuclear magnetic resonance image double-ventricle segmentation method based on spiking neural network

By adopting the U-Net network based on pulsed neural network and the dual pulse attention module in the biventricular segmentation method, the problem of blurred boundary segmentation of the biventricular in nuclear magnetic resonance images is solved, and higher segmentation accuracy and efficiency are achieved.

CN119991702APending Publication Date: 2025-05-13HEBEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510098676.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-22
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The prior art is difficult to accurately segment the blurred boundaries of the biventricles in the NMR image, resulting in unsatisfactory segmentation effect.

Method used

The dual ventricular segmentation method based on pulse neural network is adopted, combined with the U-Net network framework and the dual pulse attention module, and through pulse activation, convolution batch normalization and dual attention mechanism, the model's sensitivity to key areas of the image and segmentation accuracy are improved.

Benefits of technology

It significantly improves the accuracy and efficiency of biventricular segmentation, reduces missed and missed detection, and improves the robustness and generalization capabilities of the model, especially when dealing with complex structures and edge fuzzy areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991702A_ABST
    Figure CN119991702A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of medical image processing, and particularly relates to a nuclear magnetic resonance image double-ventricle segmentation method based on a pulse neural network. The method comprises the following steps: firstly, acquiring a plurality of heart MR images containing double ventricles to form a data set, and preprocessing the data set; then, a biventricular segmentation model is constructed based on the spiking neural network, the biventricular segmentation model takes a U-Net network as a basic framework and comprises a plurality of coding layers and decoding layers, and output features of the last decoding layer are sequentially subjected to convolution batch normalization, function activation and head segmentation to obtain a biventricular segmentation map; the coding layer and the decoding layer comprise a plurality of pulse double-attention residual modules, input features of the pulse double-attention residual modules are subjected to pulse activation, convolution batch normalization, pulse activation and convolution batch normalization in sequence, and then are subjected to residual connection with own features subjected to convolution operation; the features obtained by the residual connection pass through a double pulse attention module to obtain the output features of the pulse double attention residual module; and finally, training the biventricular segmentation model, and applying the trained biventricular segmentation model to biventricular segmentation to obtain a biventricular segmentation map. According to the method, the calculation consumption is reduced while the segmentation precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of medical image processing, and in particular is a method for segmenting biventricular ventricles in nuclear magnetic resonance images based on a pulse neural network. Background Art

[0002] The biventricle is composed of the left ventricle and the right ventricle, and its shape and size vary greatly from person to person. Many studies have shown that heart diseases such as heart failure and ventricular hypertrophy are often closely related to the size and shape of the ventricles. Therefore, accurate segmentation of the biventricle is not only helpful for evaluating cardiac function, but also provides an important basis for clinical treatment.

[0003] However, the uniqueness of the two ventricles in cardiac MR images increases the difficulty of segmentation. The boundaries of the two ventricles are usually blurred, with low contrast with the surrounding myocardial tissue and vascular structures, and are easily confused with adjacent tissues, resulting in greater challenges for accurate segmentation. The morphology, size, and position of the left and right ventricles vary significantly between individuals, and the shape of the ventricles is irregularly distributed, further increasing the complexity of segmentation. These factors make it difficult for the model to accurately extract the edge features of the ventricles, and are prone to missed detection or false detection, resulting in unsatisfactory segmentation results.

[0004] Spiking Neural Network (SNN) is a neural network based on biological neuron model, which simulates the communication between neurons using spikes. It transmits information through discrete pulse signals. The time interval and frequency of neuron pulses reflect the intensity of its response to the input signal. Based on the event-driven computing characteristics, it can effectively reduce computing overhead and energy consumption. The attention mechanism can dynamically adjust the model's attention to different areas of the input image, thereby giving higher weights to key intervals in time, helping the model focus on key areas in the image, improving segmentation accuracy, and reducing missed detection and false detection. Therefore, combining SNN with the attention mechanism can significantly improve the performance and efficiency of the model for biventricular segmentation tasks. Summary of the invention

[0005] In view of the deficiencies in the prior art, the technical problem to be solved by the present invention is to propose a method for biventricular segmentation of nuclear magnetic resonance images based on a spiking neural network.

[0006] The present invention solves the technical problem by adopting the following technical solution:

[0007] A method for segmenting biventricular ventricles in nuclear magnetic resonance images based on a spiking neural network comprises the following steps:

[0008] Step 1: Obtain a data set consisting of several cardiac MR images containing two ventricles and preprocess the data set;

[0009] Step 2: Construct a biventricular segmentation model based on a spiking neural network. The biventricular segmentation model uses the U-Net network as the basic framework, including multiple encoding layers and decoding layers. The output features of the previous encoding layer are downsampled as the input features of the next encoding layer, and the output features of the previous decoding layer are upsampled as the input features of the next decoding layer. Each encoding layer is jump-connected to the corresponding decoding layer; the output features of the last decoding layer are sequentially subjected to convolution batch normalization, activation function and segmentation head to obtain a biventricular segmentation map;

[0010] The encoding layer and the decoding layer include a plurality of pulse dual attention residual modules; in the pulse dual attention residual module, the input features are sequentially subjected to pulse activation, convolution batch normalization, pulse activation and convolution batch normalization operations, and then residually connected with the features after the convolution operation, and the features obtained by the residual connection are passed through the dual pulse attention module to obtain the output features of the pulse dual attention residual module; the dual pulse attention module combines pulse channel attention and pulse self-attention;

[0011] Step 3: Train the biventricular segmentation model, and use the trained biventricular segmentation model for biventricular segmentation to obtain a biventricular segmentation map.

[0012] Furthermore, the dual pulse attention module includes a parallel pulse channel attention block and a pulse self-attention block; the input features of the dual pulse attention module are reshaped to increase the number of channels to obtain the input features of the pulse channel attention block, and the input features are respectively pulse activated, convolutional batch normalized and pulse activated to obtain the query, key and value of the pulse channel attention, which are expressed as:

[0013]

[0014] In the formula, Q s ', K s ' and V s ' is the query, key and value of the spike channel attention, X' is the input feature of the spike channel attention block, SN(·) represents the spike activation operation, ConvBN(·) represents the convolutional batch normalization operation, and W q ', W k ' and W v 'are respectively learnable weight matrices;

[0015] The query Q that will pulse the channel attention s ' and key K s 'Perform element-by-element multiplication to obtain the channel attention map; the channel attention map consists of the channel-to-channel attention weights, and the attention weight p of the mth channel to the nth channel mn Calculated by the following formula:

[0016]

[0017] Where e represents the Hadamard product, X m ', X n ' are the features of the mth channel and the nth channel in the input feature X' respectively;

[0018] The channel attention map is compared with the pulse channel attention value V s 'After performing the Hadamard product, add it element by element with the input feature X' to get feature X o ';

[0019]

[0020] Feature X o 'After pulse activation and convolution operation, the output feature f1 of the pulse channel attention block is obtained, which is expressed as:

[0021] f1=Conv(SN(Xo'))(4)

[0022] Among them, H and W are the height and width of the feature respectively;

[0023] The input features of the dual pulse attention module are the input features of the pulse self-attention block. The input features are respectively subjected to pulse activation, convolution batch normalization and pulse activation to obtain the query, key and value of the pulse self-attention. The expression is:

[0024]

[0025] Where X is the input feature of the dual pulse attention module, Q s , K s and V s are the query, key and value of the pulse self-attention, respectively, and W q , W k and W v They are respectively the learnable weight matrices;

[0026] Query Q with pulsed self-attention s , key K s Sum value V s After element-by-element multiplication, pulse activation and convolution batch normalization operations are performed to obtain the output feature f2 of the pulse self-attention block, which is expressed as:

[0027]

[0028] Where s represents the scaling factor, Represents element-wise multiplication;

[0029] The output features of the pulse channel attention block and the pulse self-attention block are concatenated and then convolved to obtain the output features of the dual pulse attention module.

[0030] Furthermore, during the model training process, the training loss is calculated according to the following loss function;

[0031] L=αL Dice +βL BCE (8)

[0032] Where, L Dice , L BCE They are Dice loss and BCE loss respectively; α and β are weight factors;

[0033] Dice loss L Dice Calculated by the following formula:

[0034]

[0035] In the formula, p i represents the probability that the i-th pixel is classified as a segmented region, g i Represents the true probability of the i-th pixel;

[0036] BCE Loss L BCE Calculated by the following formula:

[0037]

[0038] Where M represents the number of pixels.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] 1. The dual pulse attention module combines the pulse channel attention and pulse self-attention mechanisms, which can improve the model's sensitivity to the foreground area, focus the model on the key areas of the image, and then improve the model's ability to understand details and global information, especially for the small and complex structures in the biventricular MR images. The dual pulse attention can effectively capture the characteristics of these areas. Therefore, compared with the traditional ANN, the segmentation model of the present invention combines SNN and attention mechanism, and its accuracy and energy efficiency are more outstanding. The event-driven characteristics of the pulse neural network make the utilization of computing resources more efficient, thereby minimizing the computational complexity while ensuring high accuracy, greatly reducing energy consumption, and improving the robustness and generalization ability of the model in processing complex segmentation tasks. The event-driven computing and sparse activation characteristics of SNN require that the image be fully pulsed. Therefore, the pulse channel attention block and the pulse self-attention block first pulse activate the input features, then perform convolution, and then calculate the query, key and value of attention. The design of the pulse attention mechanism is more refined, ensuring that the time and space characteristics of the pulse neurons can be effectively utilized, which helps to improve the segmentation performance of the model.

[0041] 2. Existing pulse residual connections usually convolve first and then activate, relying on the multiplication operation of floating-point numbers (non-pulse data, numbers other than 0 and 1), which will introduce higher computational consumption and produce non-conformance to event-driven requirements. Therefore, the pulse dual attention residual module of the present invention first performs pulse activation on the input features and then convolution, and introduces convolution on the residual connection, aiming to eliminate the problem of increased energy consumption caused by non-pulse data calculation. The input features are first pulse activated, so that there are only pulse data (i.e., 0 and 1) in the matrix operation process, avoiding floating-point multiplication and excessive computational redundancy. .

[0042] 3. The present invention adopts a method of directly training SNN. Compared with the training method of converting ANN to SNN (ANN2SNN), direct training of SNN can not only eliminate the influence of non-pulse data calculation, but also significantly improve the convergence speed of the model, further improving the training efficiency. Especially in the task of biventricular MR image segmentation, the pulse neural network can extract the key features of the image under a more efficient computing architecture, especially when processing areas with more complex details and blurred edges, the directly trained segmentation model can show stronger segmentation capabilities. In contrast, the ANN2SNN method often cannot fully adapt to such complex task requirements during the conversion process, resulting in segmentation accuracy that is not as good as the directly trained segmentation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 It is the overall network structure diagram of the present invention;

[0044] Figure 2It is a structural diagram of the pulse dual attention residual network of the present invention;

[0045] Figure 3 It is a structural diagram of the pulse dual attention module of the present invention;

[0046] Figure 4 Comparison of biventricular segmentation results using different methods. DETAILED DESCRIPTION

[0047] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods, but the protection scope of the present application is not limited thereto.

[0048] The present invention provides a method for segmenting biventricular ventricles in nuclear magnetic resonance images based on a spiking neural network (hereinafter referred to as the method, see Figures 1 to 4 ), including the following steps:

[0049] Step 1: Obtain a data set consisting of several cardiac MR images containing two ventricles and preprocess the data set;

[0050] For example, a dataset consisting of cardiac MR images of 100 patients was obtained. The MR images were collected during breath holding. The cardiac MR images were sliced ​​along the short axis and covered the heart from the base to the top of the left ventricle. The slice thickness was 5 to 8 mm, and the spatial resolution in the short axis plane ranged from 0.83 to 1.75 mm2 / pixel. Each patient scan was manually annotated with basic facts of the left ventricle (LV), right ventricle (RV), and myocardium (MYO). MR slice images of 70 patients were randomly selected as the training set, MR slice images of 10 patients were selected as the validation set, and MR slice images of 20 patients were selected as the test set.

[0051] Since there are often noise and artifacts in cardiac MR images, these noise and artifacts will interfere with the image quality, and the contrast between different tissues inside the heart (such as myocardium, endocardium, epicardium, etc.) may be insufficient, resulting in blurred boundaries. The pulse neural network needs to perform pulse activation on the cardiac MR image. The above problem may easily lead to the appearance of pixels that cannot be pulse activated during the activation process. Therefore, it is necessary to enhance the cardiac MR image to remove noise and artifacts and improve the boundary clarity; this embodiment adopts gamma correction, brightness enhancement, contrast enhancement and other methods.

[0052] Step 2: Construct a biventricular segmentation model based on a spiking neural network; Figure 1As shown in the figure, the biventricular segmentation model uses the U-Net network as the basic framework, including multiple encoding layers and decoding layers. The output features of the previous encoding layer are down-sampled as the input features of the next encoding layer, and the output features of the previous decoding layer are up-sampled as the input features of the next decoding layer. Each encoding layer is jump-connected to the corresponding decoding layer; the output features of the last decoding layer are sequentially subjected to convolution batch normalization, Swish activation function and segmentation head to obtain a biventricular segmentation map.

[0053] The encoding layer and the decoding layer include a plurality of spiking-DA Resblocks. In this embodiment, the encoding layer includes two spiking-DA Resblocks, and the decoding layer includes three spiking-DA Resblocks. Figure 2 As shown in the figure, the input features of the pulse dual attention residual module are sequentially subjected to pulse activation, convolution batch normalization, pulse activation and convolution batch normalization operations, and then residually connected with the features of the input features after the convolution operation. The features obtained by the residual connection pass through the dual pulse attention module SDAB to obtain the output features of the pulse dual attention residual module. The idea of ​​pulse activation followed by convolution batch normalization is adopted to eliminate non-pulse data in the residual module and ensure the event-driven characteristics of the pulse neural network.

[0054] like Figure 3 As shown, the dual pulse attention module SDAB includes a parallel pulse channel attention block (SCSA) and a pulse self-attention block (SMSA); the input features of the dual pulse attention module SDAB After the reshaping operation to increase the number of channels, the input features of the pulse channel attention block SCSA are obtained Among them, T represents the time step, B represents the batch size, C represents the number of channels, N represents the number of pixels of the feature, and D represents the feature dimension; in the pulse channel attention block SCSA, the input feature X' is respectively subjected to pulse activation, convolution batch normalization and pulse activation to obtain the query, key and value of the pulse channel attention, which are expressed as:

[0055]

[0056] In the formula, and are the query, key, and value of the pulse channel attention, respectively. SN(·) represents the pulse activation operation, ConvBN(·) represents the convolution batch normalization operation, and W q ', W k ' and W v 'are respectively learnable weight matrices;

[0057] The query Q that will pulse the channel attention s ' and key Ks 'Perform element-by-element multiplication to obtain the channel attention map; the channel attention map consists of the channel-to-channel attention weights, where the attention weight p of the mth channel to the nth channel mn Calculated by the following formula:

[0058]

[0059] Where e represents the Hadamard product, X m ', X n ' are the features of the mth channel and the nth channel in the input feature X' respectively;

[0060] The channel attention map is compared with the pulse channel attention value V s 'After performing the Hadamard product, add it element by element with the input feature X' to get feature X o ';

[0061]

[0062] Feature X o 'After pulse activation and convolution operation, the output features of the pulse channel attention block are obtained It is expressed as:

[0063] f1=Conv(SN(Xo'))(4)

[0064] Among them, H and W are the height and width of the feature respectively;

[0065] The input feature X of the dual pulse attention module SDAB directly enters the pulse self-attention block SMSA. Similar to the pulse channel attention block SCSA, the input feature X undergoes pulse activation, convolution batch normalization, and pulse activation to obtain the query, key, and value of the pulse self-attention. The expression is:

[0066]

[0067] In the formula, and are the query, key and value of the pulse self-attention, respectively, and W q , W k and W v They are respectively the learnable weight matrices;

[0068] Query Q with pulsed self-attention s , key K s Sum value V s After element-by-element multiplication, pulse activation and convolution batch normalization operations are performed to obtain the output feature f2 of the pulse self-attention block, which is expressed as:

[0069]

[0070] Where s represents the scaling factor, which is used to control the maximum value of matrix multiplication; Represents element-wise multiplication;

[0071] The output features of the pulse channel attention block SCSA and the pulse self-attention block SMSA are concatenated and then subjected to a convolution operation to restore the number of channels to obtain the output features of the dual pulse attention module SDAB, which is expressed as:

[0072] F=Conv(f1+f2)(7)

[0073] Where F is the output feature of the dual pulse attention module SDAB.

[0074] Step 3: Use pulse coding technology to directly train SNN to perform fully supervised training on the biventricular segmentation model, use the trained biventricular segmentation model for biventricular segmentation, and obtain a biventricular segmentation map; calculate the training loss according to the following loss function:

[0075] L=αL Dice +βL BCE (8)

[0076] Where, L Dice , L BCE are Dice loss and BCE loss respectively; α and β are weight factors, in this embodiment, α is set to 0.7 and β is set to 0.3;

[0077] Dice loss L Dice Calculated by the following formula:

[0078]

[0079] Where i represents the index of the pixel, which is used to traverse each pixel position in the input image or segmentation map, and p i represents the probability that the i-th pixel is classified as a segmented region, g i Represents the true probability of the i-th pixel;

[0080] BCE Loss L BCE Calculated by the following formula:

[0081]

[0082] Where M represents the number of pixels.

[0083] Example

[0084] This embodiment conducts experiments on the ACDC2017 dataset and uses the method of the present invention and the existing method to perform biventricular segmentation. The present invention uses the PyTorch framework to implement on the NVIDIA GeForce RTX 3090Ti GPU, uses the Adam optimizer for training, sets the learning rate to 0.001, sets the batch size to 1, and uses the inverse tangent function as a proxy gradient function for direct training.

[0085] Two indicators are selected to evaluate the segmentation performance of the model: Dice coefficient and 95% Hausdorff distance (HD95). The experimental results and segmentation results of different methods are shown in Tables 1 and Figure 4 .

[0086] Table 1 Comparison of experimental results of different methods

[0087]

[0088]

[0089] As can be seen from Table 1, the biventricular segmentation results of the method of the present invention are significantly better than the existing methods in multiple indicators. Specifically, the method of the present invention has achieved a significant improvement in the Dice coefficient, indicating that the method of the present invention can more accurately capture the boundaries of the biventricular heart and improve the overall accuracy of the segmentation. In terms of the HD95 indicator, the performance of the method of the present invention is particularly outstanding. Compared with methods such as TransUNet and Spiking UNet, HD95 is greatly reduced, indicating that the method of the present invention can provide more accurate segmentation results when dealing with complex areas with fuzzy boundaries and non-fixed positions, especially for the edge areas of the biventricular heart, reducing the distance between the predicted results and the true labels.

[0090] Depend on Figure 4It can be seen that although most methods can segment the main area of ​​the biventricular heart well, they still face challenges when dealing with complex structures. This is because convolutional neural networks often lose detailed information during the segmentation process, especially near the edges of the biventricular heart and smaller areas to be segmented, which can easily lead to over-segmentation. As shown in the red box in the figure, the other methods all have over-segmentation, while the method of the present invention shows more accurate segmentation results, indicating that the method of the present invention has better segmentation capabilities for smaller complex areas. This is because SNN is based on pulse transmission information and adopts an event-driven approach during the calculation process. Neurons are activated only when there is information transmission, which makes SNN have higher computational efficiency when processing image segmentation tasks, especially when computing resources are limited. SNN can effectively utilize the sparsity of information transmission. At the same time, after combining with the attention mechanism, SNN can dynamically adjust its calculation and feature extraction, reduce the processing of irrelevant information, and further improve efficiency. The combination of SNN and attention mechanism has significant advantages in the biventricular segmentation task, especially when processing images with temporal changes, dynamic features and complex structures. SNN can naturally process temporal information and dynamically adjust the focus on key areas through the attention mechanism, providing more efficient and accurate segmentation effects.

[0091] The sources of the above methods are as follows:

[0092] [1] Ronneberger O, Fischer P, Brox TU-Net: Convolutional Networks for Biomedical Image Segmentation [M / OL] / / Lecture Notes in Computer Science, MedicalImage Computing and Computer-Assisted Intervention–MICCAI 2015.2015:234-241.

[0093] [2] Diakogiannis FI, Waldner F, Caccetta P, et al. ResUNet-a: A deeplearning framework forsemantic segmentation ofremotely sensed data[J / OL]. ISPRS Journal ofPhotogrammetry andRemote Sensing, 2020:94-114.

[0094] [3] Oktay O, Schlemper J, Folgoc L, et al. Attention U-Net: Learning Whereto Look for the Pancreas [J]. arXiv: Computer Vision and Pattern Recognition, arXiv: Computer Vision and Pattern Recognition, 2018.

[0095] [4]Chen J, Lu Y, Yu Q, et al. TransUNet: Transformers Make Strong Encoders for Medical Image Segmentation [J]. Cornell University-arXiv, Cornell University-arXiv, 2021.

[0096] [5]Ruan J, Xiang S.Vm-unet:Vision mamba unet for medical imagesegmentation[J].arXivpreprint arXiv:2402.02491,2024.

[0097] [6]Fang W, Yu Z, Chen Y, et al. Deep Residual Learning in Spiking NeuralNetworks[J].

[0098] [7]Li H, Zhang Y, Xiong Z, et al. Deep multi-threshold spiking-UNet for image processing[J].

[0099] Neurocomputing,2024,586:127653.

[0100] Any matters not described in the present invention are applicable to the prior art.

Claims

1. A method for segmenting biventricular ventricles in magnetic resonance images based on a spiking neural network, characterized in that: The method comprises the following steps: Step 1: Obtain a data set consisting of several cardiac MR images containing two ventricles and preprocess the data set; Step 2: Construct a biventricular segmentation model based on a spiking neural network. The biventricular segmentation model uses the U-Net network as the basic framework, including multiple encoding layers and decoding layers. The output features of the previous encoding layer are downsampled as the input features of the next encoding layer, and the output features of the previous decoding layer are upsampled as the input features of the next decoding layer. Each encoding layer is jump-connected to the corresponding decoding layer; the output features of the last decoding layer are sequentially subjected to convolution batch normalization, activation function and segmentation head to obtain a biventricular segmentation map; The encoding layer and the decoding layer include a plurality of pulse dual attention residual modules; in the pulse dual attention residual module, the input features are sequentially subjected to pulse activation, convolution batch normalization, pulse activation and convolution batch normalization operations, and then residually connected with the features after the convolution operation, and the features obtained by the residual connection are passed through the dual pulse attention module to obtain the output features of the pulse dual attention residual module; the dual pulse attention module combines pulse channel attention and pulse self-attention; Step 3: Train the biventricular segmentation model, and use the trained biventricular segmentation model for biventricular segmentation to obtain a biventricular segmentation map.

2. The method for biventricular segmentation of nuclear magnetic resonance images based on pulse neural network according to claim 1, characterized in that: The dual pulse attention module includes a parallel pulse channel attention block and a pulse self-attention block; the input features of the dual pulse attention module are reshaped to increase the number of channels to obtain the input features of the pulse channel attention block, and the input features are respectively pulse activated, convolutional batch normalized and pulse activated to obtain the query, key and value of the pulse channel attention, which are expressed as: In the formula, Q s ', K s ' and V s ' is the query, key and value of the spike channel attention, X' is the input feature of the spike channel attention block, SN(·) represents the spike activation operation, ConvBN(·) represents the convolutional batch normalization operation, and W q ', W k ' and W v 'are respectively learnable weight matrices; The query Q that will pulse the channel attention s ' and key K s 'Perform element-by-element multiplication to obtain the channel attention map; the channel attention map consists of the channel-to-channel attention weights, and the attention weight p of the mth channel to the nth channel mn Calculated by the following formula: Where e represents the Hadamard product, X m ', X n ' are the features of the mth channel and the nth channel in the input feature X' respectively; The channel attention map is compared with the pulse channel attention value V s 'After performing the Hadamard product, add it element by element with the input feature X' to get feature X o '; Feature X o 'After pulse activation and convolution operation, the output feature f1 of the pulse channel attention block is obtained, which is expressed as: f1=Conv(SN(Xo'))(4) Among them, H and W are the height and width of the feature respectively; The input features of the dual pulse attention module are the input features of the pulse self-attention block. The input features are respectively subjected to pulse activation, convolution batch normalization and pulse activation to obtain the query, key and value of the pulse self-attention. The expression is: Where X is the input feature of the dual pulse attention module, Q s , K s and V s are the query, key and value of the pulse self-attention, respectively, and W q , W k and W v They are respectively the learnable weight matrices; Query Q with pulsed self-attention s , key K s Sum value V s After element-by-element multiplication, pulse activation and convolution batch normalization operations are performed to obtain the output feature f2 of the pulse self-attention block, which is expressed as: Where s represents the scaling factor, Represents element-wise multiplication; The output features of the pulse channel attention block and the pulse self-attention block are concatenated and then convolved to obtain the output features of the dual pulse attention module.

3. The method for biventricular segmentation of nuclear magnetic resonance images based on pulse neural network according to claim 1 or 2, characterized in that: During model training, the training loss is calculated according to the following loss function; L=αL Dice +βL BCE (8) Where, L Dice , L BCE They are Dice loss and BCE loss respectively; α and β are weight factors; Dice loss L Dice Calculated by the following formula: In the formula, p i represents the probability that the i-th pixel is classified as a segmented region, g i Represents the true probability of the i-th pixel; BCE Loss L BCE Calculated by the following formula: Where M represents the number of pixels.