A method and system for analyzing cranial ct images
By constructing an improved Net neural network segmentation model, combined with an attention mechanism and a two-layer twin encoder-decoder architecture, the noise and artifact problems in brain tumor segmentation in cranial CT images are solved, improving recognition accuracy and reducing errors, making it suitable for applications in more medical settings.
Patent Information
- Application Number
- CN202510463056.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-04-14
AI Technical Summary
Existing automatic segmentation methods for cranial CT images suffer from problems such as noise, low contrast, and artifacts when processing brain tumor images, resulting in insufficient recognition accuracy, difficulty in meeting real-time requirements, and the risk of human error and misdiagnosis.
An improved Net neural network segmentation model was constructed, combining an attention mechanism and a two-layer twin encoder-decoder architecture. Through preprocessing and improved Dice loss and cross-entropy loss functions, the accuracy and precision of brain tumor segmentation were improved.
It achieves high-precision and high-accuracy segmentation of cranial CT images, reduces human error, is suitable for wider application in more medical settings, and simplifies the operation process.
Smart Images

Figure CN120374558B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image segmentation, recognition and analysis technology, and in particular to a method and system for analyzing cranial CT images. Background Technology
[0002] Cranial CT scan is a non-invasive imaging technique that uses X-rays and computer-generated reconstructions to create cross-sectional images of the brain. CT scans offer high resolution and density resolution, clearly displaying intracranial structures such as brain parenchyma, blood vessels, bone, and calcifications. Common types of CT scans include plain scans, contrast-enhanced scans, dynamic scans, perfusion imaging, and 3D reconstruction. For example, contrast-enhanced scans increase the contrast of lesions by injecting contrast agents, thus providing a more accurate diagnosis.
[0003] Image segmentation and processing: Utilizing the grayscale differences in CT images, algorithms are used to extract information from specific regions (such as brain tissue, ventricles, calcifications, etc.). For example, automated methods based on genetic algorithms can efficiently segment brain regions and calculate ventricular volume.
[0004] With the rapid development of deep learning technology, automatic segmentation of brain tumor images has become an emerging research direction in the field of medical imaging. However, due to the complexity of brain tumor images, such as noise, low contrast and artifacts, as well as the difficulty in meeting real-time requirements, existing automatic segmentation methods are not satisfactory in dealing with these challenges.
[0005] Therefore, designing a cranial CT image analysis method and proposing an efficient and accurate automatic brain tumor segmentation algorithm for brain tumor segmentation tasks, improving the accuracy of identification, reducing errors caused by human subjectivity, eliminating the risk of missed diagnosis and misdiagnosis, and saving manpower and resources, is an important research topic for technicians in this field. Summary of the Invention
[0006] In view of this, it is necessary to provide a cranial CT image analysis method that can improve the accuracy of identification, reduce invasiveness, provide ultrasound-guided precise positioning, reduce errors and complications, is easy to promote and apply, is relatively simple to operate, and is suitable for promotion and application in more medical settings.
[0007] This application provides a method and system for analyzing cranial CT images. The method involves acquiring cranial CT image data; preprocessing the cranial CT image data; constructing an improved Net neural network segmentation model based on a Net neural network segmentation model and incorporating an attention mechanism; inputting the cranial CT images into the improved Net neural network segmentation model to obtain the output results of the Net neural network segmentation model. The Net neural network segmentation model is used to predict parameters and target region segmentation results based on the input cranial CT image data and then outputs the results. By constructing an improved Net neural network segmentation model including a two-layer twin encoder and decoder architecture, pixel-level classification results are obtained, marking the location and extent of abnormal regions, which can improve the accuracy and precision of cranial CT image analysis. Using the sum of an improved Dice loss and an improved cross-entropy as the loss function, the evaluation results are more accurate.
[0008] In a first aspect, embodiments of this application provide a method for analyzing cranial CT images, the method comprising:
[0009] Obtain cranial CT imaging data;
[0010] The cranial CT image data is preprocessed;
[0011] An improved Net neural network segmentation model is constructed by combining an attention mechanism with the existing Net neural network segmentation model.
[0012] The cranial CT image is input into the improved Net neural network segmentation model to obtain the output result of the Net neural network segmentation model. The Net neural network segmentation model is used to predict parameters and target region segmentation results based on the input cranial CT image data and output them.
[0013] Optionally, in one implementation of the first aspect of the present invention, the preprocessing of the cranial CT image data includes:
[0014] The cranial CT images were clustered by the gray value of each pixel using the FCM algorithm, and divided into gray matter, white matter, cerebrospinal fluid, and hemorrhage areas.
[0015] The skull portion was removed using morphological expansion and erosion methods.
[0016] Optionally, in one implementation of the first aspect of the present invention, the step of constructing an improved Net neural network segmentation model by combining an attention mechanism with the Net neural network segmentation model includes:
[0017] The initial improved Net neural network segmentation model includes a two-layer twin encoder and decoder architecture. The architecture uses two identical two-layer structures, with the encoder and decoder each having a two-layer design. The brain CT image segmentation steps are executed in parallel to obtain the segmentation results of the available features of brain CT images of different modalities. The segmentation results are then averaged and fused, and the average value of the available features of the different modalities is used as the fusion result.
[0018] The initial improved Net neural network segmentation model extracts high-level semantic features of the image through an encoder, restores the high-level semantic features to the resolution of the original image through a decoder, and generates segmentation results.
[0019] The model uses the U-Net network as the baseline model, captures multi-scale features through a two-layer twin encoder-decoder structure, and preserves spatial details through skip connections. The encoder adopts an asymmetric structure using a hybrid architecture of U-Net and CNN to extract local and global features, and introduces an improved residual attention mechanism to increase the weight of tumor sites in cranial CT images in the network model, so that the network model focuses on the tumor site region and suppresses interference from irrelevant tissues.
[0020] The decoder consists of a CNN architecture. An improved residual attention mechanism is added to the upsampling step to improve segmentation accuracy. An attention gate is incorporated into the skip connections, and the resulting attention map is concatenated with the feature map obtained by the decoder upsampling. This fuses low-level and high-level features to achieve more refined segmentation. The concatenated feature map after skip connections is subjected to two convolution operations to enhance the network's feature extraction capability for cranial CT images. Finally, a 1×1 convolution is performed to reduce the number of network parameters.
[0021] To aggregate image features from different modalities and handle the possibility of missing one or more modalities, the average of the available features from different modalities can be used as the first fusion result. That is, the fused average features are obtained.
[0022] Optionally, in one implementation of the first aspect of the present invention, the architecture of the improved residual attention mechanism includes:
[0023] Based on U-Net, improved residual blocks and attention residual blocks are added. The architecture consists of a shrinking module, a central module, and an expansion module. Residual blocks are used in the shrinking module to reduce information loss. An attention mechanism is introduced in the expansion module to focus on key regions through gating and attention blocks. The attention mechanism enables the network to emphasize important features and focus on key regions. The integration of residual connections helps to reduce information loss during training, ensures more efficient and stable learning, optimizes feature representation, and alleviates network degradation.
[0024] The arrow from the shrinking module to the expanding module is called a skip connection. The purpose of skip connections is to store additional information from important features. Upsampling outputs are connected to skip connections to increase feature localization, thereby creating more refined outputs at a deeper level of the model and enhancing the final prediction.
[0025] In the shrinking module of each downsampling block, residual techniques are implemented to improve extraction efficiency and reduce information loss. In each downsampling block, the input tensor passes through two modules. One module applies two filters for two-dimensional convolution and configures the modified linear unit ReLU activation function. The tensor of the other module passes through one convolution to form a shortcut module. The outputs of the two modules are added together and ReLU activation is performed.
[0026] Optionally, in one implementation of the first aspect of the present invention, the improved Net neural network segmentation model further includes a training process:
[0027] The improved Net neural network segmentation model is trained deeply on the training set, the number of filters and the learning rate are initialized, the optimal combination of hyperparameters of the model is adjusted as the model learns the features and patterns of the training data, the performance of the model is evaluated on the validation set, the learning rate and optimizer parameters are adjusted, and its performance on unseen data is evaluated on the test set, resulting in the improved Net neural network segmentation model.
[0028] Among them, adjusting the learning rate, a hyperparameter in the deep learning model, controls the step size of parameter updates, controls the speed at which model parameters are updated in each iteration, and determines the size of the step size of the model updating along the gradient direction in the parameter space. If the validation set loss fluctuates greatly, the learning rate needs to be reduced; if convergence is too slow, it should be appropriately increased. The Adam adaptive optimizer is used for automatic adjustment.
[0029] Batch size affects the stability of gradient calculation. Larger batches can speed up training but consume more memory; smaller batches can enhance generalization ability but increase noise. Adjust the number of samples used to update model parameters in each training iteration, and balance it according to hardware conditions and task requirements. The model can perform forward propagation and calculate loss based on a batch of samples, and update model parameters through backpropagation.
[0030] In each training batch, each feature is normalized so that its mean is close to 0 and its standard deviation is close to 1, which reduces the internal covariate bias, accelerates convergence, and improves the stability of the model.
[0031] After deriving a stable loss function (Loss), performance is evaluated using accuracy (ACC), Dice score, and precision (PC) index, and a line graph is generated using a visualization module.
[0032] Optionally, in one implementation of the first aspect of the present invention, obtaining a stable loss function Loss includes:
[0033] An adaptive mechanism is added to the Dice loss and cross-entropy loss functions to obtain improved Dice loss and improved cross-entropy.
[0034] The model is solved and evaluated by minimizing the sum of the improved Dice loss and the improved cross-entropy, using the loss function as the sum. The loss function formula is as follows:
[0035]
[0036] Where, N c N r P represents the normalization coefficient pixel point, respectively. i 0 P represents the probability that the region belongs to the i-th class. i * P represents the value determined based on the label of its region. i * ∈{0,1},λ c , λ r These represent the adjustment weights, ε represents the predicted class relative to the probabilities of true positives (TP), false positives (FP), and false negatives (FN), respectively, i and j represent pixels, and ε represents the smoothing factor.
[0037] Optionally, in one implementation of the first aspect of the present invention, the step of inputting the cranial CT image into the improved Net neural network segmentation model to obtain the output result of the Net neural network segmentation model includes:
[0038] By using an improved Net neural network segmentation model to output the segmented regions, pixel-level classification results are obtained, marking the location and extent of abnormal regions.
[0039] Secondly, embodiments of this application provide a cranial CT image analysis system, applied to the cranial CT image analysis method as described in the first aspect, characterized in that it includes:
[0040] The data acquisition module is used to acquire cranial CT image data;
[0041] The data processing module is used to preprocess the cranial CT image data;
[0042] The model building module is used to build an improved Net neural network segmentation model by combining the attention mechanism on the basis of the Net neural network segmentation model.
[0043] An auxiliary diagnostic module is used to input the cranial CT image into the improved Net neural network segmentation model, obtain the output result of the Net neural network segmentation model, and the Net neural network segmentation model is used to predict parameters and target region segmentation results based on the input cranial CT image data and output them.
[0044] Thirdly, embodiments of this application provide an electronic device, including:
[0045] processor;
[0046] Memory used to store processor-executable instructions;
[0047] The processor is configured to implement the cranial CT image analysis method as described in any one of claims 1 to 7 when executing the instructions.
[0048] Fourthly, embodiments of this application provide a computer-readable storage medium storing a program that instructs a device to perform the cranial CT image analysis method as described in any one of claims 1 to 7.
[0049] This application provides a method and system for analyzing cranial CT images. The method involves: acquiring cranial CT image data; preprocessing the cranial CT image data; constructing an improved Net neural network segmentation model based on a Net neural network segmentation model and incorporating an attention mechanism; inputting the cranial CT images into the improved Net neural network segmentation model to obtain the output result of the Net neural network segmentation model. The Net neural network segmentation model is used to predict parameters and target region segmentation results based on the input cranial CT image data and then outputting the results.
[0050] Beneficial effects:
[0051] (1) By constructing an improved Net neural network segmentation model that includes a dual-layer twin encoder and decoder architecture, pixel-level classification results are obtained, and the location and extent of abnormal regions are marked, which can improve the accuracy and precision of cranial CT image analysis.
[0052] (2) The improved Dice loss and the improved cross-entropy sum are used as the loss function. The model is solved and evaluated by minimizing the loss function, and the loss function of the model is optimized and improved, and the evaluation results are more accurate.
[0053] (3) Easy to promote and apply: Since it does not require surgery and is relatively simple to operate, it is suitable for promotion and application in more medical settings. Attached Figure Description
[0054] Figure 1This is a schematic flowchart of a cranial CT image analysis method provided in an embodiment of this application.
[0055] Figure 2 The diagram shows the overall structure of an improved Net neural network segmentation model provided in an embodiment of this application.
[0056] Figure 3 This is a diagram of an encoder-decoder network architecture provided in one embodiment of this application.
[0057] Figure 4 This is a diagram illustrating an improved residual attention mechanism architecture provided in an embodiment of this application.
[0058] Figure 5 This is a schematic diagram of a cranial CT image analysis system module provided in an embodiment of this application.
[0059] Figure 6 A schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0060] 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 a part of the embodiments of this application, and not all of them.
[0061] It should be noted that, in the embodiments of this application, "at least one" refers to one or more, and "more than one" refers to two or more. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the specification of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application.
[0062] It should be noted that in the embodiments of this application, the terms "first," "second," etc., are used only for descriptive purposes and should not be construed as indicating or implying relative importance, nor as indicating or implying order. Features specified as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0063] Based on the embodiments described in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0064] Example 1
[0065] This application provides a method and system for analyzing cranial CT images. The method involves acquiring cranial CT image data; preprocessing the cranial CT image data; constructing an improved Net neural network segmentation model based on a Net neural network segmentation model and incorporating an attention mechanism; inputting the cranial CT images into the improved Net neural network segmentation model to obtain the output results of the Net neural network segmentation model. The Net neural network segmentation model is used to predict parameters and target region segmentation results based on the input cranial CT image data and then outputs the results. By constructing an improved Net neural network segmentation model including a two-layer twin encoder and decoder architecture, pixel-level classification results are obtained, marking the location and extent of abnormal regions, which can improve the accuracy and precision of cranial CT image analysis. Using the sum of an improved Dice loss and an improved cross-entropy as the loss function, the evaluation results are more accurate.
[0066] Figure 1 This is a schematic flowchart of a cranial CT image analysis method provided in an embodiment of this application.
[0067] like Figure 1 As shown, a method for analyzing cranial CT images includes:
[0068] S1: Acquire cranial CT imaging data.
[0069] It is understood that, in this embodiment, the acquisition of cranial CT image data follows legal and compliant methods.
[0070] Data sources include public datasets, such as open-source medical imaging databases, or hospitals or medical institutions, such as clinical collaborations. It is crucial to ensure the legality of the data sources and protect patient privacy: data must be anonymized (removing sensitive information such as names and IDs). Medical imaging data is typically in DICOM format and requires specialized software (such as ITK-SNAP or 3D Slicer) to view or process.
[0071] Data acquisition methods include: patient positioning and positioning lines: the patient is placed in a supine position using a hard bed, with the head fixed on a CT scan pillow to maintain a midline position and reduce motion artifacts. Commonly used scanning baselines include the canthal line (the line connecting the external auditory canthus and the external canthus) and the brow line (the line connecting the midpoint of the upper edge of the eyebrow and the external auditory canthus), with the canthal line being the most commonly used due to its accurate positioning and ideal scanning range.
[0072] S2: Preprocess the cranial CT image data.
[0073] It is understood that, in this embodiment, the preprocessing of the cranial CT image data includes:
[0074] The cranial CT images were clustered by the gray value of each pixel using the FCM algorithm, and divided into gray matter, white matter, cerebrospinal fluid, and hemorrhage areas.
[0075] The skull portion was removed using morphological expansion and erosion methods.
[0076] Algorithms (such as FCM clustering) are used for intracranial structure segmentation to eliminate skull interference and improve lesion identification accuracy. Deep learning models (such as convolutional neural networks) can be used for automated feature extraction and classification.
[0077] Specifically, based on the above preprocessing, a basic preprocessing procedure is required, including data cleaning: removing salt-and-pepper noise using a median filter, reducing high-frequency noise in the smoothed image using a Gaussian filter, and removing noise points from the image using a mean filter.
[0078] Noise removal is the primary step in data cleaning. Cranial CT images can be affected by noise from the imaging equipment, the scanning process, or the transmission process. This noise exists in the form of speckle, artifacts, motion artifacts, etc., severely affecting image quality and the accurate display of cranial structures. Therefore, noise removal is a crucial step in data cleaning to improve image quality. Filters are the most commonly used noise removal tools. This invention uses a median filter, a Gaussian filter, and a mean filter. The median filter is used to remove salt-and-pepper noise, the Gaussian filter is used to smooth the image and reduce high-frequency noise, and the mean filter is used to remove noise points in the image.
[0079] Images were screened and removed. Images that were removed included those with low quality, incomplete content, severe artifacts, or that did not meet the research objectives.
[0080] Through such screening and elimination steps, it can be preliminarily ensured that the images used are of high quality, complete in content, and consistent with the research objectives. This is of great significance for improving the accuracy and efficiency of subsequent image processing and analysis. Data cleaning is an essential step in the preprocessing of panoramic cranial CT images. Effective data cleaning can significantly improve the quality of cranial CT image data, providing a basic data guarantee for subsequent image segmentation and analysis tasks. This is of great significance for improving the accuracy and stability of cranial CT image data segmentation, as well as enhancing model performance and generalization ability.
[0081] Image resampling can also be performed using bilinear interpolation. Because the equipment, parameters, and resolution used to acquire cranial CT image data may vary, this can lead to differences in image size and resolution. Therefore, to ensure consistency and fairness in subsequent processing steps, images are resampled so that all images have the same size and resolution.
[0082] The basic idea of image resampling is to change the size and resolution of an image through interpolation or sampling. Interpolation is a method of predicting unknown pixel values based on known pixel values. Several modern mainstream image resampling methods (all set to a 10% reduction) include bilinear interpolation, nearest neighbor interpolation, bicubic interpolation, and Lanczos interpolation. Labeling specific regions or objects in an image and performing label format conversion and label resampling are also performed.
[0083] A label (or marker) is a description of a specific region or object in an image, used to indicate specific structures in the image, such as gray matter, white matter, cerebrospinal fluid, and hemorrhage areas. The label processing in this study mainly includes two parts: label generation and label preprocessing.
[0084] The generated labels need preprocessing to adapt them for subsequent image processing tasks. This study's label preprocessing includes label format conversion and label resampling. However, label generation is a time-consuming task that requires a basic level of professional knowledge and is sometimes affected by subjective factors. Effective label processing can generate high-quality, consistent labels, laying a solid foundation for model training and validation.
[0085] Image enhancement processing is performed on the image using contrast enhancement methods, including one or more of linear contrast stretching, nonlinear contrast stretching, and histogram equalization. The image is then sharpened to enhance the edges and details of structures in the cranial CT image, and texture and shape are enhanced using filters.
[0086] Data augmentation increases the size and diversity of the training set by creating variations of the original data, thereby improving the model's generalization ability and reducing the risk of overfitting. The data augmentation methods used in this invention include geometric transformation and random noise injection. Geometric transformation is a common data augmentation method, including translation, rotation, scaling, and flipping operations. These operations can change the position, orientation, and scale of an image without altering its content. For example, rotating a cranial CT image can simulate different shooting angles, increasing the model's robustness to angle changes. Random noise injection is a more advanced data augmentation method that simulates noise that may occur during the actual image acquisition process by adding random noise to the image. However, some data augmentation methods are not entirely suitable for cranial CT images.
[0087] S3: Based on the Net neural network segmentation model, an improved Net neural network segmentation model is constructed by combining an attention mechanism.
[0088] Understandably, the role of residual blocks is that they are one of the core components of the Net neural network segmentation model. Through residual connections, residual blocks can preserve detailed information from the original input feature maps. This is crucial for image segmentation tasks, as the segmentation results require good spatial detail and boundary information. Feature extraction: The convolutional layers in each residual block can effectively extract local features of the image. Stacking multiple residual blocks allows the network to extract higher-level semantic features, thus performing better image segmentation tasks.
[0089] The encoder's role is to transform the input image into a semantically rich feature representation through layer-by-layer downsampling and feature extraction.
[0090] The decoder's role is to restore the feature maps extracted by the encoder to the resolution of the original image and generate the final segmentation result. Resolution restoration: The decoder achieves progressive resolution restoration through upsampling layers. By performing multiple upsampling operations, the decoder can gradually restore the resolution of the feature maps to near the resolution of the original image, thereby restoring the image's details and boundaries.
[0091] Figure 2 This is a diagram illustrating the overall structure of an improved Net neural network segmentation model provided in an embodiment of this application. Figure 2 As shown, in this embodiment, the step of constructing an improved Net neural network segmentation model by combining an attention mechanism with the Net neural network segmentation model includes:
[0092] The initial improved Net neural network segmentation model includes a two-layer twin encoder and decoder architecture. The architecture uses two identical two-layer structures, namely a first encoder and decoder architecture and a second encoder and decoder architecture. The encoder and decoder each have a two-layer design and perform the brain CT image segmentation steps in parallel to obtain the segmentation results of the available features of brain CT images of different modalities. The segmentation results are then averaged and fused, and the average value of the available features of the different modalities is used as the fusion result.
[0093] The initial improved Net neural network segmentation model extracts high-level semantic features of the image through an encoder, restores the high-level semantic features to the resolution of the original image through a decoder, and generates segmentation results.
[0094] The model uses the U-Net network as the baseline model, captures multi-scale features through a two-layer twin encoder-decoder structure, and preserves spatial details through skip connections. The encoder adopts an asymmetric structure using a hybrid architecture of U-Net and CNN to extract local and global features, and introduces an improved residual attention mechanism to increase the weight of tumor sites in cranial CT images in the network model, so that the network model focuses on the tumor site region and suppresses interference from irrelevant tissues.
[0095] Figure 3 This is a diagram of an encoder-decoder network architecture provided in one embodiment of this application. Specifically, as shown... Figure 3 As shown, the decoder consists of a CNN architecture. An improved residual attention mechanism is added to the upsampling step to improve segmentation accuracy. An attention gate is incorporated into the skip connections, and the obtained attention map is concatenated with the feature map obtained by the decoder upsampling. This fuses low-level and high-level features to achieve more refined segmentation. The feature map concatenated after skip connections is subjected to two convolution operations to enhance the network's feature extraction capability for cranial CT images. Finally, a 1×1 convolution is performed to reduce the number of network parameters.
[0096] Figure 4 This is a diagram illustrating an improved residual attention mechanism architecture provided in an embodiment of this application. Figure 4 As shown, specifically, the architecture of the improved residual attention mechanism includes:
[0097] Based on U-Net, improved residual blocks and attention residual blocks are added. The architecture consists of a shrinking module, a central module, and an expansion module. Residual blocks are used in the shrinking module to reduce information loss. An attention mechanism is introduced in the expansion module to focus on key regions through gating and attention blocks. The attention mechanism enables the network to emphasize important features and focus on key regions. The integration of residual connections helps to reduce information loss during training, ensures more efficient and stable learning, optimizes feature representation, and alleviates network degradation.
[0098] The arrow from the shrinking module to the expanding module is called a skip connection. The purpose of skip connections is to store additional information from important features. Upsampling outputs are connected to skip connections to increase feature localization, thereby creating more refined outputs at a deeper level of the model and enhancing the final prediction.
[0099] In the shrinking module of each downsampling block, residual techniques are implemented to improve extraction efficiency and reduce information loss. In each downsampling block, the input tensor passes through two modules. One module applies two filters for two-dimensional convolution and configures the modified linear unit ReLU activation function. The tensor of the other module passes through one convolution to form a shortcut module. The outputs of the two modules are added together and ReLU activation is performed.
[0100] Specifically, such as Figure 4As shown, it consists of a shrinking module (left), a bottleneck (center), and an expanding module (right). The arrows from the shrinking module to the expanding module are called skip connections. The purpose of skip connections is to store additional information from important features, where the upsampled output is connected to the skip connection to enhance feature localization, leading to an enhanced final prediction. In this work, a more complex U-Net architecture is employed, utilizing attention and residual techniques. The attention mechanism enables the network to emphasize important features, allowing it to focus on key regions. The integration of residual connections helps reduce information loss during training, ensuring more efficient and stable learning. The model is further enhanced by implementing Monte Carlo dropout techniques.
[0101] The model's architecture is built around two downsampling blocks, a bottleneck, and two upsampling blocks. In the shrinking module of each downsampling block, residual techniques are implemented to improve efficiency and reduce information loss. This means that in each downsampling block, its input tensor passes through two modules. In the main module, two 3x3 two-dimensional convolutions are applied, each followed by a Rectified Linear Unit (ReLU) activation function. Simultaneously, in the sub-module, the tensor undergoes one more convolution to form a shortcut module. After these steps, the outputs of the two modules are summed and ReLU activated.
[0102] The improved Net neural network segmentation model also includes a training process:
[0103] The improved Net neural network segmentation model is trained deeply on the training set, the number of filters and the learning rate are initialized, the optimal combination of hyperparameters of the model is adjusted as the model learns the features and patterns of the training data, the performance of the model is evaluated on the validation set, the learning rate and optimizer parameters are adjusted, and its performance on unseen data is evaluated on the test set, resulting in the improved Net neural network segmentation model.
[0104] Among them, adjusting the learning rate, a hyperparameter in the deep learning model, controls the step size of parameter updates, controls the speed at which model parameters are updated in each iteration, and determines the size of the step size of the model updating along the gradient direction in the parameter space. If the validation set loss fluctuates greatly, the learning rate needs to be reduced; if convergence is too slow, it should be appropriately increased. The Adam adaptive optimizer is used for automatic adjustment.
[0105] Batch size affects the stability of gradient calculation. Larger batches can speed up training but consume more memory; smaller batches can enhance generalization ability but increase noise. Adjust the number of samples used to update model parameters in each training iteration, and balance it according to hardware conditions and task requirements. The model can perform forward propagation and calculate loss based on a batch of samples, and update model parameters through backpropagation.
[0106] In each training batch, each feature is normalized so that its mean is close to 0 and its standard deviation is close to 1, which reduces the internal covariate bias, accelerates convergence, and improves the stability of the model.
[0107] After deriving a stable loss function (Loss), performance is evaluated using accuracy (ACC), Dice score, and precision (PC) index, and a line graph is generated using a visualization module.
[0108] Specifically, deriving a stable loss function Loss includes:
[0109] An adaptive mechanism is added to the Dice loss and cross-entropy loss functions to obtain improved Dice loss and improved cross-entropy.
[0110] The model is solved and evaluated by minimizing the sum of the improved Dice loss and the improved cross-entropy, using the loss function as the sum. The loss function formula is as follows:
[0111]
[0112] Where, N c N r P represents the normalization coefficient pixel point, respectively. i 0 P represents the probability that the region belongs to the i-th class. i * P represents the value determined based on the label of its region. i * ∈{0,1},λ c , λ r These represent the adjustment weights, ε represents the predicted class relative to the probabilities of true positives (TP), false positives (FP), and false negatives (FN), respectively, i and j represent pixels, and ε represents the smoothing factor.
[0113] S4: Input the cranial CT image into the improved Net neural network segmentation model to obtain the output result of the Net neural network segmentation model. The Net neural network segmentation model is used to predict parameters and target region segmentation results based on the input cranial CT image data and output them.
[0114] Specifically, in this embodiment, inputting the cranial CT image into the improved Net neural network segmentation model to obtain the output result of the Net neural network segmentation model includes:
[0115] By using an improved Net neural network segmentation model to output the segmented regions, pixel-level classification results are obtained, marking the location and extent of abnormal regions.
[0116] Example 2
[0117] like Figure 5 As shown, this application provides a cranial CT image analysis system, which is applied to the cranial CT image analysis method as described in Embodiment 1, including: a data acquisition module 11, a data processing module 12, a model construction module 13, and an auxiliary diagnosis module 14.
[0118] It is understood that in this embodiment, the data acquisition module 11 is used to acquire cranial CT image data.
[0119] It is understood that in this embodiment, the data processing module 12 is used to preprocess the cranial CT image data.
[0120] It is understood that in this embodiment, the model building module 13 is used to build an improved Net neural network segmentation model by combining an attention mechanism on the basis of the Net neural network segmentation model.
[0121] It is understood that in this embodiment, the auxiliary diagnostic module 14 is used to input the cranial CT image into the improved Net neural network segmentation model to obtain the output result of the Net neural network segmentation model. The Net neural network segmentation model is used to predict parameters and target region segmentation results based on the input cranial CT image data and output them.
[0122] This application provides a method and system for analyzing cranial CT images. The method involves acquiring cranial CT image data; preprocessing the cranial CT image data; constructing an improved Net neural network segmentation model based on a Net neural network segmentation model and incorporating an attention mechanism; inputting the cranial CT images into the improved Net neural network segmentation model to obtain the output results of the Net neural network segmentation model. The Net neural network segmentation model is used to predict parameters and target region segmentation results based on the input cranial CT image data and then outputs the results. By constructing an improved Net neural network segmentation model including a two-layer twin encoder and decoder architecture, pixel-level classification results are obtained, marking the location and extent of abnormal regions, which can improve the accuracy and precision of cranial CT image analysis. Using the sum of an improved Dice loss and an improved cross-entropy as the loss function, the evaluation results are more accurate.
[0123] Figure 6 This is an electronic device provided in one embodiment of this application. For example... Figure 6 As shown, the electronic device includes at least the following components: processor 101 and memory 100, communication interface 103, and bus 102.
[0124] In this embodiment, the memory 100 is used to store executable instructions of the processor 101, which, when configured to execute instructions, implements... Figure 5 The device module shown is for analyzing cranial CT images.
[0125] In embodiments of this application, a computer-readable storage medium includes instructions that instruct a device to perform the method as described in the first aspect. For example, the instructions instruct the device to perform... Figure 1 The process steps illustrate an AI-based method for predicting equipment status and assessing risks.
[0126] In one embodiment of this application, the program operating in the electronic device may be a program that controls a central processing unit (CPU) or similar device to achieve the functions of the above-described embodiments of the present invention (a program that enables the computer to function). The information processed by these devices is then temporarily stored in random access memory (RAM) during processing, and subsequently stored in various ROMs such as read-only memory (FlashROM) or hard disk drives (HDDs), and read, corrected, and written by the CPU as needed.
[0127] It should be noted that a portion of the electronic device described above can also be implemented using a computer. In this case, the program for implementing the control function can be recorded on a computer-readable recording medium, and the program recorded on the recording medium can be read into the computer and executed.
[0128] It should be noted that the term "computer" as used here refers to a computer built into an electronic device, employing hardware including an operating system and peripheral devices. Furthermore, "computer-readable recording media" refers to removable media such as floppy disks, magneto-optical disks, ROMs, and CD-ROMs, as well as storage devices such as hard drives built into a computer.
[0129] Furthermore, a "computer-readable recording medium" can include: a medium that dynamically stores a program for a short period of time, such as a communication line used when transmitting a program via a network such as the Internet or a communication line such as a telephone line; or a medium that stores a program for a fixed period of time, such as volatile memory inside a computer that serves as a server or client in this case. In addition, the aforementioned program can be a program used to implement the above-mentioned functions, or it can be a program that can implement the above-mentioned functions by combining with programs already recorded in the computer.
[0130] Furthermore, the electronic device in the above embodiments can also be implemented as an assembly (device group) composed of multiple devices. Each device constituting the device group can possess some or all of the functions or functional blocks of the electronic device in the above embodiments. As a device group, it is sufficient to have all the functions or functional blocks of the electronic device.
[0131] Those skilled in the art should recognize that the above embodiments are only used to illustrate this application and are not intended to limit this application. Any appropriate changes and variations made to the above embodiments within the essential spirit and scope of this application fall within the scope of protection claimed in this application.
Claims
1. A method for analyzing cranial CT images, characterized in that, The method includes: Obtain cranial CT imaging data; The cranial CT image data is preprocessed; An improved Net neural network segmentation model is constructed by combining an attention mechanism with the existing Net neural network segmentation model. The cranial CT image is input into the improved Net neural network segmentation model to obtain the output result of the Net neural network segmentation model. The Net neural network segmentation model is used to predict parameters and target region segmentation results based on the input cranial CT image data and output them. The improved Net neural network segmentation model, based on the Net neural network segmentation model and incorporating an attention mechanism, includes: The initial improved Net neural network segmentation model includes a two-layer twin encoder and decoder architecture. The architecture uses two identical two-layer structures, with the encoder and decoder each having a two-layer design. The brain CT image segmentation steps are executed in parallel to obtain the segmentation results of the available features of brain CT images of different modalities. The segmentation results are then averaged and fused, and the average value of the available features of the different modalities is used as the fusion result. The initial improved Net neural network segmentation model extracts high-level semantic features of the image through an encoder, restores the high-level semantic features to the resolution of the original image through a decoder, and generates segmentation results. The model uses the U-Net network as the baseline model, captures multi-scale features through a two-layer twin encoder-decoder structure, and preserves spatial details through skip connections. The encoder adopts an asymmetric structure using a hybrid architecture of U-Net and CNN to extract local and global features, and introduces an improved residual attention mechanism to increase the weight of tumor sites in cranial CT images in the network model, so that the network model focuses on the tumor site region and suppresses interference from irrelevant tissues. The decoder consists of a CNN architecture. An improved residual attention mechanism is added to the upsampling step to improve segmentation accuracy. An attention gate is incorporated into the skip connections, and the resulting attention map is concatenated with the feature map obtained by the decoder upsampling. This fuses low-level and high-level features to achieve finer segmentation. The concatenated feature map after skip connections is subjected to two convolution operations to enhance the network's feature extraction capability for cranial CT images. Finally, a 1 × 1 convolution is performed to reduce the number of network parameters.
2. The method for analyzing cranial CT images according to claim 1, characterized in that, The preprocessing of the cranial CT image data includes: The cranial CT images were clustered by the gray value of each pixel using the FCM algorithm, and divided into gray matter, white matter, cerebrospinal fluid, and hemorrhage areas. The skull portion was removed using morphological expansion and erosion methods.
3. The method for analyzing cranial CT images according to claim 1, characterized in that, The architecture of the improved residual attention mechanism includes: Based on U-Net, improved residual blocks and attention residual blocks are added. The architecture consists of a shrinking module, a central module, and an expansion module. Residual blocks are used in the shrinking module to reduce information loss. An attention mechanism is introduced in the expansion module to focus on key regions through gating and attention blocks. The attention mechanism enables the network to emphasize important features and focus on key regions. The integration of residual connections helps to reduce information loss during training, ensures more efficient and stable learning, optimizes feature representation, and alleviates network degradation. The arrow from the shrinking module to the expanding module is called a skip connection. The purpose of skip connections is to store additional information from important features. Upsampling outputs are connected to skip connections to increase feature localization, thereby creating more refined outputs at a deeper level of the model and enhancing the final prediction. In the shrinking module of each downsampling block, residual techniques are implemented to improve extraction efficiency and reduce information loss. In each downsampling block, the input tensor passes through two modules. One module applies two filters for two-dimensional convolution and configures the modified linear unit ReLU activation function. The tensor of the other module passes through one convolution to form a shortcut module. The outputs of the two modules are added together and ReLU activation is performed.
4. A method for analyzing cranial CT images according to claim 3, characterized in that, The improved Net neural network segmentation model also includes a training process: The improved Net neural network segmentation model is trained deeply on the training set, the number of filters and the learning rate are initialized, the optimal combination of hyperparameters of the model is adjusted as the model learns the features and patterns of the training data, the performance of the model is evaluated on the validation set, the learning rate and optimizer parameters are adjusted, and its performance on unseen data is evaluated on the test set, resulting in the improved Net neural network segmentation model. Among them, adjusting the learning rate, a hyperparameter in the deep learning model, controls the step size of parameter updates, controls the speed at which model parameters are updated in each iteration, and determines the size of the step size of the model updating along the gradient direction in the parameter space. If the validation set loss fluctuates greatly, the learning rate needs to be reduced; if convergence is too slow, it should be appropriately increased. The Adam adaptive optimizer is used for automatic adjustment. Batch size affects the stability of gradient calculation. Larger batches can speed up training but consume more memory; smaller batches can enhance generalization ability but increase noise. Adjust the number of samples used to update model parameters in each training iteration, and balance it according to hardware conditions and task requirements. The model can perform forward propagation and calculate loss based on a batch of samples, and update model parameters through backpropagation. In each training batch, each feature is normalized so that its mean is close to 0 and its standard deviation is close to 1, which reduces the internal covariate bias, accelerates convergence, and improves the stability of the model. After deriving a stable loss function (Loss), performance is evaluated using accuracy (ACC), Dice score, and precision (PC) index, and a line graph is generated via a visualization module.
5. A method for analyzing cranial CT images according to claim 4, characterized in that, The process of deriving a stable loss function Loss includes: An adaptive mechanism is added to the Dice loss and cross-entropy loss functions to obtain improved Dice loss and improved cross-entropy. The model is solved and evaluated by minimizing the sum of the improved Dice loss and the improved cross-entropy, using the loss function as the sum. The loss function formula is as follows: ,in, , These represent the pixels with normalized coefficients. Indicates that the region belongs to the first The probability of a class This indicates the value determined based on the label of the region. , These represent the adjustment weights, Representing relative to the true example False positives False negative Prediction class of probability class, Represents pixels. This represents the smoothing factor.
6. The method for analyzing cranial CT images according to claim 5, characterized in that, The step of inputting the cranial CT image into the improved Net neural network segmentation model to obtain the output result of the Net neural network segmentation model includes: By using an improved Net neural network segmentation model to output the segmented regions, pixel-level classification results are obtained, marking the location and extent of abnormal regions.
7. A cranial CT image analysis system, applied to the cranial CT image analysis method as described in any one of claims 1 to 6, characterized in that, include: The data acquisition module is used to acquire cranial CT image data; The data processing module is used to preprocess the cranial CT image data; The model building module is used to build an improved Net neural network segmentation model by combining the attention mechanism on the basis of the Net neural network segmentation model. An auxiliary diagnostic module is used to input the cranial CT image into the improved Net neural network segmentation model, obtain the output result of the Net neural network segmentation model, and the Net neural network segmentation model is used to predict parameters and target region segmentation results based on the input cranial CT image data and output them. The improved Net neural network segmentation model, based on the Net neural network segmentation model and incorporating an attention mechanism, includes: The initial improved Net neural network segmentation model includes a two-layer twin encoder and decoder architecture. The architecture uses two identical two-layer structures, with the encoder and decoder each having a two-layer design. The brain CT image segmentation steps are executed in parallel to obtain the segmentation results of the available features of brain CT images of different modalities. The segmentation results are then averaged and fused, and the average value of the available features of the different modalities is used as the fusion result. The initial improved Net neural network segmentation model extracts high-level semantic features of the image through an encoder, restores the high-level semantic features to the resolution of the original image through a decoder, and generates segmentation results. The model uses the U-Net network as the baseline model, captures multi-scale features through a two-layer twin encoder-decoder structure, and preserves spatial details through skip connections. The encoder adopts an asymmetric structure using a hybrid architecture of U-Net and CNN to extract local and global features, and introduces an improved residual attention mechanism to increase the weight of tumor sites in cranial CT images in the network model, so that the network model focuses on the tumor site region and suppresses interference from irrelevant tissues. The decoder consists of a CNN architecture. An improved residual attention mechanism is added to the upsampling step to improve segmentation accuracy. An attention gate is incorporated into the skip connections, and the resulting attention map is concatenated with the feature map obtained by the decoder upsampling. This fuses low-level and high-level features to achieve finer segmentation. The concatenated feature map after skip connections is subjected to two convolution operations to enhance the network's feature extraction capability for cranial CT images. Finally, a 1 × 1 convolution is performed to reduce the number of network parameters.
8. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to implement the cranial CT image analysis method as described in any one of claims 1 to 6 when executing the instructions.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that instructs the device to perform the cranial CT image analysis method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Cerebral hemorrhage segmentation method and system based on multi-model combination
CN112348796A
Whole-brain clinical target region segmentation method based on series double-attention U-Net network
CN116934772A