Brain hemorrhage hematoma segmentation and image feature extraction method and system based on deep learning

Through a deep learning-based method, the U-Net model and attention mechanism are used to solve the problem of image feature extraction in computed tomography, efficient segmentation and feature extraction of cerebral hemorrhagia are achieved, and the accuracy and efficiency of diagnosis are improved.

CN119399225BActive Publication Date: 2025-05-16CHANGCHUN UNIV OF SCI & TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411975629.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-16
Estimated Expiration
2044-12-31

AI Technical Summary

Technical Problem

The prior art is difficult to achieve layer-by-layer decomposition of sections at different levels while performing image feature extraction during computed tomography, especially in the diagnosis of cerebral hemorrhage, which lacks effective prediction tools.

Method used

Using a deep learning-based method, a U-Net model is constructed by acquiring and preprocessing cerebral hemorrhage images, combining the attention mechanism of deep residual bottleneck blocks, multiple bottleneck block stacks, channels and spaces to realize the segmentation of cerebral hemorrhage hematoma and image feature extraction.

Benefits of technology

It improves the quality and accuracy of image segmentation, can adaptively pay attention to important areas, enhances the representation ability and accuracy of the model, and is suitable for complex image processing tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399225B_ABST
    Figure CN119399225B_ABST
Patent Text Reader

Abstract

A method and system for cerebral hemorrhage and hematoma segmentation and image feature extraction based on deep learning, which relates to the field of medical image processing, solves the problem in the prior art that it is difficult to extract features from images while decomposing slices at different levels layer by layer during computer tomography. The method includes: S1, obtaining a cerebral hemorrhage image and a corresponding mask, preprocessing the cerebral hemorrhage image and the corresponding mask, and saving the preprocessed data in a file; S2, the file described in S1 uses a custom nii type file to segment the cerebral hemorrhage image, and constructs a U‑Net model, and achieves segmentation through a deep residual bottleneck block and a stack of multiple bottleneck blocks; S3, completes feature extraction of the segmented cerebral hemorrhage image in S2 through the channel and spatial attention mechanism, and achieves cerebral hemorrhage and hematoma segmentation and image feature extraction based on deep learning. It is also applicable to the field of complex image processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and in particular to a method and system for cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning. Background Art

[0002] Computed Tomography (CT) is the gold standard for the diagnosis of intracerebral hemorrhage because CT can quickly distinguish between ischemic and hemorrhagic strokes, thereby detecting intracerebral hemorrhage before surgery. It is also the most routine screening method to rule out intracerebral hemorrhage before thrombolytic therapy because it excludes other intracranial diseases with clinical stroke-like attacks. One of the key requirements for intracerebral hemorrhage examination is rapid diagnosis. Faster diagnosis leads to faster treatment, resulting in better outcomes. Studies have shown that imaging markers of intracerebral hemorrhage can provide information on disease progression and assist in predicting the occurrence of factors affecting prognosis.

[0003] Hematoma expansion refers to the visually discernible change in hematoma volume between the patient's baseline CT and follow-up CT, and the assessment of hematoma volume growth varies among hematoma-related studies. Early hematoma expansion is not only an independent predictor of increased risk of death, but also aggravates neurological damage, resulting in irreversible consequences. More seriously, more than 75% of patients will experience severe disability or death. However, there is currently no reliable tool to predict HE in patients with acute ICH.

[0004] Therefore, it is currently difficult to extract features from images while decomposing slices at different levels layer by layer during computed tomography. Summary of the invention

[0005] The present invention aims to solve the problem in the prior art that it is difficult to extract features from images while decomposing slices at different levels layer by layer during computer tomography.

[0006] To solve the above technical problems, the present invention is achieved through the following technical solutions:

[0007] Solution 1: The present invention proposes a method for cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning, the method comprising:

[0008] S1, obtaining a cerebral hemorrhage image and a corresponding mask, preprocessing the cerebral hemorrhage image and the corresponding mask, and saving the preprocessed data in a file;

[0009] The files described in S2 and S1 use custom nii type files to segment the ICH images and build a U-Net model to achieve segmentation through a deep residual bottleneck block and multiple bottleneck block stacks;

[0010] S3, through the channel and spatial attention mechanism, complete the feature extraction of the segmented cerebral hemorrhage image in S2, and realize cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning.

[0011] Furthermore, a preferred embodiment is provided, wherein S1 also includes a step of enhancing the acquired cerebral hemorrhage image.

