A method for segmenting stroke lesion area images and computer-readable medium

By combining the cross-dual-branch encoding network with the Swin Transformer encoding network and optimizing the loss function training, the inaccuracy and time-consuming problems of stroke lesion segmentation were solved, and efficient and accurate lesion area segmentation was achieved.

CN116993757BActive Publication Date: 2025-09-19WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310849917.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-11
Publication Date
2025-09-19
Estimated Expiration
2043-07-11

AI Technical Summary

Technical Problem

Existing stroke lesion segmentation methods have problems in MRI images such as motion artifact interference, large differences in lesion location and shape, blurred boundaries, and subjective differences in doctor annotation, resulting in inaccurate segmentation and time-consuming and labor-intensive work.

Method used

A cross-double-branch encoding network combined with a Swin Transformer encoding network and a decoder network was used, and the training was optimized by the cross-entropy Dyss weighted loss function to achieve accurate segmentation of the stroke lesion area.

Benefits of technology

The accuracy of pixel segmentation of stroke lesions is improved, the lesion area can be quickly determined, training time is saved, and the segmentation effect of lesion areas of different sizes is significant.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116993757B_ABST
    Figure CN116993757B_ABST
Patent Text Reader

Abstract

The present invention proposes a method for image segmentation of stroke lesion regions and a computer-readable medium. The method acquires multiple original stroke magnetic resonance images, preprocesses them sequentially to obtain preprocessed images, and labels each with a corresponding true classification label. A lesion image segmentation network is constructed, and each preprocessed image is input into the lesion image segmentation network for lesion segmentation prediction, resulting in a stroke prediction probability map for each preprocessed image. Combined with the true classification label of each stroke lesion pixel in each preprocessed image, a cross-entropy-weighted loss function is constructed. A trained lesion image segmentation network is obtained through optimization training using a stochastic gradient descent algorithm. Real-time acquired stroke magnetic resonance images are then passed through the trained lesion image segmentation network for predictive segmentation and probability threshold determination, resulting in a real-time pixel range of the stroke lesion region. The present invention improves the accuracy of stroke lesion pixel region segmentation prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of medical image processing, and in particular relates to a method for segmenting stroke lesion area images and a computer-readable medium. Background Art

[0002] Stroke is a common cerebrovascular disease with high disability and mortality rates. Currently, the diagnosis of stroke relies primarily on high-resolution T1-weighted magnetic resonance imaging (MRI). Determining brain damage and functional recovery is key for doctors to formulate treatment plans, and is mainly assessed by observing the location, shape, boundaries, and size of the lesion. Therefore, stroke lesion segmentation is an important problem in medical image analysis. The problem of accurate segmentation of stroke lesions in MRI images remains to be solved, mainly for the following reasons:

[0003] Motion artifacts in MRI hinder segmentation performance;

[0004] Due to the existence of multiple stroke subtypes, the location and shape of the lesions vary significantly. Depending on the severity of the disease, the location, shape, and size of the lesions vary greatly, and the lesion volume can range from hundreds to tens of thousands of cubic millimeters.

[0005] Some lesions have fuzzy boundaries, and different radiologists may not label the lesion areas consistently. Furthermore, manual labeling of MRI images is time-consuming and labor-intensive, and may introduce subjective differences among doctors.

[0006] Therefore, establishing an automatic and accurate stroke lesion segmentation method is of great practical significance for helping doctors quickly identify the lesion area and shorten rescue time. In recent years, deep learning methods have shown very promising performance in solving various computer vision problems, such as image classification, object detection, and semantic segmentation. Many deep learning-based methods have been applied to stroke lesion segmentation and achieved impressive segmentation results.

[0007] Convolutional neural networks, exemplified by the U-Net, are neural networks with a symmetrical encoder-decoder structure and employ skip connections to enhance detail preservation. Due to their advantages in extracting local features, they have achieved impressive results in medical image segmentation. However, due to the inherent limitations of convolution, they are still limited by their receptive field and cannot infer relationships between long-range elements. Therefore, when faced with stroke segmentation tasks involving uncertain lesion location, shape, boundaries, and size, CNN-based U-Net approaches have limited performance.

