Semi-supervised intracranial hemorrhage image segmentation method, device, equipment and medium

By introducing a Transformer encoder, a skip connection module, and a boundary fusion module into semi-supervised intracranial hemorrhage image segmentation, and combining adaptive boundary point prior knowledge, the problems of noise accumulation and boundary information ignoring in existing methods are solved, and high-precision and stable intracranial hemorrhage image segmentation is achieved.

CN121600512APending Publication Date: 2026-03-03HEBEI UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-29
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Existing semi-supervised medical image segmentation methods are easily affected by pseudo-label noise in intracranial hemorrhage image segmentation, and the consistency regularization method ignores the global geometry and boundary information of the lesion region, resulting in unstable segmentation and insufficient accuracy.

Method used

We employ a Transformer-based encoder and decoder, combined with a skip connection module and a boundary fusion module. We extract features through multi-head self-attention and channel attention mechanisms to generate attention maps to focus on boundary regions. We guide the model to learn complex boundaries through an adaptive boundary point prior knowledge generation module. We combine pixel-level segmentation with geometric level set regression tasks to optimize the training loss function and improve segmentation accuracy.

Benefits of technology

It significantly improves the segmentation accuracy and boundary coherence of intracranial hemorrhage images, enhances the model's ability to identify blurred boundaries and resist interference, and achieves stable segmentation of complex tissue structures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600512A_ABST
    Figure CN121600512A_ABST
Patent Text Reader

Abstract

The invention discloses a semi-supervised intracranial hemorrhage image segmentation method and device, equipment and a medium, and relates to the technical field of medical image processing.The method comprises the steps that firstly, a voxel region with the violent boundary change is concerned through an attention map explicit guidance model, secondary focusing of features in the boundary region is achieved, and the image segmentation accuracy is improved; the problems of boundary blur and detail maintenance of the segmentation result at small blood vessels and irregular bleeding contours are counteracted; then, channel attention and space attention are combined for modeling, key features are highlighted through weighted fusion in a self-adaptive mode, and therefore conflicts caused by shallow-layer and deep-layer feature differences are effectively relieved, the shape of a bleeding focus is continuous, and the segmentation fineness is improved; and finally, a pixel-level segmentation head and a level set function regression output head are arranged in parallel to realize collaborative optimization of probability segmentation and geometric contour modeling, a sparse boundary supervision graph is generated based on an edge detection result, learning of a model in a complex deformation area is explicitly guided, and accurate segmentation of a clinical hemorrhage image is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical image processing technology, and in particular to a semi-supervised image segmentation method, apparatus, device, and medium for intracranial hemorrhage. Background Technology

[0002] Medical image segmentation is a crucial task in medical image analysis and computer-aided diagnosis, aiming to accurately classify input medical images at the pixel or voxel level to precisely locate lesions. This process is of great significance for disease diagnosis and treatment planning. However, existing medical image segmentation methods heavily rely on a large number of high-quality labeled training samples. These labels require doctors with extensive clinical experience to perform the annotations, which is costly and inefficient. To alleviate the dependence on labeled training images, researchers have proposed various semi-supervised segmentation methods in recent years, utilizing a large amount of unlabeled medical image data that is readily available in actual clinical settings to improve the training performance of the models.

[0003] Current semi-supervised medical image segmentation methods are mainly divided into two categories: one is a pseudo-label-based strategy, which trains an initial model with a small amount of labeled data and generates pseudo-labels for unlabeled samples. However, this method is highly sensitive to the performance of the initial model. Once there is noise in the pseudo-labels, it will be amplified during the training process, thereby reducing the segmentation accuracy. The other category is the consistency regularization method, which requires the model to maintain consistent prediction results for the same unlabeled sample under different perturbations. Although it can improve robustness, it only acts on the output probability space and ignores the prior geometric shape and boundary information of the lesion region, making it difficult to guarantee the segmentation stability in complex tissue structures or low-contrast regions.

[0004] However, due to the irregular shape and small blood vessels of intracranial hemorrhage lesions, current methods ignore the problems of blurred boundaries, insufficient preservation of details and insufficient shape continuity, making it difficult to accurately segment clinical hemorrhage images. Summary of the Invention

