System, method and medium for automatically segmenting deep grey matter nuclei in magnetic resonance imaging

By fusing the alternating coding structure of CNN and Transformer, combining the cascade channel-space fusion module and the symmetric boundary attention module, the dynamic adaptive weighted Dice loss function is used to solve the accuracy and repeatability of dark gray matter nucleus segmentation in MRI images, achieving high precision and efficient segmentation effect.

CN119991940APending Publication Date: 2025-05-13FUDAN UNIVERSITY
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

It is difficult for the prior art to achieve high-precision dark gray matter nucleus segmentation, especially in the case of small size and low contrast in MRI images, the traditional method is time-consuming and has problems of poor subjectivity and repeatability.

Method used

The alternating coding structure of the fusion convolutional neural network CNN and Transformer is adopted, combined with the cascaded channel-space fusion module and the symmetric boundary attention module, and the precise segmentation of the deep gray matter nucleus through a dynamic adaptive weighted Dice loss function.

Benefits of technology

It realizes high-precision segmentation of DGM nuclei, solves the problem of class imbalance, improves the segmentation accuracy of small-volume nuclei, and is suitable for the segmentation of small-volume and low-contrast structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991940A_ABST
    Figure CN119991940A_ABST
Patent Text Reader

Abstract

The invention provides a system and a method for automatically segmenting deep grey matter nuclei in magnetic resonance imaging, and a medium. The method comprises the following steps: carrying out resampling, cutting and normalization preprocessing on a magnetic resonance image; using an encoder module comprising an alternating convolutional neural network encoder block and a Transform encoder block to extract hierarchical feature representation; through a cascade channel-space fusion module, features are fused by applying a channel and a space attention mechanism; reconstructing the segmentation map using a decoder module comprising an up-sampling layer and a hopping connection; through a symmetric boundary attention module, original and mirror image segmentation images are compared, and boundary refinement is enhanced; using a dynamic adaptive weighted Dice loss function to adjust the weight according to the volume of each nucleus, and guiding network training; and outputting a segmentation map of the deep grey matter nuclei. According to the method, accurate segmentation of the DGM nuclei is realized, and the problem of class imbalance in small-size nucleus segmentation is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of medical image processing, and in particular to a system, method and medium for automatically segmenting deep gray matter nuclei in magnetic resonance imaging. Background Art

[0002] Parkinson's disease (PD) is a common neurodegenerative disease, which is mainly manifested by motor and cognitive dysfunction. Magnetic resonance imaging (MRI) technology provides an important imaging basis for the early diagnosis of PD, especially the accurate segmentation of deep gray matter (DGM) nuclei (such as red nucleus, substantia nigra, putamen and globus pallidus), which can provide key information for the diagnosis and research of PD. However, due to the small size and low contrast of DGM nuclei in MRI images, traditional segmentation methods often fail to achieve ideal accuracy. In addition, manual segmentation is not only time-consuming, but also has problems of subjectivity and poor repeatability. Therefore, the development of a high-precision and automated DGM nucleus segmentation method is of great significance for the diagnosis of PD. Summary of the invention

[0003] In view of the defects in the prior art, an object of the present invention is to provide a system, method and medium for automatically segmenting deep gray matter nuclei in magnetic resonance imaging.

[0004] The system for automatically segmenting deep gray matter nuclei in magnetic resonance imaging provided by the present invention comprises:

[0005] A preprocessing module that resamples, crops, and normalizes the input magnetic resonance image;

[0006] The encoder module, consisting of alternating convolutional neural network encoder blocks and Transformer encoder blocks, extracts hierarchical feature representations from the preprocessed images;

[0007] The cascaded channel-spatial fusion module fuses the features extracted by the encoder module by applying the channel attention and spatial attention mechanisms sequentially;

[0008] The decoder module, including upsampling layers and skip connections to the corresponding layers of the encoder module, reconstructs the segmentation map of deep gray matter nuclei;

[0009] The symmetric boundary attention module, embedded in the decoder module, enhances the boundary refinement of deep gray matter nuclei by comparing the original segmentation map with the mirrored segmentation map;

[0010] The loss calculation module uses a dynamic adaptive weighted Dice loss function to adaptively adjust the weights according to the volume of each deep gray matter nucleus to solve the class imbalance problem during training;