[0008] On the other hand, the Transformer, thanks to its self-attention mechanism and its ability to model long-range dependencies, has achieved tremendous success in natural language processing. Transformers have also demonstrated strong performance in medical imaging. Medical imaging network architectures incorporating Transformers offer significant performance improvements over pure convolutional neural networks, particularly the combination of U-Net and Transformer. However, these architectures still have limitations in extracting local details and are still limited by the receptive field of U-Net. Summary of the Invention

[0009] In order to solve the above technical problems, the present invention proposes a method for segmenting stroke lesion area images and a computer-readable medium.

[0010] The technical solution of the method of the present invention is a method for segmenting an image of a stroke lesion area, which specifically includes the following steps:

[0011] Step 1: Acquire multiple original stroke MRI images, perform cropping, normalization, splicing, and data augmentation on each original stroke MRI image to obtain each preprocessed image, and mark the true classification label of the stroke lesion for each pixel in each preprocessed image;

[0012] Step 2: Construct a lesion image segmentation network. Input each preprocessed image into the lesion image segmentation network for lesion segmentation prediction. Obtain a stroke prediction probability map for each preprocessed image. Combined with the true classification label of the stroke lesion for each pixel in each preprocessed image, a cross-entropy Dyss-weighted loss function is constructed. Optimize the training using the stochastic gradient descent algorithm to obtain the trained lesion image segmentation network.

[0013] Step 3: The real-time acquired stroke MRI image is predicted and segmented using the trained lesion image segmentation network to obtain a stroke prediction probability map of the real-time stroke MRI image. Combined with the probability threshold, the pixel range of the stroke lesion area in the real-time stroke MRI image is obtained.

[0014] Preferably, the lesion image segmentation network in step 2 includes:

[0015] Cross-branch encoding network, feature fusion network, decoder network;

[0016] The cross-dual-branch encoding network, feature fusion network, and decoder network are connected in sequence;

[0017] The cross-double-branch encoding network performs feature extraction processing on each preprocessed image to obtain local features of each preprocessed image and global features of each preprocessed image, and outputs the local features of each preprocessed image and the global features of each preprocessed image to the feature fusion network;

[0018] The feature fusion network performs feature fusion processing on the local features of each preprocessed image and the global features of each preprocessed image to obtain fused features of each preprocessed image and outputs the fused features to the decoder network;

[0019] The decoder network processes the fused features of each preprocessed image to obtain a predicted lesion region segmentation image of each preprocessed image;

[0020] The cross-double-branch encoding network includes: a CNN encoding network and a Swin Transformer encoding network;

[0021] The CNN encoding network and the Swin Transformer encoding network;

[0022] The CNN encoding network includes:

[0023] The first CNN encoding module, the second CNN encoding module, ..., the Kth CNN encoding module;

[0024] The first CNN encoding module is composed of multi-layer convolution modules and pooling layers;

[0025] The k-th CNN encoding module is composed of multi-layer convolution modules, k∈[2,K];

[0026] The Swin Transformer encoding network includes:

[0027] The first Swin Transformer network coding module, the second Swin Transformer network coding module, ..., the Kth Swin Transformer network coding module;

[0028] The first Swin Transformer network coding module is composed of a segmentation image block layer, a linear embedding layer, and an STrans module cascaded in sequence.

[0029] The k-th Swin Transformer network coding module is composed of an image block merging layer, a linear embedding layer, and an STrans module cascaded in sequence, k∈[2,K];

[0030] The feature fusion network includes:

[0031] The first feature fusion module, the second feature fusion module, ..., the Kth feature fusion module;

[0032] The k-th feature fusion module is composed of a dimension conversion module, a feature splicing module, and a multi-layer convolution module cascaded in sequence, k∈[1,K];

[0033] The decoder network comprises:

[0034] The first upsampling module, the second upsampling module, ..., the Kth upsampling module;

[0035] The first upsampling module, the second upsampling module, ..., the Kth upsampling module are sequentially cascaded to form a structure;

[0036] The kth upsampling module is composed of an upsampling layer, a splicing layer, and a convolutional layer cascaded in sequence;

[0037] The first CNN encoding module extracts features from each preprocessed image of the multi-layer convolution module through multi-layer convolution to obtain first-stage features of each preprocessed image, and outputs the first-stage features of each preprocessed image to the first upsampling module;