[0005] This invention provides a semi-supervised image segmentation method, apparatus, device, and medium for intracranial hemorrhage, which can solve the problems existing in the prior art.

[0006] This invention provides a semi-supervised image segmentation method for intracranial hemorrhage, comprising the following steps: Obtain images of the patient's intracranial hemorrhage; The bleeding image is input into a pre-trained bleeding image segmentation model to obtain the bleeding image segmentation result; the bleeding image segmentation model includes a cascaded Transformer-based encoder, a skip connection module and a Transformer-based decoder. The encoder maps each image patch to a multidimensional embedding space through a linear projection matrix to obtain embedding features. It then extracts global contextual features of the embedding features through a multi-head self-attention mechanism and a multilayer perceptron, and adds them element by element to obtain preliminary fusion features. The encoder calculates the correlation between voxels in the preliminary fusion features through a channel attention mechanism and a spatial attention mechanism, and generates an attention map. The preliminary fusion features are then multiplied with the attention map channel by channel to obtain boundary features. The skip connection module performs linear mapping transformations on the embedded features and boundary features respectively, and adds the embedded features and boundary features mapped to the same feature space to obtain the fused features; the skip connection module learns the weight of each feature channel through the channel attention mechanism to obtain the channel weight, and learns the weight of each spatial position through the spatial attention mechanism to obtain the spatial weight, and adds the channel weight and spatial weight to the fused features element by element to obtain the weighted features, and adds the weighted features to the embedded features through the residual connection to obtain the segmentation features; The decoder maps the segmentation feature layer to a voxel-level probability segmentation map, and uses the segmentation features to predict the level set function value of each voxel. Based on the probability segmentation map and the level set function value, the bleeding image segmentation result is obtained.

[0007] Preferably, the training of the hemorrhage image segmentation model includes: During the training of the hemorrhage image segmentation model, a 3D edge detection algorithm is used to process the input intracranial hemorrhage image to obtain a set of candidate boundary voxel points. Then, a 3D neighborhood is constructed with each candidate point as the center, the proportion p of lesion voxels within the neighborhood is statistically analyzed, and a significance score is calculated by combining the mean and standard deviation of neighboring voxels. ,when If the value is greater than the set threshold, the point is retained as a valid boundary point; otherwise, it is discarded, so as to retain more monitoring points in irregular areas and reduce redundant points in smooth areas. For any candidate point The volume percentage of its 20 adjacent voxels is extracted to obtain a statistic, which is expressed as: ; ; ; ; Set threshold When candidate points If the value exceeds the threshold, the point is retained as a valid boundary point; otherwise, it is discarded. The selected valid boundary points are then... Mapping to the corresponding voxel locations generates a sparse boundary supervision graph. ;Boundary map predicted by minimizing the hemorrhage image segmentation model and The error between them guides the bleeding image segmentation model to learn complex boundary structures; Its training loss function is: ; + ; ; ; ; in: Indicates the segmentation loss; Indicates regression loss; Represents the total number of voxels in a 3D image; This represents the boundary prediction value of the network at position i; This represents the boundary supervision value at position i; This indicates a loss of consistency. This indicates that the output of the level set task head will be converted into a voxel-level image.

[0008] Preferably, the acquisition of the embedded features includes: Acquire images of the patient's intracranial hemorrhage. and These represent the labeled dataset and the unlabeled dataset, respectively. The overall medical image dataset is... ; Three-dimensional images from a medical image dataset Divide into a series of three-dimensional image blocks and unfold them into a vector sequence, denoted as . ;in, Indicates the resolution of the input data. This indicates the resolution of each image patch. , represents the total number of three-dimensional blocks obtained from the partitioning; Serialized image blocks Mapping to a K-dimensional latent embedding space, achieved through a trainable linear projection, the embedding process is represented as: ; in: Represents the 3D block embedding projection matrix; This indicates positional embedding.

[0009] Preferably, obtaining the boundary features includes: After embedding, there are a total of N 3D blocks. Assume that in the i-th block, the given input features are... ,in First, it is fed into the sequences of multi-head self-attention MSA and multilayer perceptual MLP to obtain preliminary fusion features of global dependency representation, which are expressed as: ; By jointly modeling channel attention and spatial attention, an attention map focused on the boundary region is generated. Attention map Preliminary fusion features after attention weighting Channel-by-channel multiplication, and preliminary fusion features through residual connections. Add to obtain boundary features , is represented as: ; ; ; in: This represents the characteristics of the encoder output. The feature map represents the prediction. and These represent element-wise addition and channel-wise multiplication, respectively.

