Training method of brain hematoma segmentation model, brain hematoma segmentation method and device
By combining brain structure recognition models and neural network models and utilizing prior constraints of anatomical structures, the problem of inaccurate segmentation of cerebral hematoma in existing technologies has been solved, achieving higher segmentation accuracy and stability, and making it suitable for automatic segmentation of cerebral hematoma.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- UNION STRONG (BEIJING) TECH CO LTD
- Filing Date
- 2026-05-06
- Publication Date
- 2026-07-14
AI Technical Summary
Existing methods for segmenting cerebral hematomas are susceptible to noise, calcification, and bone artifacts, leading to missegmentation or omissions. They also lack explicit constraints on human anatomical structures, resulting in inaccurate segmentation.
By introducing anatomical priors (brain parenchyma mask, ventricle mask, and skull mask) from the brain structure recognition model, and combining them with a neural network model, the parameters are iteratively updated using the target loss value, providing explicit anatomical spatial constraints and improving the anatomical rationality and accuracy of segmentation.
It significantly improved the accuracy of cerebral hematoma segmentation, reduced the probability of ventricles, skull, and artifacts being misidentified as hematomas, enhanced the anatomical rationality and clinical reliability of the segmentation results, and improved the segmentation stability and generalization ability of the model in complex brain cases.
Smart Images

