Cerebral hemorrhage automatic segmentation method and system for corpse head CT image, and medium
By combining grayscale correction and adaptive window width and level with coarse-fine two-level network segmentation and connected component analysis, the problem of high false positives in cadaver CT images is solved, achieving highly accurate and robust brain hemorrhage segmentation, which is suitable for forensic diagnosis in multi-device and multi-protocol scenarios.
Patent Information
- Application Number
- CN202511503938.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-01-13
AI Technical Summary
Existing technologies for cadaver CT images suffer from a high false positive rate due to noise, artifacts, and differences in window width and window level, affecting the accuracy and robustness of cerebral hemorrhage diagnosis, especially posing a significant risk of misdiagnosis in forensic medicine.
Gray-scale correction technology was used to eliminate the differences between autopsy and clinical data. Adaptive window widths and levels for cases were generated through cluster analysis. Combined with coarse-fine two-level network segmentation and connected component analysis, false positives were reduced.
It significantly improves the accuracy and robustness of cerebral hemorrhage segmentation, provides reliable imaging evidence in multi-device and multi-protocol scenarios, reduces the false positive rate, and improves the credibility of forensic diagnosis.
Smart Images

Figure CN121329993A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical imaging equipment, and in particular to an automatic segmentation method, system and medium for brain hemorrhage in cadaver head CT images. Background Technology
[0002] Intracerebral hemorrhage is a common neurosurgical emergency. Based on the location of the hemorrhage, it can generally be classified into five types: intraparenchymal hemorrhage, subarachnoid hemorrhage, subdural hemorrhage, epidural hemorrhage, and intraventricular hemorrhage. All of these types of hemorrhage can lead to serious health problems, such as brain tissue damage, neurological dysfunction, and even death. Timely diagnosis and treatment of intracerebral hemorrhage are crucial for improving patient prognosis; therefore, accurate intracerebral hemorrhage segmentation techniques play a vital role in clinical diagnosis.
[0003] In medical imaging diagnosis, CT scans are the preferred method for detecting cerebral hemorrhage. Through multi-class segmentation of CT images, doctors can more clearly identify and differentiate five types of hemorrhage areas: intraparenchymal hemorrhage, subarachnoid hemorrhage, subdural hemorrhage, epidural hemorrhage, and intraventricular hemorrhage. This provides crucial information for developing individualized treatment plans and evaluating treatment effectiveness. However, clinical CT scans are often affected by noise, artifacts, and differences in window width and level. Existing single deep learning networks or traditional hybrid methods are insufficient in terms of accuracy and robustness, with a particularly high false positive rate.
[0004] In the field of forensic medicine, the tasks of autopsy CT scans are even more challenging: Intracranial gas buildup and decreased density of liquefied brain tissue resulting from decomposition cause significant grayscale shifts in CT images; subarachnoid hemorrhage, after decomposition, leads to an expansion of the bleeding area and blurred bleeding boundaries due to blood diffusion and red blood cell disintegration, manifesting as a significant increase in noise and stripe artifacts in the hemorrhage area on CT images. In this scenario, traditional fixed-window-width or single-stage network images of the deceased are highly susceptible to misinterpretation by the radiologist, leading to false positive diagnoses and directly interfering with forensic examinations of the cause and manner of death.
[0005] Furthermore, to reduce false positives, traditional segmentation methods often employ thresholding, region growing, or active contouring algorithms in the coarse stage to quickly locate the hemorrhage area before refining it in subsequent modules. However, manual feature extraction is lengthy, has poor generalization across different machine models and protocols, and is extremely sensitive to CT noise, easily misclassifying artifacts as hemorrhage and introducing new false positives. Single deep learning segmentation, on the other hand, commonly uses networks like U-Net and U-Net++ to segment five types of hemorrhage in one go. While this method can automatically extract features, it doesn't account for grayscale drift and window width differences caused by necrosis, leading to noise or abnormal window widths being mistaken for hemorrhage signals and resulting in a high false positive rate. Hybrid methods, such as using traditional methods for coarse segmentation followed by deep learning networks for fine segmentation, combine the advantages of both to some extent but increase system complexity and computational cost. Therefore, a solution is urgently needed to address the problem of false positives caused by noise, artifacts, and differences in window width and level in the segmentation of different types of brain hemorrhage in CT brain images. Summary of the Invention
[0006] To overcome the aforementioned technical deficiencies, the present invention aims to provide an automatic segmentation method, system, and medium for cerebral hemorrhage in cadaver head CT images. First, CT values are corrected on the autopsy data to eliminate the difference between cadaver and non-cadaver data. Then, a case-specific window width and level are generated using a clustering method. Subsequently, a combination of coarse-fine two-level network segmentation is employed to reduce false positives and improve segmentation accuracy. This enables precise, robust, and low-false-positive segmentation of five types of cerebral hemorrhage in multi-device and multi-protocol scenarios, providing highly reliable imaging evidence for clinical and forensic diagnosis.
[0007] This invention discloses an automatic segmentation method for brain hemorrhage in cadaver head CT images, comprising the following steps: CT image data of cerebral hemorrhage were acquired, and a cerebral hemorrhage mask was labeled. The acquired CT image data of the cadaver's head was corrected using a grayscale correction method to obtain the corrected CT image data. A dynamic window width and window level generation method is adopted. Based on the image characteristics of specific cases, cluster analysis is used to generate window widths and window levels that are adaptive to the cases, thus obtaining CT image data with adaptive window widths and window levels. The CT image data with adaptive window width and window level is coarsely segmented to obtain a coarse segmentation result. In response to the detection of a hemorrhage area in the coarse segmentation, the corrected CT image data is finely segmented to obtain a fine segmentation result. By performing connected component analysis on the coarse and fine segmentation results, a segmentation mask with a low false positive rate for cerebral hemorrhage is obtained.
[0008] Preferably, the steps of acquiring CT image data of cerebral hemorrhage, labeling with a cerebral hemorrhage mask, and correcting the acquired cadaver head CT image data using a grayscale correction method to obtain corrected CT image data include the following steps: CT image data of cerebral hemorrhage were collected and labeled with five types of cerebral hemorrhage masks, which include: intraparenchymal hemorrhage, subarachnoid hemorrhage, subdural hemorrhage, epidural hemorrhage, and intraventricular hemorrhage. Collect live head CT image data, compile live brain CT standard histograms, and correct the cadaver head CT image data based on the live brain CT standard histograms.
[0009] Preferably, the collection of live head CT image data and the statistical analysis of live brain CT standard histograms include the following steps: Preprocessing of live head CT image data: Collect live head CT image data and remove data with artifacts to obtain a processed live CT dataset. Brain segmentation model was used to extract regions of living brain tissue. ; Extract the HU value of living brain tissue and combine all extracted brain tissue HU values according to formula (1); (1) Statistical analysis of standard histograms from in vivo brain CT scans: defining bin boundaries Where k=0, ..., K, , K=512, calculate the frequency according to formula (2), and add overflow processing according to formula (3); (2) (3) Normalize the probability histogram according to formula (4); (4) Calculate the cumulative distribution function according to formula (5). .
[0010] (5) Preferably, the step of correcting the cadaver head CT image data based on the in vivo brain CT standard histogram includes the following steps: Input cadaver head CT image data, including autopsy CT images. Segmentation brain mask ; The HU value extracted from autopsy brain tissue is expressed as: ; The autopsy data histograms were statistically analyzed using the aforementioned method for calculating the standard histogram of in vivo brain CT scans. ; Calculate the cumulative distribution function of the autopsy according to formula (6). ; (6) According to formula (7), for each brain tissue pixel Perform a match; (7) Pixel processing of putrefactive gas regions in cadaver brain tissue includes marking brain tissue with CT values less than -900 as gas pixels (see formula (8-1)) and using local median filling (neighborhood is...). (Window), see formula (8-2); (8-1) (8-2) Preferably, the method of generating dynamic window width and window level, which generates adaptive window width and window level based on the image characteristics of specific cases through cluster analysis, to obtain CT image data with adaptive window width and window level, includes the following steps: After performing putrefaction correction on the CT image data of the cadaver's head, the brain tissue was separated using brain segmentation function. The separated brain tissue data was then normalized to the maximum and minimum values to achieve the processing of the CT image data of the cadaver's head. Using the K-means clustering method, cluster centers and standard deviations were determined for background, brain tissue, brain hemorrhage, and calcification. Based on the cluster centers and standard deviations, the required window width and window level were set as follows: The fitting center category was set to k=4, representing background, brain tissue, hemorrhage, and calcification, respectively. A K-Means model was fitted using the extracted normalized brain tissue to obtain the mean. and standard deviation , where 1 is the background, 2 is brain tissue, 3 is cerebral hemorrhage, and 4 is calcification of the brain. The optimal window width and window level of interest are calculated according to formula (9).
[0011] (9) Preferably, the CT image data with adaptive window width and level is coarsely segmented to obtain the coarse segmentation result, including the following steps: Based on the parameters obtained from cluster analysis, the corrected CT image data is truncated to three different window widths and window levels to form a three-channel input method; The display range of each channel is calculated using formula (10). ch1 displays only cerebral hemorrhage and is used to display the hemorrhage area with high contrast, while inhibiting brain tissue and calcification. ch2 displays brain tissue and cerebral hemorrhage and is used to observe the relationship between hemorrhage and surrounding brain tissue. ch3 displays brain tissue, cerebral hemorrhage and calcification and is used to observe all lesions and normal tissues globally. (10) Each channel is normalized based on its maximum and minimum values, and the spacing of each channel image is amplified. The CT image data with the adaptive window width and window level is input into the coarse segmentation network. The network is trained and the input image is segmented using the labeled brain hemorrhage mask, and the coarse segmentation result is output.
[0012] Preferably, the step of finely segmenting the corrected CT image data in response to the detection of a hemorrhage area by coarse segmentation to obtain a fine segmentation result includes the following steps: Based on the coarse segmentation results, it is determined whether there is a bleeding area in the image. If there is a bleeding area, the corrected CT image is re-truncated to lower the truncation limit. The image spacing is uniformly reduced, and the CT values are normalized. The normalized data is then input into the fine segmentation network for training and segmentation, and the fine segmentation results are output.
[0013] Preferably, the step of performing connected component analysis on the coarse segmentation results and fine segmentation results to obtain a brain hemorrhage segmentation mask with a low false positive rate includes the following steps: Connectivity analysis was performed on the coarse and fine segmentation results respectively, dividing adjacent pixels in the segmentation results into different connected regions; For each connected component in the fine segmentation result, determine whether there is an intersection between the connected component and each connected component in the coarse segmentation result; If a connected component in a fine segment intersects with any connected component in a coarse segment, then the fine segment connected component has a bleed region, and the fine segment connected component is retained. If a connected component in a fine segmentation has no intersection with any connected component in a coarse segmentation, then that connected component in the fine segmentation is identified as a false positive region. Deleting the fine segmentation connected component yields a brain hemorrhage segmentation mask with a low false positive rate.
[0014] This invention also discloses an automatic segmentation system for brain hemorrhage in cadaver head CT images, comprising: The autopsy data grayscale calibration module is used to acquire CT image data of cerebral hemorrhage, label the cerebral hemorrhage mask, and use grayscale correction methods to correct the acquired CT image data of the cadaver's head, thus obtaining the corrected CT image data. The dynamic window width and window level generation module is used to generate adaptive window width and window level based on the image features of specific cases through cluster analysis, thereby obtaining CT image data with adaptive window width and window level. The coarse and fine two-level network segmentation module is used to coarsely segment the adaptive window width and window level CT image data to obtain a coarse segmentation result, and in response to the detection of a hemorrhage area by the coarse segmentation, to finely segment the corrected CT image data to obtain a fine segmentation result. The connected component analysis module is used to perform connected component analysis on the coarse and fine segmentation results to obtain a segmentation mask for cerebral hemorrhage with a low false positive rate.
[0015] The present invention also discloses a computer-readable storage medium having a computer program stored thereon, the computer executing any of the described automatic segmentation methods for brain hemorrhage in cadaver head CT images.
[0016] Compared with existing technologies, the above technical solution has the following advantages: 1. This invention introduces grayscale (decomposition) correction technology, which corrects autopsy data through a specific algorithm to eliminate the difference between autopsy and clinical data, making autopsy data more usable in the diagnosis of cerebral hemorrhage and providing more accurate input data for subsequent segmentation. This innovation is an important improvement in targeted processing of autopsy data that has been rarely involved in previous methods, and significantly improves the application value of autopsy data in the diagnosis of cerebral hemorrhage. 2. By clustering and analyzing the features of case images, the most suitable window width and level can be customized for each case, which can more accurately highlight the features related to cerebral hemorrhage in brain images and reduce misjudgments and omissions caused by unreasonable window width and level settings. This adaptive method not only improves the accuracy and robustness of segmentation, but also provides more reliable imaging evidence for the diagnosis of cerebral hemorrhage in multi-device and multi-protocol scenarios; 3. This paper proposes a false positive rejection strategy based on a coarse-fine two-level network combined with connected component analysis. First, a coarse segmentation network is used to quickly identify the hemorrhage region in the image. Then, a fine segmentation network is used for accurate segmentation of five types of cerebral hemorrhage. Since false positive regions are easily generated during multi-class segmentation, this invention further optimizes the process through connected component analysis: if the connected components of the fine segmentation and the coarse segmentation intersect, the region is retained; otherwise, it is considered a false positive region and rejected. This method effectively combines the advantages of coarse-fine two-level networks, significantly reducing the false positive rate, improving the accuracy of cerebral hemorrhage segmentation, and providing more reliable imaging evidence for medical diagnosis. Attached Figure Description
[0017] Figure 1 This is a flowchart of the steps of an automatic segmentation method for brain hemorrhage in cadaver head CT images disclosed in this invention; Figure 2 This is a structural framework diagram of an automatic brain hemorrhage segmentation system for cadaver head CT images disclosed in this invention; Figure 3 This is an algorithm framework diagram of the automatic segmentation method for cerebral hemorrhage disclosed in a preferred embodiment of the present invention; Figure 4 This is an algorithm framework diagram of the automatic segmentation method for cerebral hemorrhage disclosed in a preferred embodiment of the present invention.
[0018] Figure labels: 10-Autopsy data grayscale calibration module; 20-Dynamic window width and window level generation module; 30-Coarse and fine two-level network segmentation module; 40-Connected component analysis module. Detailed Implementation
[0019] The advantages of the present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments.
[0020] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0021] The terminology used in this disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The singular forms “a,” “the,” and “the” as used in this disclosure and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.
[0022] It should be understood that although the terms first, second, third, etc., may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are used only to distinguish information of the same type from one another. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0023] In the description of this invention, it should be understood that the terms "longitudinal", "lateral", "up", "down", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0024] In the description of this invention, unless otherwise specified and limited, it should be noted that the terms "installation", "connection" and "linking" should be interpreted broadly. For example, they can refer to mechanical or electrical connections, or internal connections between two components. They can be direct connections or indirect connections through an intermediate medium. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0025] In the following description, suffixes such as "module," "part," or "unit" used to denote elements are used only for the convenience of the description of the invention and have no specific meaning in themselves. Therefore, "module" and "part" can be used interchangeably.
[0026] like Figure 1 As shown, to achieve the above objectives, this invention discloses an automatic segmentation method for brain hemorrhage in cadaver head CT images, relating to the field of computed tomography (CT) technology, and applied to autopsy brain CT image imaging, comprising the following steps: Step S1: Collect CT image data of cerebral hemorrhage, label the cerebral hemorrhage mask, and use grayscale correction method to correct the collected CT image data of the cadaver's head to obtain the corrected CT image data. Step S2: Using a dynamic window width and window level generation method, based on the image characteristics of specific cases, a window width and window level adapted to the case are generated through cluster analysis to obtain CT image data with adaptive window width and window level. Step S3: The CT image data with adaptive window width and window level is coarsely segmented to obtain a coarse segmentation result. In response to the detection of a hemorrhage area in the coarse segmentation, the corrected CT image data is finely segmented to obtain a fine segmentation result. Step S4: Perform connected component analysis on the coarse segmentation results and fine segmentation results to obtain a segmentation mask for cerebral hemorrhage with a low false positive rate.
[0027] Specifically, this invention adopts an end-to-end brain hemorrhage segmentation system of "grayscale calibration-adaptive window width-coarse-fine combination", adding three core innovations on the basis of coarse-fine two-level network, which significantly reduces false positives and improves cross-scenario robustness.
[0028] See Figure 3First, after data collection, during the data annotation stage, hemorrhage masks are clearly labeled, preferably five types of hemorrhage masks: intracranial hemorrhage, subarachnoid hemorrhage, subdural hemorrhage, epidural hemorrhage, and intraventricular hemorrhage, providing a foundation for accurate segmentation. Since training the segmentation network typically uses clinical live CT image data of the head, which is easy to collect, while autopsy data is difficult to obtain, and the decomposition of the body can lead to deviations in CT values, making it difficult for networks trained directly using non-autopsy data to segment autopsy data effectively. Therefore, this invention introduces grayscale (CT value) correction technology, using a specific algorithm to correct the autopsy data, eliminating the differences between cadaver images and clinical images, ensuring data consistency and usability. Subsequently, a dynamic window width and window level generation method was adopted. Based on the image features of specific cases, a unique window width and window level setting was generated through cluster analysis to better highlight the features related to cerebral hemorrhage, reduce misjudgments caused by unreasonable window width and window level settings, and improve the robustness and accuracy of segmentation.
[0029] Finally, in the segmentation stage, a false positive elimination strategy combining coarse and fine-level networks with connected component analysis was employed. The coarse network located the hemorrhage, while the fine network categorized it into five types. Post-processing was then used to remove false positives: first, the coarse segmentation network quickly determined the approximate location of the hemorrhage area, focusing on segmenting hemorrhage areas of a single category without distinguishing between hemorrhage types, effectively reducing false positives; then, the fine segmentation network was used for precise identification and segmentation of the hemorrhage; finally, connected component analysis was used to combine the results of coarse and fine segmentation. If the connected components of the fine segmentation intersected with those of the coarse segmentation, the hemorrhage was retained; otherwise, it was considered a false positive and eliminated. This synergistic effect significantly improved the accuracy of image segmentation for cadaveric brain hemorrhage, reduced the false positive rate, and provided more reliable imaging evidence for forensic examination and identification.
[0030] Furthermore, step S1 includes the following steps: CT image data of cerebral hemorrhage were collected and labeled with five types of cerebral hemorrhage masks, which include: intraparenchymal hemorrhage, subarachnoid hemorrhage, subdural hemorrhage, epidural hemorrhage, and intraventricular hemorrhage. Collect live head CT image data, compile live brain CT standard histograms, and correct the cadaver head CT image data based on the live brain CT standard histograms.
[0031] Specifically, the CT image data of cerebral hemorrhage includes both live data and cadaver data, and both types of CT image data are labeled with a cerebral hemorrhage mask. Clinically, live head CT data of cerebral hemorrhage is readily available, and most publicly available cerebral hemorrhage data online is also live images. Therefore, this type of live data is mainly used when training a cerebral hemorrhage segmentation model. However, due to putrefaction, autopsy CT images will cause CT values to shift. This shift will significantly reduce the segmentation accuracy when the trained model is directly used to segment cerebral hemorrhage from autopsy data. To solve this problem, one embodiment of the present invention employs putrefaction correction technology to eliminate the deviation of CT values between autopsy data and live data, thereby improving the segmentation accuracy of the model on autopsy data.
[0032] Furthermore, the collection of live head CT image data and the statistical analysis of standard histograms of live brain CT scans include the following steps: In vivo head CT data preprocessing includes collecting in vivo head CT image data and removing data containing artifacts to obtain a processed CT dataset. Brain tissue regions were extracted using a brain segmentation model. ; Extract the HU value of living brain tissue, and combine all extracted brain tissue HU values according to formula (1); (1) Statistical analysis of standard histograms of in vivo brain CT scans This includes defining bin boundaries. Where k=0, ..., K, , K=512, calculate the frequency according to formula (2), and add overflow processing according to formula (3); (2) (3) Normalize the probability histogram according to formula (4); (4) Calculate the cumulative distribution function using formula (5). ; (5) Furthermore, based on the standard histogram of a live brain CT scan, the cadaver data is corrected for CT values, including the following steps: Input cadaver head CT image data: autopsy CT images Segmentation brain mask ; The HU value extracted from autopsy brain tissue is expressed as: ; Histogram of autopsy data , Referencing the histogram statistics of non-cadaveric brains; Calculate the cumulative distribution function of autopsies Refer to formula (6); (6) Histogram matching processing, including for each brain tissue pixel Match according to formula (7); (7) Pixel processing of putrefactive gas regions in cadaver brain tissue, including: Marking gas pixels That is, brain tissue with a CT value less than -900 is labeled as gas, and then local median filling (neighborhood) is used. for The window is represented by formula (8).
[0033] (8) Specifically, some pixels in the brain tissue of a corpse may be affected by putrefactive gases. In order to eliminate the difference from the clinical in vivo CT values, these pixels need to be compensated.
[0034] Furthermore, step S2 includes the following steps: Cadaver head CT image data processing: After putrefaction correction of cadaver head CT image data, brain tissue is separated using brain segmentation function, and the separated brain tissue data is normalized for maximum and minimum values. Using the K-means clustering method, cluster centers and standard deviations were determined for background, brain tissue, brain hemorrhage, and calcification. Based on the cluster centers and standard deviations, the required window width and window level were set as follows: Fitting the K-Means model: The fitting center category k=4 was set to represent background, brain tissue, hemorrhage, and calcification, respectively. The extracted normalized brain tissue was used to fit the K-Means model to obtain the mean. and standard deviation , where 1 is the background, 2 is brain tissue, 3 is cerebral hemorrhage, and 4 is calcification of the brain. The optimal window width and window level of interest are calculated according to formula (9).
[0035] (9) Specifically, in traditional brain image processing, window width and level settings are usually fixed or manually adjusted based on the experience of technicians. While this approach may meet basic needs in some cases, it cannot adequately adapt to the significant differences between different cases. The CT image features of cerebral hemorrhage vary considerably among patients, including the location of the hemorrhage, the amount of bleeding, and changes in the density of surrounding tissues. These factors all affect image contrast and clarity. Therefore, using fixed or empirical window width and level settings can easily lead to the loss or misjudgment of cerebral hemorrhage feature information, thus affecting the accuracy of diagnosis. To overcome this limitation, one embodiment of this invention proposes an adaptive window width and level method. By clustering the features of case images, the most suitable window width and level are tailored for each case, thereby more accurately highlighting cerebral hemorrhage-related feature information, reducing misjudgments and omissions caused by unreasonable window width and level settings, and significantly improving the accuracy and robustness of cerebral hemorrhage segmentation.
[0036] Further, in step S3, the CT image data with adaptive window width and window level is coarsely segmented to obtain a coarse segmentation result, including the following steps: Based on the parameters obtained from cluster analysis, the corrected CT image data is truncated to three different window widths and window levels to form a three-channel input method; The display range of each channel is calculated using formula (10). ch1 displays only cerebral hemorrhage and is used to display the hemorrhage area with high contrast, while inhibiting brain tissue and calcification. ch2 displays brain tissue and cerebral hemorrhage and is used to observe the relationship between hemorrhage and surrounding brain tissue. ch3 displays brain tissue, cerebral hemorrhage and calcification and is used to observe all lesions and normal tissues globally. (10) Each channel is normalized based on its maximum and minimum values, and the spacing of each channel image is amplified. The CT image data with the adaptive window width and window level is input into the coarse segmentation network. The network is trained and the input image is segmented using the labeled brain hemorrhage mask, and the coarse segmentation result is output.
[0037] Specifically, in order to enable the segmentation algorithm to focus on different tissues of the brain, one embodiment of the present invention adopts a three-channel input method. First, after obtaining the mean and bias of each class according to K-Means clustering, the display range of each channel is calculated by the above formula (10). Among them, ch1 only displays cerebral hemorrhage, and displays the hemorrhage area with high contrast, suppressing brain tissue and calcification; ch2 displays brain tissue and cerebral hemorrhage, which is convenient for observing the relationship between hemorrhage and surrounding brain tissue; ch3 displays brain tissue, cerebral hemorrhage and calcification, and observes all lesions and normal tissues globally. Then, each channel is normalized according to its maximum and minimum values. Then, the spacing of the input image is enlarged, which can make the algorithm pay more attention to the global information of the image. At the same time, the enlarged spacing also weakens the algorithm's attention to noise points and artifacts, because the CT values of noise points and artifacts may be similar to the hemorrhage area. If they are not processed, they may mislead the algorithm and lead to incorrect hemorrhage detection. In addition, the enlarged spacing reduces the size of the input image and speeds up the segmentation speed of the algorithm.
[0038] Further, in step S3, in response to the detection of a hemorrhage area in the coarse segmentation, the corrected CT image data is further segmented, including the following steps: Based on the coarse segmentation results, it is determined whether there is a bleeding area in the image. If there is a bleeding area, fine segmentation is performed, and the corrected CT image is re-truncated to lower the truncation limit. The image spacing is uniformly reduced, and the CT values are normalized. The normalized data is then input into the fine segmentation network for training and segmentation, and the fine segmentation results are output.
[0039] Specifically, in the precise segmentation stage, a single-channel image is sufficient to meet the segmentation requirements. At this stage, to improve the algorithm's accuracy in identifying hemorrhage areas, the image spacing needs to be reduced, i.e., the image size needs to be enlarged. By enlarging the image size, the algorithm can observe the details in the image more clearly, thus more accurately identifying and locating the hemorrhage area. However, enlarging the image size also brings some challenges. While enlarging the image, noise and artifacts in the image are also correspondingly amplified. These noises and artifacts may have similar CT values to the hemorrhage area, increasing the risk of misjudgment by the algorithm. The algorithm may incorrectly identify these amplified noises and artifacts as hemorrhage areas, leading to false positive results. Therefore, while enlarging the image size to improve segmentation accuracy, effective measures are also needed to suppress the interference of noise and artifacts to ensure the accuracy and reliability of the segmentation results.
[0040] Specifically, step S4 includes the following steps: Connectivity analysis was performed on the coarse and fine segmentation results respectively, dividing adjacent pixels in the segmentation results into different connected regions; For each connected component in the fine segmentation result, determine whether there is an intersection between the connected component and each connected component in the coarse segmentation result; If a connected component in a fine segment intersects with any connected component in a coarse segment, then the fine segment connected component has a bleed region, and the fine segment connected component is retained. If a connected component in a fine segmentation has no intersection with any connected component in a coarse segmentation, then that connected component in the fine segmentation is identified as a false positive region. Deleting the fine segmentation connected component yields a brain hemorrhage segmentation mask with a low false positive rate.
[0041] Specifically, after coarse and fine segmentation, to further improve the accuracy of the segmentation results, false positive removal processing is needed for the fine segmentation results. Specifically, firstly, connected component analysis is performed on the coarse and fine segmentation results, dividing adjacent pixels in the segmentation results into different connected regions. Then, for each connected region in the fine segmentation results, it is determined whether there is any intersection between this connected region and each connected region in the coarse segmentation results. If a connected region in the fine segmentation intersects with any connected region in the coarse segmentation, it indicates that this region was identified as a hemorrhage region in the coarse segmentation stage and is therefore retained. Conversely, if a connected region in the fine segmentation has no intersection with any connected region in the coarse segmentation, it indicates that this connected region may be a false positive region and should be removed. Through these steps, false positive regions in the fine segmentation results can be effectively removed, ultimately obtaining a more accurate segmentation mask for the five types of brain hemorrhage with a lower false positive rate.
[0042] Example 1: See Figure 4 The present invention discloses a preferred embodiment, and the specific implementation steps are as follows: 1) Data annotation: Collect CT images of cerebral hemorrhage and annotate them with five types of cerebral hemorrhage masks, namely intracranial hemorrhage, subarachnoid hemorrhage, subdural hemorrhage, epidural hemorrhage and intraventricular hemorrhage; 2) Grayscale calibration: (Existing methods can also be used for non-cadaver head data, and this grayscale calibration step can be omitted.) a. Statistical histogram of live head CT data: Collect CT data and remove data with artifacts and high noise to make the statistics more accurate; then use a brain segmentation model to segment the brain and obtain the statistical histogram according to the above-mentioned method for statistical analysis of live brain CT standard histogram. b. CT value correction of cadaver data: Brain tissue is also segmented in the input cadaver data, and then the cadaver data is corrected according to the CT value correction method for cadaver data.
[0043] 3) Adaptive window width and level: Using the K-means clustering method, the cluster centers and standard deviations of background, brain tissue, brain hemorrhage, and calcification are determined. Based on these parameters, the required window width can be set according to the needs.
[0044] 4) Input image preprocessing for coarse segmentation network: a. The corrected head CT image is truncated into three different window widths and window levels according to formula (10). The first channel focuses on cerebral hemorrhage, the second channel focuses on brain tissue and hemorrhage, and the third channel focuses on key global brain information. The images with three different truncation values are combined into a three-channel data. b. Normalize the three-channel data and amplify the spacing of the three-channel image, which is equivalent to reducing the size of the image. This allows the algorithm to focus more on the global information of the image and reduce attention to local noise and artifacts, thereby reducing the occurrence of false positives. c. Combine the five types of masks into one type, that is, set all values greater than 0 in the mask to 1, and use them as label data for training the coarse segmentation network; 5) Training and testing of the coarse segmentation network; a. Input the processed data obtained in step 2 into the coarse segmentation network for training, use the loss function to calculate the network loss, and continuously update and save the network parameters according to the value of the loss function until the loss function reaches a better level; b. Use the trained network to segment the input image to obtain a coarse segmentation mask; c. Based on the mask output by the coarse segmentation network, determine whether there is a bleed region in the image. If no bleed region is found, the process ends; if a bleed region is found, proceed to the next step of fine segmentation. 6) Preprocessing of finely segmented network data: a. After the coarse segmentation detects the bleeding area, the corrected CT image needs to be re-truncated to further improve segmentation accuracy. Specifically, the grayscale value of the CT image is truncated to the range of [-20HU, 100HU]. This truncation range takes into full account the autopsy data that may exist in actual application scenarios. Since the body may decompose during the autopsy, resulting in a decrease in tissue density and a corresponding decrease in CT value, the lower limit of truncation is set to -20HU to effectively highlight the characteristics of the bleeding area, ensuring that the segmentation algorithm can accurately identify and distinguish the bleeding area from the surrounding tissue, thereby improving the accuracy and reliability of subsequent segmentation steps. b. In contrast to the coarse segmentation stage, the fine segmentation stage requires reducing the spacing and enlarging the image size so that the algorithm can observe image details more clearly and improve segmentation accuracy; c. Normalize the CT values again to ensure the consistency of the input data; 7) Training and testing the fine-segmentation network; a. Input the processed data into the fine segmentation network for training, use the loss function to calculate the network loss, and continuously update and save the network parameters based on the value of the loss function until the loss function reaches an optimal level; b. Use the trained network to perform fine segmentation on the input image. The fine segmentation network outputs a segmentation mask containing 5 types of hemorrhage (intraparenchymal hemorrhage, subarachnoid hemorrhage, subdural hemorrhage, epidural hemorrhage, and intraventricular hemorrhage). 8) Post-processing to remove false positives: a. Perform connected component analysis on the results of coarse and fine segmentation respectively, and divide adjacent pixels into different connected regions; b. For each connected component in the fine segmentation result, calculate its intersection with each connected component in the coarse segmentation result; c. If a connected component in the fine segmentation intersects with any connected component in the coarse segmentation, then retain that connected component; otherwise, discard that connected component. d. Through the above steps, false positive regions in the fine segmentation results are effectively removed, improving the accuracy of segmentation; 9) Output the final result: After post-processing, five types of cerebral hemorrhage segmentation masks with low false positive rates are obtained as the final segmentation results. This result can accurately distinguish different types of hemorrhage, providing a reliable basis for clinical diagnosis; like Figure 2 As shown, to achieve the above objectives, the present invention also discloses an automatic segmentation system for brain hemorrhage in cadaver head CT images, comprising: The autopsy data grayscale calibration module is used to acquire CT image data of cerebral hemorrhage, label the cerebral hemorrhage mask, and use grayscale correction methods to correct the acquired CT image data of the cadaver's head, thus obtaining the corrected CT image data. The dynamic window width and window level generation module is used to generate adaptive window width and window level based on the image features of specific cases through cluster analysis, thereby obtaining CT image data with adaptive window width and window level. The coarse and fine two-level network segmentation module is used to coarsely segment the adaptive window width and window level CT image data to obtain a coarse segmentation result, and in response to the detection of a hemorrhage area by the coarse segmentation, to finely segment the corrected CT image data to obtain a fine segmentation result. The connected component analysis module is used to perform connected component analysis on the coarse and fine segmentation results to obtain a segmentation mask for cerebral hemorrhage with a low false positive rate.
[0045] Specifically, the automatic segmentation system for cerebral hemorrhage disclosed in this invention corresponds to the above-described automatic segmentation method for cerebral hemorrhage. For other parts not described, please refer to the content of the method above.
[0046] To achieve the above objectives, the present invention also provides a computer-readable storage medium comprising multiple storage media, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, app store, etc., wherein a computer program is stored thereon, and the program performs corresponding functions when executed by a processor. The computer-readable storage medium of this embodiment is used to execute any of the above-described methods for automatic segmentation of brain hemorrhage from cadaver head CT images.
[0047] It should be noted that the embodiments of the present invention have better implementability and are not intended to limit the present invention in any way. Any person skilled in the art may use the above-disclosed technical content to change or modify it into equivalent effective embodiments. However, any modifications or equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of the technical solution of the present invention.
Claims
1. An automatic segmentation method for cerebral hemorrhage in cadaver head CT images, characterized in that, Includes the following steps: CT image data of cerebral hemorrhage were acquired, and a cerebral hemorrhage mask was labeled. The acquired CT image data of the cadaver's head was corrected using a grayscale correction method to obtain the corrected CT image data. A dynamic window width and window level generation method is adopted. Based on the image characteristics of specific cases, cluster analysis is used to generate window widths and window levels that are adaptive to the cases, thus obtaining CT image data with adaptive window widths and window levels. The CT image data with adaptive window width and window level is coarsely segmented to obtain a coarse segmentation result. In response to the detection of a hemorrhage area in the coarse segmentation, the corrected CT image data is finely segmented to obtain a fine segmentation result. By performing connected component analysis on the coarse and fine segmentation results, a segmentation mask with a low false positive rate for cerebral hemorrhage is obtained.
2. The method for automatic segmentation of cerebral hemorrhage in cadaver head CT images as described in claim 1, characterized in that, The process of acquiring CT image data of cerebral hemorrhage, labeling it with a cerebral hemorrhage mask, and correcting the acquired cadaver head CT image data using a grayscale correction method to obtain corrected CT image data includes the following steps: CT image data of cerebral hemorrhage were collected and labeled with five types of cerebral hemorrhage masks, including intraparenchymal hemorrhage, subarachnoid hemorrhage, subdural hemorrhage, epidural hemorrhage, and intraventricular hemorrhage. Collect live head CT image data, compile live brain CT standard histograms, and correct the cadaver head CT image data based on the live brain CT standard histograms.
3. The method for automatic segmentation of cerebral hemorrhage in cadaver head CT images as described in claim 2, characterized in that, The process of collecting live head CT image data and calculating the standard histogram of the live brain CT scan includes the following steps: Preprocessing of live head CT image data includes collecting live head CT image data and removing data containing artifacts to obtain a processed live CT dataset. Brain segmentation model was used to extract regions of living brain tissue. ; Extract the HU value of living brain tissue and combine all extracted brain tissue HU values according to formula (1); (1) Statistical analysis of standard histograms from in vivo brain CT scans, including defining bin boundaries. Where k=0, ..., K, , K=512, calculate the frequency according to formula (2), and add overflow processing according to formula (3); (2) (3) Normalize the probability histogram according to formula (4); (4) Calculate the cumulative distribution function according to formula (5). ; (5)。 4. The method for automatic segmentation of cerebral hemorrhage in cadaver head CT images as described in claim 3, characterized in that, The process of correcting cadaver head CT image data based on the standard histogram of a live brain CT scan includes the following steps: Input cadaver head CT image data, including autopsy CT images. Segmentation brain mask ; The HU value extracted from autopsy brain tissue is expressed as: ; The autopsy data histograms were statistically analyzed using the aforementioned method for calculating the standard histogram of in vivo brain CT scans. ; Calculate the cumulative distribution function of the autopsy according to formula (6). ; (6) According to formula (7), for each brain tissue pixel Perform a match; (7) Pixel processing of putrefactive gas regions in cadaver brain tissue includes marking brain tissue with CT values less than -900 as gas pixels (see formula (8-1)) and using local median fill (neighborhood). for (Window), see formula (8-2); (8-1) (8-2)。 5. The method for automatic segmentation of cerebral hemorrhage in cadaver head CT images as described in claim 4, characterized in that, The method employs a dynamic window width and window level generation approach. Based on the image characteristics of specific cases, cluster analysis is used to generate window widths and window levels that are adaptive to the cases, resulting in CT image data with adaptive window widths and window levels. This includes the following steps: After performing putrefaction correction on the CT image data of the cadaver's head, the brain tissue was separated using brain segmentation function. The separated brain tissue data was then normalized to the maximum and minimum values to achieve the processing of the CT image data of the cadaver's head. Using the K-means clustering method, cluster centers and standard deviations were determined for background, brain tissue, brain hemorrhage, and calcification. Based on the cluster centers and standard deviations, the required window width and window level were set as follows: The fitting center category was set to k=4, representing background, brain tissue, hemorrhage, and calcification, respectively. A K-Means model was fitted using the extracted normalized brain tissue to obtain the mean. and standard deviation Where 1 represents the background, 2 represents brain tissue, 3 represents cerebral hemorrhage, and 4 represents calcification of the brain, the optimal window width and window level of interest are calculated according to formula (9). (9)。 6. The method for automatic segmentation of cerebral hemorrhage in cadaver head CT images as described in claim 5, characterized in that, The step of coarsely segmenting the CT image data with adaptive window width and window level to obtain the coarse segmentation result includes the following steps: Based on the parameters obtained from cluster analysis, the corrected CT image data is truncated to three different window widths and window levels to form a three-channel input method; The display range of each channel is calculated using formula (10). ch1 displays only cerebral hemorrhage and is used to display the hemorrhage area with high contrast, while inhibiting brain tissue and calcification. ch2 displays brain tissue and cerebral hemorrhage and is used to observe the relationship between hemorrhage and surrounding brain tissue. ch3 displays brain tissue, cerebral hemorrhage and calcification and is used to observe all lesions and normal tissues globally. (10) Each channel is normalized based on its maximum and minimum values, and the spacing of each channel image is amplified. The CT image data with the adaptive window width and window level is input into the coarse segmentation network. The network is trained and the input image is segmented using the labeled brain hemorrhage mask, and the coarse segmentation mask is output.
7. The method for automatic segmentation of cerebral hemorrhage in cadaver head CT images as described in claim 6, characterized in that, In response to the detection of a hemorrhage area in the coarse segmentation, the corrected CT image data is further segmented to obtain a fine segmentation result, including the following steps: Based on the coarse segmentation results, it is determined whether there is a bleeding area in the image. If there is a bleeding area, the corrected CT image is re-truncated to lower the truncation limit. The image spacing is uniformly reduced, and the CT values are normalized. The normalized data is then input into the fine segmentation network for training and segmentation, and the fine segmentation results are output.
8. The method for automatic segmentation of cerebral hemorrhage in cadaver head CT images as described in claim 7, characterized in that, The process of performing connected component analysis on the coarse and fine segmentation results to obtain a segmentation mask for cerebral hemorrhage with a low false positive rate includes the following steps: Connectivity analysis was performed on the coarse and fine segmentation results respectively, dividing adjacent pixels in the segmentation results into different connected regions; For each connected component in the fine segmentation result, determine whether there is an intersection between the connected component and each connected component in the coarse segmentation result; If a connected component in a fine segment intersects with any connected component in a coarse segment, then the fine segment connected component has a bleed region, and the fine segment connected component is retained. If a connected component in a fine segmentation has no intersection with any connected component in a coarse segmentation, then that connected component in the fine segmentation is identified as a false positive region. Deleting the fine segmentation connected component yields a brain hemorrhage segmentation mask with a low false positive rate.
9. An automatic segmentation system for brain hemorrhage in cadaver head CT images, characterized in that, include: The autopsy data grayscale calibration module is used to acquire CT image data of cerebral hemorrhage, label the cerebral hemorrhage mask, and use grayscale correction methods to correct the acquired CT image data of the cadaver's head, thus obtaining the corrected CT image data. The dynamic window width and window level generation module is used to generate adaptive window width and window level based on the image features of specific cases through cluster analysis, thereby obtaining CT image data with adaptive window width and window level. The coarse and fine two-level network segmentation module is used to coarsely segment the adaptive window width and window level CT image data to obtain a coarse segmentation result, and in response to the detection of a hemorrhage area by the coarse segmentation, to finely segment the corrected CT image data to obtain a fine segmentation result. The connected component analysis module is used to perform connected component analysis on the coarse and fine segmentation results to obtain a segmentation mask for cerebral hemorrhage with a low false positive rate.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer executes the automatic segmentation method for cerebral hemorrhage in cadaver head CT images according to any one of claims 1-8.