A dual-path mamba-unet-based cerebral hemorrhage auxiliary diagnosis method

By constructing a dual-path Mamba-unet model, utilizing symmetric reference maps and difference maps, and combining anatomical and contextual feature encoders, the problem of the separation between lesion localization and subtype classification in the diagnosis of cerebral hemorrhage was solved, achieving high-precision lesion localization and subtype classification, thus improving the practicality and reliability of diagnosis.

CN122392880APending Publication Date: 2026-07-14UNIV OF ELECTRONICS SCI & TECH OF CHINA

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
UNIV OF ELECTRONICS SCI & TECH OF CHINA
Filing Date
2026-04-14
Publication Date
2026-07-14

Smart Images

  • Figure CN122392880A_ABST
    Figure CN122392880A_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of medical image processing and artificial intelligence auxiliary diagnosis, and provides a brain hemorrhage auxiliary diagnosis method based on a double-path mamba-unet, which on one hand proposes a self-reference symmetric segmentation method, explicitly utilizes the bilateral symmetry prior of the brain, constructs a patient-specific symmetric reference map, provides anatomical constraints for lesion positioning, and improves the positioning sensitivity and accuracy; at the same time, an adaptive gating module is designed to dynamically distinguish and process the inherent physiological asymmetry of the brain and the pathological asymmetry caused by brain hemorrhage, reduce the risk of misjudging the inherent asymmetry tissue as a lesion, and improve the reliability of the positioning result; on the other hand, a stage fusion model is constructed to realize the full interaction and collaborative optimization of features between the lesion positioning and subtype diagnosis tasks, effectively avoid the error propagation and feature fragmentation problem, and significantly reduce the model reasoning delay; in summary, the application solves the problem that a single task model cannot simultaneously consider spatial accuracy and semantic discrimination in brain hemorrhage diagnosis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image processing and artificial intelligence-assisted diagnosis technology, specifically providing a method for assisted diagnosis of cerebral hemorrhage based on dual-path Mamba-unet. Background Technology

[0002] Cerebral hemorrhage is a disease caused by the rupture of blood vessels in the brain, resulting in bleeding. Due to its rapid onset and extremely high mortality rate, it seriously threatens the health and lives of middle-aged and elderly people. Rapid and accurate diagnosis of cerebral hemorrhage and differentiation of its subtypes are crucial for developing treatment plans, accurately assessing prognosis, and effectively reducing patient mortality and disability rates. Computed tomography (CT) is the preferred imaging method for cerebral hemorrhage, directly displaying changes in the internal structure of brain tissue. It plays a central role in various clinical scenarios, including rapid screening, lesion localization, disease monitoring, and treatment planning. However, the current diagnostic process for cerebral hemorrhage heavily relies on manual analysis by radiologists, facing problems such as time-consuming interpretation, subjective differences, and missed diagnoses of subtle lesions, greatly limiting diagnostic efficiency and accuracy. Deep learning-based cerebral hemorrhage auxiliary diagnostic technology automatically identifies and locates diagnostically significant hemorrhage lesions from patient CT images. This not only enables the screening of key risk factors but also accurately determines the specific subtype of cerebral hemorrhage, providing a powerful tool for auxiliary diagnosis.

[0003] Spontaneous intracerebral hemorrhage commonly occurs in deep gray matter nuclei, subcortical white matter of the cerebral lobe, and the cerebellum. These areas typically exhibit clear bilateral symmetry structurally. However, the formation of hemorrhagic lesions disrupts this local anatomical symmetry. Therefore, in clinical diagnosis, utilizing the prior knowledge of bilateral symmetry of the brain to pinpoint abnormal areas is a crucial initial diagnostic strategy. Early intracerebral hemorrhage often presents as small hematomas or oozing, with mild imaging signs. For example, amyloid angiopathy often presents as multiple microbleeds, which are tiny and appear as punctate low-signal areas on imaging. If punctate signals are observed on one side of the brain while no signal is seen in the symmetrical area on the other side, or if there are significant differences in the number and location of signals between the two sides, it indicates that a hemorrhagic lesion may be present at the location of the abnormal signal. Therefore, detecting these tiny lesions heavily relies on high image contrast and the model's ability to identify subtle asymmetric changes.