[0011] Among them, the system outputs the deep gray matter nucleus segmentation results with accuracy meeting the preset requirements.

[0012] Preferably, the preprocessing module resamples the input magnetic resonance image to 1×1×1 mm 3 The voxel spacing is 224×224×16 and the voxel intensity values ​​are normalized to the range of [0, 255].

[0013] Preferably, each convolutional neural network encoder block uses a residual skip unit, includes a convolutional layer, a ReLU activation function, and a batch normalization layer to capture local spatial features of the image;

[0014] Each Transformer encoder block contains a multi-head self-attention layer, layer normalization, and a feed-forward network to capture the global context information of the image;

[0015] The input image passes through the convolutional neural network encoder block and the Transformer encoder block in sequence to form a multi-level feature representation including local texture and global structure information.

[0016] Preferably, a channel attention mechanism is first adopted to generate channel attention weights using global average pooling and a multi-layer perceptron; and then a spatial attention mechanism is used to generate a spatial weight map through a convolutional layer.

[0017] Preferably, the decoder module restores the feature map to its original resolution through a deconvolution method, and utilizes the symmetry of the brain structure to enhance the segmentation accuracy of the boundary area.

[0018] Preferably, the symmetric boundary attention module generates a mirrored version of the segmentation map, calculates the difference between the original segmentation map and the mirrored segmentation map, and refines the boundary region based on the calculated difference.

[0019] Preferably, the dynamic adaptive weighted Dice loss function calculates the weight of each deep gray matter nucleus according to the following formula:

[0020]

[0021] The dynamic adaptive weighted Dice loss for batch i is calculated as:

[0022]

[0023] The overall loss is taken as the batch average:

[0024]

[0025] Among them, ω im is the weight of the label index m in the i-th batch; M is the number of labels; and are the true and predicted volumes of the label index m in the i-th batch; I is the batch size.

[0026] The method for automatically segmenting deep gray matter nuclei in magnetic resonance imaging provided by the present invention comprises the following steps:

[0027] receiving magnetic resonance images;

[0028] The magnetic resonance images were preprocessed by resampling, cropping and normalization;

[0029] Extract hierarchical feature representations using an encoder module consisting of alternating convolutional neural network encoder blocks and Transformer encoder blocks;

[0030] Through the cascaded channel-spatial fusion module, channel and spatial attention mechanisms are applied to fuse features;

[0031] Reconstruct the segmentation map using a decoder module that includes upsampling layers and skip connections;

[0032] By using the symmetric boundary attention module, the original and mirrored segmentation maps are compared to enhance boundary refinement;

[0033] A dynamic adaptive weighted Dice loss function is used to adjust the weights according to the volume of each nucleus to guide network training;

[0034] Output the segmentation map of deep gray matter nuclei.

[0035] Preferably, the network is trained using manually annotated MRI images with a batch size of 32 and a learning rate of 10. -3 The Adam optimizer was used for 500 iterations.

[0036] According to the computer-readable storage medium storing a computer program provided by the present invention, when the computer program is executed by a processor, the steps of the method for automatically segmenting deep gray matter nuclei in magnetic resonance imaging are implemented.

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

[0038] (1) The present invention adopts an alternating coding structure that integrates convolutional neural networks (CNN) and Transformer, combined with a cascaded channel-space fusion (CCSF) module and a symmetric boundary attention (SymBA) module, to achieve accurate segmentation of DGM nuclei. In addition, the dynamic adaptive weighted Dice loss function (DAW-Dice Loss) is introduced to effectively solve the class imbalance problem in the segmentation of small-volume nuclei.

[0039] (2) The alternating CNN-Transformer encoding structure adopted in the present invention effectively combines local and global features, and is particularly suitable for the segmentation of small-volume, low-contrast structures; the CCSF module enhances the model's attention to key features through channel and spatial attention mechanisms, thereby improving the accuracy of feature expression; the SymBA module utilizes the symmetry of the brain structure to refine the segmentation boundaries and reduce the errors in the edge areas; the DAW-Dice loss function effectively solves the class imbalance problem and enhances the segmentation accuracy of small-volume nuclei. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:

[0041] Figure 1 A flow chart of the present invention for automatic segmentation of Parkinson's disease related deep gray matter nuclei in magnetic resonance imaging;