[0038] The first-stage features of each preprocessed image are passed through a pooling layer to obtain the first-stage local features of each preprocessed image, and the first-stage local features of each preprocessed image are output to the second SwinTransformer network coding module and the first feature fusion module respectively;

[0039] If k∈[2,K-1], the k-th CNN encoding module extracts local features of the k-1-th stage global features of each preprocessed image through multi-layer convolution to obtain the k-th stage local features of each preprocessed image, and outputs the k-th stage local features of each preprocessed image to the k+1-th Swin Transformer network encoding module and the k-th feature fusion module respectively;

[0040] The K-th CNN encoding module extracts local features from the K-1-th stage global features of each preprocessed image through multi-layer convolution to obtain the K-th stage local features of each preprocessed image, and outputs the K-th stage local features of each preprocessed image to the K-th feature fusion module;

[0041] The first Swin Transformer network coding module extracts global features from each preprocessed image through a segmentation image block layer, a linear embedding layer, and an STrans module to obtain the first-stage global features of each preprocessed image, and outputs the first-stage global features of each preprocessed image to the second CNN coding module and the first feature fusion module respectively;

[0042] If k∈[2,K-1], the k-th Swin Transformer network coding module, the k-1th stage local features of each preprocessed image are sequentially processed by the image block merging layer, the linear embedding layer, and the STrans module to perform global feature extraction, and the k-th stage global features of each preprocessed image are obtained, and the k-th stage global features of each preprocessed image are respectively output to the k+1th CNN coding module and the k-th feature fusion module;

[0043] The K-th Swin Transformer network coding module extracts global features from the K-1th stage local features of each preprocessed image through the image block merging layer, the linear embedding layer, and the STrans module in sequence, obtaining the K-th stage global features of each preprocessed image, and outputting the k-th stage global features of each preprocessed image to the k-th feature fusion module;

[0044] The kth feature fusion module fuses the kth stage local features and the kth stage global features of each preprocessed image through a dimension conversion module, a feature splicing module, and a multi-layer convolution module in sequence to obtain the kth stage fused features of each preprocessed image, and outputs the kth stage fused features of each preprocessed image to the decoding network, k∈[1,K];

[0045] The K-th upsampling module upsamples the K-th stage fused features of each preprocessed image to obtain the K-th stage upsampling fusion features, splices the K-th stage upsampling fusion features with the K-1-th stage fused features of each preprocessed image in the channel dimension to obtain the K-th stage upsampling splicing fusion features, performs multi-layer convolution on the K-th stage upsampling splicing fusion features to obtain the k-th stage upsampling convolution splicing fusion features, and outputs them to the K-1-th stage decoder;

[0046] If k∈[2,K-1], the kth upsampling module upsamples each k+1th stage upsampling convolution splicing fusion feature to obtain the kth stage upsampling fusion feature, splices the kth stage upsampling fusion feature with the k-1th stage fusion feature of each preprocessed image in the channel dimension to obtain the kth stage upsampling splicing fusion feature, performs multi-layer convolution on the kth stage upsampling splicing fusion feature to obtain the kth stage upsampling convolution splicing fusion feature, and outputs it to the k-1th stage decoder;

[0047] The first upsampling module upsamples each of the second-stage upsampling convolution splicing fusion features to obtain the first-stage upsampling fusion features, splices the first-stage upsampling fusion features with the first-stage features of each preprocessed image in the channel dimension to obtain the first-stage upsampling splicing fusion features, and performs multi-layer convolution on the first-stage upsampling splicing fusion features to obtain a stroke prediction probability map for each preprocessed image;

[0048] The cross entropy Dice weighted loss function described in step 2 is defined as follows:

[0049] Loss = α × L ce +×L dice

[0050] Among them, Loss represents the cross entropy Dyss weighted loss function, L ce represents the cross entropy loss function, L dice Denotes the Dyess loss function, α denotes the cross entropy loss weight, and β denotes the Dyess loss weight;

[0051] The cross entropy loss function is defined as follows:

[0052]

