Medical image brain region segmentation optimization algorithm based on deep learning

By optimizing the data preprocessing, network structure, and loss function of the deep learning brain region segmentation algorithm, and combining multimodal fusion networks and domain adaptation techniques, the problems of insufficient accuracy in multimodal data fusion and small target region segmentation are solved, the generalization ability of the model is improved, and high-precision brain region segmentation in medical images is achieved.

CN120852769APending Publication Date: 2025-10-28DALIAN MEDICAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510886093.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-30
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

Existing deep learning brain segmentation algorithms face challenges in multimodal data fusion, small target region segmentation accuracy, and model generalization ability, making it difficult to meet the high-precision requirements of clinical applications.

Method used

By employing methods such as data preprocessing, network training, model lightweighting, and evaluation optimization, including the combination of multimodal fusion networks, feature pyramid networks and dilated convolutions, focal loss functions, and domain adaptation techniques, the network structure and loss function are optimized, data augmentation and model lightweighting are performed, forming a closed-loop evaluation-localization-optimization process.

Benefits of technology

It significantly improves the multimodal data fusion effect, the segmentation accuracy of small target regions and the generalization performance of the model, improves the segmentation accuracy and efficiency of brain region segmentation in medical images, adapts to the differences of different data sources, and meets the needs of clinical applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FDA0005473691310000051
    Figure FDA0005473691310000051
  • Figure FDA0005473691310000052
    Figure FDA0005473691310000052
Patent Text Reader

Abstract

The invention belongs to the technical field of medical images, and particularly relates to a medical image brain region segmentation optimization algorithm based on deep learning, and the algorithm comprises the following specific steps: S1, data preprocessing: firstly collecting multi-modal medical image data from different hospitals, and carrying out the data marking, so as to mark real labels of different tissue regions of the brain; performing normalization processing on the image data, and mapping a gray value of the data to an interval of [0, 1] to eliminate gray difference caused by different devices and scanning parameters; and then cutting and zooming the data, and uniformly adjusting the image data into the same size. Through data preprocessing, the problem of inconsistent spatial resolution is solved, standardized data input is provided for subsequent multi-modal fusion network construction based on an attention mechanism, favorable conditions are created for multi-modal data fusion from the source, and the fusion effect is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of medical imaging technology, specifically to a deep learning-based optimization algorithm for brain region segmentation in medical imaging. Background Technology

[0002] With the rapid development of medical imaging technology, techniques such as computed tomography (CT) and magnetic resonance imaging (MRI) are widely used in clinical diagnosis. Medical imaging has become an important basis for the diagnosis, treatment planning, and postoperative evaluation of brain diseases. Brain region segmentation, as a key step in medical image analysis, aims to divide brain tissue in medical images into different regions, such as gray matter, white matter, and cerebrospinal fluid, providing doctors with precise anatomical information.

[0003] In recent years, deep learning has achieved remarkable results in the field of brain region segmentation in medical images due to its powerful feature extraction and pattern recognition capabilities. Segmentation algorithms based on convolutional neural networks (CNNs), such as U-Net and 3DU-Net, can automatically learn brain tissue features from medical images through end-to-end training, significantly improving segmentation accuracy compared to traditional methods. However, due to the complexity of brain tissue structure, significant individual differences, and interference factors such as noise and artifacts in medical images, existing deep learning brain region segmentation algorithms still face many challenges and struggle to meet the high-precision requirements of clinical applications. Specifically, the following problems exist:

[0004] 1. Difficulty in Multimodal Data Fusion: In real-world clinical scenarios, single-modal medical images often fail to provide sufficient information, necessitating the fusion of data from multiple modalities such as CT and MRI for brain region segmentation. However, differences in grayscale and spatial resolution between different modalities hinder multimodal data fusion. For example, CT images clearly display high-density tissues like bone but have poor resolution for soft tissues; while MRI images clearly show soft tissue structures but require longer imaging times and are prone to motion artifacts. Existing multimodal fusion algorithms typically employ simple feature concatenation or weighted fusion methods, failing to fully exploit the complementary information between different modalities and impacting segmentation accuracy. Taking the fusion of two modalities as an example, assuming the input features of the two modalities are F1 and F2, the traditional weighted fusion method can be expressed as: F = αF1 + (1-α)F2; where α is the weighting coefficient. This simple fusion method struggles to adaptively adjust weights based on data characteristics, limiting the improvement of segmentation performance.

[0005] 2. Low Segmentation Accuracy of Small Target Regions: The brain contains some small but functionally important structures, such as the hippocampus and amygdala. Accurate segmentation of these small target regions is crucial for the early diagnosis of diseases like epilepsy and Alzheimer's. However, existing deep learning segmentation algorithms have significant shortcomings when handling small target regions. On one hand, convolutional neural networks gradually reduce the resolution of feature maps during downsampling, leading to the loss of detailed information in small target regions. On the other hand, small target regions account for a small proportion of the training data and are easily ignored by the network, resulting in insufficient learning of these regions by the model. For example, when segmenting the hippocampus, the traditional U-Net algorithm may encounter problems such as blurred boundaries and missed segments. Let the segmentation result be S and the true label be G. For small target regions, the commonly used Dice coefficient evaluation metric is: Because the target area is small, even a small segmentation error can cause the Dice coefficient to decrease significantly, affecting the segmentation accuracy.

[0006] 3. Insufficient Model Generalization Ability: Medical imaging data exhibits strong heterogeneity. Differences in imaging equipment, scanning parameters, and image processing procedures among different hospitals lead to inconsistent data distribution. Existing deep learning segmentation models often overfit the training data during training, resulting in a significant drop in segmentation performance when faced with test data from different data sources. For example, a brain region segmentation model trained in one hospital may experience a 10%-20% decrease in segmentation accuracy when applied to imaging data from other hospitals. From a statistical perspective, the model's loss function on the training set is: Where N is the number of training samples, y i For real labels, Let L be the model's prediction result, and l be the loss function. When the model overfits the training data, the loss function L on the test set... test It will be much larger than L train This results in insufficient generalization ability of the model.

[0007] Based on the above, a deep learning-based optimization algorithm for brain region segmentation in medical images is invented. Summary of the Invention

[0008] To address the aforementioned technical problems, according to one aspect of the present invention, the present invention provides the following technical solution:

[0009] A deep learning-based optimization algorithm for brain region segmentation in medical images includes the following specific steps:

[0010] S1, Data Preprocessing: First, collect multimodal medical image data from different hospitals and perform data annotation to mark the true labels of different brain tissue regions; then, normalize the image data and map the gray values ​​of the data to the [0,1] range to eliminate gray value differences caused by different devices and scanning parameters; then, crop and scale the data to uniformly adjust the image data to the same size.

[0011] S2, Network Training: First, a segmentation network combining a multimodal fusion network based on an attention mechanism, a feature pyramid network, and dilated convolution is built, and a focus loss function and domain adaptation technique are introduced; then, the preprocessed data is divided into training set, validation set, and test set; then, an optimization algorithm is used to train the network;

[0012] S3: Model Lightweighting: First, use structured or unstructured pruning methods to trim the parameters of the trained model; then, convert the model's parameters and calculations from high precision to low precision to reduce memory usage and computational complexity and improve the model's inference speed without significantly affecting the model's accuracy.

[0013] S4: Model Evaluation and Optimization: First, the trained model is evaluated using a test set to assess its segmentation accuracy. Then, the model's segmentation performance is analyzed on different modalities, target regions of different sizes, and data sources to identify any problems. Finally, based on the evaluation results, the network structure, loss function, and data augmentation methods are optimized to further improve the model's performance.

[0014] As a preferred embodiment of the deep learning-based medical image brain region segmentation optimization algorithm described in this invention, the specific steps of S2 are as follows:

[0015] S21, Multimodal Fusion Network Construction: Based on the attention-based multimodal fusion strategy, a network structure including a channel attention module and a spatial attention module is constructed. First, independent feature extraction branches are designed for different modal image data. Then, the feature maps extracted by each branch are input into the channel attention module to obtain global information of the channel dimension through global average pooling and global max pooling operations. Then, the importance weight of each channel is calculated through a multilayer perceptron to achieve adaptive adjustment of the feature contribution of different channels. After that, the adjusted feature map is input into the spatial attention module, and the importance weight of spatial location is calculated using convolution operations to weight different regions of the feature map, finally obtaining the fused feature map.

[0016] S22, Segmentation Network Construction: Based on the U-Net network architecture, a feature pyramid network and dilated convolution are incorporated; in the encoding stage, downsampling is used to gradually extract semantic information; in the decoding stage, upsampling is used to restore the feature map resolution, and the feature pyramid network is combined to fuse shallow high-resolution features with deep semantic information. At the same time, dilated convolution is applied at appropriate positions to expand the receptive field of the convolution kernel without reducing the resolution, thereby enhancing the feature capture capability of small target regions.

[0017] S23, Integration of Loss Function and Domain Adaptation Module: The focus loss function is integrated into the network training process to optimize the segmentation of small target regions; at the same time, domain adaptation technology is introduced to build a domain discriminator network, whose structure is designed as a combination of multiple convolutional layers and fully connected layers to distinguish whether the data comes from the source domain or the target domain; during the training process, the segmentation network not only minimizes the segmentation loss, but also generates features that can deceive the domain discriminator to achieve the alignment of the feature distributions of the source domain and the target domain.

[0018] S24, Data partitioning ratio determined: The preprocessed multimodal medical image data is divided into training set, validation set, and test set in a 6:2:2 ratio; the training set is used for iterative updates of network parameters, enabling the network to learn data features and segmentation patterns; the validation set is used to evaluate model performance and adjust network hyperparameters during training to prevent overfitting; the test set is used to objectively and independently evaluate the model's performance after training is completed, obtaining the final segmentation accuracy index.

[0019] S25, Data Shuffling and Grouping: To avoid order bias in data partitioning, the data is shuffled before partitioning to ensure that the data in each subset is random and representative; after shuffling, the data is divided into training set, validation set and test set according to a determined ratio, and the data is labeled and stored accordingly.

[0020] S26, Hyperparameter initialization: First, set the initial learning rate; then determine the batch size; finally, set the number of training epochs;

[0021] S27, Algorithm Selection: The Adam optimization algorithm is selected because it can adaptively adjust the learning rate of each parameter, and has good convergence speed and stability when dealing with large-scale data and complex network structures; at the same time, the parameters of the Adam algorithm can be set to optimize the training process.

[0022] S28, Network training process: First, a training loop is performed, then loss calculation and backpropagation are performed, followed by verification and parameter adjustment, and finally the training termination condition is determined.

[0023] S29, Model Saving and Backup: After training is completed, the final trained model parameters are saved, and version records and backups are made. The saved model will be used for subsequent performance evaluation on the test set and practical application deployment to support brain region segmentation in medical imaging.

[0024] As a preferred embodiment of the deep learning-based medical image brain region segmentation optimization algorithm described in this invention, the fused features in S21 are represented as follows:

[0025] F fusion =Att channel (F1,F2)·Att spatial (F1,F2)

[0026] Among them, Att channel and Att spatial These represent the channel attention module and the spatial attention module, respectively.

[0027] As a preferred embodiment of the deep learning-based medical image brain region segmentation optimization algorithm described in this invention, the expression for the focus loss function in step S23 is:

[0028] L focal = -α(1-p) γ log(p)

[0029] Where α is the balance factor, γ is the focusing parameter, and p is the probability that the model predicts a positive sample. As a preferred embodiment of the deep learning-based medical image brain region segmentation optimization algorithm described in this invention, the specific steps of S28 are as follows:

[0030] S281, Training loop begins: In each training cycle, batches of data are taken from the training set in sequence, and multimodal image data are input into the constructed network architecture; for each batch of data, the multimodal fusion network is first used to obtain fusion features, and then the fusion features are input into the segmentation network for brain region segmentation prediction;

[0031] S282, Loss Calculation and Backpropagation: The segmentation prediction results of the network are compared with the real labels to calculate the focal loss function value. At the same time, the domain adaptation loss is calculated by combining the discrimination results of the domain discriminator in the domain adaptation module on the features generated by the segmentation network. The two losses are added together to obtain the total loss function value. Through the backpropagation algorithm, the gradient of all trainable parameters in the network is calculated according to the total loss function, and the parameter values ​​are updated to optimize the network in the direction of reducing loss.

[0032] S283, Validation and Parameter Tuning: After a certain number of training rounds, the currently trained model is evaluated using a validation set, and evaluation metrics are calculated; based on the evaluation results of the validation set, the hyperparameters are adjusted.

[0033] S284, Training Termination Criteria Judgment: When the training reaches the preset maximum number of training rounds, or when the loss on the validation set no longer decreases significantly over multiple consecutive rounds, the model is considered to have converged, and the training process is stopped.