[0042] Figure 2 A schematic diagram of the system structure. DETAILED DESCRIPTION

[0043] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.

[0044] Example 1

[0045] like Figure 2 The present invention provides a system for automatically segmenting deep gray matter nuclei in magnetic resonance imaging, comprising:

[0046] A preprocessing module that resamples, crops, and normalizes the input magnetic resonance image;

[0047] The encoder module, consisting of alternating convolutional neural network encoder blocks and Transformer encoder blocks, extracts hierarchical feature representations from the preprocessed images;

[0048] The cascaded channel-spatial fusion module fuses the features extracted by the encoder module by applying the channel attention and spatial attention mechanisms sequentially;

[0049] The decoder module, including upsampling layers and skip connections to the corresponding layers of the encoder module, reconstructs the segmentation map of deep gray matter nuclei;

[0050] The symmetric boundary attention module, embedded in the decoder module, enhances the boundary refinement of deep gray matter nuclei by comparing the original segmentation map with the mirrored segmentation map;

[0051] The loss calculation module uses a dynamic adaptive weighted Dice loss function to adaptively adjust the weights according to the volume of each deep gray matter nucleus to solve the class imbalance problem during training;

[0052] Among them, the system outputs the deep gray matter nucleus segmentation results with accuracy meeting the preset requirements.

[0053] The preprocessing module resamples the input magnetic resonance image to 1×1×1mm 3 The voxel spacing is 224×224×16 and the voxel intensity values ​​are normalized to the range of [0, 255].

[0054] Each convolutional neural network encoder block uses residual skip units and contains convolutional layers, ReLU activation functions, and batch normalization layers to capture local spatial features of the image;

[0055] Each Transformer encoder block contains a multi-head self-attention layer, layer normalization, and a feed-forward network to capture the global context information of the image;

[0056] The input image passes through the convolutional neural network encoder block and the Transformer encoder block in sequence to form a multi-level feature representation including local texture and global structure information.

[0057] First, the channel attention mechanism is adopted to generate channel attention weights using global average pooling and multi-layer perceptron; then the spatial attention mechanism is used to generate a spatial weight map through the convolutional layer.

[0058] The decoder module restores the feature map to its original resolution through a deconvolution method and enhances the segmentation accuracy of the boundary area by utilizing the symmetry of the brain structure.

[0059] The symmetric boundary attention module generates a mirrored version of the segmentation map, calculates the difference between the original segmentation map and the mirrored segmentation map, and refines the boundary region based on the calculated difference.

[0060] The dynamic adaptive weighted Dice loss function calculates the weight of each deep gray matter nucleus according to the following formula:

[0061]

[0062] The dynamic adaptive weighted Dice loss for batch i is calculated as:

[0063]

[0064] The overall loss is taken as the batch average:

[0065]

[0066] Among them, ω im is the weight of the label index m in the i-th batch; M is the number of labels; and are the true and predicted volumes of the label index m in the i-th batch; I is the batch size.

[0067] like Figure 1 The present invention also provides a method for automatically segmenting deep gray matter nuclei in magnetic resonance imaging, comprising:

[0068] receiving magnetic resonance images;

[0069] The magnetic resonance images were preprocessed by resampling, cropping and normalization;

[0070] Extract hierarchical feature representations using an encoder module consisting of alternating convolutional neural network encoder blocks and Transformer encoder blocks;

[0071] Through the cascaded channel-spatial fusion module, channel and spatial attention mechanisms are applied to fuse features;

[0072] Reconstruct the segmentation map using a decoder module that includes upsampling layers and skip connections;

[0073] By using the symmetric boundary attention module, the original and mirrored segmentation maps are compared to enhance boundary refinement;

[0074] A dynamic adaptive weighted Dice loss function is used to adjust the weights according to the volume of each nucleus to guide network training;

[0075] Output the segmentation map of deep gray matter nuclei.

[0076] The network was trained using manually annotated MRI images with a batch size of 32 and a learning rate of 10. -3 The Adam optimizer was used for 500 iterations.

[0077] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for automatically segmenting deep gray matter nuclei in magnetic resonance imaging.

[0078] Example 2