[0004] However, existing diagnostic models for cerebral hemorrhage still have many limitations: on the one hand, they ignore the knowledge of brain symmetry, leading to inaccurate lesion segmentation or misjudgment of normal physiological asymmetry; on the other hand, single-task design separates lesion localization and diagnosis, with localization models lacking diagnostic target guidance and classification models losing spatial information and failing to locate accurately, resulting in impractical or unreliable results. For example, the literature "Tingting Li, Xingwei An, Yang Di, et al. SrSNet: Accuratesegmentation of stroke lesions by a two-stage segmentation framework with asymmetry information[J]. Expert Systems with Applications. 2024, 254,124329." proposes the SrSNet two-stage segmentation framework, which explicitly utilizes the prior knowledge of bilateral brain symmetry, designs a feature-level symmetric attention module and an image-level difference map input, and integrates the global modeling of Transformer and the local refinement capability of CNN. On the ISLES22 dataset, the Dice score reaches 0.7915 and the recall rate reaches 0.7832.

[0005] In summary, the existing technologies have the following shortcomings: 1) They lack effective modeling of the bilateral symmetry of the brain. On the one hand, they fail to explicitly incorporate prior knowledge of the bilateral symmetry of the brain, resulting in a lack of effective constraints and insufficient segmentation accuracy when locating lesions. On the other hand, even when attempting to utilize symmetry methods, they often overlook asymmetry caused by normal physiological changes in the brain, leading to misjudgments of normal tissues and reducing the reliability of lesion localization. 2) The model architecture design has significant limitations. Single-task lesion localization models lack high-level semantic guidance for the final diagnostic goal, making it easy for their lesion localization results to become disconnected from clinical decision-making needs. Single-task classification models, on the other hand, ignore the spatial structural information of lesions and lack pixel-level localization capabilities, making them susceptible to background interference and prone to misjudgments, and also unable to meet the clinical need for visual and accurate lesion localization. Summary of the Invention

[0006] The purpose of this invention is to address the numerous deficiencies in the aforementioned background technology by proposing a dual-path Mamba-unet-based auxiliary diagnostic method for cerebral hemorrhage. This method achieves simultaneous lesion localization and subtype classification by constructing a stage fusion model.

[0007] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0008] A method for auxiliary diagnosis of cerebral hemorrhage based on dual-path Mamba-unet, characterized by the following steps:

[0009] An initial symmetric reference map is generated by combining a flipping operation with the original observation image. A lightweight neural network is used to perform self-supervised optimization on the initial symmetric reference map to obtain the symmetric reference map. The basic difference map between the original observation image and the symmetric reference map is calculated.

[0010] Using the baseline difference map as input, pathologically sensitive features are extracted by the anatomical feature encoder;

[0011] Using the original observed image as input, the initial context features are extracted by the context feature encoder;

[0012] The anatomical-context feature fusion module fuses pathological sensitive features and contextual features to obtain anatomical features for lesion localization and contextual features for subtype diagnosis.

[0013] Anatomical features are input into the anatomical feature decoder to obtain lesion localization results; contextual features are flattened into vectors and input into a multilayer perceptron to obtain a cerebral hemorrhage subtype diagnostic prediction vector.

[0014] Furthermore, the initial symmetric reference diagram is represented as follows: ,in, Represents the original observed image. Indicates a flip operation. This represents the initial symmetric reference diagram.

[0015] Furthermore, the lightweight neural network employs the U-Net network.

[0016] Furthermore, the basic difference diagram is represented as follows: ,in, Represents the original observed image. Represents the initial symmetry reference diagram. This represents a lightweight neural network. This represents a basic difference diagram.

[0017] Furthermore, in the anatomical feature encoder:

[0018] No. Layer anatomical feature encoder receives the first Output of layer anatomical feature encoder As input, Entering the After the layer-by-layer anatomical feature encoder, global average pooling is used for downsampling, and asymmetric feature extraction is performed on the downsampling results to obtain asymmetric features. :

[0019] ,

[0020] in, For Gaussian kernel, Indicates average pooling. This represents a 3×3 convolutional layer. Represents the ReLU activation function;

[0021] Then calculate the regional stability to obtain the stability map. : ,in, Temperature coefficient;

[0022] Using gating enhancement mechanisms to obtain pathologically sensitive features : .

[0023] Furthermore, in the context feature encoder:

[0024] No. The layer context feature encoder receives the first Features output by layer context encoder As input, Entering the After the layer context encoder, global average pooling is used for downsampling. The downsampling results are divided into patches of equal size, and each patch is flattened into a 1D feature vector. The feature vectors of all patches are concatenated, and positional encoding is added to each feature vector according to the patch division method to obtain the feature matrix. :

[0025] ,

[0026] in, This represents the 1D feature vector after the i-th patch is flattened. Represents the position encoding vector. This indicates the concatenation of eigenvectors;

[0027] Multi-scale patch partitioning is introduced, using patch sizes of p×p, 2p×2p, and 4p×4p respectively, where p is the smallest patch size. Through multi-scale patch partitioning, feature matrices are obtained under the three partition sizes. , , ;

[0028] VisionMamba is used to process the feature matrix , , The process involves processing the feature vectors, then restoring each feature vector to a patch of the same size, and finally reverting them to their original positions according to the order in which they were partitioned, resulting in the feature matrix. , , :

[0029] ,

[0030] Where j takes the values ​​1, 2, or 3. This means that each one-dimensional feature vector output by VisionMamba is reshaped into a two-dimensional patch representation of the corresponding size; This means that all the recovered patches are reassembled back to their spatial positions in the original image according to the original order of the patch division, resulting in a complete feature map;

[0031] feature matrix , , The initial context features are obtained through fusion. :

[0032] ,

[0033] ,

[0034] in, and These are the weight matrices.

[0035] Furthermore, in the anatomical-context feature fusion module:

[0036] The anatomy-context feature fusion module simultaneously receives features output from the last layer of the anatomy feature encoder. Context features output by the last layer context feature encoder As input, the fused features are obtained through channel fusion. :

[0037] ,

[0038] in, This represents the element-wise dot product operation. This represents the concatenation of eigenvectors. This represents a 1×1 convolutional layer. Represents the Sigmoid function;

[0039] Then, fusion features are obtained through adaptive fusion. :

[0040] ,

[0041] in, Represents the adaptive weight vector. Represents a k×k convolutional layer;

[0042] use To each and Feature enhancement is performed to obtain anatomical features for lesion localization. Contextual features used for subtype diagnosis : , .

[0043] Furthermore, the lightweight neural network, anatomical feature encoder, contextual feature encoder, anatomical-contextual feature fusion module, anatomical feature decoder, and multilayer perceptron together constitute a dual-path Mamba-unet-based auxiliary diagnostic model for cerebral hemorrhage, with a model training loss... for:

[0044] ,

[0045] in, Indicates self-monitoring loss, This indicates Dice's loss. Represents the multivariate cross-entropy loss. and These are the weight parameters for Dice loss and multivariate cross-entropy loss;

[0046] ,

[0047] in, Represents the original observed image. Represents the initial symmetry reference diagram. This represents a lightweight neural network. Indicates the weighting factor. Represents the gradient operator;

[0048] ,

[0049] in, This indicates the lesion localization result. Labels indicating the location of lesions;

[0050] ,

[0051] in, This indicates the diagnostic prediction results for different subtypes of cerebral hemorrhage. Indicates category label, Indicates the number of categories.

[0052] Based on the above technical solution, the beneficial effect of the present invention is that it provides an auxiliary diagnostic method for cerebral hemorrhage based on dual-path Mamba-unet, which has the following advantages:

[0053] 1) This invention proposes a self-reference symmetric segmentation method, which explicitly utilizes the prior knowledge of bilateral symmetry of the brain. By constructing a patient-specific symmetric reference map, it provides anatomical constraints for lesion localization, thereby improving localization sensitivity and accuracy. At the same time, an adaptive gating module is designed to dynamically distinguish and process the inherent physiological asymmetry of the brain and the pathological asymmetry caused by cerebral hemorrhage, reducing the risk of misjudging inherently asymmetrical tissues as lesions and improving the reliability of localization results.

[0054] 2) This invention constructs a phased fusion model, abandoning the traditional two-stage process, and simultaneously realizes accurate lesion localization and rapid classification of hemorrhage subtypes; the core lies in the introduction of a multi-scale fusion module, which deeply integrates anatomical features responsible for fine localization with contextual features containing high-level semantics, realizing full interaction and collaborative optimization of features between lesion localization and subtype diagnosis tasks, effectively avoiding error propagation and feature fragmentation problems, and significantly reducing model inference latency;

[0055] In summary, this invention provides a dual-path Mamba-unet-based auxiliary diagnostic method for cerebral hemorrhage, which solves the problem that single-task models in cerebral hemorrhage diagnosis cannot simultaneously achieve spatial accuracy and semantic discrimination. By modeling the bilateral symmetry of the brain, it captures asymmetric features. Compared with current cerebral hemorrhage diagnostic methods, it not only effectively improves model accuracy but also achieves synergistic optimization of lesion localization and subtype classification, thereby enhancing diagnostic practicality and clinical reliability. Attached Figure Description

[0056] Figure 1 This is a schematic diagram of the structure of the cerebral hemorrhage auxiliary diagnostic model based on dual-path mamba-unet in this invention.

[0057] Figure 2 This is a schematic diagram of the anatomical feature encoder in this invention.

[0058] Figure 3 This is a schematic diagram of the context feature encoder in this invention. Detailed Implementation

[0059] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments.

[0060] This embodiment proposes a dual-path Mamba-unet-based auxiliary diagnostic method for intracerebral hemorrhage, mainly including steps such as difference map calculation, anatomical feature extraction, contextual feature extraction, and feature fusion. It is implemented based on an auxiliary diagnostic model for intracerebral hemorrhage. Figure 1 As shown.

[0061] 1. A dual-path Mamba-unet-based auxiliary diagnostic model for cerebral hemorrhage;

[0062] like Figure 1 As shown, the model consists of two paths: an anatomical path and a contextual path. The anatomical path receives a symmetric reference map calculated from the difference map and processes it through an anatomical feature encoder to obtain anatomical features. The anatomical feature encoder is as follows: Figure 2 As shown; the context path receives the original image and processes it through a context feature encoder to obtain context features. The context feature encoder is as follows: Figure 3 As shown, the anatomical features and contextual features output by the last encoder are input into the fusion module for fusion, the correlation between the anatomical features and contextual features is mined, and the original anatomical features and contextual features are enhanced through residual connections. Finally, the enhanced anatomical features and contextual features are input into the decoder path and MLP respectively to obtain the lesion localization results and the cerebral hemorrhage subtype diagnosis results.

[0063] 2. Calculation of the difference plot;

[0064] To differentiate between cerebral hemorrhage lesions and normal brain tissue, doctors in clinical practice typically use symmetrical comparisons of the two hemispheres of the brain; assuming a given original observation image... (CT image), satisfies ,in, This indicates asymmetric noise caused by physiological asymmetry. This indicates asymmetric noise caused by pathological asymmetry. Representing the symmetrical parts of brain structures, that is, the ideal structures that conform to bilateral symmetry after eliminating all asymmetric noise; in order to obtain from observed images Extracting asymmetric information and This embodiment attempts to solve for an optimal symmetric reference diagram. ;

[0065] By minimizing the reconstruction constraints and symmetry constraints, the influence of noise is minimized, and the optimization objective is shown in Equation (1):

[0066] (1)