[0053] Among them, NUM represents the number of preprocessed images, M represents the number of rows of the i-th preprocessed image, N represents the number of columns of the i-th preprocessed image, g i,(x,y) represents the true classification label of the stroke lesion in the xth row and yth column of the i-th preprocessed image. If g i,(x,y) = 0, it is a normal area pixel. If g i,(x,y) =1, it is the pixel in the lesion area, p i,(x,y) ∈[0, 1], p i,(x,y) It represents the predicted probability value of the pixel in the xth row and yth column of the stroke prediction probability map of the i-th preprocessed image calculated by the segmentation method belonging to the stroke lesion area classification;

[0054] The Deiss loss function is defined as follows:

[0055]

[0056] Among them, δ∈[0,1], δ represents the gradient propagation adjustable coefficient;

[0057] Preferably, the pixel range of the stroke lesion area of ​​the real-time stroke magnetic resonance image is obtained by combining the probability threshold judgment in step 3, specifically as follows:

[0058] Pixels in the stroke prediction probability map of the real-time stroke magnetic resonance image, whose predicted probability values ​​for the pixels belonging to the stroke lesion area classification are greater than a probability threshold, are screened out as lesion area pixels, and the stroke lesion area pixel range of the real-time stroke magnetic resonance image is further obtained;

[0059] The present invention also provides a computer-readable medium, which stores a computer program executed by an electronic device. When the computer program runs on the electronic device, the steps of the stroke lesion area image segmentation method are executed.

[0060] This invention improves the accuracy of pixel segmentation prediction for stroke lesions. By combining a convolutional neural network with a Transformer model, the network achieves excellent segmentation results for stroke lesions of varying sizes, even when the difference between lesions and normal areas is not obvious. This helps doctors more accurately identify lesion areas. Furthermore, this invention achieves faster convergence during training, saving significant training time. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] Figure 1 : A flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0062] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0063] In specific implementation, the method proposed in the technical solution of the present invention can be automatically run by those skilled in the art using computer software technology. System devices that implement the method, such as computer-readable storage media that store the corresponding computer program of the technical solution of the present invention and computer equipment that runs the corresponding computer program, should also be within the scope of protection of the present invention.

[0064] The following combination Figure 1 The technical solution of the embodiment of the present invention is a method for segmenting an image of a stroke lesion area, which is specifically as follows:

[0065] Step 1: Acquire multiple original stroke MRI images, perform cropping, normalization, splicing, and data augmentation on each original stroke MRI image to obtain each preprocessed image, and mark the true classification label of the stroke lesion for each pixel in each preprocessed image;

[0066] Step 2: Construct a lesion image segmentation network. Input each preprocessed image into the lesion image segmentation network for lesion segmentation prediction. Obtain a stroke prediction probability map for each preprocessed image. Combined with the true classification label of the stroke lesion for each pixel in each preprocessed image, a cross-entropy Dyss-weighted loss function is constructed. Optimize the training using the stochastic gradient descent algorithm to obtain the trained lesion image segmentation network.

[0067] The lesion image segmentation network described in step 2 includes:

[0068] Cross-branch encoding network, feature fusion network, decoder network;

[0069] The cross-dual-branch encoding network, feature fusion network, and decoder network are connected in sequence;

[0070] The cross-double-branch encoding network performs feature extraction processing on each preprocessed image to obtain local features of each preprocessed image and global features of each preprocessed image, and outputs the local features of each preprocessed image and the global features of each preprocessed image to the feature fusion network;

[0071] The feature fusion network performs feature fusion processing on the local features of each preprocessed image and the global features of each preprocessed image to obtain fused features of each preprocessed image and outputs the fused features to the decoder network;

[0072] The decoder network processes the fused features of each preprocessed image to obtain a predicted lesion region segmentation image of each preprocessed image;

[0073] The cross-double-branch encoding network includes: a CNN encoding network and a Swin Transformer encoding network;

[0074] The CNN encoding network and the Swin Transformer encoding network;

[0075] The CNN encoding network includes:

[0076] The first CNN encoding module, the second CNN encoding module, ..., the Kth CNN encoding module, K = 4;

[0077] The first CNN encoding module is composed of multi-layer convolution modules and pooling layers;

[0078] The k-th CNN encoding module is composed of multi-layer convolution modules, k∈[2,K];

[0079] The number of convolution modules of the 1st to the Kth CNN encoding modules is 2, 1, 1, and 1, respectively;