[0010] Preferably, the acquisition of the segmentation features includes: Linear projection is performed on the features at the encoding and decoding ends respectively, and the embedded features and boundary features mapped to the same feature space are added together to obtain the fused features. ; Suppressing fusion features using gating mechanisms Redundant information in the middle, to obtain ; By jointly modeling channel attention and spatial attention, the channel weights and spatial weights are weighted element-wise with the fused features to obtain weighted features. ; and weighted features are connected through residual connections. Adding the embedded features to obtain the segmentation features , is represented as: ; ; ; in: These represent the input features at the decoding and encoding ends, respectively. This represents a 1×1×1 convolution + BN + ReLU operation; represents the projection operator 1×1×1 convolution + BN; Gate represents a gated attention; CBAM represents channel spatial attention.

[0011] Preferably, obtaining the hemorrhage image segmentation result includes: The decoder connects two task output heads in parallel. The segmentation output head uses a 1×1×1 convolution to map the segmentation features to a voxel-level label probability map, and the regression output head predicts the level set function value of each voxel. The calculation of the regression output head is expressed as follows: ; in: and These represent two different pixels or voxels in the segmentation mask; Represents the zero level set; and These represent the internal and external regions of the target object, respectively. Represents the task transformation function; The transformation from the voxel-level label probability map to the level set function map is achieved through the task transformation function, and through... Mapping the level set function values ​​to an approximate binary segmentation map is represented as: .

[0012] This invention also provides a semi-supervised intracranial hemorrhage image segmentation device, comprising: The image module is used to acquire images of the patient's intracranial hemorrhage. The segmentation module is used to input the bleeding image into a pre-trained bleeding image segmentation model to obtain the bleeding image segmentation result; wherein, the bleeding image segmentation model includes a cascaded Transformer-based encoder, a skip connection module and a Transformer-based decoder; The feature extraction module involves the encoder mapping each image patch to a multidimensional embedding space using a linear projection matrix to obtain embedding features. Global context features of these embedding features are extracted using a multi-head self-attention mechanism and a multilayer perceptron, and then added element-wise to obtain preliminary fusion features. The encoder then calculates the correlation between voxels in the preliminary fusion features using channel attention and spatial attention mechanisms, generating an attention map. The preliminary fusion features are then multiplied channel-wise with the attention map to obtain boundary features. The skip connection module performs linear mapping transformations on the embedded features and boundary features respectively, and adds the embedded features and boundary features mapped to the same feature space to obtain the fused features; the skip connection module learns the weight of each feature channel through the channel attention mechanism to obtain the channel weight, and learns the weight of each spatial position through the spatial attention mechanism to obtain the spatial weight, and adds the channel weight and spatial weight to the fused features element by element to obtain the weighted features, and adds the weighted features to the embedded features through the residual connection to obtain the segmentation features; The decoding module maps the segmentation feature layer to a voxel-level probability segmentation map, and simultaneously uses the segmentation features to predict the level set function value of each voxel. Based on the probability segmentation map and the level set function value, the bleeding image segmentation result is obtained.

[0013] This invention also provides an electronic device, including a memory and a processor; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the steps of the semi-supervised intracranial hemorrhage image segmentation method described above.

[0014] This invention also provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of a semi-supervised intracranial hemorrhage image segmentation method as described above.