[0034] As a preferred embodiment of the deep learning-based medical image brain region segmentation optimization algorithm described in this invention, the specific steps of S3 are as follows:

[0035] S31, Define the lightweighting goal: Based on the actual application scenario, clarify the goal of model lightweighting; at the same time, set the acceptable range of model performance loss to ensure that the lightweight model can still meet the accuracy requirements of brain region segmentation in medical imaging.

[0036] S32, Backup the original model: Before performing any lightweight operations, fully back up the trained original model and its parameters;

[0037] S33, Select pruning method:

[0038] Structured pruning: Suitable for scenarios that reduce computation while maintaining a regular model structure, making it easier for hardware acceleration;

[0039] Unstructured pruning: It is highly flexible and can perform more precise pruning of model parameters, but it can lead to irregular model structure, which is not conducive to efficient hardware execution.

[0040] S34, Determine the pruning criteria: First, calculate the absolute value of each connection weight in the network, set a threshold, and mark the weights with absolute values ​​less than the threshold as deletable; then, during model training, record the gradient of each parameter, and select parameters with gradients below a certain threshold for deletion, prompting the model to focus on important parameters.

[0041] S35, Perform pruning operation: First, prune the model in the first round according to the selected pruning method and standard; then, fine-tune the pruned model to adapt it to the pruned structure and recover some of the performance lost due to pruning; then evaluate the performance of the pruned and fine-tuned model and calculate the segmentation index.

[0042] S36, Select quantization strategy: First, directly quantize the trained model, and then introduce quantization operation during the model training process to simulate low-precision calculation, so that the model can adapt to the changes brought about by quantization during the training stage and better maintain the model performance.

[0043] S37, Perform quantization operation: If post-training quantization is used, convert the model's parameters and intermediate calculation results from high-precision data types to low-precision data types; for weight parameters and activation values ​​in the neural network, convert them according to the quantization mapping rules;

[0044] S38, Quantization-Aware Training: If quantization-aware training is selected, a quantization layer is added to the model training code to simulate low-precision calculations; during backpropagation, the gradient of the quantization error is calculated and the model parameters are updated to adapt the model to the quantization operation; during training, the model performance metrics are monitored and the quantization parameters are adjusted to ensure that the model accuracy loss is minimized.

[0045] S39, Verify the quantization effect: Conduct comprehensive testing on the quantized model, use the test set to calculate the segmentation index, and evaluate the impact of quantization on model performance; at the same time, compare the number of parameters, memory usage, and inference time of the model before and after quantization to verify whether the lightweight effect has achieved the expected results.

[0046] As a preferred embodiment of the deep learning-based medical image brain region segmentation optimization algorithm described in this invention, the specific steps of S4 are as follows:

[0047] S41, Data Preparation: First, apply the trained model to the test set to ensure that the test set data has not been involved in the model training and validation process, thus guaranteeing the objectivity of the evaluation; then check the completeness of the test set data, including multimodal image data and corresponding ground truth labels, to avoid inaccurate evaluation results due to missing data.

[0048] S42, Performance index calculation: First, calculate the Dice coefficient, then calculate the intersection-union ratio, and then perform runtime statistics;

[0049] S43, Modal Difference Analysis: The Dice coefficient and IoU of the model are statistically analyzed on different modal image data to determine the model's performance when processing single modal data and whether the model has an adaptability problem for certain modal data.

[0050] S44, Target Region Size Analysis: Compare the segmentation performance metrics of the model in large and small target regions to clarify the advantages and disadvantages of the model when handling targets of different sizes, especially the segmentation accuracy of small target regions, and determine whether the expected improvement effect has been achieved.

[0051] S45, Data Source Difference Analysis: Since the test set data comes from different hospitals, the performance indicators of the model on the data from different hospitals are calculated respectively. The generalization ability of the model when facing different data sources is analyzed, and it is seen whether the domain adaptation technique effectively reduces the impact of data distribution differences.

[0052] S46, Problem Identification: Based on the performance analysis results, determine the specific problems existing in the model;

[0053] S47, Targeted optimization: Optimize network structure, loss function, data augmentation and domain adaptation techniques;

[0054] S48, Retraining and Evaluation: After optimization, retrain the model using the adjusted model structure, parameters, and data augmentation methods. During training, train and validate according to the dataset partitioning, and adjust hyperparameters based on the validation set results. After training, evaluate the optimized model again using the test set, repeating the above performance index calculation and multi-dimensional performance analysis steps, comparing the performance changes before and after optimization, and determining whether the optimization measures are effective. If the expected optimization effect is not achieved, continue repeating the problem identification and targeted optimization steps until the model performance meets the requirements.

[0055] As a preferred embodiment of the deep learning-based medical image brain region segmentation optimization algorithm described in this invention, the specific steps of S42 are as follows:

[0056] S421, Dice coefficient calculation: For each sample in the test set, substitute the model's segmentation result S and the true label G into the Dice coefficient formula. The Dice coefficient of each sample was calculated in different brain tissue regions and small target regions; the Dice coefficient of the model on the overall test set was obtained by averaging the Dice coefficients of all samples.

[0057] S422, Cross-over-union ratio calculation: For each sample, calculate the cross-over-union ratio. The IoU values ​​for different brain tissue regions and small target regions were calculated separately, and the average IoU of the test set was calculated.

[0058] S423, Runtime Statistics: When the model makes predictions on the test set, record the time the model takes to process each sample, calculate the average runtime for all samples, and evaluate the model's inference efficiency.

[0059] As a preferred embodiment of the deep learning-based medical image brain region segmentation optimization algorithm described in this invention, the specific steps of S47 are as follows:

[0060] S471, Network Structure Adjustment: If the model is found to be ineffective in segmenting small target regions, the combination of the feature pyramid network and dilated convolution can be further optimized; if the model has problems in multimodal data fusion, the attention-based multimodal fusion network can be improved.

[0061] S472, Loss Function Optimization: For cases where the segmentation accuracy of small target regions is low, the values ​​of the balance factor α and the focusing parameter γ can be adjusted to find a better combination of parameters through experiments, thereby enhancing the model's learning ability for small target regions; at the same time, it can be combined with other loss functions to optimize the segmentation effect from multiple perspectives.

[0062] S473, Data Augmentation Improvement: If the model's generalization ability is insufficient, a generative adversarial network can be used to augment the data, synthesizing more diverse training data, enabling the model to learn a wider range of data features and improve its adaptability to different data sources.