[0079] The present invention provides a system for automatic segmentation of Parkinson's disease-related deep gray matter nuclei in magnetic resonance imaging, comprising the following modules:

[0080] Preprocessing module

[0081] Input: Get raw MRI images, specifically T2 FLAIR sequences.

[0082] operate:

[0083] Resampling: Resample the image to a uniform voxel spacing (e.g. 1×1×1mm 3 ) to accommodate differences in different scanners and imaging parameters.

[0084] Cropping: The central region of the image (e.g., 224×224×16 voxels) is captured to reduce background noise and focus on the DGM nucleus region.

[0085] Normalization: Normalize the voxel intensity values ​​to the range of [0, 255] to ensure data consistency and facilitate subsequent network training.

[0086] Encoder modules

[0087] Structure: Alternating CNN and Transformer encoder blocks are adopted to fully extract local and global features of the image.

[0088] Components:

[0089] CNN encoder block: uses residual skip unit (RSU), contains convolutional layer, ReLU activation function and batch normalization layer. It mainly captures the local spatial features of the image.

[0090] Transformer encoder block: Contains multi-head self-attention mechanism, layer normalization and feed-forward network. It is used to capture the global context information of the image.

[0091] Operation: The input image passes through CNN and Transformer encoder blocks in sequence to form a multi-level feature representation that combines local texture and global structure information.

[0092] Cascaded Channel-Spatial Fusion (CCSF) Module

[0093] Purpose: To effectively integrate features from CNN and Transformer and enhance the model’s focus on important information.

[0094] structure:

[0095] Channel fusion: A channel attention mechanism is used to generate channel weights using global average pooling and multi-layer perceptron (MLP).

[0096] Spatial fusion: Use the spatial attention mechanism to generate a spatial weight map through the convolutional layer.

[0097] Operation: The CCSF module first performs channel fusion and then spatial fusion to ensure that the model can focus on important feature channels and spatial positions, thereby improving the accuracy of feature expression.

[0098] Decoder module

[0099] Structure: Symmetrical to the encoder module, including upsampling operations and skip connections to gradually reconstruct the segmentation results.

[0100] Components:

[0101] Up-convolution layer: restore the feature map to the original resolution through upsampling methods such as deconvolution.

[0102] SymBA module: Embedded in the decoder, it exploits the symmetry of the brain structure to enhance the segmentation accuracy of boundary areas.

[0103] Operation: The decoder module achieves accurate segmentation of DGM nuclei by fusing multi-scale features and refining boundaries.

[0104] Loss calculation module

[0105] Dynamic Adaptive Weighted Dice Loss Function (DAW-Dice Loss):

[0106] Purpose: To solve the problem of class imbalance in segmentation tasks, especially the segmentation problem of small volume structures.

[0107] Mechanism: The weight is dynamically calculated based on the volume of each ROI (region of interest), and the smaller the volume, the higher the weight. Weights are introduced into the Dice loss calculation to strengthen the model's attention to small-volume nuclei.

[0108] Weight ω im is calculated as:

[0109]

[0110] The DAW-Dice loss for batch i is:

[0111]

[0112] The overall loss is taken as the batch average:

[0113]

[0114] in, and are the true and predicted volumes of the label index m in the i-th batch, M is the number of labels, and I is the batch size.

[0115] The present invention provides a method for automatic segmentation of Parkinson's disease-related deep gray matter nuclei in magnetic resonance imaging, comprising:

[0116] Training phase

[0117] The network is trained using a manually annotated MRI dataset with true labels as supervision information.

[0118] Set training parameters such as batch size (e.g. 32), learning rate (e.g. 10 -3 ), optimizer (such as Adam), and number of iterations (such as 500).

[0119] The DAW-Dice loss function is used to guide network optimization and ensure balanced learning of structures of different sizes.

[0120] Reasoning Phase

[0121] The preprocessed MRI images are input into the trained network.

[0122] The network outputs the segmentation results of the DGM nuclei, which can be post-processed as needed (such as thresholding and morphological operations).

[0123] Validation of clinical datasets

[0124] The method of the present invention is applied to clinical MRI data sets to automatically segment the DGM nuclei. The results show that the method of the present invention is superior to the traditional method in terms of indicators such as Dice similarity coefficient (DSC), intersection over union (IOU), average symmetric surface distance (ASD) and Hausdorff distance with 95% confidence interval (HD95), especially in the segmentation of small volume structures such as red nucleus (RN) and substantia nigra (SN).