[0015] This invention provides a semi-supervised image segmentation method, apparatus, device, and medium for intracranial hemorrhage, which has the following advantages compared with the prior art: This invention first embeds a boundary fusion module (RCAM) at the end of the Transformer encoder. The RCAM extracts global contextual features of the embedded features through a multi-head self-attention mechanism and a multilayer perceptron. Then, it calculates the correlation between voxels in the preliminary fused features using channel attention and spatial attention mechanisms, generating an attention map. The preliminary fused features are then multiplied channel-by-channel with the attention map to obtain boundary features. This process explicitly guides the model to focus on voxel regions with drastic boundary changes through the attention map, achieving secondary focus of features in the boundary regions and offsetting the segmentation results in areas with small blood vessels and irregular bleeding. The problem of blurred boundaries and lack of detail preservation at the contours was addressed by setting up a skip connection mechanism, LDEBlock, between the encoder and decoder. LDEBlock fully integrates the shallow features represented by boundary features with the deep features represented by embedded features. During the fusion, channel attention and spatial attention are jointly modeled, and key features are adaptively highlighted through weighted fusion. This effectively alleviates the conflict caused by the difference between shallow and deep features, enhances the boundary reconstruction capability, and makes the shape of the bleeding lesion continuous to improve the segmentation precision. Finally, the segmentation features are mapped to voxel-level probability segmentation maps, achieving accurate segmentation of clinical bleeding images.

[0016] Furthermore, this invention designs an adaptive boundary point prior knowledge generation module (VGS) during the model training process. This module can generate boundary point maps of different sparseness according to the changes in boundary shape, explicitly guiding the model to learn complex boundary geometric priors. This overcomes the drawbacks of traditional edge loss or distance transformation loss, which impose uniform constraints on the global scope, and significantly enhances the model's ability to identify fuzzy boundaries and its anti-interference ability. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of the overall process of a semi-supervised intracranial hemorrhage image segmentation method provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the network structure of the boundary fusion module RCAM in a semi-supervised intracranial hemorrhage image segmentation method provided in an embodiment of the present invention; Figure 3 A schematic diagram of the skip connection module LDEBlock in a semi-supervised intracranial hemorrhage image segmentation method provided in an embodiment of the present invention; Figure 4 This diagram illustrates the segmentation results of a semi-supervised intracranial hemorrhage image segmentation method provided in this embodiment of the invention on an intracranial hemorrhage dataset, compared with other comparative models. Detailed Implementation

[0018] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be practiced in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0019] Current semi-supervised medical image segmentation methods are mainly divided into two categories: one is a pseudo-label-based strategy, which trains an initial model with a small amount of labeled data and generates pseudo-labels for unlabeled samples. However, this method is highly sensitive to the performance of the initial model. Once there is noise in the pseudo-labels, it will be amplified during the training process, thereby reducing the segmentation accuracy. The other category is the consistency regularization method, which requires the model to maintain consistent prediction results for the same unlabeled sample under different perturbations. Although it can improve robustness, it only acts on the output probability space and ignores the prior geometric shape and boundary information of the lesion region, making it difficult to guarantee the segmentation stability in complex tissue structures or low-contrast regions.

[0020] Therefore, the existing technology still has the following shortcomings: (1) the pseudo-label method is limited by the performance of the initial model and is prone to introducing noise accumulation in unlabeled data; (2) the consistency regularization method only focuses on the consistency of the probability space and lacks effective modeling of global shape prior and boundary information, resulting in the segmentation results being unstable in complex scenarios; and intracranial hemorrhage has the characteristics of irregular bleeding shape and small bleeding blood vessels, which poses a challenge to medical image segmentation algorithms.

[0021] To overcome the shortcomings of existing semi-supervised medical image segmentation methods, such as pseudo-label noise accumulation and limited consistency constraints, this invention proposes a semi-supervised intracranial hemorrhage segmentation method based on dual-task consistency and prior knowledge guidance. This method combines an adaptive boundary point prior knowledge module with pixel-level segmentation and geometric level set regression tasks to efficiently utilize unlabeled data, thereby improving segmentation accuracy and boundary coherence. The specific segmentation process is as follows: Figure 1 As shown, it specifically includes: Step 1: Acquire real intracranial hemorrhage images. and These represent the labeled and unlabeled datasets, respectively. The overall medical image dataset is... Among them, the labeled samples are recorded as Unlabeled samples are denoted as ;in Represents the true segmentation mask; at the voxel level, sample pairs are denoted as... .

[0022] The dataset of labeled and unlabeled images with real labels is input into the encoder, such as... Figure 1 As shown, the input to the classic Transformer is a one-dimensional serialized embedding vector, therefore, special processing is required for the input 3D image. To this end, the 3D image... Divide into a series of three-dimensional image blocks and unfold them into a vector sequence, denoted as . ;in, Indicates the resolution of the input data. This indicates the resolution of each image patch. , where is the total number of 3D blocks obtained from the partitioning, and is also the effective sequence length input to the Transformer; then the serialized image blocks are... Mapping to a K-dimensional latent embedding space is achieved through a trainable linear projection; the embedding process can be represented as:

[0023] .

[0024] in: Embed the projection matrix into the 3D block; For position embedding.

[0025] Step 2: Then, it goes through the boundary blending module RCAM, such as... Figure 2 As shown, this module aims to improve segmentation accuracy in complex boundary scenarios during intracranial hemorrhage detection. While existing Transformer-based segmentation methods can capture global dependencies, they often lack fine-grained feature representation in boundary regions, leading to blurred boundaries and incomplete reconstruction. To address this, this module introduces Refined Feature Map (RCAM) at the end of each Transformer layer of the encoder to refine the extracted features and predict prior knowledge. RCAM comprises two core components: 1) an attention map generator that takes the features output from the encoder as input and outputs an attention map f to guide model training; 2) an enhanced feature map Z that preserves boundary information. Through this design, RCAM guides the model to focus its attention on voxel regions with significant boundary changes, thereby improving the fineness and accuracy of the segmentation results. The encoder part contains a total of N cascaded blocks, resulting in N 3D blocks after embedding. Assuming the i-th block has a given input feature of... ,in We first feed it into sequences of multi-head self-attention (MSA) and multilayer perception (MLP) to collect global dependencies for coarse boundary localization; the RCAM boundary transformation features can be expressed as: .

[0026] .

[0027] .

[0028] .

[0029] in: This represents the characteristics of the encoder output. The feature map represents the prediction. and These represent element-wise addition and channel-wise multiplication, respectively.

[0030] Step 3: The features extracted by the encoder are then passed to the decoder. The image decoded by the decoder is input to the pixel-level segmentation head and the geometrically aware level set regression head for subsequent operations. The skip connection between the encoder and decoder is the skip connection module LDEBlock of this invention. Figure 3 As shown, LDEBlock performs dimensional alignment and concatenation of the encoded and decoded feature maps of each layer, then weights and fuses them through the channel attention module and the spatial attention module, and finally uses residual connections to output optimized features. This module can effectively fuse shallow texture details with deep semantic information, alleviate feature differences and provide richer context for the decoder.

[0031] The LDEBlock skip connection module addresses the insufficient fusion problem caused by feature distribution differences between the encoder and decoder in intracranial hemorrhage segmentation tasks. While shallow features retain rich boundary and texture details, their semantic expression is poor. Deep features, on the other hand, possess stronger semantic representation but lack fine-grained details. Directly fusing them using simple addition or concatenation can easily lead to insufficient information interaction, thus affecting the reconstruction quality and segmentation accuracy during the decoding stage. Therefore, this invention introduces a lightweight multi-dimensional feature enhancement mechanism at the skip connection: first, the features at the encoder and decoder are projected to alleviate distribution differences; then, key features are adaptively highlighted through joint modeling of channel attention and spatial attention, and a gating mechanism is used to suppress redundant or invalid information; finally, the fused features are combined with the decoder features in a residual manner, ensuring the stability of the decoding process and significantly improving the sufficiency of cross-layer feature interaction, thereby effectively alleviating the conflict caused by differences between shallow and deep features, enhancing boundary reconstruction capabilities, and improving segmentation precision. The LDEBlock skip connection module can be represented as: .

[0032] .

[0033] .

[0034] in: These represent the input features at the decoding and encoding ends, respectively. This represents a 1×1×1 convolution + BN + ReLU operation. This represents the projection operator 1×1×1 convolution + BN, Gate is a gated attention, and CBAM represents channel spatial attention.

[0035] Step 4: At the end of the network, the decoder connects two task output heads in parallel: the segmentation output head uses a 1×1×1 convolution to map to a voxel-level label probability map, and the regression output head predicts the level set function value for each voxel; the specific calculation process of the regression head is as follows: .

[0036] set up To segment two different pixels or voxels in a mask, It represents the zero level set and also the outline of the target object; and These represent the internal and external regions of the target object, respectively. To achieve the task transformation from the segmentation graph to the level set function graph, this invention uses a task transformation function. This function can map a segmentation mask to a corresponding level set function representation, and the output of the level set task can be obtained through... The mapping is to an approximate binary segmentation image that is comparable to the pixel segmentation output, represented as: .