[0067] The first part consists of reconstruction constraints, and the second part consists of symmetry constraints. Indicates the observed image The image obtained after performing a left-right flip operation; under the current optimization objective... It has a closed-form solution, which can be obtained by solving the gradient of the optimization objective, as shown in equation (2):

[0068] (2)

[0069] We can obtain, ;

[0070] Although the initial symmetry reference map possesses basic anatomical rationality, its static features still have certain limitations. On the one hand, bilateral averaging may lead to excessive smoothing of subtle anatomical structures, resulting in reduced sensitivity for small lesions. On the other hand, fixed mathematical formulas cannot adapt to individual specificities, and errors may be amplified in specific populations. To alleviate the limitations of static features, a self-supervised optimization mechanism is introduced, using a lightweight learnable network to optimize the initial symmetry reference map. Input into a lightweight neural network In the U-Net network, an optimized symmetric reference graph is obtained. In this process, this embodiment introduces a self-supervised loss, which is calculated as shown in equation (3):

[0071] (3)

[0072] in, As a weighting factor, express The gradient; the self-supervised loss consists of two parts. The first part is the reconstruction term, which preserves patient specificity and anatomical diversity by using the patient's own image as a reference without forcibly specifying a template. The second part is the smoothing regularization, which enhances the true edge gradient by eliminating spurious small gradients, concentrating gradient energy, suppressing over-smoothing, and enhancing anatomical details. The self-supervised design allows the model to achieve better convergence with fewer iterations, effectively accelerating the training speed.

[0073] From the original observation image Subtract the symmetrical reference image To obtain the basic difference map The data is input into the first-layer anatomical feature encoder. The calculation is shown in formula (4):

[0074] (4)

[0075] High-value areas may contain cerebral hemorrhage lesions or natural asymmetry of the brain, while low-value areas are more likely to contain symmetrical, healthy brain tissue.

[0076] 3. Anatomical feature encoder;

[0077] like Figure 2 As shown, the l-th layer anatomical feature encoder receives the output of the (l-1)-th layer anatomical feature encoder. As input, After entering the anatomical feature encoder of the l-th layer, global average pooling is first used for downsampling, which halves the resolution. Then, asymmetric feature extraction is performed on the downsampled result, and the calculation formula is shown in Equation (5):

[0078] (5)

[0079] in, For Gaussian kernel, Indicates average pooling. This represents a 3×3 convolution. Represents the ReLU activation function;

[0080] Formula (5) firstly extracts the original features of the basic difference map through convolution, including low-frequency physiological variation features and high-frequency pathological mutation features; in order to obtain pathological features related to diagnosis, Gaussian blur is used to extract low-frequency global background differences and separate them from the original features; finally, negative noise is eliminated by ReLU activation function to obtain asymmetric features. ;

[0081] In order to extract asymmetric features The pathological asymmetry features caused by cerebral hemorrhage were extracted. In this embodiment, an adaptive gating mechanism was designed. First, the regional stability was calculated according to equation (6) to obtain the stability map. :

[0082] (6)

[0083] in, Temperature coefficient; Used for quantification Asymmetric intensity at location, The smaller the size, the greater the likelihood of bleeding in the corresponding area. The larger the value, the greater the likelihood that the corresponding area is a healthy area. The moderate area may be an area of ​​inherent physiological asymmetry in the brain;

[0084] The pathological sensitivity features are obtained using a gating enhancement mechanism, and the calculation formula is shown in Equation (7):

[0085] (7)

[0086] The first term represents the preservation of original differential features for features that may be bleeding areas; the second term represents the use of convolution to smooth asymmetric features and suppress noise for healthy areas. Through this adaptive gating mechanism, the model can automatically adjust the suppression intensity according to local differences, effectively extracting pathologically sensitive features.

[0087] 4. Contextual feature encoder;