[0080] The Swin Transformer encoding network includes:

[0081] The first Swin Transformer network coding module, the second Swin Transformer network coding module, ..., the Kth Swin Transformer network coding module;

[0082] The first Swin Transformer network coding module is composed of a segmentation image block layer, a linear embedding layer, and an STrans module cascaded in sequence;

[0083] The k-th Swin Transformer network coding module is composed of an image block merging layer, a linear embedding layer, and an STrans module cascaded in sequence, k∈[2,K];

[0084] The number of STrans modules of the 1st to the Kth Swin Transformer network coding modules is 2, 2, 18, and 2 respectively;

[0085] The feature fusion network includes:

[0086] The first feature fusion module, the second feature fusion module, ..., the Kth feature fusion module;

[0087] The k-th feature fusion module is composed of a dimension conversion module, a feature splicing module, and a multi-layer convolution module cascaded in sequence, k∈[1,K];

[0088] The decoder network comprises:

[0089] The first upsampling module, the second upsampling module, ..., the Kth upsampling module;

[0090] The first upsampling module, the second upsampling module, ..., the Kth upsampling module are sequentially cascaded to form a structure;

[0091] The kth upsampling module is composed of an upsampling layer, a splicing layer, and a convolutional layer cascaded in sequence;

[0092] The first CNN encoding module extracts features from each preprocessed image of the multi-layer convolution module through multi-layer convolution to obtain first-stage features of each preprocessed image, and outputs the first-stage features of each preprocessed image to the first upsampling module;

[0093] The first-stage features of each preprocessed image are passed through a pooling layer to obtain the first-stage local features of each preprocessed image, and the first-stage local features of each preprocessed image are output to the second SwinTransformer network coding module and the first feature fusion module respectively;

[0094] If k∈[2,K-1], the k-th CNN encoding module extracts local features of the k-1-th stage global features of each preprocessed image through multi-layer convolution to obtain the k-th stage local features of each preprocessed image, and outputs the k-th stage local features of each preprocessed image to the k+1-th Swin Transformer network encoding module and the k-th feature fusion module respectively;

[0095] The K-th CNN encoding module extracts local features from the K-1-th stage global features of each preprocessed image through multi-layer convolution to obtain the K-th stage local features of each preprocessed image, and outputs the K-th stage local features of each preprocessed image to the K-th feature fusion module;

[0096] The first Swin Transformer network coding module extracts global features from each preprocessed image through a segmentation image block layer, a linear embedding layer, and an STrans module to obtain the first-stage global features of each preprocessed image, and outputs the first-stage global features of each preprocessed image to the second CNN coding module and the first feature fusion module respectively;

[0097] If k∈[2,K-1], the k-th Swin Transformer network coding module, the k-1th stage local features of each preprocessed image are sequentially processed by the image block merging layer, the linear embedding layer, and the STrans module to perform global feature extraction, and the k-th stage global features of each preprocessed image are obtained, and the k-th stage global features of each preprocessed image are respectively output to the k+1th CNN coding module and the k-th feature fusion module;

[0098] The K-th Swin Transformer network coding module extracts global features from the K-1th stage local features of each preprocessed image through the image block merging layer, the linear embedding layer, and the STrans module in sequence, obtaining the K-th stage global features of each preprocessed image, and outputting the k-th stage global features of each preprocessed image to the k-th feature fusion module;

[0099] The kth feature fusion module fuses the kth stage local features and the kth stage global features of each preprocessed image through a dimension conversion module, a feature splicing module, and a multi-layer convolution module in sequence to obtain the kth stage fused features of each preprocessed image, and outputs the kth stage fused features of each preprocessed image to the decoding network, k∈[1,K];

[0100] The K-th upsampling module upsamples the K-th stage fused features of each preprocessed image to obtain the K-th stage upsampling fusion features, splices the K-th stage upsampling fusion features with the K-1-th stage fused features of each preprocessed image in the channel dimension to obtain the K-th stage upsampling splicing fusion features, performs multi-layer convolution on the K-th stage upsampling splicing fusion features to obtain the k-th stage upsampling convolution splicing fusion features, and outputs them to the K-1-th stage decoder;