[0012] Further, a preferred implementation is provided, wherein S1 specifically includes the following steps:

[0013] S1.1. Define a NumPy library and use ct_scan to represent three-dimensional CT scan image data, where the three-dimensional CT scan image data includes multiple two-dimensional slices;

[0014] S1.2, cropping the three-dimensional CT scan image data based on S1.1, where imageLen represents the side length of the input image, and windowLen represents the size of the cropping window;

[0015] S1.3, pass imageLen and windowLen as parameters to the prepare_data function, combine them with the image data cropped in S1.2, and save the image into the .pkl file based on whether there is cerebral hemorrhage image data.

[0016] Furthermore, a preferred implementation is provided, wherein S2 also includes a step of extracting features from the cerebral hemorrhage image.

[0017] Further, a preferred implementation is provided, in which the method for constructing the U-Net model in S2 is:

[0018] S2.1, the input bottleneck block processes the input tensor through the conv1 convolution kernel; the output result is normalized through the batch normalization layer BatchNormalization; the negative value is output as 0 through the activation layer ReLU, and the positive value is retained;

[0019] S2.2. Define the BottleneckDownsampleBlock class, which uses convolution and downsampling operations to receive the input tensor X, where the input tensor X is the feature map passed from the previous layer;

[0020] S2.3, apply another conv1x1 convolutional layer to the feature map, add the two tensors X_shortcut after convolution and downsampling, and pass the conv1 convolutional layer to match the number of channels F3 and spatial size of X;

[0021] S2.4. Define the UpSamplingAndConcatenation class for upsampling and concatenating feature maps.

[0022] S2.5. Use tf.keras.layers.Concatenate to concatenate the upsampled feature map with the skip connection feature map, use axis=3 to concatenate the channels of the feature map, and merge the two tensors along the depth direction.

[0023] S2.6, the input x is upsampled by Conv2DTranspose to generate an expanded feature map, and Concatenate is used to concatenate the expanded feature map with the skip connection xskip;

[0024] S2.7, process the input tensor X with the residual block and output a tensor with the same shape as the input;

[0025] S2.8, extracting features of different levels from the output tensor;

[0026] S2.9. Use the upsample_and_concatenation function to concatenate the upsampled feature map with the corresponding encoder layer feature map. Each layer uses residual_block. Each decoding layer consists of convolution operations and jump connections to complete the construction of the U-Net model.

[0027] Solution 2: A system for cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning, the system comprising:

[0028] A data acquisition module, used for acquiring a cerebral hemorrhage image and a corresponding mask, preprocessing the cerebral hemorrhage image and the corresponding mask, and saving the preprocessed data in a file;

[0029] The segmentation module is used to segment the files described in the data acquisition module using a custom nii type file image, and to build a U-Net model to achieve segmentation through a deep residual bottleneck block and multiple bottleneck block stacks;

[0030] The feature extraction module is used to complete the feature extraction of the cerebral hemorrhage image segmented in the segmentation module through the channel and spatial attention mechanism, and realize the cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning.

[0031] Solution 3: A computer device includes a processor and a storage medium, wherein the memory stores a computer program. When the processor runs the computer program stored in the memory, the processor executes any one of the methods described in Solution 1.

[0032] Solution 4: A computer storage medium for storing a computer program. When the computer program is read by a computer, the computer executes any one of the methods described in Solution 1.

[0033] The present invention is beneficial in that:

[0034] The method described in the present invention adopts residual connection, multi-scale feature extraction, skip connection, bottleneck structure and other technologies. By introducing the channel and space attention mechanism, the weight can be dynamically adjusted according to the importance of the feature, so that the model can adaptively focus on important areas, which helps to improve the performance of tasks such as image segmentation.

[0035] The method described in the present invention can improve the overall contrast of the image. The flexibility of the model is reflected in the design of each module. Each module, such as the bottleneck block and the downsampling block, can adjust the hyperparameters as needed, so that the network can be applied to various image processing tasks. Each layer uses different filter sizes and depths to learn different feature expressions at different levels. This hierarchical learning method helps to improve the representation ability and accuracy of the model.

[0036] The present invention is also applicable to the field of complex image processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a flow chart of the deep learning-based cerebral hemorrhage hematoma segmentation and image feature extraction method described in Implementation Method 1. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solutions and advantages of the implementation methods of the present application clearer, the technical solutions in the implementation methods of the present application will be clearly and completely described below in conjunction with the drawings in the implementation methods of the present application. Obviously, the described implementation methods are only part of the implementation methods of the present application, not all of the implementation methods.