[0088] like Figure 3 As shown, the l-th layer context feature encoder receives the features output by the (l-1)-th layer context encoder. As input, the first-layer context feature encoder receives the input image X as input, i.e. ;when After entering the l-th layer context feature encoder, global average pooling is first used for downsampling, reducing the resolution to half of the original. Then, the downsampled result is divided into patches of equal size, and each patch is flattened into a 1D feature vector. The feature vectors of all patches are concatenated, and positional encoding is added to each feature vector according to the patch division method to obtain the feature matrix. As input for subsequent calculations, the calculation formulas are shown in equations (8) and (9):

[0089] (8)

[0090] (9)

[0091] in, This represents the 1D feature vector after the i-th patch is flattened. Represents the position encoding vector;

[0092] Because lesions in cerebral hemorrhage vary in size, using smaller patches may result in large lesions being segmented into different patches, preventing the model from fully extracting local features. Conversely, using larger patches may cause small lesions to be "submerged" in a large background, making it difficult for the model to identify and extract their features. To avoid insufficient feature extraction due to fixed-size patch partitioning, a multi-scale patch partitioning method is introduced in the context feature encoder. Patch partitioning is performed using sizes of p×p, 2p×2p, and 4p×4p, respectively, for feature extraction of small, medium, and large lesions, where p is a hyperparameter representing the minimum patch size. Through multi-scale patch partitioning, three different feature matrices are obtained. , , ;

[0093] To effectively model the long-distance dependencies between lesions at multiple scales, this embodiment uses VisionMamba as the core module for context feature encoding. Compared with the traditional VisionTransformer (ViT), VisionMamba achieves linear computational complexity through the State Space Model (SSM), significantly reducing the computational burden of long sequence modeling. After processing by VisionMamba blocks, each feature vector is restored to a patch of the same size, and it is restored to its original position according to the order in which the patch was divided. The calculation formula is shown in Equation (10).

[0094] (10)

[0095] Where j takes values ​​of 1, 2, and 3, respectively corresponding to , , The calculation formula that has been processed by VisionMamba and restored to its original structure;

[0096] Patch segmentation at different scales captures complementary features of lesions of different sizes. Direct and simple concatenation can lead to feature redundancy and semantic conflicts. Therefore, this embodiment designs an adaptive multi-scale aggregation mechanism, which concatenates the restored multi-scale features by channel and applies channel attention to the concatenated result to obtain the fused contextual features. As the output of the l-th layer context encoder, the calculation formula is shown in equations (11) and (12):

[0097] (11)

[0098] (12)

[0099] in, and These are the weight matrices of the two fully connected layers.

[0100] 5. Anatomical-contextual feature fusion module;

[0101] While anatomical features can capture detailed features, they are susceptible to noise interference, leading to missed detection of minute lesions. Contextual features, while capable of modeling contextual relationships, suffer from reduced resolution, weakening the accuracy of anatomical boundary localization. This separation further results in insufficient discovery of key pathological patterns. To address this, this invention proposes an anatomical-contextual feature fusion module. First, anatomical features and contextual features are concatenated along the channel dimension. Then, adaptive channel fusion is used to compress channels and suppress noise. Finally, multi-scale spatial attention is used to collaboratively optimize the representation of local details and global context.

[0102] The anatomy-context feature fusion module simultaneously receives features output from the last layer of the anatomy feature encoder. and the features output by the last layer context feature encoder As input, first and The layers are spliced ​​by channel to facilitate subsequent fusion processing; where L is a hyperparameter of the model, representing the maximum number of layers in the encoder; experimental verification shows that the model performance is optimal when L=4, therefore, in this invention, L is set to 4;

[0103] To avoid insufficient fusion of anatomical and contextual features due to channel fragmentation during spatial fusion, adaptive channel fusion is first performed on the concatenated features to lay the foundation for subsequent deep fusion at the spatial level. Specifically, 1×1 point convolution is used to process the concatenated features, and then adaptive channel fusion weights are obtained through Sigmoid activation. The fusion weights are then used to perform channel fusion on the features. The calculation formula is shown in Equation (13).

[0104] (13)

[0105] in, This represents the element-wise dot product operation;