[0125] Generalization ability of multi-center datasets

[0126] The method of the present invention was applied to data sets from multiple different centers, including the public PPMI data set, to verify its generalization ability under different devices and imaging parameters. The experimental results showed that the model maintained a high level of segmentation performance on different data sets, proving its applicability in actual clinical settings.

[0127] Example 3

[0128] The present invention proposes a PSS-FINet network for magnetic resonance T2Flair sequence images to cope with the challenge of automatic segmentation of subcortical structures related to clinical diagnosis of PD, so as to improve the accuracy and efficiency of early diagnosis of PD. PSS-FINet takes brain magnetic resonance T2Flair sequence images as input, and first extracts global and local features through an encoder with a CNN and transformer alternating structure. Then, the GLFF (Global-local features fusion) Block performs feature fusion activation and pattern segmentation related features. Then, the encoded features and fused features are sent to the corresponding layer of the decoder for decoding. Finally, the nucleus segmentation result is obtained through the 11 convolutional layers of the decoder. It is worth noting that due to the small volume of ROIs and blurred boundaries. The present invention uses its left-right similar symmetrical organizational structure to propose an SDM-based symmetric boundary attention mechanism module (SDM-based symmetric boundary attention module), calculates its SDM according to the symmetric difference of the segmentation result and weights it to the corresponding layer of the PSS-FINet decoder according to the deep supervision mechanism, so that the network pays more attention to the boundaries of ROIs and obtains more accurate segmentation results.

[0129] Encoder module. The encoder of PSS-FINet is composed of L layers of CNN and transformer alternating encoding, L = 4. Since the T2Flair sequence image contains a large number of brain tissue images irrelevant to the ROI, the irrelevant background area is removed by crop operation before it is sent to the encoder. The input of the encoder is defined as I m , I m Through a 1*1 convolution layer to expand the channel, we get Where W, H, and C are the width, height, and number of channels of the input, respectively. First, extract features through RSU_1 to obtain local CNN features then, It is sent to the transformer to extract features that can better represent global information. Similarly, after alternating CNN and transformer again, the bottom-level features of the encoder are obtained in, It is a U-shaped network structure whose depth decreases as the PSS-FINet encoding depth increases, and is used to capture multi-scale features within the stage. RSU_l mainly consists of an input feature channel conversion layer, (L-l+2) intermediate feature extraction layers and a multi-scale feature fusion layer. We define the input of RSU_l as Then the output of RSU_1 is Obtained by the following formula:

[0130]

[0131] Among them, RSU_l(*) represents the feature extraction operation of the first RSU module, and Downsample(*) is the downsampling operation based on maxpooling. Then, Extract features that better represent global information through alternating transformers It can be obtained as follows:

[0132]

[0133] Among them, PE(*) represents the patch partition and Linear Embedding operations in the transformer module, MixB(*) represents the Mixing Block operation, the index (Ll) represents the number of Mixing Block operations in the transformer module, and FM(*) represents the feature mapping operation, which resizes and downsamples the transformer features to To ensure that the feature can maintain mapping with the next level RSU_(l+2).

[0134] Decoder module. Unlike the encoder module, the decoder module consists of only L encoder modules, including (RSU+SDM weighting+upsampling) operations. Define the input of the first encoder module as It can be calculated by the following formula:

[0135]

[0136] in, is the output feature of the (l+1)th level decoding module of the decoder, is the encoder corresponding to the level CNN feature through the jump connection, It is the fusion feature after feature correction between the adjacent CNN and transformer coding layers at the corresponding level using the GLFF Block proposed in this paper. After obtaining the corresponding decoded RSU output feature, the feature is weighted by the symmetric boundary attention mechanism proposed in this paper to make the network pay more attention to the segmentation boundary. Therefore, The output of the first-level decoding module of the decoder is obtained through the above operation It can be calculated by the following test:

[0137]

[0138] Among them, SDMA(*) is the signed distance attention weighted operation of the mask, ⊕ is the element-by-element addition operation, and Upsample(*) is the upsampling operation based on linear interpolation. Repeat the above decoding process L times to obtain the final decoding feature and the corresponding f 0 After concat together, two convolution operations are performed to obtain the final segmentation It is expressed by the following formula:

[0139]

[0140] in, Represents 2 1×1 convolution operations.

[0141] In order to better integrate local features with global features, the GLFF Block proposed in the present invention is used between adjacent CNN and transformer coding layers for feature fusion and correction.

[0142] After the image encoder outputs the features, the transformer features are reshaped to Then, CNN features are obtained through 3 layers of 3*3 convolution operations. In order to better fuse local features with global features, the Feature FusionBlock proposed in the present invention is used to perform feature fusion and correction between CNN and transformer features to obtain fusion features with better representation ability to improve the segmentation results.

[0143] Feature Fusion Block mainly includes three steps: channel self-attention, spatial self-attention and fusion. First, F t and F c Get combined features through concatenate operation F new Obtained through n (3*3Conv+ReLU+3*3Conv) operations The present invention sets n = {1, 2, ..., N}, N = 4. The channel self-attention feature can be calculated by the following formula:

[0144]

[0145] Among them, ⊕ is the element-by-element addition operation, Conv 3×3 (·) is a 3×3 convolution operation, and ReLU(·) is the activation function.

[0146] Get channel self-attention features After the reshape operation, it is used as the input feature for spatial self-attention weighting. Obtained through two parallel operations of maxpooling and averagepooling and Next, the (concat+1×1Conv) operation combination is used to and The spatial weighted feature map is obtained after sigmoid operation And weighted to the spatial self-attention input feature to obtain the spatially weighted feature It can be calculated by the following formula:

[0147]

[0148] in, is the element-wise multiplication operation, σ(·) is the sigmoid operation, Maxpooling(·) and Averagepooling(·) are maximum pooling and average pooling respectively;

[0149] Finally, fusion is used to make final adjustments to calibrate the features. As the input feature of the fusion, it is downsampled by the combination of (1×1Conv+Maxpooling) operations, and upsampled by the combination of (1×1Conv+linear interpolation) operations after ReLU activation to restore the feature resolution. fusion It can be obtained by the following formula:

[0150]

[0151] Since human brain nuclei have a special symmetric structure, this paper proposes an SDM-based symmetric boundary attention module based on this feature. This module includes three important steps: mirror difference, SDM operation and DWAM. It aims to construct a difference SDM using the segmentation difference between the original segmentation result and its horizontal mirror image, and weight it to the corresponding level of the decoder through element addition operation and deep supervision mechanism, and weight the decoded features to achieve the purpose of edge segmentation optimization.

[0152] First, we give the input of the SDM-based symmetric boundary attention module And flip the mask horizontally to obtain the corresponding horizontal mirror image Then, the horizontal mirror difference feature is obtained by element-by-element subtraction operation

[0153]

[0154] Wherein, M is the number of labels of the mask, and M=4 in the present invention.

[0155] Next, for f hm_d Perform label difference binarization and SDM operation to obtain the SDM weighted feature map f SDM , can be calculated by the following formula:

[0156] f sDM =SDM(Binary(f HM_d ))

[0157] Among them, SDM(x) is the SDM operation based on Euclidean distance transformation, which can be calculated by the following formula:

[0158]

[0159] Where (x,y) is f HM_d The coordinates of any point after binarization, φ is its structural boundary, and the internal and external areas of the boundary are defined as Ω in and Ω out , ‖·‖2 represents the Euclidean distance transform (EDT).

[0160] Finally, f is resized by the resize operation. SDM Construct a weighted feature map that matches the decoder level And weighted to the corresponding decoding features by element addition operation, this process can be expressed as follows:

[0161]

[0162] in, Represents the decoder depth index, and the entire DWAM process is completed after L times of weighting.

[0163] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.

[0164] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.

Claims