[0063] S474, Domain Adaptation Technology Optimization: To address the issue of significant performance differences in models across different data sources, the structure and training method of the domain discriminator are optimized.

[0064] Compared with existing technologies:

[0065] 1. Multimodal medical image data from different hospitals were collected through data preprocessing, providing a rich and diverse data foundation for fusion; the images were normalized to map gray values ​​to the [0,1] interval, effectively eliminating grayscale differences caused by different equipment and scanning parameters, making the data from different modalities comparable in grayscale; cropping and scaling operations unified the image size, solving the problem of inconsistent spatial resolution, providing standardized data input for the subsequent construction of a multimodal fusion network based on the attention mechanism, creating favorable conditions for multimodal data fusion from the source, and significantly improving the fusion effect.

[0066] 2. The segmentation network built during network training integrates a feature pyramid network and dilated convolution. The feature pyramid network combines shallow high-resolution features with deep semantic information, effectively preserving details of small target regions and avoiding information loss due to downsampling. Meanwhile, dilated convolution expands the receptive field without reducing resolution, enabling the network to capture global information about small targets. Simultaneously, a focus loss function is introduced, increasing the penalty for samples in small target regions by adjusting sample weights, guiding the model to focus on small target segmentation. These strategies work together, improving the segmentation accuracy of small target regions from both network structure design and loss function optimization perspectives.

[0067] 3. Through domain adaptation techniques and data augmentation methods in network training; the domain adaptation technique trains the domain discriminator to distinguish data sources through adversarial training, while prompting the segmentation network to generate features that can deceive the domain discriminator, thereby aligning the feature distributions of the source and target domains and reducing differences between different data sources; while data augmentation expands the diversity of data by performing operations such as rotation, scaling, translation, and adding noise to the training data, allowing the model to be exposed to more data with different distributions, enhancing its adaptability to different data sources, and effectively improving the model's generalization performance.

[0068] 4. Model evaluation and optimization employ multi-dimensional evaluation metrics such as the Dice coefficient and Intersection over Union (IoU) to comprehensively analyze the model from the perspectives of different modalities of data, target region size, and data sources. This evaluation method can accurately pinpoint specific problems in the model's performance in areas such as multimodal data fusion, small target region segmentation, and generalization ability. Based on the evaluation results, targeted optimizations are made to the network structure, loss function, and data augmentation methods. The model is then retrained and evaluated, forming a closed-loop process of "evaluation-positioning-optimization-re-evaluation." This process ensures that the algorithm can dynamically adjust and continuously improve based on actual performance, thereby enhancing its ability to solve various problems and ultimately achieving optimized and stable algorithm performance. Detailed Implementation

[0069] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below.

[0070] This invention provides a deep learning-based optimization algorithm for brain region segmentation in medical images, comprising the following specific steps:

[0071] S1, Data Preprocessing: First, collect multimodal medical image data from different hospitals, including CT, MRI, etc., and perform data annotation to mark the true labels of different brain tissue regions; then, normalize the image data and map the gray values ​​of the data to the [0,1] interval to eliminate gray value differences caused by different equipment and scanning parameters; then, crop and scale the data to uniformly adjust the image data to the same size.

[0072] S2, Network Training: First, a segmentation network combining a multimodal fusion network based on an attention mechanism, a feature pyramid network, and dilated convolution is built, and a focus loss function and domain adaptation technique are introduced; then, the preprocessed data is divided into training set, validation set, and test set; then, an optimization algorithm is used to train the network;

[0073] The specific steps of S2 are as follows:

[0074] S21, Multimodal Fusion Network Construction: Based on the attention-based multimodal fusion strategy, a network structure including a channel attention module and a spatial attention module is constructed. First, independent feature extraction branches are designed for different modalities (e.g., CT, MRI) image data, using common convolutional layer combinations (e.g., alternating convolutional layers, batch normalization layers, and activation function layers) for initial feature extraction. Then, the feature maps extracted from each branch are input into the channel attention module to obtain global information in the channel dimension through global average pooling and global max pooling operations. Next, a multilayer perceptron is used to calculate the importance weight of each channel, achieving adaptive adjustment of the feature contribution of different channels. Finally, the adjusted feature map is input into the spatial attention module, where convolutional operations are used to calculate the importance weight of spatial locations, weighting different regions of the feature map to obtain the fused feature map.

[0075] The fused features in S21 are represented as follows:

[0076] F fusion =Att channel (F1,F2)·Att spatial (F1,F2)

[0077] Among them, Att channel and Att spatial These represent the channel attention module and the spatial attention module, respectively.

[0078] S22, Segmentation Network Construction: Based on the U-Net network architecture, a feature pyramid network and dilated convolution are incorporated; in the encoding stage, downsampling operations (such as pooling layers) are used to gradually extract semantic information; in the decoding stage, upsampling operations are used to restore the feature map resolution, and the feature pyramid network is combined to fuse shallow high-resolution features with deep semantic information. At the same time, dilated convolution is applied at appropriate positions to expand the receptive field of the convolution kernel without reducing the resolution, thereby enhancing the feature capture capability of small target regions.

[0079] S23, Integration of Loss Function and Domain Adaptation Module: The focus loss function is integrated into the network training process to optimize the segmentation of small target regions; at the same time, domain adaptation technology is introduced to build a domain discriminator network, whose structure is designed as a combination of multiple convolutional layers and fully connected layers to distinguish whether the data comes from the source domain or the target domain; during the training process, the segmentation network not only minimizes the segmentation loss, but also generates features that can deceive the domain discriminator to achieve the alignment of the feature distributions of the source domain and the target domain.

[0080] The expression for the focus loss function in S23 is:

[0081] L focal = -α(1-p) γ log(p)

[0082] Where α is the balance factor, γ is the focusing parameter, and p is the probability that the model predicts a positive sample;

[0083] S24, Data partitioning ratio determined: The preprocessed multimodal medical image data is divided into training set, validation set, and test set in a 6:2:2 ratio; the training set is used for iterative updates of network parameters, enabling the network to learn data features and segmentation patterns; the validation set is used during training to evaluate model performance, adjust network hyperparameters (such as learning rate, batch size, etc.), and prevent model overfitting; the test set is used after model training is completed to objectively and independently evaluate the model's performance and obtain the final segmentation accuracy index.