[0039] Embodiment 1: This embodiment provides a method for cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning, the method comprising:

[0040] S1, obtaining a cerebral hemorrhage image and a corresponding mask, preprocessing the cerebral hemorrhage image and the corresponding mask, and saving the preprocessed data in a file;

[0041] The files described in S2 and S1 use custom nii type files to segment the ICH images and build a U-Net model to achieve segmentation through a deep residual bottleneck block and multiple bottleneck block stacks;

[0042] S3, through the channel and spatial attention mechanism, complete the feature extraction of the segmented cerebral hemorrhage image in S2, and realize cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning.

[0043] Implementation method 2: This implementation method further limits the deep learning-based cerebral hemorrhage hematoma segmentation and image feature extraction method described in implementation method 1, and S1 also includes the step of enhancing the acquired cerebral hemorrhage image.

[0044] Implementation method 3: This implementation method further limits the method for cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning described in implementation method 1. S1 specifically includes the following steps:

[0045] S1.1. Define a NumPy library and use ct_scan to represent three-dimensional CT scan image data, where the three-dimensional CT scan image data includes multiple two-dimensional slices;

[0046] S1.2, cropping the three-dimensional CT scan image data based on S1.1, where imageLen represents the side length of the input image, and windowLen represents the size of the cropping window;

[0047] S1.3, pass imageLen and windowLen as parameters to the prepare_data function, combine them with the image data cropped in S1.2, and save the image into the .pkl file based on whether there is cerebral hemorrhage image data.

[0048] Implementation method 4: This implementation method further limits the deep learning-based cerebral hemorrhage hematoma segmentation and image feature extraction method described in implementation method 1, and S2 also includes a step of extracting features from the cerebral hemorrhage image.

[0049] Implementation 5: This implementation is a further limitation of the deep learning-based cerebral hemorrhage hematoma segmentation and image feature extraction method described in Implementation 1. The method for constructing the U-Net model in S2 is:

[0050] S2.1, the input bottleneck block processes the input tensor through the conv1 convolution kernel; the output result is normalized through the batch normalization layer BatchNormalization; the negative value is output as 0 through the activation layer ReLU, and the positive value is retained;

[0051] S2.2. Define the BottleneckDownsampleBlock class, which uses convolution and downsampling operations to receive the input tensor X, where the input tensor X is the feature map passed from the previous layer;

[0052] S2.3, apply another conv1x1 convolutional layer to the feature map, add the two tensors X_shortcut after convolution and downsampling, and pass an additional conv1 convolutional layer to match the number of channels F3 and spatial size of X;

[0053] S2.4. Define the UpSamplingAndConcatenation class for upsampling and concatenating feature maps.

[0054] S2.5. Use tf.keras.layers.Concatenate to concatenate the upsampled feature map with the skip connection feature map, use axis=3 to concatenate the channels of the feature map, and merge the two tensors along the depth direction.

[0055] S2.6, the input x is upsampled by Conv2DTranspose to generate an expanded feature map, and Concatenate is used to concatenate the expanded feature map with the skip connection xskip;

[0056] S2.7, process the input tensor X with the residual block and output a tensor with the same shape as the input;

[0057] S2.8, extracting features of different levels from the output tensor;

[0058] S2.9. Use the upsample_and_concatenation function to concatenate the upsampled feature map with the corresponding encoder layer feature map. Each layer uses residual_block. Each decoding layer consists of convolution operations and jump connections to complete the construction of the U-Net model.

[0059] Embodiment 6: This embodiment proposes a deep learning-based cerebral hemorrhage hematoma segmentation and image feature extraction system, the system comprising:

[0060] A data acquisition module, used for acquiring a cerebral hemorrhage image and a corresponding mask, preprocessing the cerebral hemorrhage image and the corresponding mask, and saving the preprocessed data in a file;

[0061] The segmentation module is used to segment the files described in the data acquisition module using a custom nii type file image, and to build a U-Net model to achieve segmentation through a deep residual bottleneck block and multiple bottleneck block stacks;

[0062] The feature extraction module is used to complete the feature extraction of the cerebral hemorrhage image segmented in the segmentation module through the channel and spatial attention mechanism, and realize the cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning.

[0063] Embodiment 7: This embodiment proposes a computer device, including a processor and a storage medium, wherein a computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the method described in any one of embodiments 1 to 5.