1. A system for automatically segmenting deep gray matter nuclei in magnetic resonance imaging, characterized in that: include: A preprocessing module that resamples, crops, and normalizes the input magnetic resonance image; The encoder module, consisting of alternating convolutional neural network encoder blocks and Transformer encoder blocks, extracts hierarchical feature representations from the preprocessed images; The cascaded channel-spatial fusion module fuses the features extracted by the encoder module by applying the channel attention and spatial attention mechanisms sequentially; The decoder module, including upsampling layers and skip connections to the corresponding layers of the encoder module, reconstructs the segmentation map of deep gray matter nuclei; The symmetric boundary attention module, embedded in the decoder module, enhances the boundary refinement of deep gray matter nuclei by comparing the original segmentation map with the mirrored segmentation map; The loss calculation module uses a dynamic adaptive weighted Dice loss function to adaptively adjust the weights according to the volume of each deep gray matter nucleus to solve the class imbalance problem during training; Among them, the system outputs the deep gray matter nucleus segmentation results with accuracy meeting the preset requirements.

2. The system for automatically segmenting deep gray matter nuclei in magnetic resonance imaging according to claim 1, characterized in that: The preprocessing module resamples the input magnetic resonance image to 1×1×1mm 3 The voxel spacing is 224×224×16 and the voxel intensity values ​​are normalized to the range of [0, 255].

3. The system for automatically segmenting deep gray matter nuclei in magnetic resonance imaging according to claim 1, characterized in that: Each convolutional neural network encoder block uses residual skip units and contains convolutional layers, ReLU activation functions, and batch normalization layers to capture local spatial features of the image; Each Transformer encoder block contains a multi-head self-attention layer, layer normalization, and a feed-forward network to capture the global context information of the image; The input image passes through the convolutional neural network encoder block and the Transformer encoder block in sequence to form a multi-level feature representation including local texture and global structure information.

4. The system for automatically segmenting deep gray matter nuclei in magnetic resonance imaging according to claim 1, characterized in that: First, the channel attention mechanism is adopted to generate channel attention weights using global average pooling and multi-layer perceptron; Then use the spatial attention mechanism to generate a spatial weight map through the convolutional layer.

5. The system for automatically segmenting deep gray matter nuclei in magnetic resonance imaging according to claim 1, characterized in that: The decoder module restores the feature map to its original resolution through a deconvolution method and enhances the segmentation accuracy of the boundary area by utilizing the symmetry of the brain structure.

6. The system for automatically segmenting deep gray matter nuclei in magnetic resonance imaging according to claim 1, characterized in that: The symmetric boundary attention module generates a mirrored version of the segmentation map, calculates the difference between the original segmentation map and the mirrored segmentation map, and refines the boundary region based on the calculated difference.

7. The system for automatically segmenting deep gray matter nuclei in magnetic resonance imaging according to claim 1, characterized in that: The dynamic adaptive weighted Dice loss function calculates the weight of each deep gray matter nucleus according to the following formula: The dynamic adaptive weighted Dice loss for batch i is calculated as: The overall loss is taken as the batch average: Among them, ω im is the weight of the label index m in the i-th batch; M is the number of labels; and are the true and predicted volumes of the label index m in the i-th batch; I is the batch size.

8. A method for automatically segmenting deep gray matter nuclei in magnetic resonance imaging, characterized in that: The system for automatically segmenting deep gray matter nuclei in magnetic resonance imaging according to any one of claims 1 to 7 comprises the following steps: receiving magnetic resonance images; The magnetic resonance images were preprocessed by resampling, cropping and normalization; Extract hierarchical feature representations using an encoder module consisting of alternating convolutional neural network encoder blocks and Transformer encoder blocks; Through the cascaded channel-spatial fusion module, channel and spatial attention mechanisms are applied to fuse features; Reconstruct the segmentation map using a decoder module that includes upsampling layers and skip connections; By using the symmetric boundary attention module, the original and mirrored segmentation maps are compared to enhance boundary refinement; A dynamic adaptive weighted Dice loss function is used to adjust the weights according to the volume of each nucleus to guide network training; Output the segmentation map of deep gray matter nuclei.

9. The method for automatically segmenting deep gray matter nuclei in magnetic resonance imaging according to claim 8, characterized in that: The network was trained using manually annotated MRI images with a batch size of 32 and a learning rate of 10. -3 The Adam optimizer was used for 500 iterations.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for automatically segmenting deep gray matter nuclei in magnetic resonance imaging according to claim 8 or 9 are implemented.

Citation Information

Patent Citations

  • Deep grey matter nucleus segmentation method based on self-supervised learning and hybrid network

    CN118015266A