[0084] S25, Data Shuffling and Grouping: To avoid order bias in data partitioning, the data is shuffled before partitioning. Random shuffling can be used to ensure that the data in each subset is random and representative. After shuffling, the data is divided into training set, validation set and test set according to a determined ratio, and the data is labeled and stored accordingly.

[0085] S26, Hyperparameter Initialization: First, set the initial learning rate, which can generally be set to 0.001 and can be adjusted according to the performance changes of the validation set during training; then determine the batch size. Considering that medical image data has a large memory footprint, the batch size can be set to 8-16 to balance training speed and memory usage; then set the number of training epochs. Usually, preliminary training is performed first to observe the model convergence. It can be set to 50-100 epochs initially. If the ideal effect is not achieved, the number of epochs can be increased appropriately.

[0086] S27, Optimization Algorithm Selection: The Adam optimization algorithm is chosen because it combines the advantages of the Adaptive Gradient Algorithm (Adagrad) and the Root Mean Square Propagation Algorithm (RMSProp), allowing for adaptive adjustment of the learning rate for each parameter. It exhibits good convergence speed and stability when handling large-scale data and complex network structures. Furthermore, the parameters of the Adam algorithm can be set, such as β1 = 0.9, β2 = 0.999, ∈ = 10. -8 To optimize the training process;

[0087] S28, Network training process: First, a training loop is performed, then loss calculation and backpropagation are performed, followed by verification and parameter adjustment, and finally the training termination condition is determined.

[0088] The specific steps of S28 are as follows:

[0089] S281, Training loop begins: In each training cycle, batches of data are taken from the training set in sequence, and multimodal image data are input into the constructed network architecture; for each batch of data, the multimodal fusion network is first used to obtain fusion features, and then the fusion features are input into the segmentation network for brain region segmentation prediction;

[0090] S282, Loss Calculation and Backpropagation: The segmentation prediction results of the network are compared with the true labels to calculate the focal loss function value. At the same time, the domain adaptation loss is calculated by combining the discrimination results of the domain discriminator in the domain adaptation module on the features generated by the segmentation network. The two losses are added together to obtain the total loss function value. Through the backpropagation algorithm, the gradient of all trainable parameters in the network (such as the weights and biases of convolutional layers) is calculated according to the total loss function, and the parameter values ​​are updated to optimize the network in the direction of reducing loss.

[0091] S283, Validation and Parameter Tuning: After a certain number of training rounds (e.g., every 5 rounds), evaluate the currently trained model using a validation set, calculating evaluation metrics such as the Dice coefficient and Intersection over Union (IoU); adjust hyperparameters such as the learning rate based on the validation set evaluation results; if the loss on the validation set no longer decreases or fluctuates, the learning rate can be appropriately reduced (e.g., divided by 10) to avoid the model getting stuck in local optima; if the model's performance on the validation set continues to improve, training can continue with the current parameters;

[0092] S284, Training termination condition judgment: When the training reaches the preset maximum number of training rounds, or when the loss on the validation set no longer decreases significantly within several consecutive rounds (e.g., 10 rounds) (the decrease is less than a certain threshold, e.g., 0.001), the model is considered to have converged and the training process is stopped.

[0093] S29, Model Saving and Backup: After training is completed, the final trained model parameters are saved. Common model saving formats can be used (such as .pth format in PyTorch or .h5 format in TensorFlow). Version records and backups should be made. The saved model will be used for subsequent performance evaluation on the test set and practical application deployment to support brain region segmentation in medical imaging.

[0094] S3: Model Lightweighting: First, use structured or unstructured pruning methods to trim the parameters of the trained model; then, convert the model's parameters and calculations from high precision to low precision to reduce memory usage and computational complexity and improve the model's inference speed without significantly affecting the model's accuracy.

[0095] The specific steps of S3 are as follows:

[0096] S31, Define the lightweighting goal: Based on the actual application scenario, clarify the goal of model lightweighting; if the model is planned to be deployed on devices with limited computing resources such as mobile terminals, the number of model parameters and computational load need to be significantly reduced; if used on clinical workstations, resource consumption can be appropriately reduced while ensuring a certain inference speed; at the same time, set an acceptable range for model performance loss, such as allowing the Dice coefficient to decrease by no more than 3%, to ensure that the lightweight model can still meet the accuracy requirements of brain region segmentation in medical imaging;

[0097] S32, Backup the original model: Before performing any lightweighting operations, fully back up the trained original model and its parameters; use the standard save format of the corresponding deep learning framework (such as PyTorch's .pth file, TensorFlow's .h5 file), and record key information about the model training, including training epochs, datasets used, optimization algorithms and hyperparameters, so that the original model can be restored if problems occur during the lightweighting process;

[0098] S33, Select pruning method:

[0099] Structured pruning: Suitable for scenarios that reduce computation while maintaining a regular model structure, facilitating hardware acceleration; for example, channel pruning can remove unimportant channels in the network, reducing the number of input or output channels in convolutional layers; layer pruning directly removes redundant convolutional or fully connected layers.

[0100] Unstructured pruning: It is highly flexible and can perform more precise pruning of model parameters, but it can lead to irregular model structure, which is not conducive to efficient hardware execution; for example, weight pruning, by setting a threshold, deletes connection weights that are below the threshold.

[0101] S34, Determine the pruning criteria: First, calculate the absolute value of each connection weight in the network, set a threshold, and mark the weights with absolute values ​​less than the threshold as deletable; then, during model training, record the gradient of each parameter, and select parameters with gradients below a certain threshold for deletion, prompting the model to focus on important parameters.

[0102] S35, Perform pruning: First, prune the model according to the selected pruning method and standards; then, fine-tune the pruned model to adapt it to the pruned structure and recover some of the performance lost due to pruning; next, evaluate the performance of the pruned and fine-tuned model, and calculate segmentation metrics such as the Dice coefficient and Intersection over Union (IoU); if the performance degradation exceeds the acceptable range, reduce the pruning ratio and repeat pruning and fine-tuning; if the performance meets the requirements, continue with the next round of pruning to gradually achieve the target lightweighting level.

[0103] S36, Select quantization strategy: First, directly quantize the trained model, and then introduce quantization operation during the model training process to simulate low-precision calculation, so that the model can adapt to the changes brought about by quantization during the training stage and better maintain the model performance.

[0104] S37, Perform quantization: If post-training quantization is used, convert the model's parameters and intermediate calculation results from high-precision data types (such as 32-bit floating-point numbers) to low-precision data types (such as 8-bit integers); for weight parameters and activation values ​​in the neural network, convert them according to quantization mapping rules; for example, map the floating-point range to the integer range through linear mapping;