[0064] Embodiment 8: This embodiment proposes a computer storage medium for storing a computer program. When the computer program is read by a computer, the computer executes the method described in any one of Embodiments 1 to 5.

[0065] Embodiment 9: This embodiment includes an example, which is used to explain the above embodiment. Figure 1 To illustrate this embodiment, the method for cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning described in this embodiment specifically includes the following steps:

[0066] Step 1: Obtain the CT image of cerebral hemorrhage and its corresponding mask, perform preprocessing, and save the data in the current default file;

[0067] Step 2: The current default file uses a custom nii type file image for segmentation, based on the U-Net model, using a deep residual bottleneck block, multiple bottleneck block stacks. These blocks are stacked 2, 3, 4, 5, or 14 times, with a total of 104 convolutional layers in the entire network to improve the quality of the segmentation mask.

[0068] Among them, the collected images are enhanced, and residual connections, multi-scale feature extraction, jump connections, bottleneck structures and other technologies are used. By introducing the channel and space attention mechanism, the weights can be dynamically adjusted according to the importance of the features. Each module, such as the bottleneck block and the downsampling block, can adjust the hyperparameters as needed. Each layer uses different filter sizes and depths, and learns different feature expressions at different levels, so that the model can more accurately segment the hematoma area. In the computer implementation process, the Python programming language is used. Python has a rich standard library and provides source code or machine code suitable for various major system platforms. The namespaces used below are all from the Python integrated module module and OpenCV module.

[0069] Furthermore, step 2 includes the following steps:

[0070] Step 1: Define the NumPy library, use ct_scan to represent the three-dimensional CT scan image data, which contains multiple two-dimensional slices; use w_level and w_width to represent the center value and width of the windowing operation, which are usually used to adjust the HU value (Hounsfield Units) range of the image for display optimization of CT images; use slice_s: to represent each CT image slice, which is a two-dimensional array in ct_scan;

[0071] Step 2: Define the NumPy library, use imageLen to represent the side length of the input image, windowLen to represent the size of the cropping window; use n_moves to represent the number of window slides in each dimension of the image; 0 means to initialize the counter to track the number of the currently cropped image, and set the pixel values ​​less than 0 to 0 and the pixel values ​​greater than 255 to 255;

[0072] Step 3: Define the prepare_data function, pass imageLen and windowLen as parameters to this function, use hemorrhage_diagnosis_df to represent the DataFrame of image information; use hemorrhage_diagnosis_array to represent the NumPy array of diagnosis; define the segment_ct function, crop out a small 128x128 image, and save the image to a .pkl file based on whether there is cerebral hemorrhage.

[0073] The construction of the segmentation model U-Net specifically includes the following steps:

[0074] Step 1: Import the required libraries, including OpenCV, NumPy, tensorflow.keras;

[0075] Step 2: Define a class called DRUnetInput, which accepts the width, height, and number of input channels of the image and initializes the input layer as the entry for the subsequent network;

[0076] Step 3: Define the class of InputBottleneckBlock and input the bottleneck block. Process the input tensor through the conv1 convolution kernel; normalize the output result through the batch normalization layer BatchNormalization; use the activation layer ReLU to output negative values ​​as 0 and retain positive values;

[0077] Step 4: Define the BottleneckDownsampleBlock class, use convolution and downsampling operations to reduce the spatial dimension, and maintain information flow through residual connections. BottleneckDownsampleBlock accepts an input tensor X, which is usually a feature map passed from the previous layer; the input tensor is usually a four-dimensional tensor with a shape of batch_size, height, width, channels, where height and width represent the spatial dimensions of the feature map, and channels represents the number of channels;

[0078] Step 5: Map the input channels to the new channel number F1 through the convolutional layer conve1, i.e., Conv2D layer. The step size of this convolutional layer is set to (s, s) to achieve downsampling and reduce the spatial size of the feature map.

[0079] Step 6: After ReLU activation, BottleneckDownsampleBlock continues to extract features through a convolutional layer. The convolutional layer uses the kernel_size=kernel_size parameter. In this example, it is a 3x3 convolution kernel, s=1, that is, the step size is set to (1, 1), and the padding method is 'same' to ensure that the size of the feature map does not change, retain the details of the input features, and further improve the expressiveness of the features and the stability of the network;

[0080] Step 7: Apply another conv1x1 convolutional layer to the input tensor with a stride of (s, s). Changing the stride reduces the size of the feature map and ensures that information can be processed effectively at different scales.