[0037] Step 5: In the pixel-level segmentation head, this invention introduces an adaptive boundary point prior knowledge generation module (VGS) to improve the feature learning effect based on boundaries by introducing prior knowledge. Given that the boundary awareness module (RCAM) has difficulty accurately identifying the boundary regions that best represent the lesion structure during training, this invention pre-generates high-quality boundary prior supervision data to guide the model to learn boundary features more efficiently. This not only strengthens the expressive power of boundary regions but also accelerates the convergence process of the network through prior constraints, thereby improving the overall segmentation accuracy and stability.

[0038] Specifically, the input intracranial hemorrhage image is first processed using a traditional 3D edge detection algorithm to obtain a set of candidate boundary voxel points. Then, a 3D neighborhood is constructed with each candidate point as the center, the proportion of lesion voxels p within the neighborhood is statistically analyzed, and a significance score is calculated by combining the mean and standard deviation of neighboring voxels. ,when If the value exceeds a set threshold, the point is retained as a valid boundary point; otherwise, it is discarded. This approach aims to retain more monitoring points in irregular regions and reduce redundant points in smooth regions. Specifically: For any candidate point The volume ratio of its 20 adjacent voxels (the first 10 and the last 10) was extracted to obtain the following statistics: .

[0039] .

[0040] .

[0041] .

[0042] Set threshold When candidate points If the threshold is exceeded, the point is retained as a valid boundary point; otherwise, it is discarded. This allows for the retention of more monitoring points in irregular boundary regions and only a small number of points in smooth regions, thus achieving focused constraints on complex boundaries.

[0043] Subsequently, the selected valid boundary points Mapping to the corresponding voxel locations generates a sparse boundary supervision graph. The valid points are assigned a value of 1, and the remaining positions are assigned a value of 0, and this is used in conjunction with the network's predicted boundary map during training. Error minimization calculations are performed to guide the model to focus on blurred and irregular boundary regions, thereby improving its sensitivity to complex contours and overall segmentation accuracy.

[0044] Step Six: During training, the training loss function is: .

[0045] + .

[0046] .

[0047] .

[0048] .

[0049] Among them, segmentation loss Regression loss Calculations are performed based solely on labeled data. This represents the total number of voxels in a 3D image. This represents the boundary prediction value of the network at position i. This represents the boundary supervision value (0 or 1) at position i; while the consistency loss... It is applicable to both labeled and unlabeled data. This is used to convert the output of the level set task head into voxel-level images; this design enables joint optimization of the network under semi-supervised conditions, thereby improving the utilization efficiency of unlabeled data.

[0050] To achieve a dynamic balance between supervision loss and consistency loss, this invention further introduces a time-dependent weight function that varies with the training process, specifically in the form of: ;in, Indicates the current training steps. This represents the maximum number of training steps; this weight function can suppress the impact of consistency loss in the early stage of training and gradually enhance it in the later stage of training, thereby achieving effective fusion of supervised and unsupervised data.

[0051] like Figure 4 This diagram illustrates the segmentation results of the method of this invention and other comparative models on an intracranial hemorrhage dataset, showing the original image, ground truth annotations, and segmentation results of different methods in sequence. As can be seen, the present invention can achieve better performance in boundary delineation and detail preservation of the hemorrhage area, thereby improving the overall segmentation accuracy.

[0052] This invention improves the segmentation accuracy of blurred boundaries by embedding an RCAM module in the Transformer encoder, explicitly guiding the model to focus on boundary regions. It also enhances the feature representation capability of the decoding stage through an improved skip connection mechanism, LDEBlock, achieving efficient fusion of cross-layer features. Furthermore, it proposes a novel adaptive boundary point prior knowledge generation module, VGS, which can generate boundary point maps of varying sparseness based on boundary shape changes, allowing the supervised model to learn more boundary information. A dual-task output design combines pixel-level segmentation with geometric contour regression, ensuring both the accuracy of the segmentation results and the continuity of the boundaries. Finally, through dual-task consistency constraints, it effectively utilizes unlabeled intracranial hemorrhage images, mitigating the defects of pseudo-label noise and single consistency regularization, thus improving the overall performance of intracranial hemorrhage image segmentation.