[0106] To address the core challenge of lesion scale differences, multi-scale spatial fusion is further introduced, extracting multi-granularity spatial context through parallel multi-scale convolutional layers; specifically, convolutional pairs of sizes 3×3, 5×5, 7×7, and 9×9 are used respectively. The process is performed to obtain spatial fusion features at different scales. Then, the fusion features at different scales are spliced ​​together by channel and adaptively fused. The calculation formula is shown in Equation (14):

[0107] (14)

[0108] in, An adaptive weight vector;

[0109] To preserve the unique characteristics of anatomical and contextual features and prevent excessive loss of detail during feature fusion, residual connections are ultimately used. To each and Feature enhancement is performed to obtain the final anatomical features used for lesion localization and subtype diagnosis. and context features The calculation formulas are shown in equations (15) and (16):

[0110] (15)

[0111] (16)

[0112] 6. Loss function;

[0113] Anatomical features The input is fed into the decoder path (which uses a symmetrical structure with the anatomical feature encoder) to obtain the lesion localization result. The Dice loss function is used to optimize the lesion localization results, as shown in equation (17):

[0114] (17)

[0115] in, This indicates the lesion localization result. Labels indicating the location of lesions;

[0116] context features Flattened into a vector, it is input into an MLP to obtain a diagnostic prediction vector for the subtype of cerebral hemorrhage. The multivariate cross-entropy loss function is adopted, as shown in equation (18):

[0117] (18)

[0118] in, Represents the classification probability vector The c-th element value, Indicates category label, Indicates the number of categories;

[0119] The overall loss function of the model consists of three parts, namely, the self-supervised loss. Dice loss Multivariate cross-entropy loss The overall loss function is shown in equation (19):

[0120] (19)

[0121] in, and These are the weight parameters for Dice loss and multivariate cross-entropy loss.

[0122] In summary, this invention solves the problem that single-task models in the diagnosis of cerebral hemorrhage cannot simultaneously achieve both spatial accuracy and semantic discrimination. By modeling the bilateral symmetry of the brain, it captures asymmetric features. Compared with current methods for cerebral hemorrhage diagnosis, this invention not only effectively improves model accuracy but also achieves synergistic optimization of lesion localization and subtype classification, thereby enhancing diagnostic practicality and clinical reliability.

[0123] The above description is merely a specific embodiment of the present invention. Any feature disclosed in this specification may be replaced by other equivalent or similar features unless otherwise specified. All disclosed features, or steps in all methods or processes, may be combined in any way except for mutually exclusive features and / or steps.

Claims

1. A method for auxiliary diagnosis of cerebral hemorrhage based on dual-path Mamba-unet, characterized in that, Includes the following steps: An initial symmetric reference map is generated by combining a flipping operation with the original observation image. A lightweight neural network is used to perform self-supervised optimization on the initial symmetric reference map to obtain the symmetric reference map. The basic difference map between the original observation image and the symmetric reference map is calculated. Using the baseline difference map as input, pathologically sensitive features are extracted by the anatomical feature encoder; Using the original observed image as input, the initial context features are extracted by the context feature encoder; The anatomical-context feature fusion module fuses pathological sensitive features and contextual features to obtain anatomical features for lesion localization and contextual features for subtype diagnosis. Anatomical features are input into the anatomical feature decoder to obtain lesion localization results; contextual features are flattened into vectors and input into a multilayer perceptron to obtain a cerebral hemorrhage subtype diagnostic prediction vector.

2. The method for auxiliary diagnosis of cerebral hemorrhage based on dual-path Mamba-unet according to claim 1, characterized in that, The initial symmetric reference diagram is represented as follows: ,in, Represents the original observed image. Indicates a flip operation. This represents the initial symmetric reference diagram.

3. The method for auxiliary diagnosis of cerebral hemorrhage based on dual-path Mamba-unet according to claim 1, characterized in that, The lightweight neural network uses the U-Net network.

4. The method for auxiliary diagnosis of cerebral hemorrhage based on dual-path Mamba-unet according to claim 1, characterized in that, The basic difference diagram is represented as follows: ,in, Represents the original observed image. Indicates the initial symmetry reference diagram. This represents a lightweight neural network. This represents a basic difference diagram.