Figure CN122391253A_ABST
Abstract
Description
Technical Field
[0001] This application generally relates to the field of medical image processing technology. More specifically, this application relates to a training method for a brain hematoma segmentation model, a brain hematoma segmentation method, and an apparatus. Background Technology
[0002] Intracerebral hemorrhage (ICH) is a common acute cerebrovascular disease with high mortality and disability rates. Clinicians typically need to quickly determine the location, volume, and morphological characteristics of the hematoma using brain CT images to determine a treatment plan (e.g., conservative treatment or surgical intervention). Therefore, accurate and rapid automated segmentation of the hematoma area is of significant clinical importance.
[0003] Currently, commonly used methods for segmenting brain hematomas are traditional image processing methods based on thresholding or region growing, such as segmentation methods based on Hounsfield Unit (HU) thresholding. Specifically, high-density hematoma regions are identified by setting a fixed grayscale threshold. However, this method is susceptible to noise, calcification, and bone artifacts, leading to missegmentation or missed segmentation.
[0004] In view of this, there is an urgent need to provide a training method for a brain hematoma segmentation model, a brain hematoma segmentation method, and an apparatus, so as to achieve high accuracy in brain hematoma segmentation when using a trained brain hematoma segmentation model. Summary of the Invention
[0005] In order to at least solve one or more of the technical problems mentioned above, this application proposes a training method for a brain hematoma segmentation model, a brain hematoma segmentation method, and an apparatus in several aspects.
[0006] In a first aspect, this application provides a training method for a brain hematoma segmentation model, comprising: acquiring a three-dimensional brain training image and a three-dimensional brain labeled image; wherein the three-dimensional brain labeled image is obtained by labeling the three-dimensional brain training image; inputting the three-dimensional brain training image into a trained brain structure recognition model for region recognition to obtain a brain parenchyma mask, a ventricle mask, and a skull mask; and inputting the three-dimensional brain training image into a neural network model to obtain a hematoma probability map, and determining a hematoma region based on the hematoma probability map; wherein the hematoma probability map includes the probability that each voxel on the three-dimensional brain training image belongs to a brain hematoma; determining a target loss value based on the hematoma region, the three-dimensional brain labeled image, the brain parenchyma mask, the ventricle mask, and the skull mask; adjusting the parameters of the neural network model based on the target loss value, and returning to execute the step of inputting the three-dimensional brain training image into the neural network model until a set termination condition is met to obtain a brain hematoma segmentation model.
[0007] In some embodiments, after obtaining the three-dimensional brain training image, the method further includes: performing at least one preprocessing operation on the three-dimensional brain training image, namely resampling, denoising, and normalization, to obtain a preprocessed three-dimensional brain training image.
[0008] In some embodiments, determining the hematoma region based on the hematoma probability map includes: filtering voxels on the hematoma probability map based on a set probability threshold to select hematoma regions from the hematoma probability map.
[0009] In some embodiments, determining the target loss value based on the hematoma region, the three-dimensional brain annotated image, the brain parenchyma mask, the ventricle mask, and the skull mask includes: calculating a first loss value based on the hematoma region and the three-dimensional brain annotated image; calculating a second loss value based on the hematoma region, the brain parenchyma mask, the ventricle mask, and the skull mask; and determining the target loss value based on the first loss value and the second loss value.
[0010] In some embodiments, calculating the second loss value based on the hematoma region, the brain parenchyma mask, the ventricular mask, and the skull mask includes: calculating a first penalty term based on the hematoma region and the brain parenchyma mask; the first penalty term representing the sum of probabilities of voxels located outside the brain parenchyma mask on the hematoma region; calculating a second penalty term based on the hematoma region and the skull mask; the second penalty term representing the sum of probabilities of voxels located outside the skull mask on the hematoma region; calculating a third penalty term based on the hematoma region and the ventricular mask; the third penalty term representing the sum of probabilities of voxels located inside the ventricular mask on the hematoma region; and calculating the second loss value based on the first penalty term, the second penalty term, and the third penalty term.
[0011] In some embodiments, the method satisfies at least one of the following: the first penalty term is calculated using the following formula: ;in, Indicates the first penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; The brain parenchyma mask is represented; the second penalty term is calculated using the following formula: ;in, This indicates the second penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; Indicates the area outside the skull mask; the third penalty term is calculated using the following formula: ;in, This indicates the third penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; Indicates the ventricular mask; This indicates that the hematoma area overlaps with the ventricular canopy.
[0012] In a second aspect, this application provides a method for segmenting a brain hematoma, comprising: acquiring a three-dimensional brain image to be segmented; inputting the three-dimensional brain image to be segmented into a brain hematoma segmentation model to obtain a probability map of the hematoma to be segmented; wherein the brain hematoma segmentation model is trained based on the method described in the first aspect or any of the embodiments of the first aspect; and determining the brain hematoma region based on the probability map of the hematoma to be segmented.
[0013] In some embodiments, the method further includes: inputting the three-dimensional brain image to be segmented into a trained brain structure recognition model for region recognition to obtain a brain parenchyma mask; after determining the brain hematoma region, the method further includes: correcting the brain hematoma region based on the brain parenchyma mask.
[0014] In some embodiments, after identifying the cerebral hematoma region, the method further includes: calculating the hematoma volume based on the number of voxels in the cerebral hematoma region and the volume of a single voxel.
[0015] In a third aspect, this application provides a training device for a brain hematoma segmentation model, comprising: a three-dimensional image acquisition module for acquiring three-dimensional brain training images and three-dimensional brain labeled images; wherein the three-dimensional brain labeled images are obtained by labeling the three-dimensional brain training images; a recognition module for inputting the three-dimensional brain training images into a pre-trained brain structure recognition model for region recognition to obtain brain parenchyma masks, ventricular masks, and skull masks; and a hematoma region acquisition module for inputting the three-dimensional brain training images into a neural network model to obtain hematoma generalizations. The system generates a probability map and determines the hematoma region based on the hematoma probability map; wherein the hematoma probability map includes the probability that each voxel on the three-dimensional brain training image belongs to a brain hematoma; a target loss value determination module is used to determine a target loss value based on the hematoma region, the three-dimensional brain labeled image, the brain parenchyma mask, the ventricle mask, and the skull mask; a training module is used to adjust the parameters of the neural network model based on the target loss value, and return to execute the step of inputting the three-dimensional brain training image into the neural network model until the set termination condition is met, thereby obtaining a brain hematoma segmentation model.
[0016] In a fourth aspect, this application provides a brain hematoma segmentation device, comprising: a three-dimensional brain image acquisition module for acquiring a three-dimensional brain image to be segmented; a hematoma probability map acquisition module for inputting the three-dimensional brain image to be segmented into a brain hematoma segmentation model to obtain a hematoma probability map; wherein the brain hematoma segmentation model is trained based on the method described in the first aspect or any of the embodiments of the first aspect; and a brain hematoma region segmentation module for determining a brain hematoma region based on the hematoma probability map.
[0017] In a fifth aspect, this application provides an electronic device comprising: a processor configured to execute program instructions; and a memory configured to store the program instructions, which, when loaded and executed by the processor, cause the processor to perform a training method for a brain hematoma segmentation model as described in the first aspect or any of the embodiments of the first aspect, or a brain hematoma segmentation method as described in the second aspect or any of the embodiments of the second aspect.
[0018] In a sixth aspect, this application provides a computer-readable storage medium storing program instructions, characterized in that, when the program instructions are loaded and executed by a processor, the processor performs a training method for a brain hematoma segmentation model as described in the first aspect or any of the embodiments of the first aspect, or a brain hematoma segmentation method as described in the second aspect or any of the embodiments of the second aspect.
[0019] By employing the training method, segmentation method, and apparatus for the brain hematoma segmentation model provided above, this embodiment of the application introduces anatomical priors (i.e., brain parenchyma mask, ventricular mask, and skull mask) through a brain structure recognition model during the training of the brain hematoma segmentation model. This provides explicit anatomical spatial constraints for hematoma segmentation, reducing the probability of ventricles, skull, and artifacts being misidentified as hematomas, and improving the anatomical rationality of the segmentation results. The target loss value is calculated using the brain parenchyma mask, ventricular mask, skull mask, hematoma region, and three-dimensional labeled brain image, allowing the model to simultaneously consider segmentation accuracy and consistency with anatomical rules during training. This makes the segmentation results more consistent with prior medical knowledge and improves the clinical credibility of the model output. The parameters of the neural network model are iteratively updated using the target loss value, enabling the model to continuously learn anatomical constraint rules during training. This significantly improves the segmentation stability and generalization ability of the model in complex brain cases, resulting in high accuracy in brain hematoma segmentation when using the trained brain hematoma segmentation model. Attached Figure Description
[0020] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, and the same or corresponding reference numerals denote the same or corresponding parts, wherein:
[0021] Figure 1 An exemplary flowchart of a training method for a brain hematoma segmentation model according to some embodiments of this application is shown; Figure 2 An exemplary flowchart of a brain hematoma segmentation method according to some embodiments of this application is shown; Figure 3 The diagram illustrates a brain hematoma segmentation network architecture according to some embodiments of this application; Figure 4 An exemplary structural block diagram of a training apparatus for a brain hematoma segmentation model according to some embodiments of this application is shown; Figure 5 An exemplary structural block diagram of a brain hematoma segmentation device according to some embodiments of this application is shown; Figure 6 An exemplary structural block diagram of an electronic device according to some embodiments of this application is shown. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] It should be understood that the terms "comprising" and "including" used in the specification and claims of this application indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0024] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this specification and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0025] As used in this specification and claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0026] The specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0027] Exemplary application scenarios Intracerebral hemorrhage is a common acute cerebrovascular disease with high mortality and disability rates. Clinicians typically need to quickly determine the location, volume, and morphological characteristics of the hematoma using brain CT images to determine a treatment plan (e.g., conservative treatment or surgical intervention). Therefore, accurate and rapid automatic segmentation of the intracerebral hematoma area has significant clinical importance.
[0028] Currently, there are two commonly used methods for segmenting brain hematomas: traditional image processing methods based on thresholding or region growing, and semantic segmentation methods based on deep learning. Traditional image processing methods based on thresholding or region growing, such as HU-based segmentation, specifically identify high-density hematoma regions by setting a fixed grayscale threshold. However, this method is easily affected by noise, calcification, and bone artifacts, leading to missegmentation or missed segmentation.
[0029] The semantic segmentation method based on deep learning specifically uses a convolutional neural network structure to segment medical images to obtain the brain hematoma region. However, this method usually only relies on image intensity information and statistical features, and lacks explicit constraints on human anatomical structures, which may lead to the misidentification of ventricles, bones, epidural hematomas or artifacts as intraparenchymal hematomas, resulting in incorrect brain hematoma segmentation.
[0030] In view of this, there is an urgent need to provide a training method for a brain hematoma segmentation model, a brain hematoma segmentation method, and an apparatus, so as to improve the accuracy of brain hematoma segmentation when using a trained brain hematoma segmentation model.
[0031] Figure 1 An exemplary flowchart of a training method 100 for a brain hematoma segmentation model according to some embodiments of this application is shown.
[0032] like Figure 1As shown, the training method 100 for the above-mentioned brain hematoma segmentation model includes: step S110: acquiring a three-dimensional brain training image and a three-dimensional brain labeled image; step S120: inputting the three-dimensional brain training image into a pre-trained brain structure recognition model for region recognition to obtain a brain parenchyma mask, a ventricle mask, and a skull mask; and step S130: inputting the three-dimensional brain training image into a neural network model to obtain a hematoma probability map and determining the hematoma region based on the hematoma probability map; wherein, the hematoma probability map includes the probability that each voxel on the three-dimensional brain training image belongs to a brain hematoma; step S140: determining a target loss value based on the hematoma probability map, the three-dimensional brain labeled image, the brain parenchyma mask, the ventricle mask, and the skull mask; step S150: adjusting the parameters of the neural network model based on the target loss value, and returning to execute the step of inputting the three-dimensional brain training image into the neural network model until the set termination condition is met to obtain the brain hematoma segmentation model.
[0033] For example, the three-dimensional brain training image in step S110 above refers to three-dimensional volumetric data of the skull, including complete spatial structural information of the brain. Specifically, the three-dimensional brain training image can be computed tomography (CT) three-dimensional volumetric data or magnetic resonance imaging (MRI) three-dimensional volumetric data.
[0034] In this embodiment, the aforementioned three-dimensional brain training image includes multiple voxels, each voxel being... It means that, among them, I represents the voxel coordinates of the voxel, and I is the grayscale value (i.e., HU value). It should be noted that the I mentioned above is a real physical measurement signal, representing the density of human tissue.
[0035] In this embodiment, the three-dimensional brain training images can be acquired from corresponding medical imaging equipment or directly retrieved from a Picture Archiving and Communication System (PACS). This embodiment does not specifically limit the method of acquiring the three-dimensional brain training images.
[0036] For example, the three-dimensional brain labeled image in step S110 above is obtained by labeling a three-dimensional brain training image. Specifically, the brain hematoma region can be labeled in the three-dimensional brain training image (e.g., manually or by machine) to form a three-dimensional brain labeled image.
[0037] As an optional embodiment of this application, such as Figure 3As shown in "1. Input and Preprocessing", after obtaining the 3D brain training images, preprocessing operations can be performed on the 3D brain training images to obtain preprocessed 3D brain training images, and model training can be performed based on the preprocessed 3D brain training images. The preprocessing operations here may include, but are not limited to, at least one of resampling, denoising, and normalization.
[0038] Resampling refers to unifying the 3D brain training images to a fixed voxel spacing (e.g., 1×1×1mm). 3 The above-mentioned denoising refers to using Gaussian filtering, median filtering and other filtering methods to reduce image noise in three-dimensional brain training images and improve the clarity of image features; the above-mentioned normalization refers to mapping the gray values (i.e. HU values) of three-dimensional brain training images to a fixed range (e.g., 0~1) to unify all data distributions.
[0039] The specific procedures for the above preprocessing operations are all standard procedures, and can be found in the descriptions in relevant materials. They will not be repeated here.
[0040] Based on the above description, the three-dimensional brain annotation image in step S110 can be obtained by annotating the preprocessed three-dimensional brain training image.
[0041] In this embodiment of the application, after obtaining the three-dimensional brain training image, the three-dimensional brain training image is preprocessed to ensure data consistency between different devices.
[0042] For example, such as Figure 3 As shown in "2. Anatomical Structure and Recognition Module", the brain structure recognition model in step S120 is a 3D segmentation model (i.e., a pre-trained model) trained in advance using a large number of brain images. It can accurately identify the brain parenchyma region, ventricle region, and skull region in the three-dimensional brain training images to obtain the brain parenchyma mask (denoted as...). ), ventricular mask (denoted as ) and skull mask (denoted as Specifically, it can adopt network architectures such as 3D-Unet and nn-Unet, but the embodiments of this application do not specifically limit it.
[0043] The aforementioned brain parenchyma mask is a binary three-dimensional matrix marking normal brain tissue regions, used to define the reasonable location of cerebral hematoma; the aforementioned ventricle mask is a binary three-dimensional matrix marking ventricular system regions, used to avoid abnormal overlap between cerebral hematoma and ventricles. The skull mask is a binary three-dimensional matrix marking skull boundaries, used to exclude regions outside the skull.
[0044] In this embodiment, a three-dimensional brain training image is input into a brain structure recognition model. The brain structure recognition model automatically identifies and outputs mask data for three anatomical structures: brain parenchyma mask, ventricle mask, and skull mask, providing a spatial basis for subsequent brain hematoma segmentation constraints.
[0045] For example, the neural network model in step S130 above is a deep learning network for brain hematoma segmentation, such as 3D U-Net, nnU-Net, Res-Net, Swin-UNet, etc. This application embodiment does not specifically limit it.
[0046] like Figure 3 As shown in "3. Hematoma Segmentation Network (Anatomical Constraint Training)", the neural network model includes an encoder and a decoder. In this embodiment, the preprocessed three-dimensional brain training image is input into the neural network model. The encoder (downsampling) performs convolution processing to progressively compress the feature map size and extract the deep features of the three-dimensional brain training image. Then, the bottleneck layer (B) captures the highest-dimensional features, and the decoder (upsampling) performs deconvolution to restore the feature map to its original size. The feature map extracted by the encoder is combined to restore detailed information to output a hematoma probability map.
[0047] The above hematoma probability diagram (denoted as) The matrix represents a three-dimensional probability matrix, including the probability that each voxel belongs to a cerebral hematoma. Specifically, the probability value of each voxel can be in the range of 0 to 1, representing the probability that the voxel belongs to a cerebral hematoma. The larger the probability value, the higher the probability that it belongs to a cerebral hematoma.
[0048] As an optional embodiment of this application, after obtaining the hematoma probability map, the voxels on the hematoma probability map can be screened based on a set probability threshold to screen out hematoma areas from the hematoma probability map.
[0049] For example, the aforementioned probability threshold is a predefined probability boundary value, such as 0.5, 0.8, etc., and this application embodiment does not specifically limit it.
[0050] In this embodiment, voxels with a probability greater than or equal to a set probability threshold are identified as hematoma voxels; voxels with a probability less than the set probability threshold are identified as non-hematoma voxels. Based on this, the specific process of filtering voxels on the hematoma probability map based on the set probability threshold can be as follows: retain voxels with a probability greater than the set probability threshold, and remove voxels with a probability less than the set probability threshold, thereby obtaining the hematoma region (denoted as...). ).
[0051] This application embodiment converts the hematoma probability map output by the neural network model into a hematoma region by setting a probability threshold, thereby excluding non-hematoma voxels and improving processing efficiency.
[0052] For example, the target loss value in step S140 above is a numerical value that measures the difference between the model's prediction results and the annotation and dissection rules, and can be used to guide the parameter update of the neural network model.
[0053] In this application embodiment, there are many methods for determining the target loss value based on the hematoma region, three-dimensional brain annotated image, brain parenchyma mask, ventricular mask, and skull mask. As a specific implementation of this application, such as... Figure 3 As shown in “5. Loss Function (Training Phase)”, the first loss value (i.e., segmentation loss) is calculated based on the hematoma region and the three-dimensional brain annotation image; and the second loss value (i.e., anatomical constraint loss) is calculated based on the hematoma region, brain parenchyma mask, ventricle mask and skull mask; and the target loss value is determined based on the first loss value and the second loss value.
[0054] For example, the first loss value mentioned above can be a segmentation loss, used to measure the difference between the predicted result (i.e., the hematoma region) and the annotation (i.e., the 3D brain annotation image). Specifically, it can be calculated using loss functions such as the cross-entropy loss function and the Dice loss function. The specific cross-entropy loss function and Dice loss function are standard formulas, which can be found in relevant materials and will not be elaborated here.
[0055] In this embodiment, the aforementioned second loss value can be an anatomical consistency constraint loss, used to measure the degree of deviation between the predicted result (i.e., the hematoma region) and the anatomical rules. These anatomical rules could be, for example, that the hematoma must be located inside the brain parenchyma, that the hematoma should not be located outside the skull, that the hematoma should not be located outside the ventricles, etc. In other words, the anatomical rules constrain the hematoma segmentation range to calculate the second loss value.
[0056] The specific calculation method for the second loss value is illustrated in the following examples, and will not be repeated here.
[0057] In this embodiment, determining the target loss value based on the first loss value and the second loss value can specifically involve assigning weight coefficients to the first loss value and / or the second loss value, and then performing a weighted calculation to obtain the target loss value. Specifically, it can be calculated using the following formula:
[0058] in, Indicates the target loss value; This represents the first loss value; Indicates the second loss value; This represents a weighting coefficient, for example, 0.5. The specific value can be determined according to the actual situation, and this application does not impose a specific limitation on it.
[0059] For example, the parameters of the neural network model in step S150 above refer to learnable variables such as convolution kernels, weights, and biases in the neural network model.
[0060] In this embodiment, after calculating the loss value, the parameters of the neural network model are adjusted based on the target loss value using the backpropagation algorithm. After the parameters of the neural network model are updated, the process returns to the forward inference step (i.e., the step of inputting the three-dimensional brain training image into the neural network model) for the next round of training. This training process is repeated until the preset training stop criterion is reached (i.e., the set termination condition is met), thus obtaining the trained brain hematoma segmentation model.
[0061] The above-mentioned termination conditions are the conditions for the completion of model training, which can be many, such as the number of iterations reaching a set number (e.g., 200 times), the loss value converging, the target loss value being less than or equal to a set loss value (e.g., 0.05), etc. This application embodiment does not specifically limit these conditions, and they can be determined according to the actual situation.
[0062] In this embodiment, when training the brain hematoma segmentation model, an anatomical prior (i.e., brain parenchyma mask, ventricular mask, and skull mask) is introduced through a brain structure recognition model. This provides explicit anatomical spatial constraints for hematoma segmentation, reducing the probability of ventricles, skull, and artifacts being misidentified as hematomas, and improving the anatomical rationality of the segmentation results. Specifically, the target loss value is calculated using the brain parenchyma mask, ventricular mask, skull mask, hematoma region, and three-dimensional brain labeled image. This allows the model to simultaneously consider segmentation accuracy and consistency with anatomical rules during training, making the segmentation results more consistent with medical prior knowledge and improving the clinical credibility of the model output. The parameters of the neural network model are iteratively updated with the target loss value, enabling the model to continuously learn anatomical constraint rules during training. This significantly improves the segmentation stability and generalization ability of the model in complex brain cases, resulting in high accuracy in brain hematoma segmentation when using the trained brain hematoma segmentation model.
[0063] As an optional embodiment of this application, see Figure 3 The “4. Anatomical Constraint Module” calculates a second loss value based on the hematoma region, brain parenchyma mask, ventricle mask, and skull mask, including: calculating a first penalty term based on the hematoma region and brain parenchyma mask; calculating a second penalty term based on the hematoma region and skull mask; calculating a third penalty term based on the hematoma region and ventricle mask; and calculating a second loss value based on the first penalty term, the second penalty term, and the third penalty term.
[0064] For example, the first penalty term mentioned above is calculated based on the anatomical constraint that the hematoma must be located inside the brain parenchyma, and is used to represent the sum of probabilities of voxels on the hematoma region located outside the brain parenchyma mask. Specifically, it can be calculated using the following formula:
[0065] in, Indicates the first penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; Indicates a mask for brain parenchyma; The second penalty term mentioned above is calculated based on the anatomical constraint that the hematoma should not be located outside the skull. It represents the sum of probabilities of voxels in the hematoma region being outside the skull mask. Specifically, it can be calculated using the following formula:
[0066] in, This indicates the second penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; Indicates the area outside the skull membrane; The third penalty term mentioned above is calculated based on the anatomical constraint that the hematoma should not be located outside the ventricle. It represents the total probability of voxels within the ventricle mask on the hematoma region. Specifically, it can be calculated using the following formula:
[0067] in, This indicates the third penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; Indicates the ventricular mask; This indicates that the hematoma area overlaps with the ventricular canopy.
[0068] In this embodiment, after obtaining the first penalty term, the second penalty term, and the third penalty term, a weighted calculation is performed based on the first penalty term, the second penalty term, and the third penalty term to obtain the second loss value. Specifically, it can be calculated using the following formula:
[0069] in, Indicates the second loss value; Indicates the first penalty item; This indicates the second penalty item; This indicates the third penalty item; , where is the weighting coefficient, representing the importance of different anatomical rules.
[0070] Figure 2 An exemplary flowchart of a brain hematoma segmentation method 200 according to some embodiments of this application is shown.
[0071] like Figure 2As shown, the above-mentioned brain hematoma segmentation method 200 includes: step S210: acquiring a three-dimensional brain image to be segmented; step S220: inputting the three-dimensional brain image to be segmented into a brain hematoma segmentation model to obtain a probability map of the hematoma to be segmented; step S230: determining the brain hematoma region based on the probability map of the hematoma to be segmented.
[0072] For example, the three-dimensional brain image to be segmented in step S210 above refers to the three-dimensional volumetric data of the skull to be segmented for cerebral hematoma, including complete spatial structural information of the brain. In the embodiments of this application, it can be, for example, CT three-dimensional volumetric data, MRI three-dimensional volumetric data, etc., and this application does not specifically limit it.
[0073] In this embodiment, the three-dimensional brain image to be segmented can be acquired from the corresponding medical imaging equipment or directly retrieved from PACS. This embodiment does not specifically limit the method of acquiring the three-dimensional brain training image.
[0074] In this embodiment of the application, after obtaining the three-dimensional brain image to be segmented, at least one of the following preprocessing operations can be performed on the three-dimensional brain image to be segmented: resampling, denoising, and normalization, to obtain the preprocessed three-dimensional brain image to be segmented, and then the cerebral hematoma segmentation is performed on the preprocessed three-dimensional brain image to be segmented.
[0075] For example, the brain hematoma segmentation model in step S220 above utilizes Figure 1 The brain hematoma segmentation model shown is trained using a specific training method. The probability map of the hematoma to be segmented is a three-dimensional probability matrix, which includes the probability that each voxel in the three-dimensional brain image to be segmented belongs to a brain hematoma.
[0076] In this embodiment of the application, the three-dimensional brain image to be segmented is input into the brain hematoma segmentation model, and the brain hematoma segmentation model processes the three-dimensional brain image to be segmented to obtain the probability map of the hematoma to be segmented.
[0077] In this embodiment of the application, after obtaining the probability map of the hematoma to be segmented, as follows: Figure 3 As shown in "6. Reasoning and Post-processing", the brain hematoma region is determined based on the probability map of the hematoma to be segmented. Specifically, based on a set probability threshold (i.e. Figure 3 In The voxels on the hematoma probability map to be segmented are then filtered to identify brain hematoma regions. Specific filtering methods can be found in the description of the hematoma region acquisition process in the above embodiments, and will not be repeated here.
[0078] This application embodiment utilizes the trained brain hematoma segmentation model to process the three-dimensional brain image to be segmented, and can automatically output the brain hematoma region with high accuracy; the whole process does not require manual intervention, meeting the needs of rapid diagnosis in emergency brain hemorrhage; and it can be applied to various imaging such as head CT and MRI, with strong versatility.
[0079] As an optional embodiment of this application, the above-mentioned brain hematoma segmentation method 200 further includes: inputting the three-dimensional brain image to be segmented into a trained brain structure recognition model for region recognition to obtain a brain parenchyma mask; after determining the brain hematoma region, the above-mentioned brain hematoma segmentation method 200 further includes: correcting the brain hematoma region based on the brain parenchyma mask.
[0080] For example, a detailed description of the brain structure recognition model described above can be found in the embodiments above, and will not be repeated here. In this embodiment, the three-dimensional brain image to be segmented is input into the trained brain structure recognition model for region recognition to obtain a brain parenchyma mask. Then, the brain parenchyma mask is used to correct the cerebral hematoma region. Specifically, voxels outside the brain parenchyma mask on the cerebral hematoma region are removed, and only voxels inside the brain parenchyma mask are retained to obtain the corrected cerebral hematoma region.
[0081] In this embodiment of the application, after segmenting the cerebral hematoma region, it also... Figure 3 As shown in "6. Reasoning and Post-processing", the brain parenchyma mask is used to perform post-verification (i.e., anatomical consistency correction) on the segmentation results (i.e., brain hematoma area) to completely eliminate extra-brain missegmentation and improve the accuracy of the segmentation results.
[0082] As an optional embodiment of this application, after determining the cerebral hematoma region, further as follows: Figure 3 As shown in “6. Reasoning and Post-processing”, the above-mentioned brain hematoma segmentation method 200 also includes: calculating the hematoma volume based on the number of voxels in the brain hematoma region and the volume of a single voxel.
[0083] It should be noted that the cerebral hematoma region here can be the region segmented using a cerebral hematoma segmentation model; if there is a post-processing (i.e., correction) step, it can also be the corrected cerebral hematoma region. This application embodiment does not specifically limit this, and can be determined according to the actual situation.
[0084] In this embodiment of the application, the volume of a single voxel (denoted as ) The value is a fixed number, for example, 1 mL. After the hematoma region is identified, the hematoma volume (denoted as L) can be calculated based on the number of voxels (N) in the hematoma region and the volume of a single voxel. This hematoma volume L can be used as a clinical indication for surgery. Specifically, it can be calculated through the following steps:
[0085] In this embodiment, after segmenting the cerebral hematoma region, the volume of the cerebral hematoma is automatically calculated, providing a key basis for judging surgical indications and prognostic assessment; and the automatic calculation of the cerebral hematoma volume is more efficient and more accurate than manual estimation.
[0086] Figure 4 An exemplary structural block diagram of a training apparatus 400 for a brain hematoma segmentation model according to some embodiments of this application is shown.
[0087] like Figure 4 As shown, the training device 400 for the aforementioned brain hematoma segmentation model includes: a three-dimensional image acquisition module 410, used to acquire three-dimensional brain training images and three-dimensional brain labeled images; wherein, the three-dimensional brain labeled images are obtained by labeling the three-dimensional brain training images; a recognition module 420, used to input the three-dimensional brain training images into a pre-trained brain structure recognition model for region recognition, obtaining brain parenchyma masks, ventricular masks, and skull masks; and a hematoma region acquisition module 430, used to input the three-dimensional brain training images into a neural network model, obtaining... A hematoma probability map is generated, and the hematoma region is determined based on the hematoma probability map. The hematoma probability map includes the probability that each voxel on the three-dimensional brain training image belongs to the brain hematoma. A target loss value determination module 440 is used to determine the target loss value based on the hematoma region, the three-dimensional brain labeled image, the brain parenchyma mask, the ventricle mask, and the skull mask. A training module 450 is used to adjust the parameters of the neural network model based on the target loss value and return to execute the step of inputting the three-dimensional brain training image into the neural network model until the set termination condition is met to obtain the brain hematoma segmentation model.
[0088] As an optional embodiment of this application, the training device 400 for the brain hematoma segmentation model further includes: a preprocessing module, used to perform at least one preprocessing operation among resampling, denoising, and normalization on the three-dimensional brain training image to obtain a preprocessed three-dimensional brain training image.
[0089] As an optional embodiment of this application, the hematoma region acquisition module 430 is specifically used to perform screening processing on voxels on the hematoma probability map based on a set probability threshold, so as to screen out hematoma regions from the hematoma probability map.
[0090] As an optional embodiment of this application, the target loss value determination module 440 is specifically used for: calculating a first loss value based on the hematoma region and the three-dimensional brain annotation image; calculating a second loss value based on the hematoma region, the brain parenchyma mask, the ventricle mask and the skull mask; and determining a target loss value based on the first loss value and the second loss value.
[0091] As an optional embodiment of this application, the target loss value determination module 440 calculates a second loss value based on the hematoma region, brain parenchyma mask, ventricular mask, and skull mask, including: calculating a first penalty term based on the hematoma region and brain parenchyma mask; the first penalty term represents the sum of probabilities of voxels located outside the brain parenchyma mask on the hematoma region; calculating a second penalty term based on the hematoma region and skull mask; the second penalty term represents the sum of probabilities of voxels located outside the skull mask on the hematoma region; calculating a third penalty term based on the hematoma region and ventricular mask; the third penalty term represents the sum of probabilities of voxels located inside the ventricular mask on the hematoma region; and calculating a second loss value based on the first penalty term, the second penalty term, and the third penalty term.
[0092] As an optional embodiment of this application, the training device 400 for the above-described brain hematoma segmentation model satisfies at least one of the following: The first penalty term is calculated using the following formula:
[0093] in, Indicates the first penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; Indicates a mask for brain parenchyma; The second penalty is calculated using the following formula:
[0094] in, This indicates the second penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; Indicates the area outside the skull membrane; The third penalty is calculated using the following formula:
[0095] in, This indicates the third penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; Indicates the ventricular mask; This indicates that the hematoma area overlaps with the ventricular canopy.
[0096] For details on the specific implementation methods and beneficial effects, please refer to the description of the above embodiment of the training method 100 for the cerebral hematoma segmentation model, which will not be repeated here.
[0097] Figure 5 An exemplary structural block diagram of a brain hematoma segmentation device 500 according to some embodiments of this application is shown.
[0098] like Figure 5As shown, the above-mentioned brain hematoma segmentation device 500 includes: a three-dimensional brain image acquisition module 510, used to acquire the three-dimensional brain image to be segmented; a hematoma probability map acquisition module 520, used to input the three-dimensional brain image to be segmented into the brain hematoma segmentation model to obtain the hematoma probability map to be segmented; wherein, the brain hematoma segmentation model is trained according to the above-mentioned brain hematoma segmentation model training method 100; and a brain hematoma region segmentation module 530, used to determine the brain hematoma region based on the hematoma probability map to be segmented.
[0099] As an optional embodiment of this application, the above-mentioned brain hematoma segmentation device 500 further includes: a brain parenchyma mask acquisition module, used to input the three-dimensional brain image to be segmented into a trained brain structure recognition model for region recognition to obtain a brain parenchyma mask; the above-mentioned brain hematoma segmentation device 500 further includes: a correction module, used to correct the brain hematoma region based on the brain parenchyma mask.
[0100] As an optional embodiment of this application, the above-mentioned brain hematoma segmentation device 500 further includes: a hematoma volume calculation module, used to calculate the hematoma volume based on the number of voxels in the brain hematoma region and the volume of a single voxel.
[0101] For details on the specific implementation methods and beneficial effects, please refer to the description of the embodiments of the brain hematoma segmentation method 200 above, which will not be repeated here.
[0102] Correspondingly, embodiments of this application also provide Figure 4 or Figure 5 The hardware structure diagram of the device shown is as follows: Figure 6 As shown, the electronic device 600 can be a device for implementing the above-described training method 100 for the brain hematoma segmentation model or the brain hematoma segmentation method 200. For example... Figure 6 As shown, the electronic device 600 includes a processor 610 and a memory 620. The memory 620 is configured to store program instructions; the processor 610 is configured to load and execute the program instructions stored in the memory 620 to implement an embodiment of the training method 100 for the corresponding brain hematoma segmentation model or an embodiment of the brain hematoma segmentation method 200 as shown above.
[0103] As one embodiment, memory 620 can be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as program instructions, data, etc. For example, memory 620 can be volatile memory, non-volatile memory, or similar storage media. Specifically, memory 620 can be RAM (Random Access Memory), flash memory, storage drives (such as hard disk drives), solid-state drives, any type of storage disk (such as optical discs, DVDs, etc.), or similar storage media, or combinations thereof.
[0104] This concludes the process. Figure 6 Description of the electronic device shown.
[0105] While numerous embodiments of this application have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will arise for those skilled in the art without departing from the spirit and intent of this application. It should be understood that various alternatives to the embodiments of this application described herein may be employed in the practice of this application. The appended claims are intended to define the scope of protection of this application and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A training method for a brain hematoma segmentation model, characterized in that, include: Acquire three-dimensional brain training images and three-dimensional brain labeled images; wherein the three-dimensional brain labeled images are obtained by labeling the three-dimensional brain training images; The three-dimensional brain training images are input into a pre-trained brain structure recognition model for region identification, resulting in brain parenchyma masks, ventricular masks, and skull masks; and The three-dimensional brain training image is input into a neural network model to obtain a hematoma probability map, and the hematoma region is determined based on the hematoma probability map; wherein, the hematoma probability map includes the probability that each voxel on the three-dimensional brain training image belongs to a cerebral hematoma; The target loss value is determined based on the hematoma region, the three-dimensional brain annotated image, the brain parenchyma mask, the ventricle mask, and the skull mask. The parameters of the neural network model are adjusted based on the target loss value, and the process returns to the step of inputting the three-dimensional brain training image into the neural network model until the set termination condition is met, thus obtaining the brain hematoma segmentation model.
2. The method according to claim 1, characterized in that, After acquiring the three-dimensional brain training images, the method further includes: The three-dimensional brain training image is subjected to at least one preprocessing operation, namely resampling, denoising, and normalization, to obtain a preprocessed three-dimensional brain training image.
3. The method according to claim 1, characterized in that, The determination of the hematoma region based on the hematoma probability map includes: Based on a set probability threshold, voxels on the hematoma probability map are filtered to select hematoma regions from the hematoma probability map.
4. The method according to claim 1, characterized in that, The determination of the target loss value based on the hematoma region, the three-dimensional brain annotated image, the brain parenchyma mask, the ventricle mask, and the skull mask includes: A first loss value is calculated based on the hematoma region and the three-dimensional annotated brain image; and The second loss value is calculated based on the hematoma region, the brain parenchyma mask, the ventricular mask, and the skull mask. The target loss value is determined based on the first loss value and the second loss value.
5. The method according to claim 4, characterized in that, The calculation of the second loss value based on the hematoma region, the brain parenchyma mask, the ventricular mask, and the skull mask includes: A first penalty term is calculated based on the hematoma region and the brain parenchyma mask; the first penalty term represents the sum of probabilities of voxels located outside the brain parenchyma mask on the hematoma region. A second penalty term is calculated based on the hematoma region and the skull mask; the second penalty term represents the sum of probabilities of voxels located outside the skull mask on the hematoma region. A third penalty term is calculated based on the hematoma region and the ventricular mask; the third penalty term represents the sum of probabilities of voxels located within the ventricular mask on the hematoma region. The second loss value is calculated based on the first penalty term, the second penalty term, and the third penalty term.
6. The method according to claim 5, characterized in that, The method satisfies at least one of the following: The first penalty term is calculated using the following formula: in, Indicates the first penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; This refers to the brain parenchyma mask; The second penalty term is calculated using the following formula: in, This indicates the second penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; Indicates the area outside the skull membrane; The third penalty term is calculated using the following formula: in, This indicates the third penalty item; The probability that the voxel in the hematoma region belongs to a cerebral hematoma; Indicates the ventricular mask; This indicates that the hematoma area overlaps with the ventricular canopy.
7. A method for segmenting a cerebral hematoma, characterized in that, include: Obtain a three-dimensional brain image to be segmented; The three-dimensional brain image to be segmented is input into the brain hematoma segmentation model to obtain a probability map of the hematoma to be segmented; wherein, the brain hematoma segmentation model is trained based on the method described in any one of claims 1-6; The brain hematoma region is determined based on the probability map of the hematoma to be segmented.
8. The method according to claim 7, characterized in that, The method further includes: The three-dimensional brain image to be segmented is input into a pre-trained brain structure recognition model for region recognition to obtain a brain parenchyma mask; After identifying the area of the cerebral hematoma, the method further includes: The brain hematoma region is modified based on the brain parenchyma mask.
9. The method according to claim 7 or 8, characterized in that, After identifying the area of the cerebral hematoma, the method further includes: The hematoma volume is calculated based on the number of voxels in the brain hematoma region and the volume of a single voxel.
10. A training device for a brain hematoma segmentation model, characterized in that, include: A three-dimensional image acquisition module is used to acquire three-dimensional brain training images and three-dimensional brain labeled images; wherein, the three-dimensional brain labeled images are obtained by annotating the three-dimensional brain training images; The recognition module is used to input the three-dimensional brain training images into a pre-trained brain structure recognition model for region recognition, obtaining brain parenchyma masks, ventricular masks, and skull masks; and The hematoma region acquisition module is used to input the three-dimensional brain training image into a neural network model to obtain a hematoma probability map, and determine the hematoma region based on the hematoma probability map; wherein, the hematoma probability map includes the probability that each voxel on the three-dimensional brain training image belongs to a cerebral hematoma; The target loss value determination module is used to determine the target loss value based on the hematoma region, the three-dimensional brain annotation image, the brain parenchyma mask, the ventricle mask, and the skull mask. The training module is used to adjust the parameters of the neural network model based on the target loss value, and return to execute the step of inputting the three-dimensional brain training image into the neural network model until the set termination condition is met, so as to obtain the brain hematoma segmentation model.
11. A device for dividing a cerebral hematoma, characterized in that, include: The module for acquiring three-dimensional brain images to be segmented is used to acquire three-dimensional brain images to be segmented. A hematoma probability map acquisition module is used to input the three-dimensional brain image to be segmented into a brain hematoma segmentation model to obtain a hematoma probability map; wherein, the brain hematoma segmentation model is trained based on the method described in any one of claims 1-6; The brain hematoma region segmentation module is used to determine the brain hematoma region based on the probability map of the hematoma to be segmented.
12. An electronic device, characterized in that, include: A processor, configured to execute program instructions; as well as A memory configured to store the program instructions, which, when loaded and executed by the processor, cause the processor to perform the training method for the brain hematoma segmentation model as described in any one of claims 1-6 or the brain hematoma segmentation method as described in any one of claims 7-9.
13. A computer-readable storage medium storing program instructions, characterized in that, When the program instructions are loaded and executed by the processor, the processor performs the training method for the brain hematoma segmentation model according to any one of claims 1-6 or the brain hematoma segmentation method according to any one of claims 7-9.