[0053] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.

Claims

1. A semi-supervised image segmentation method for intracranial hemorrhage, characterized in that, Includes the following steps: Obtain images of the patient's intracranial hemorrhage; The bleeding image is input into a pre-trained bleeding image segmentation model to obtain the bleeding image segmentation result; the bleeding image segmentation model includes a cascaded Transformer-based encoder, a skip connection module and a Transformer-based decoder. The encoder maps each image patch to a multidimensional embedding space through a linear projection matrix to obtain embedding features. It then extracts global contextual features of the embedding features through a multi-head self-attention mechanism and a multilayer perceptron, and adds them element by element to obtain preliminary fusion features. The encoder calculates the correlation between voxels in the preliminary fusion features through a channel attention mechanism and a spatial attention mechanism, and generates an attention map. The preliminary fusion features are then multiplied with the attention map channel by channel to obtain boundary features. The skip connection module performs linear mapping transformations on the embedded features and boundary features respectively, and adds the embedded features and boundary features mapped to the same feature space to obtain the fused features; The skip connection module learns the weights of each feature channel through the channel attention mechanism to obtain channel weights, and learns the weights of each spatial location through the spatial attention mechanism to obtain spatial weights. The channel weights and spatial weights are then weighted element-wise with the fused features to obtain weighted features. Finally, the weighted features are added to the embedded features through residual connections to obtain the segmentation features. The decoder maps the segmentation feature layer to a voxel-level probability segmentation map, and uses the segmentation features to predict the level set function value of each voxel. Based on the probability segmentation map and the level set function value, the bleeding image segmentation result is obtained.

2. The semi-supervised intracranial hemorrhage image segmentation method according to claim 1, characterized in that, The training of the hemorrhage image segmentation model includes: During the training of the hemorrhage image segmentation model, a 3D edge detection algorithm is used to process the input intracranial hemorrhage image to obtain a set of candidate boundary voxel points. Then, a 3D neighborhood is constructed with each candidate point as the center, the proportion p of lesion voxels within the neighborhood is statistically analyzed, and a significance score is calculated by combining the mean and standard deviation of neighboring voxels. ,when If the value is greater than the set threshold, the point is retained as a valid boundary point; otherwise, it is discarded, so as to retain more monitoring points in irregular areas and reduce redundant points in smooth areas. For any candidate point The volume percentage of its 20 adjacent voxels is extracted to obtain a statistic, which is expressed as: ; ; ; ; Set threshold When candidate points If the value exceeds the threshold, the point is retained as a valid boundary point; otherwise, it is discarded. The selected valid boundary points are then... Mapping to the corresponding voxel locations generates a sparse boundary supervision graph. ;Boundary map predicted by minimizing the hemorrhage image segmentation model and The error between them guides the bleeding image segmentation model to learn complex boundary structures; Its training loss function is: ; + ; ; ; ; in: Indicates the segmentation loss; Indicates regression loss; Represents the total number of voxels in a 3D image; This represents the boundary prediction value of the network at position i; This represents the boundary supervision value at position i; This indicates a loss of consistency. This indicates that the output of the level set task head will be converted into a voxel-level image.

3. The semi-supervised intracranial hemorrhage image segmentation method according to claim 1, characterized in that, The acquisition of the embedded features includes: Acquire images of the patient's intracranial hemorrhage. and These represent the labeled dataset and the unlabeled dataset, respectively. The overall medical image dataset is... ; Three-dimensional images from a medical image dataset Divide into a series of three-dimensional image blocks and unfold them into a vector sequence, denoted as . ;in, Indicates the resolution of the input data. This indicates the resolution of each image patch. , represents the total number of three-dimensional blocks obtained from the partitioning; Serialized image blocks Mapping to a K-dimensional latent embedding space, achieved through a trainable linear projection, the embedding process is represented as: ; in: Represents the 3D block embedding projection matrix; This indicates positional embedding.