[0105] S38, Quantization-Aware Training: If quantization-aware training is selected, a quantization layer is added to the model training code to simulate low-precision calculations; during backpropagation, the gradient of the quantization error is calculated and the model parameters are updated to adapt the model to the quantization operation; during training, the model performance metrics are monitored and the quantization parameters are adjusted to ensure that the model accuracy loss is minimized.

[0106] S39, Verify the quantization effect: Conduct comprehensive testing on the quantized model, use the test set to calculate the Dice coefficient, IoU and other segmentation metrics to evaluate the impact of quantization on model performance; at the same time, compare the number of parameters, memory usage and inference time of the model before and after quantization to verify whether the lightweight effect has achieved the expected results.

[0107] Setting the model to be lightweight has the following advantages:

[0108] Improve the practicality of the algorithm: The lightweight model reduces the computational resource requirements while maintaining performance, making it more suitable for deployment and application in resource-constrained environments such as clinical equipment and mobile terminals, thereby improving the practical application value and scalability of the algorithm;

[0109] Accelerating the reasoning process: By reducing the computational load and memory consumption of the model, the model can provide segmentation results more quickly when performing brain region segmentation reasoning in medical images, meeting the needs of rapid clinical diagnosis and improving the efficiency of medical services;

[0110] S4: Model Evaluation and Optimization: First, the trained model is evaluated using a test set to assess its segmentation accuracy. Then, the model's segmentation performance is analyzed on different modalities, target regions of different sizes, and data sources to identify any problems. Finally, based on the evaluation results, the network structure, loss function, and data augmentation methods are optimized to further improve the model's performance.

[0111] The specific steps of S4 are as follows:

[0112] S41, Data Preparation: First, apply the trained model to the test set to ensure that the test set data has not been involved in the model training and validation process, thus guaranteeing the objectivity of the evaluation; then check the completeness of the test set data, including multimodal image data and corresponding ground truth labels, to avoid inaccurate evaluation results due to missing data.

[0113] S42, Performance index calculation: First, calculate the Dice coefficient, then calculate the intersection-union ratio, and then perform runtime statistics;

[0114] The specific steps of S42 are as follows:

[0115] S421, Dice coefficient calculation: For each sample in the test set, substitute the model's segmentation result S and the true label G into the Dice coefficient formula. The Dice coefficient of each sample is calculated in different brain tissue regions (such as gray matter, white matter, cerebrospinal fluid, etc.) and small target regions (such as hippocampus and amygdala). By averaging the Dice coefficients of all samples, the Dice coefficient index of the model on the overall test set is obtained. The index reflects the degree of overlap between the model segmentation results and the real labels. The closer the value is to 1, the higher the segmentation accuracy.

[0116] S422, Cross-over-union ratio calculation: For each sample, calculate the cross-over-union ratio. The IoU values ​​of different brain tissue regions and small target regions were calculated separately, and the average IoU of the test set was calculated. The IoU index measures the proportion of the intersection between the segmentation result and the real region in the union set. The larger the value, the better the segmentation effect.

[0117] S423, Running Time Statistics: When the model makes predictions on the test set, record the time the model takes to process each sample, calculate the average running time for all samples, and evaluate the model's inference efficiency.

[0118] S43, Modal Difference Analysis: The Dice coefficient and IoU of the model are statistically analyzed on different modal imaging data (such as CT and MRI) to determine the model's performance when processing single modal data and to determine whether the model has an adaptation problem for certain modal data.

[0119] S44, Target Region Size Analysis: Compare the segmentation performance indicators of the model in large target regions (such as large tissues like the cerebral cortex) and small target regions to clarify the advantages and disadvantages of the model when dealing with targets of different sizes, especially the segmentation accuracy of small target regions, and determine whether the expected improvement effect has been achieved.

[0120] S45, Data Source Difference Analysis: Since the test set data comes from different hospitals, the performance indicators of the model on the data from different hospitals are calculated respectively. The generalization ability of the model when facing different data sources is analyzed, and it is seen whether the domain adaptation technique effectively reduces the impact of data distribution differences.

[0121] S46, Problem Identification: Based on the performance analysis results, determine the specific problems existing in the model. For example, if the model is found to have low Dice coefficients and IoU in small target regions, it indicates that the segmentation of small target regions is still insufficient; if the performance is poor on a specific modality of data, it indicates that the model has not learned the features of that modality of data sufficiently; when the model's performance fluctuates greatly on different hospital data, it indicates that the generalization ability needs to be further improved.

[0122] S47, Targeted optimization: Optimize network structure, loss function, data augmentation and domain adaptation techniques;

[0123] The specific steps of S47 are as follows:

[0124] S471, Network Structure Adjustment: If the model is found to be ineffective in segmenting small target regions, the combination of the feature pyramid network and dilated convolution can be further optimized, such as adjusting the number of layers in the feature pyramid and the dilation rate of the dilated convolution; if the model has problems in multimodal data fusion, the attention-based multimodal fusion network can be improved, such as increasing the complexity of the attention module or adjusting the connection between modules.

[0125] S472, Loss Function Optimization: For cases where the segmentation accuracy of small target regions is low, the values ​​of the balance factor α and the focusing parameter γ can be adjusted to find a better parameter combination through experiments, thereby enhancing the model's learning ability for small target regions; at the same time, it can be combined with other loss functions (such as the boundary loss function) to optimize the segmentation effect from multiple perspectives.

[0126] S473, Data Augmentation Improvement: If the model's generalization ability is insufficient, a generative adversarial network can be used to augment the data, synthesizing more diverse training data, enabling the model to learn a wider range of data features and improve its adaptability to different data sources.

[0127] S474, Domain Adaptation Technology Optimization: To address the issue of large performance differences of the model on different data sources, optimize the structure and training method of the domain discriminator, such as increasing the number of network layers of the domain discriminator and adjusting the loss weights of adversarial training, so that the segmentation network can better align the feature distributions of the source and target domains and improve generalization performance.

[0128] S48, Retraining and Evaluation: After optimization, retrain the model using the adjusted model structure, parameters, and data augmentation methods. During training, train and validate according to the dataset partitioning, and adjust hyperparameters based on the validation set results. After training, evaluate the optimized model again using the test set, repeating the above performance index calculation and multi-dimensional performance analysis steps, comparing the performance changes before and after optimization, and determining whether the optimization measures are effective. If the expected optimization effect is not achieved, continue repeating the problem identification and targeted optimization steps until the model performance meets the requirements.