[0101] If k∈[2,K-1], the kth upsampling module upsamples each k+1th stage upsampling convolution splicing fusion feature to obtain the kth stage upsampling fusion feature, splices the kth stage upsampling fusion feature with the k-1th stage fusion feature of each preprocessed image in the channel dimension to obtain the kth stage upsampling splicing fusion feature, performs multi-layer convolution on the kth stage upsampling splicing fusion feature to obtain the kth stage upsampling convolution splicing fusion feature, and outputs it to the k-1th stage decoder;

[0102] The first upsampling module upsamples each of the second-stage upsampling convolution splicing fusion features to obtain the first-stage upsampling fusion features, splices the first-stage upsampling fusion features with the first-stage features of each preprocessed image in the channel dimension to obtain the first-stage upsampling splicing fusion features, and performs multi-layer convolution on the first-stage upsampling splicing fusion features to obtain a stroke prediction probability map for each preprocessed image;

[0103] The cross entropy Dice weighted loss function described in step 2 is defined as follows:

[0104] Loss = α × L ce +×L dice

[0105] Among them, Loss represents the cross entropy Dyss weighted loss function, L ce represents the cross entropy loss function, L dice Denotes the Dyess loss function, α = 0.5 denotes the cross entropy loss weight, and β = 0.5 denotes the Dyess loss weight;

[0106] The cross entropy loss function is defined as follows:

[0107]

[0108] Where NUM = 1000 represents the number of preprocessed images, M = 192 represents the number of rows of the i-th preprocessed image, N = 192 represents the number of columns of the i-th preprocessed image, g i,(x,y) represents the true classification label of the stroke lesion in the xth row and yth column of the i-th preprocessed image. If g i,(x,y) = 0, it is a normal area pixel. If g i,(x,y) =1, it is the pixel in the lesion area, p i,(x,y) ∈[0, 1], p i,(x,y) It represents the predicted probability value of the pixel in the xth row and yth column of the stroke prediction probability map of the i-th preprocessed image calculated by the segmentation method belonging to the stroke lesion area classification;

[0109] The Deiss loss function is defined as follows:

[0110]

[0111] Where, δ∈[0,1],δ=10 -5 represents the gradient propagation adjustable coefficient;

[0112] Step 3: The real-time acquired stroke MRI image is predicted and segmented using the trained lesion image segmentation network to obtain a stroke prediction probability map of the real-time stroke MRI image. Combined with the probability threshold, the pixel range of the stroke lesion area in the real-time stroke MRI image is obtained.

[0113] The pixel range of the stroke lesion area in the real-time stroke magnetic resonance image is obtained by combining the probability threshold in step 3, as follows:

[0114] Pixels in the stroke prediction probability map of the real-time stroke magnetic resonance image, whose predicted probability values ​​for the pixels belonging to the stroke lesion area classification are greater than a probability threshold, are screened out as lesion area pixels, and the stroke lesion area pixel range of the real-time stroke magnetic resonance image is further obtained;

[0115] A specific embodiment of the present invention also provides a computer-readable medium.

[0116] The computer readable medium is a server workstation;

[0117] The server workstation stores a computer program executed by an electronic device. When the computer program is run on the electronic device, the electronic device executes the steps of the stroke lesion area image segmentation method according to an embodiment of the present invention.

[0118] It should be understood that parts not elaborated in detail in this specification belong to the prior art.

[0119] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of protection of the patent of the present invention. Under the guidance of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested by the present invention shall be based on the attached claims.

Claims