4. The semi-supervised intracranial hemorrhage image segmentation method according to claim 3, characterized in that, The acquisition of the boundary features includes: After embedding, there are a total of N 3D blocks. Assume that in the i-th block, the given input features are... ,in First, it is fed into the sequences of multi-head self-attention MSA and multilayer perceptual MLP to obtain preliminary fusion features of global dependency representation, which are expressed as: ; By jointly modeling channel attention and spatial attention, an attention map focused on the boundary region is generated. Attention map Preliminary fusion features after attention weighting Channel-by-channel multiplication, and preliminary fusion features through residual connections. Add to obtain boundary features , is represented as: ; ; ; in: This represents the characteristics of the encoder output. The feature map represents the prediction. and These represent element-wise addition and channel-wise multiplication, respectively.

5. The semi-supervised intracranial hemorrhage image segmentation method according to claim 4, characterized in that, The acquisition of the segmentation features includes: Linear projection is performed on the features at the encoding and decoding ends respectively, and the embedded features and boundary features mapped to the same feature space are added together to obtain the fused features. ; Suppressing fusion features using gating mechanisms Redundant information in the middle, to obtain ; By jointly modeling channel attention and spatial attention, the channel weights and spatial weights are weighted element-wise with the fused features to obtain weighted features. ; and weighted features are connected through residual connections. Adding the embedded features to obtain the segmentation features , is represented as: ; ; ; in: These represent the input features at the decoding and encoding ends, respectively. This represents a 1×1×1 convolution + BN + ReLU operation; represents the projection operator 1×1×1 convolution + BN; Gate represents a gated attention; CBAM represents channel spatial attention.

6. The semi-supervised intracranial hemorrhage image segmentation method according to claim 1, characterized in that, The process of obtaining the bleeding image segmentation result includes: The decoder connects two task output heads in parallel. The segmentation output head uses a 1×1×1 convolution to map the segmentation features to a voxel-level label probability map, and the regression output head predicts the level set function value of each voxel. The calculation of the regression output head is expressed as follows: ; in: and These represent two different pixels or voxels in the segmentation mask; Represents the zero level set; and These represent the internal and external regions of the target object, respectively. Represents the task transformation function; The transformation from the voxel-level label probability map to the level set function map is achieved through the task transformation function, and through... Mapping the level set function values ​​to an approximate binary segmentation map is represented as: 。 7. A semi-supervised intracranial hemorrhage image segmentation device, characterized in that, include: The image module is used to acquire images of the patient's intracranial hemorrhage. The segmentation module is used to input the bleeding image into a pre-trained bleeding image segmentation model to obtain the bleeding image segmentation result; wherein, the bleeding image segmentation model includes a cascaded Transformer-based encoder, a skip connection module and a Transformer-based decoder; The feature extraction module involves the encoder mapping each image patch to a multidimensional embedding space using a linear projection matrix to obtain embedding features. Global context features of these embedding features are extracted using a multi-head self-attention mechanism and a multilayer perceptron, and then added element-wise to obtain preliminary fusion features. The encoder then calculates the correlation between voxels in the preliminary fusion features using channel attention and spatial attention mechanisms, generating an attention map. The preliminary fusion features are then multiplied channel-wise with the attention map to obtain boundary features. The skip connection module performs linear mapping transformations on the embedded features and boundary features respectively, and adds the embedded features and boundary features mapped to the same feature space to obtain the fused features; the skip connection module learns the weight of each feature channel through the channel attention mechanism to obtain the channel weight, and learns the weight of each spatial position through the spatial attention mechanism to obtain the spatial weight, and adds the channel weight and spatial weight to the fused features element by element to obtain the weighted features, and adds the weighted features to the embedded features through the residual connection to obtain the segmentation features; The decoding module maps the segmentation feature layer to a voxel-level probability segmentation map, and simultaneously uses the segmentation features to predict the level set function value of each voxel. Based on the probability segmentation map and the level set function value, the bleeding image segmentation result is obtained.

8. An electronic device, characterized in that, include: Memory and processor; The memory is used to store computer programs; When the processor executes the computer program stored in the memory, it implements the steps of the semi-supervised intracranial hemorrhage image segmentation method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, Used to store a computer program, which, when executed by a processor, implements the steps of a semi-supervised intracranial hemorrhage image segmentation method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • A boundary-aware double-attention-guided liver segment segmentation method

    CN113344951A

  • Medical image segmentation method based on u-net

    US20220309674A1