[0129] Although the present invention has been described above with reference to embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, as long as there is no structural conflict, the features in the disclosed embodiments can be combined with each other in any manner. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A deep learning-based optimization algorithm for brain region segmentation in medical imaging, characterized in that, The specific steps are as follows: S1, Data Preprocessing: First, collect multimodal medical image data from different hospitals and perform data annotation to mark the true labels of different brain tissue regions; then, normalize the image data and map the gray values ​​of the data to the [0,1] range to eliminate gray value differences caused by different devices and scanning parameters; then, crop and scale the data to uniformly adjust the image data to the same size. S2, Network Training: First, a segmentation network combining a multimodal fusion network based on an attention mechanism, a feature pyramid network, and dilated convolution is built, and a focus loss function and domain adaptation technique are introduced; then, the preprocessed data is divided into training set, validation set, and test set; then, an optimization algorithm is used to train the network; S3: Model Lightweighting: First, use structured or unstructured pruning methods to trim the parameters of the trained model; then, convert the model's parameters and calculations from high precision to low precision to reduce memory usage and computational complexity and improve the model's inference speed without significantly affecting the model's accuracy. S4: Model Evaluation and Optimization: First, the trained model is evaluated using a test set to assess its segmentation accuracy. Then, the model's segmentation performance is analyzed on different modalities, target regions of different sizes, and data sources to identify any problems. Finally, based on the evaluation results, the network structure, loss function, and data augmentation methods are optimized to further improve the model's performance.

2. The deep learning-based medical image brain region segmentation optimization algorithm according to claim 1, characterized in that, The specific steps of S2 are as follows: S21, Construction of Multimodal Fusion Network: Based on the multimodal fusion strategy based on attention mechanism, a network structure including channel attention module and spatial attention module is built; independent feature extraction branches are designed for different modal image data. Next, the feature maps extracted from each branch are input into the channel attention module to obtain global information of the channel dimension through global average pooling and global max pooling operations. Then, the importance weight of each channel is calculated by the multilayer perceptron to achieve adaptive adjustment of the feature contribution of different channels. The adjusted feature map is then input into the spatial attention module, which uses convolution operations to calculate the importance weights of spatial locations, weights different regions of the feature map, and finally obtains the fused feature map. S22, Segmentation Network Construction: Based on the U-Net network architecture, a feature pyramid network and dilated convolution are incorporated; in the encoding stage, downsampling is used to gradually extract semantic information; in the decoding stage, upsampling is used to restore the feature map resolution, and the feature pyramid network is combined to fuse shallow high-resolution features with deep semantic information. At the same time, dilated convolution is applied at appropriate positions to expand the receptive field of the convolution kernel without reducing the resolution, thereby enhancing the feature capture capability of small target regions. S23, Integration of Loss Function and Domain Adaptation Module: The focus loss function is integrated into the network training process to optimize the segmentation of small target regions; at the same time, domain adaptation technology is introduced to build a domain discriminator network, whose structure is designed as a combination of multi-layer convolutional layers and fully connected layers to distinguish whether the data comes from the source domain or the target domain. During training, segmentation networks not only need to minimize segmentation loss, but also need to generate features that can deceive the domain discriminator, thereby aligning the feature distributions of the source and target domains. S24, Data partitioning ratio determined: The preprocessed multimodal medical image data is divided into training set, validation set, and test set in a 6:2:2 ratio; the training set is used for iterative updates of network parameters, enabling the network to learn data features and segmentation patterns; the validation set is used to evaluate model performance and adjust network hyperparameters during training to prevent overfitting; the test set is used to objectively and independently evaluate the model's performance after training is completed, obtaining the final segmentation accuracy index. S25, Data Shuffling and Grouping: To avoid order bias in data partitioning, the data is shuffled before partitioning to ensure that the data in each subset is random and representative; after shuffling, the data is divided into training set, validation set and test set according to a determined ratio, and the data is labeled and stored accordingly. S26, Hyperparameter initialization: First, set the initial learning rate; then determine the batch size; finally, set the number of training epochs; S27, Algorithm Selection: The Adam optimization algorithm is selected because it can adaptively adjust the learning rate of each parameter, and has good convergence speed and stability when dealing with large-scale data and complex network structures; at the same time, the parameters of the Adam algorithm can be set to optimize the training process. S28, Network training process: First, a training loop is performed, then loss calculation and backpropagation are performed, followed by verification and parameter adjustment, and finally the training termination condition is determined. S29, Model Saving and Backup: After training is completed, the final trained model parameters are saved, and version records and backups are made. The saved model will be used for subsequent performance evaluation on the test set and practical application deployment to support brain region segmentation in medical imaging.

3. The deep learning-based medical image brain region segmentation optimization algorithm according to claim 2, characterized in that, The fused features in S21 are represented as follows: F fusion =To channel (F1,F2)·To spatial (F1,F2) Among them, Att channel and Att spatial These represent the channel attention module and the spatial attention module, respectively.

4. The deep learning-based medical image brain region segmentation optimization algorithm according to claim 2, characterized in that, The expression for the focus loss function in S23 is: L focal =-α(1-p) γ log(p) Where α is the balance factor, γ is the focusing parameter, and p is the probability that the model predicts a positive sample.

5. The deep learning-based medical image brain region segmentation optimization algorithm according to claim 2, characterized in that, The specific steps of S28 are as follows: S281, Training loop begins: In each training cycle, batches of data are taken from the training set in sequence, and multimodal image data are input into the constructed network architecture; for each batch of data, the multimodal fusion network is first used to obtain fusion features, and then the fusion features are input into the segmentation network for brain region segmentation prediction; S282, Loss Calculation and Backpropagation: The segmentation prediction results of the network are compared with the real labels to calculate the focal loss function value. At the same time, the domain adaptation loss is calculated by combining the discrimination results of the domain discriminator in the domain adaptation module on the features generated by the segmentation network. The two losses are added together to obtain the total loss function value. Through the backpropagation algorithm, the gradient of all trainable parameters in the network is calculated according to the total loss function, and the parameter values ​​are updated to optimize the network in the direction of reducing loss. S283, Validation and Parameter Tuning: After a certain number of training rounds, the currently trained model is evaluated using a validation set, and evaluation metrics are calculated; based on the evaluation results of the validation set, the hyperparameters are adjusted. S284, Training Termination Criteria Judgment: When the training reaches the preset maximum number of training rounds, or when the loss on the validation set no longer decreases significantly over multiple consecutive rounds, the model is considered to have converged, and the training process is stopped.