[0081] Step 8: Using the Add() function, we define the addition of filters, padding, kernel_initializer, and X_shortcut after convolution and downsampling. X_shortcut passes an additional conv1 convolution layer to match the number of channels F3 and spatial size of X.

[0082] Step 9: Define the UpSamplingAndConcatenation class, which implements upsampling and concatenates the feature maps of the encoder and decoder. Input x and xskip as parameters to pass low-level detail information to the decoder; use the Conv2DTranspose deconvolution layer, convolution kernel 3x3 for upsampling, s=2, and use the 'same' padding method to ensure that the size of the feature map is correctly expanded after upsampling;

[0083] Step 10: Use tf.keras.layers.Concatenate to concatenate the upsampled feature map with the skip connection feature map, use axis=3 to concatenate the channels of the feature map, and merge the two tensors along the depth direction;

[0084] Step 11: The input x is upsampled through Conv2DTranspose to generate an expanded feature map, and Concatenate is used to concatenate the expanded feature map with the skip connection xskip, retaining the low-level detail information, thereby providing more context information for the subsequent decoding process;

[0085] Step 12: Define the ResidualBlock class, conv3x3 convolution kernel, pass x to this class as the input tensor, and after processing by the residual block, output a tensor with the same shape as the input. This output contains the features extracted by residual learning;

[0086] Step 13: Use tf.keras.layers.Conv2D to create two convolutional layers. The first convolutional layer uses the specified filters, kernel_size, strides and padding, and uses the he_normal initialization method. The convolutional layer is further normalized and nonlinearized through BatchNormalization and ReLU activation functions; the second convolutional layer conv3x3 continues to extract spatial features and performs the same BatchNormalization and ReLU activation operations. x will be resized through the Conv2D layer to ensure that the input and output have the same shape;

[0087] Step 14: Define the OutputLayer class, use num_classes to represent the number of output categories; use the conv1x1 convolution layer to map the feature map output by the decoder to the final number of output categories, call the Conv2D layer, s=1, fill mode is 'same', define filters=num_classes, padding, activation parameters;

[0088] Step 15: Use kernel_initializer='he_normal' to initialize the weights of the convolution kernel, using the He normal distribution initialization method to help speed up the training process and avoid the gradient vanishing problem;

[0089] Step 16: Use bias_initializer='zeros' to zero-initialize the bias term, reduce the original multi-channel feature map to num_classes channels, and output the output tensor x with batch_size, height, width, num_classes. Each pixel contains the probability value of each category, activated by Softmax.

[0090] Step 17: Define inputs, use image_width, image_height to represent parameters, 4 represents the number of channels, use bottleneck_block stacking, bottleneck_downsample_block and bottleneck_block to process the input in turn, and the number of filters in each layer increases layer by layer to extract features at different levels;

[0091] Step 18: Define the encoder and use the upsample_and_concatenation function to concatenate the upsampled feature map with the corresponding encoder layer feature map. Each layer uses residual_block. Each decoding layer consists of convolution operations and jump connections to gradually restore the spatial information of the image.

[0092] In summary, this embodiment proposes a method for cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning. This method can decompose slices at different levels layer by layer, and extract features from the image at the same time to achieve feature extraction of hematoma area influence. This method can improve the quality and accuracy of segmented images and provide more reliable data support for research in biology, medicine and other fields.

[0093] Those skilled in the art will appreciate that the above are only preferred embodiments of the present invention, and the various embodiments of the present disclosure and / or the features described in the claims may be combined or combined in various ways, even if such combinations or combinations are not explicitly described in the present disclosure. It is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art may still modify the technical solutions described in the aforementioned embodiments, or perform equivalent substitutions on some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.

[0094] Although preferred embodiments of the present invention have been described, additional changes and modifications may be made to these embodiments by those skilled in the art once the basic inventive concepts are known. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention. Obviously, those skilled in the art may make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A method for segmenting and extracting image features of cerebral hemorrhage hematoma based on deep learning, characterized in that: The method comprises: S1, obtaining a cerebral hemorrhage image and a corresponding mask, preprocessing the cerebral hemorrhage image and the corresponding mask, and saving the preprocessed data in a file; The files described in S2 and S1 use custom nii type files to segment the ICH images and build a U-Net model to achieve segmentation through a deep residual bottleneck block and multiple bottleneck block stacks; S3, completes feature extraction of the segmented cerebral hemorrhage image in S2 through the channel and spatial attention mechanism, and realizes cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning; The method for constructing the U-Net network model in S2 is: S2.1, the input bottleneck block processes the input tensor through the conv1 convolution kernel; the output result is normalized through the batch normalization layer BatchNormalization; the negative value is output as 0 through the activation layer ReLU, and the positive value is retained; S2.