1. A method for segmenting a stroke lesion area image, characterized by: Construct a lesion image segmentation network, input each preprocessed image into the lesion image segmentation network for prediction to construct a cross-entropy Dyss weighted loss function, and optimize the training through the stochastic gradient descent algorithm to obtain a trained lesion image segmentation network; the lesion image segmentation network includes: a cross-double-branch encoding network, a feature fusion network, and a decoder network; the cross-double-branch encoding network, the feature fusion network, and the decoder network are connected in sequence; the cross-double-branch encoding network performs feature extraction processing on each preprocessed image to obtain local features of each preprocessed image and global features of each preprocessed image, and outputs the local features of each preprocessed image and the global features of each preprocessed image to the feature fusion network; the feature fusion network performs feature fusion processing on the local features of each preprocessed image and the global features of each preprocessed image to obtain fused features of each preprocessed image, and outputs them to the decoder network; the decoder network performs feature fusion processing on the fused features of each preprocessed image to obtain a predicted lesion area segmentation image of each preprocessed image; The cross-double-branch encoding network includes: a CNN encoding network and a Swin Transformer encoding network; The CNN encoding network and the Swin Transformer encoding network; The CNN encoding network includes: The first CNN encoding module, the second CNN encoding module, ..., the Kth CNN encoding module; The first CNN encoding module is composed of multi-layer convolution modules and pooling layers; The k-th CNN encoding module is composed of multi-layer convolution modules, k∈[2,K]; The Swin Transformer encoding network includes: The first Swin Transformer network coding module, the second Swin Transformer network coding module, ..., the Kth Swin Transformer network coding module; The first Swin Transformer network coding module is composed of a segmentation image block layer, a linear embedding layer, and an STrans module cascaded in sequence; The k-th Swin Transformer network coding module is composed of an image block merging layer, a linear embedding layer, and an STrans module cascaded in sequence, k∈[2,K]; The feature fusion network includes: The first feature fusion module, the second feature fusion module, ..., the Kth feature fusion module; The k-th feature fusion module is composed of a dimension conversion module, a feature splicing module, and a multi-layer convolution module cascaded in sequence, k∈[1,K]; The decoder network comprises: The first upsampling module, the second upsampling module, ..., the Kth upsampling module; The first upsampling module, the second upsampling module, ..., the Kth upsampling module are sequentially cascaded to form a structure; The kth upsampling module is composed of an upsampling layer, a splicing layer, and a convolutional layer cascaded in sequence. The trained lesion image segmentation network is used to perform predictive segmentation to obtain a stroke prediction probability map of the real-time stroke magnetic resonance image. The pixel range of the stroke lesion area in the real-time stroke magnetic resonance image is further obtained by combining the probability threshold judgment.

2. The stroke lesion area image segmentation method according to claim 1, characterized in that: The following steps are involved: Step 1: Acquire multiple original stroke MRI images, perform cropping, normalization, splicing, and data augmentation on each original stroke MRI image to obtain each preprocessed image, and mark the true classification label of the stroke lesion for each pixel in each preprocessed image; Step 2: Construct a lesion image segmentation network. Input each preprocessed image into the lesion image segmentation network for lesion segmentation prediction. Obtain a stroke prediction probability map for each preprocessed image. Combined with the true classification label of the stroke lesion for each pixel in each preprocessed image, a cross-entropy Dyss-weighted loss function is constructed. Optimize the training using the stochastic gradient descent algorithm to obtain the trained lesion image segmentation network. Step 3: The real-time acquired stroke MRI image is predicted and segmented through the trained lesion image segmentation network to obtain the stroke prediction probability map of the real-time stroke MRI image. Combined with the probability threshold judgment, the pixel range of the stroke lesion area in the real-time stroke MRI image is obtained.