6. The deep learning-based medical image brain region segmentation optimization algorithm according to claim 1, characterized in that, The specific steps of S3 are as follows: S31, Define the lightweighting goal: Based on the actual application scenario, clarify the goal of model lightweighting; at the same time, set the acceptable range of model performance loss to ensure that the lightweight model can still meet the accuracy requirements of brain region segmentation in medical imaging. S32, Backup the original model: Before performing any lightweight operations, fully back up the trained original model and its parameters; S33, Select pruning method: Structured pruning: Suitable for scenarios that reduce computation while maintaining a regular model structure, making it easier for hardware acceleration; Unstructured pruning: It is highly flexible and can perform more precise pruning of model parameters, but it can lead to irregular model structure, which is not conducive to efficient hardware execution. S34, Determine the pruning criteria: First, calculate the absolute value of each connection weight in the network, set a threshold, and mark the weights with absolute values ​​less than the threshold as deletable; then, during model training, record the gradient of each parameter, and select parameters with gradients below a certain threshold for deletion, prompting the model to focus on important parameters. S35, Perform pruning operation: First, prune the model in the first round according to the selected pruning method and standard; then, fine-tune the pruned model to adapt it to the pruned structure and recover some of the performance lost due to pruning; then evaluate the performance of the pruned and fine-tuned model and calculate the segmentation index. S36, Select quantization strategy: First, directly quantize the trained model, and then introduce quantization operation during the model training process to simulate low-precision calculation, so that the model can adapt to the changes brought about by quantization during the training stage and better maintain the model performance. S37, Perform quantization operation: If post-training quantization is used, convert the model's parameters and intermediate calculation results from high-precision data types to low-precision data types; The weight parameters and activation values ​​in the neural network are transformed according to the quantization mapping rules; S38, Quantization-aware training: If quantization-aware training is selected, a quantization layer is added to the model training code to simulate low-precision calculations; During backpropagation, the gradient of the quantization error is calculated, and the model parameters are updated to adapt the model to the quantization operation. During training, monitor model performance metrics and adjust quantization parameters to ensure minimal loss of model accuracy. S39, Verify the quantization effect: Conduct comprehensive testing on the quantized model, use the test set to calculate the segmentation index, and evaluate the impact of quantization on model performance; at the same time, compare the number of parameters, memory usage, and inference time of the model before and after quantization to verify whether the lightweight effect has achieved the expected results.

7. The deep learning-based medical image brain region segmentation optimization algorithm according to claim 1, characterized in that, The specific steps of S4 are as follows: S41, Data Preparation: First, apply the trained model to the test set to ensure that the test set data has not been involved in the model training and validation process, thus guaranteeing the objectivity of the evaluation; then check the completeness of the test set data, including multimodal image data and corresponding ground truth labels, to avoid inaccurate evaluation results due to missing data. S42, Performance index calculation: First, calculate the Dice coefficient, then calculate the intersection-union ratio, and then perform runtime statistics; S43, Modal Difference Analysis: The Dice coefficient and IoU of the model are statistically analyzed on different modal image data to determine the model's performance when processing single modal data and whether the model has an adaptability problem for certain modal data. S44, Target Region Size Analysis: Compare the segmentation performance metrics of the model in large and small target regions to clarify the advantages and disadvantages of the model when handling targets of different sizes, especially the segmentation accuracy of small target regions, and determine whether the expected improvement effect has been achieved. S45, Data Source Difference Analysis: Since the test set data comes from different hospitals, the performance indicators of the model on the data from different hospitals are calculated respectively. The generalization ability of the model when facing different data sources is analyzed, and it is seen whether the domain adaptation technique effectively reduces the impact of data distribution differences. S46, Problem Identification: Based on the performance analysis results, determine the specific problems existing in the model; S47, Targeted optimization: Optimize network structure, loss function, data augmentation and domain adaptation techniques; S48, Retraining and Evaluation: After optimization and adjustment, retrain the model using the adjusted model structure, parameters, and data augmentation methods; During training, training and validation are performed according to the dataset partitioning, and hyperparameters are adjusted based on the validation set results. After training, the optimized model is evaluated again using the test set. The above performance index calculation and multi-dimensional performance analysis steps are repeated to compare the performance changes before and after optimization and determine whether the optimization measures are effective. If the expected optimization effect is not achieved, the problem identification and targeted optimization steps are repeated until the model performance meets the requirements.

8. The deep learning-based medical image brain region segmentation optimization algorithm according to claim 7, characterized in that, The specific steps of S42 are as follows: S421, Dice coefficient calculation: For each sample in the test set, substitute the model's segmentation result S and the true label G into the Dice coefficient formula. The Dice coefficient of each sample was calculated in different brain tissue regions and small target regions; the Dice coefficient of the model on the overall test set was obtained by averaging the Dice coefficients of all samples. S422, Cross-over-union ratio calculation: For each sample, calculate the cross-over-union ratio. The IoU values ​​for different brain tissue regions and small target regions were calculated separately, and the average IoU of the test set was calculated. S423, Runtime Statistics: When the model makes predictions on the test set, record the time the model takes to process each sample, calculate the average runtime for all samples, and evaluate the model's inference efficiency.

9. The deep learning-based medical image brain region segmentation optimization algorithm according to claim 7, characterized in that, The specific steps of S47 are as follows: S471, Network Structure Adjustment: If the model is found to be ineffective in segmenting small target regions, the combination of the feature pyramid network and dilated convolution can be further optimized; if the model has problems in multimodal data fusion, the attention-based multimodal fusion network can be improved. S472, Loss Function Optimization: For cases where the segmentation accuracy of small target regions is low, the values ​​of the balance factor α and the focusing parameter γ can be adjusted to find a better combination of parameters through experiments, thereby enhancing the model's learning ability for small target regions; at the same time, it can be combined with other loss functions to optimize the segmentation effect from multiple perspectives. S473, Data Augmentation Improvement: If the model's generalization ability is insufficient, a generative adversarial network can be used to augment the data, synthesizing more diverse training data, enabling the model to learn a wider range of data features and improve its adaptability to different data sources. S474, Domain Adaptation Technology Optimization: To address the issue of significant performance differences in models across different data sources, the structure and training method of the domain discriminator are optimized.