5. The method for auxiliary diagnosis of cerebral hemorrhage based on dual-path Mamba-unet according to claim 1, characterized in that, In the anatomical feature encoder: No. Layer anatomical feature encoder receives the first Output of layer anatomical feature encoder As input, Entering the After the layer-by-layer anatomical feature encoder, global average pooling is used for downsampling, and asymmetric feature extraction is performed on the downsampling results to obtain asymmetric features. : , in, For Gaussian kernel, Indicates average pooling. This represents a 3×3 convolutional layer. Represents the ReLU activation function; Then calculate the regional stability to obtain the stability map. : ,in, Temperature coefficient; Using gating enhancement mechanisms to obtain pathologically sensitive features : .

6. The method for auxiliary diagnosis of cerebral hemorrhage based on dual-path Mamba-unet according to claim 1, characterized in that, In the context feature encoder: No. The layer context feature encoder receives the first Features output by layer context encoder As input, Entering the After the layer context encoder, global average pooling is used for downsampling. The downsampling results are divided into patches of equal size, and each patch is flattened into a 1D feature vector. The feature vectors of all patches are concatenated, and positional encoding is added to each feature vector according to the patch division method to obtain the feature matrix. : , in, This represents the 1D feature vector after the i-th patch is flattened. Represents the position encoding vector. This indicates the concatenation of eigenvectors; Multi-scale patch partitioning is introduced, using patch sizes of p×p, 2p×2p, and 4p×4p respectively, where p is the smallest patch size. Through multi-scale patch partitioning, feature matrices are obtained under the three partition sizes. , , ; VisionMamba is used to process the feature matrix , , The process involves processing the feature vectors, then restoring each feature vector to a patch of the same size, and finally reverting them to their original positions according to the order in which they were partitioned. This process is repeated for the feature matrix. , , : , Where j takes the values ​​1, 2, or 3. This means that each one-dimensional feature vector output by VisionMamba is reshaped into a two-dimensional patch representation of the corresponding size. This means that all restored patches are reassembled back to their original spatial positions in the original image according to the original order in which they were divided. feature matrix , , The initial context features are obtained through fusion. : , , in, and These are the weight matrices.

7. The method for auxiliary diagnosis of cerebral hemorrhage based on dual-path Mamba-unet according to claim 1, characterized in that, In the anatomical-context feature fusion module: The anatomy-context feature fusion module simultaneously receives features output from the last layer of the anatomy feature encoder. Context features output by the last layer context feature encoder As input, the fused features are obtained through channel fusion. : , in, This represents the element-wise dot product operation. This represents the concatenation of eigenvectors. This represents a 1×1 convolutional layer. Represents the Sigmoid function; Then, fusion features are obtained through adaptive fusion. : , in, Represents the adaptive weight vector. Represents a k×k convolutional layer; use To each and Feature enhancement is performed to obtain anatomical features for lesion localization. Contextual features used for subtype diagnosis : , .

8. The method for auxiliary diagnosis of cerebral hemorrhage based on dual-path Mamba-unet according to claim 1, characterized in that, The lightweight neural network, anatomical feature encoder, contextual feature encoder, anatomical-contextual feature fusion module, anatomical feature decoder, and multilayer perceptron together constitute a dual-path Mamba-unet-based auxiliary diagnostic model for cerebral hemorrhage. The model training loss... for: , in, Indicates self-monitoring loss, This indicates Dice's loss. Represents the multivariate cross-entropy loss. and These are the weight parameters for Dice loss and multivariate cross-entropy loss; , in, Represents the original observed image. Indicates the initial symmetry reference diagram. This represents a lightweight neural network. Indicates the weighting factor. Represents the gradient operator; , in, This indicates the lesion localization result. Labels indicating the location of lesions; , in, This indicates the diagnostic prediction results for different subtypes of cerebral hemorrhage. Indicates category label, Indicates the number of categories.