3. The stroke lesion area image segmentation method according to claim 1, wherein: The first CNN encoding module extracts features from each preprocessed image of the multi-layer convolution module through multi-layer convolution to obtain first-stage features of each preprocessed image, and outputs the first-stage features of each preprocessed image to the first upsampling module; The first-stage features of each preprocessed image are passed through a pooling layer to obtain the first-stage local features of each preprocessed image, and the first-stage local features of each preprocessed image are output to the second SwinTransformer network coding module and the first feature fusion module respectively; If k∈[2,K-1], the k-th CNN encoding module extracts local features of the k-1-th stage global features of each preprocessed image through multi-layer convolution to obtain the k-th stage local features of each preprocessed image, and outputs the k-th stage local features of each preprocessed image to the k+1-th Swin Transformer network encoding module and the k-th feature fusion module respectively; The K-th CNN encoding module extracts local features from the K-1-th stage global features of each preprocessed image through multi-layer convolution to obtain the K-th stage local features of each preprocessed image, and outputs the K-th stage local features of each preprocessed image to the K-th feature fusion module; The first Swin Transformer network coding module extracts global features from each preprocessed image through a segmentation image block layer, a linear embedding layer, and an STrans module to obtain the first-stage global features of each preprocessed image, and outputs the first-stage global features of each preprocessed image to the second CNN coding module and the first feature fusion module respectively; If k∈[2,K-1], the k-th Swin Transformer network coding module, the k-1th stage local features of each preprocessed image are sequentially processed by the image block merging layer, the linear embedding layer, and the STrans module to perform global feature extraction, and the k-th stage global features of each preprocessed image are obtained, and the k-th stage global features of each preprocessed image are respectively output to the k+1th CNN coding module and the k-th feature fusion module; The K-th Swin Transformer network coding module extracts global features from the K-1th stage local features of each preprocessed image through the image block merging layer, the linear embedding layer, and the STrans module in sequence, obtaining the K-th stage global features of each preprocessed image, and outputting the k-th stage global features of each preprocessed image to the k-th feature fusion module; The kth feature fusion module fuses the kth stage local features and the kth stage global features of each preprocessed image through the dimension conversion module, the feature splicing module, and the multi-layer convolution module in sequence to obtain the kth stage fused features of each preprocessed image, and outputs the kth stage fused features of each preprocessed image to the decoder network, k∈[1,K]; The K-th upsampling module upsamples the K-th stage fused features of each preprocessed image to obtain the K-th stage upsampling fusion features, splices the K-th stage upsampling fusion features with the K-1-th stage fused features of each preprocessed image in the channel dimension to obtain the K-th stage upsampling splicing fusion features, performs multi-layer convolution on the K-th stage upsampling splicing fusion features to obtain the k-th stage upsampling convolution splicing fusion features, and outputs them to the K-1-th stage decoder; If k∈[2,K-1], the kth upsampling module upsamples each k+1th stage upsampling convolution splicing fusion feature to obtain the kth stage upsampling fusion feature, splices the kth stage upsampling fusion feature with the k-1th stage fusion feature of each preprocessed image in the channel dimension to obtain the kth stage upsampling splicing fusion feature, performs multi-layer convolution on the kth stage upsampling splicing fusion feature to obtain the kth stage upsampling convolution splicing fusion feature, and outputs it to the k-1th stage decoder; The first upsampling module upsamples each of the second-stage upsampling convolution splicing fusion features to obtain the first-stage upsampling fusion features, splices the first-stage upsampling fusion features with the first-stage features of each preprocessed image in the channel dimension to obtain the first-stage upsampling splicing fusion features, and performs multi-layer convolution on the first-stage upsampling splicing fusion features to obtain a stroke prediction probability map for each preprocessed image.

4. The method for segmenting stroke lesion images according to claim 3, wherein: The cross entropy Dice weighted loss function described in step 2 is defined as follows: in, represents the cross entropy Dyss weighted loss function , represents the cross entropy loss function, represents the Diess loss function, represents the cross entropy loss weight, represents the Days loss weight; The cross entropy loss function is defined as follows: in, represents the number of preprocessed images, represents the number of rows of the i-th preprocessed image, represents the number of columns of the i-th preprocessed image, represents the true classification label of the stroke lesion in the xth row and yth column of the i-th preprocessed image. If It is a normal area pixel. If is the pixel in the lesion area, ∈[0, 1], It represents the predicted probability value of the pixel in the xth row and yth column of the stroke prediction probability map of the i-th preprocessed image calculated by the segmentation method belonging to the stroke lesion area classification; The Deiss loss function is defined as follows: in, ∈[0,1], Represents the gradient propagation adjustable coefficient.

5. The method for segmenting stroke lesion images according to claim 4, wherein: The pixel range of the stroke lesion area in the real-time stroke magnetic resonance image is obtained by combining the probability threshold in step 3, as follows: Pixels in the stroke prediction probability map of the real-time stroke magnetic resonance image whose predicted probability values ​​of pixels belonging to the stroke lesion area classification are greater than a probability threshold are screened out as lesion area pixels, and the pixel range of the stroke lesion area in the real-time stroke magnetic resonance image is further obtained.

6. A computer-readable medium, characterized in that It stores a computer program executed by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Practical lung lesion segmentation method based on bilateral learning branches

    CN115375712A

  • Three-dimensional medical image segmentation method and system based on long and short term memory self-attention model

    CN116129107A