2. Define the BottleneckDownsampleBlock class, which uses convolution and downsampling operations to receive the input tensor X, where the input tensor X is the feature map passed from the previous layer; S2.3, apply another conv1x1 convolutional layer to the feature map, add the two tensors X_shortcut after convolution and downsampling, and pass the conv1 convolutional layer to match the number of channels F3 and spatial size of X; S2.

4. Define the UpSamplingAndConcatenation class for upsampling and concatenating feature maps. S2.

5. Use tf.keras.layers.Concatenate to concatenate the upsampled feature map with the skip connection feature map, use axis=3 to concatenate the channels of the feature map, and merge the two tensors along the depth direction. S2.6, the input x is upsampled by Conv2DTranspose to generate an expanded feature map, and Concatenate is used to concatenate the expanded feature map with the skip connection xskip; S2.7, process the input tensor X with the residual block and output a tensor with the same shape as the input; S2.8, extracting features of different levels from the output tensor; S2.

9. Use the upsample_and_concatenation function to concatenate the upsampled feature map with the corresponding encoder layer feature map. Each layer uses residual_block. Each decoding layer consists of convolution operations and jump connections to complete the construction of the U-Net model.

2. The method for cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning according to claim 1, characterized in that: S1 also includes a step of enhancing the acquired cerebral hemorrhage image.

3. The method for cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning according to claim 1, characterized in that: S1 specifically includes the following steps: S1.

1. Define a NumPy library and use ct_scan to represent three-dimensional CT scan image data, where the three-dimensional CT scan image data includes multiple two-dimensional slices; S1.2, cropping the three-dimensional CT scan image data based on S1.1, where imageLen represents the side length of the input image, and windowLen represents the size of the cropping window; S1.3, pass imageLen and windowLen as parameters to the prepare_data function, combine them with the image data cropped in S1.2, and save the image into the .pkl file based on whether there is cerebral hemorrhage image data.

4. The method for cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning according to claim 1, characterized in that: S2 also includes a step of extracting features from the cerebral hemorrhage image.

5. A deep learning-based brain hemorrhage hematoma segmentation and image feature extraction system, characterized in that: The system comprises: A data acquisition module, used for acquiring a cerebral hemorrhage image and a corresponding mask, preprocessing the cerebral hemorrhage image and the corresponding mask, and saving the preprocessed data in a file; The segmentation module is used to segment the files described in the data acquisition module using a custom nii type file image, and to build a U-Net model to achieve segmentation through a deep residual bottleneck block and multiple bottleneck block stacks; The feature extraction module is used to extract features from the cerebral hemorrhage images segmented in the segmentation module through the channel and spatial attention mechanism, and realize the cerebral hemorrhage hematoma segmentation and image feature extraction based on deep learning; The method to improve the U-Net network model in the segmentation module is: S2.1, the input bottleneck block processes the input tensor through the conv1 convolution kernel; the output result is normalized through the batch normalization layer BatchNormalization; the negative value is output as 0 through the activation layer ReLU, and the positive value is retained; S2.

2. Define the BottleneckDownsampleBlock class, which uses convolution and downsampling operations to receive the input tensor X, where the input tensor X is the feature map passed from the previous layer; S2.3, apply another conv1x1 convolutional layer to the feature map, add the two tensors X_shortcut after convolution and downsampling, and pass the conv1 convolutional layer to match the number of channels F3 and spatial size of X; S2.

4. Define the UpSamplingAndConcatenation class for upsampling and concatenating feature maps. S2.

5. Use tf.keras.layers.Concatenate to concatenate the upsampled feature map with the skip connection feature map, use axis=3 to concatenate the channels of the feature map, and merge the two tensors along the depth direction. S2.6, the input x is upsampled by Conv2DTranspose to generate an expanded feature map, and Concatenate is used to concatenate the expanded feature map with the skip connection xskip; S2.7, process the input tensor X with the residual block and output a tensor with the same shape as the input; S2.8, extracting features of different levels from the output tensor; S2.

9. Use the upsample_and_concatenation function to concatenate the upsampled feature map with the corresponding encoder layer feature map. Each layer uses residual_block. Each decoding layer consists of convolution operations and jump connections to complete the construction of the U-Net model.

6. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Brain tumor image segmentation method combining feature fusion and attention mechanism

    CN116342624A