A trigeminal nerve magnetic resonance imaging segmentation and classification system
By designing a trigeminal nerve magnetic resonance imaging segmentation classification system, using multi-resolution models and morphological structure loss functions, the problem of insufficient sample size in trigeminal nerve research was solved, automatic segmentation and pain identification of the trigeminal nerve were realized, and the research efficiency was improved. Accuracy and efficiency.
Patent Information
- Application Number
- CN202411143203.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-20
AI Technical Summary
In the current research on trigeminal nerve, due to the limited sample size, insufficient generalization ability of deep learning models, and lack of automated segmentation and identification capabilities in conventional magnetic resonance imaging examinations, it is difficult to identify trigeminal neuralgia.
A trigeminal nerve magnetic resonance imaging segmentation and classification system is designed. Through the trigeminal nerve magnetic resonance imaging segmentation subsystem and trigeminal neuralgia identification and classification subsystem, a multi-resolution coarse positioning model and a fine segmentation model are combined, and the morphological structure is used. The loss function optimizes the segmentation effect, and trains and infers through the deep learning model to achieve automatic segmentation and pain identification of the trigeminal nerve.
It improves the accuracy of automatic segmentation and pain identification of the trigeminal nerve, enhances the generalization ability of the model, reduces additional imaging costs, and enables automated segmentation and identification in conventional magnetic resonance imaging examinations.
Smart Images

Figure CN118657801B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of trigeminal nerve, in particular to a trigeminal nerve magnetic resonance imaging segmentation and classification system. Background Art
[0002] At present, researchers mainly focus on the study of the trigeminal nerve in the cerebral cistern, but due to the limited sample size, it is still challenging to apply it in clinical practice. Specifically, QingShi Zeng et al. from the Department of Radiology of Qilu Hospital of Shandong University performed three-dimensional fast imaging of 3D FIESTA and magnetic resonance angiography (MRA) on 37 TN patients, and used a three-dimensional U-net network to segment the trigeminal nerve on the three-dimensional FIESTA sequence and segment the blood vessels in MRA. By combining the two segmentation results, the contact between the nerve and the blood vessels can be automatically identified. However, due to the structural complexity and low prevalence of the trigeminal nerve, there are relatively few medical image datasets, which leads to a lack of sufficient samples in the training of deep learning models. That is, the current research data volume is mostly dozens or more than a hundred cases, which affects the generalization ability of the model. Currently, most of the research on the trigeminal nerve is focused on magnetic resonance angiography (MRA). MRA requires special imaging sequences and techniques to highlight the vascular structure and blood flow. These additional techniques and steps may increase costs. There are fewer studies on trigeminal nerve segmentation based on conventional magnetic resonance imaging examinations. That is, the current identification of trigeminal neuralgia is mostly based on observing the contact between nerves and blood vessels. There are few studies that directly apply neural networks to trigeminal neuralgia and automatically achieve trigeminal nerve segmentation and trigeminal neuralgia identification through conventional magnetic resonance imaging examinations. Summary of the invention
[0003] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a trigeminal nerve magnetic resonance imaging segmentation and classification system.
[0004] The object of the present invention is achieved by the following technical solutions: a trigeminal nerve magnetic resonance imaging segmentation and classification system, comprising a trigeminal nerve magnetic resonance imaging segmentation subsystem and a trigeminal neuralgia identification and classification subsystem;
[0005] The trigeminal nerve MRI segmentation subsystem is used to segment the entire trigeminal nerve branches and divide the region of interest for the trigeminal neuralgia differential classification subsystem;
[0006] The trigeminal neuralgia differential classification subsystem is used to identify and classify patients with trigeminal neuralgia and normal people.
[0007] Preferably, the trigeminal nerve magnetic resonance imaging segmentation subsystem trains a coarse positioning model and a fine segmentation model according to different image resolutions.
[0008] Preferably, the resolution of the coarse positioning model is twice the actual resolution, and its sampling method is random sampling in the entire image domain; the resolution of the fine segmentation model is the median of the actual resolution of all samples, and its sampling method is random sampling in the indicated area.
[0009] Preferably, the steps of segmentation training of the trigeminal nerve magnetic resonance imaging segmentation subsystem are as follows:
[0010] S1: Collect and label all three branches of the trigeminal nerve;
[0011] S2: preprocess the data and set the training set, validation set and test set in a ratio of 7:1:2;
[0012] S3: Select deep learning models and hyperparameters based on task requirements;
[0013] S4: Separate the trigeminal nerve roots and ganglia from the trigeminal nerve branches according to the morphological structure, and optimize the segmented area using the loss function:
[0014] ;
[0015] in, is the original manually marked area, The core trigeminal nerve root and ganglion, It is the trigeminal nerve branch and the peripheral trigeminal nerve root and ganglion. and for and Weight balance parameter between losses;
[0016] When the loss function is When the coefficient loss function is
[0017] ;
[0018] When the loss function is hour,
[0019] ;
[0020] Will The coefficient loss function and As the loss function for network training ,
[0021] ;
[0022] in, for Loss and Weight balance parameter between losses;
[0023] The final loss function is:
[0024] ;
[0025] in, for Loss and The weight balance parameter between losses, is the original manually marked area, The core trigeminal nerve root and ganglion, It is the trigeminal nerve branch and the peripheral trigeminal nerve root and ganglion. and for and Weight balance parameter between losses;
[0026] S5: Randomly select a number of samples from the training set, read these samples into the model after bias field correction, and randomly take image blocks of fixed size and resolution from the range of each sample according to the sampling method, perform data augmentation on them, and normalize the image;
[0027] S6: Through forward propagation, the image passes through each neuron in the network layer by layer to generate the trigeminal nerve segmentation result. The loss between the trigeminal nerve segmentation result and the trigeminal nerve manual labeling is calculated according to the loss function and the gradient is calculated. The model parameters are updated using the back propagation algorithm.
[0028] S7: Repeat steps S5 and S6 to traverse the entire training set data, and then repeat this step until the maximum number of iterations is reached;
[0029] S8: Evaluate the model using validation set data and test Coefficient, recall and precision indicators to select the optimal model;
[0030] S9: Use the test set data to test the optimal model and obtain the test set data. Coefficient, recall, and precision metrics.
[0031] Preferably, in step S3, the deep learning models include 3D U-Net, nnUNet, V-Net and SEVB-Ne, and the hyperparameters include resolution, cropping amount, sampling method, maximum number of iterations, initial learning rate, batch size and decay rate.
[0032] Preferably, in step S5, voxels with MR image intensity values higher than 99% and lower than 1% are removed by adaptive normalization, and all image intensity values are unified between 0 and 1 by maximum and minimum normalization.
[0033] Preferably, the steps of segmentation reasoning of the trigeminal nerve magnetic resonance imaging segmentation subsystem are as follows:
[0034] A1: Read the bias-field-corrected image of the test sample into the model;
[0035] A2: Divide the entire image into several image blocks along one axis according to the resolution and batch size of the coarse positioning model;
[0036] A3: Preprocess the read image blocks and input the normalized images into the trained coarse positioning model. Through forward propagation, the images pass through each neuron in the network layer by layer and finally generate a prediction result.
[0037] A4: Repeat steps A2 and A3 to obtain prediction results for all image blocks, and map the prediction results to the original image to obtain a segmentation result with the same size as the input image;
[0038] A5: Locate the position of the trigeminal nerve in the entire image based on the coarse segmentation result, represented by a bounding-box. Use a sliding window to divide the bounding-box area into overlapping sub-blocks. The resolution and size of the sub-blocks are the same as those of the fine segmentation model.
[0039] A6: Input the sub-blocks into the trained fine segmentation model in sequence. Through forward propagation, the image passes through each neuron in the network layer by layer, and finally generates a prediction result;
[0040] A7: Repeat steps A5 and A6 to obtain fine segmentation prediction results for all image blocks. The segmentation results of the sub-blocks constitute the segmentation results of the entire trigeminal nerve area. The segmentation results of the overlapping parts are Gaussian weighted averaged.
[0041] A8: Visualize the segmented image results for users to view.
[0042] Preferably, the steps of classification training of the trigeminal neuralgia identification classification subsystem are as follows:
[0043] B1: Collect, classify and label trigeminal nerve image datasets;
[0044] B2: The image is corrected by bias field through N4 Bias Field Correction, and the training set, validation set and test set are set with a ratio of 7:1:2;
[0045] B3: Select deep learning models and hyperparameters based on the classification task;
[0046] B4: Select the corresponding loss function in step S4 to determine the difference between the model output and the true label;
[0047] B5: Randomly select a number of samples from the training set, read these samples into the model after bias field correction, and obtain the position of the trigeminal nerve in the entire image based on the trigeminal nerve annotation. Randomly take image blocks of fixed size and resolution within the trigeminal nerve position range, perform data enhancement on them, and normalize the image.
[0048] B6: Input the preprocessed image into the model and predict the category probability by forward propagating the image through each neuron in the network layer by layer;
[0049] B7: Calculate the loss between the network prediction probability and the true label according to the selected loss function and calculate the gradient, and use the back propagation algorithm to update the model parameters;
[0050] B8: Repeat steps B5 to B7 to traverse the entire training set data, and then repeat this step until the maximum number of iterations is reached;
[0051] B9: Evaluate the model through the validation set, calculate the AUC, sensitivity, specificity, accuracy, precision and F1 score indicators, and select the optimal model;
[0052] B10: Use the test set data to test the selected model and obtain the AUC, sensitivity, specificity, accuracy, precision and F1 score indicators of the test set.
[0053] Preferably, in step B3, the deep learning model includes ResNet, DenseNet and Inception.
[0054] Preferably, the steps of classification reasoning of the trigeminal neuralgia identification classification subsystem are as follows:
[0055] C1: After bias field correction and trigeminal nerve pixel-level annotation, the test image sample is read into the model, and its position in the entire image is obtained according to the trigeminal nerve annotation, including the center point coordinates and length, width and height;
[0056] C2: The image block with fixed size and resolution is sampled with the coordinates of the center point of the trigeminal nerve in the original image as the center;
[0057] C3: Enhance and normalize the read image blocks, input the preprocessed image blocks into the model for forward propagation, and calculate the model's predicted probability distribution for each category;
[0058] C4: Calculates the performance of the model on the test set based on the difference between the predicted results and the true labels;
[0059] C5: Generate confusion matrix, ROC curve, calibration curve and decision curve based on the test results.
[0060] The present invention has the following advantages: based on the loss function of the morphological structure of the trigeminal nerve, the present invention separates the easily segmented trigeminal nerve roots and ganglia from the difficult-to-segment trigeminal nerve branches in corresponding ways, thereby completely and automatically segmenting all three branches of the trigeminal nerve. At the same time, because the loss in the difficult-to-segment area is relatively high, a large weight is assigned to the difficult-to-segment area, and a small weight is assigned to the easy-to-segment area. Therefore, the loss function will prioritize the optimization of the loss in the difficult-to-segment area, thereby improving the segmentation effect. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 This is a schematic diagram of the overall process of the trigeminal nerve magnetic resonance imaging segmentation and classification system. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0063] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0064] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.
[0065] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0066] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, or the positions or positional relationships in which the product of the invention is usually placed when in use, or the positions or positional relationships commonly understood by those skilled in the art, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0067] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0068] In this embodiment, if Figure 1 As shown, a trigeminal nerve magnetic resonance imaging segmentation and classification system includes a trigeminal nerve magnetic resonance imaging segmentation subsystem and a trigeminal neuralgia identification and classification subsystem;
[0069] The trigeminal nerve MRI segmentation subsystem is used to segment the entire trigeminal nerve branches and divide the region of interest for the trigeminal neuralgia differential classification subsystem;
[0070] The trigeminal neuralgia identification and classification subsystem is used to identify trigeminal neuralgia patients and normal people, and classify them, so as to provide auxiliary decision support for doctors. Based on the loss function of the morphological structure of the trigeminal nerve, the easily segmented trigeminal nerve roots and ganglia are separated from the difficult-to-segment trigeminal nerve branches in a corresponding manner, so that all three branches of the trigeminal nerve are fully automatically segmented. At the same time, because the loss in the difficult-to-segment area is relatively high, a large weight is assigned to the difficult-to-segment area, and a small weight is assigned to the easy-to-segment area. Then, the loss function will prioritize the optimization of the loss in the difficult-to-segment area, thereby improving the segmentation effect. In this embodiment, the automatic segmentation of the trigeminal nerve and the automation of trigeminal neuralgia are achieved through conventional magnetic resonance imaging examinations, without the need for additional complex post-processing and equipment.
[0071] Furthermore, the trigeminal nerve magnetic resonance imaging segmentation subsystem trains a coarse positioning model and a fine segmentation model according to different image resolutions. Specifically, due to the large size of three-dimensional medical images, in order to reduce the memory size, a multi-resolution approach is adopted here to train two segmentation models, a coarse positioning model and a fine segmentation model, at different image resolutions. Furthermore, the resolution of the coarse positioning model is twice the actual resolution, and its sampling method is random sampling in the entire image domain; the resolution of the fine segmentation model is the median of the actual resolution of all samples, and its sampling method is random sampling in the indicated area.
[0072] In this embodiment, the steps of segmentation training of the trigeminal nerve magnetic resonance imaging segmentation subsystem are as follows:
[0073] S1: All three branches of the trigeminal nerve are collected and labeled; that is, each pixel is labeled as belonging to the background or the trigeminal nerve.
[0074] S2: Preprocess the data and set the training set, validation set and test set in a ratio of 7:1:2; specifically, all images use N4 Bias Field Correction to eliminate the intensity inhomogeneity of MR images to obtain bias field corrected images, where the training set: validation set: test set is 7:1:2.
[0075] S3: Select deep learning models and hyperparameters according to task requirements; preferably, deep learning models include 3D U-Net, nnUNet, V-Net and SEVB-Ne, and hyperparameters include resolution, cropping amount, sampling method, maximum number of iterations, initial learning rate, batch size and decay rate. Specifically, the specific settings of hyperparameters are shown in Table 1.
[0076] Table 1 Hyperparameter settings of trigeminal nerve MRI segmentation subsystem
[0077] Hyperparameters Coarse positioning model Fine segmentation model Resolution [1, 1, 1] [0.5, 0.5, 0.5] Crop Amount [128, 128, 128] [64, 192, 160] Sampling method GLOBAL: Random sampling across the entire image domain MASK: random sampling within the mask indication area Maximum number of iterations 6000 6000 Initial learning rate 1e-4 1e-4 Decay rate 0.1 0.1 Batch Quantity 12 12 Optimizer Adam Adam
[0078] S4: Separate the trigeminal nerve roots and ganglia from the trigeminal nerve branches according to the morphological structure, and optimize the segmented area using the loss function:
[0079] ;
[0080] in, is the original manually marked area, The core trigeminal nerve root and ganglion, It is the trigeminal nerve branch and the peripheral trigeminal nerve root and ganglion. and for and The weight balance parameter between losses; here is 0.2, is 0.8. By assigning larger weights to difficult-to-segment regions ( ) and assign smaller weights to easily segmented regions ( ), the loss in the difficult-to-segment area is relatively high, so this loss function will prioritize the loss of the difficult-to-segment area to improve the segmentation effect.
[0081] When the loss function is When the coefficient loss function is
[0082] ;
[0083] When the loss function is hour,
[0084] ;
[0085] Will The coefficient loss function and As the loss function for network training ,
[0086] ;
[0087] in, for Loss and The weight balance parameter between losses; here is 0.5.
[0088] The final loss function is:
[0089] ;
[0090] in, for Loss and The weight balance parameter between losses, is the original manually marked area, The core trigeminal nerve root and ganglion, It is the trigeminal nerve branch and the peripheral trigeminal nerve root and ganglion. and for and Weight balance parameter between losses;
[0091] S5: Randomly select the number of samples from the training set, read these samples into the model after bias field correction, and randomly take image blocks of fixed size and resolution from the range of each sample according to the sampling method, perform data enhancement on them, and normalize the image; specifically, the number of samples read each time is determined by the batch size, that is, the number of samples processed simultaneously during each iteration of training. The coarse positioning model randomly samples image blocks of fixed size and resolution from the entire image area of each sample; the fine segmentation model randomly samples image blocks of fixed size and resolution from the trigeminal nerve annotation indication area of each sample. The main function of data enhancement is to improve the generalization ability of the model, and adding an appropriate amount of noise data can improve the robustness of the network model. Furthermore, voxels with MR image intensity values higher than 99% and lower than 1% are removed by adaptive normalization, and all image intensity values are unified between 0 and 1 by maximum and minimum normalization.
[0092] S6: Through forward propagation, the image passes through each neuron in the network layer by layer to generate the trigeminal nerve segmentation result. The loss between the trigeminal nerve segmentation result and the trigeminal nerve manual labeling is calculated according to the loss function and the gradient is calculated. The model parameters are updated using the back propagation algorithm. Specifically, in the process of calculating the loss, the entire trigeminal nerve is divided into two regions through the corrosion operation. The central area of the trigeminal nerve root. For the trigeminal nerve branch area, the Dice loss and Focal loss of the two areas are calculated respectively according to the final loss function, the comprehensive loss is obtained according to the weight parameters, the gradient is calculated and the back propagation algorithm is used to update the model parameters.
[0093] S7: Repeat steps S5 and S6 to traverse the entire training set data, and then repeat this step until the maximum number of iterations is reached;
[0094] S8: Evaluate the model using validation set data and test Coefficient, recall and precision indicators to select the optimal model;
[0095] S9: Use the test set data to test the optimal model and obtain the test set data. Coefficient, recall, and precision metrics.
[0096] In this embodiment, the steps of segmentation reasoning of the trigeminal nerve magnetic resonance imaging segmentation subsystem are as follows:
[0097] A1: Read the bias-field-corrected image of the test sample into the model;
[0098] A2: Divide the entire image into several image blocks along one axis according to the resolution and batch size of the coarse positioning model;
[0099] A3: Preprocess the read image blocks and input the normalized images into the trained coarse positioning model. Through forward propagation, the images pass through each neuron in the network layer by layer and finally generate a prediction result.
[0100] A4: Repeat steps A2 and A3 to obtain prediction results for all image blocks, and map the prediction results to the original image to obtain a segmentation result with the same size as the input image;
[0101] A5: Locate the position of the trigeminal nerve in the entire image based on the coarse segmentation result, represented by a bounding-box. Use a sliding window to divide the bounding-box area into overlapping sub-blocks. The resolution and size of the sub-blocks are the same as those of the fine segmentation model.
[0102] A6: Input the sub-blocks into the trained fine segmentation model in sequence. Through forward propagation, the image passes through each neuron in the network layer by layer, and finally generates a prediction result;
[0103] A7: Repeat steps A5 and A6 to obtain fine segmentation prediction results for all image blocks. The segmentation results of the sub-blocks constitute the segmentation results of the entire trigeminal nerve area, and the segmentation results of the overlapping parts are Gaussian weighted averaged. Specifically, in this way, the fine segmentation model can accurately segment the trigeminal nerve, and each pixel point will be assigned a category label, indicating whether the object category to which the pixel belongs is background or trigeminal nerve, which constitutes the trigeminal nerve segmentation result as a whole. At the same time, the segmentation results can also be post-processed to further improve the quality. For example, post-processing can perform edge smoothing, remove small noise points, or fill holes.
[0104] A8: Visualize the segmented image results for users to view.
[0105] In this embodiment, the steps of classification training of the trigeminal neuralgia identification classification subsystem are as follows:
[0106] B1: Collect trigeminal nerve image datasets, classify and label them; that is, trigeminal nerve patient labels or normal person labels.
[0107] B2: The image is corrected by bias field through N4 Bias Field Correction, and the training set, validation set and test set are set with a ratio of 7:1:2; specifically, all images are corrected by N4 Bias Field Correction to eliminate the intensity inhomogeneity of MR images and obtain bias field corrected images, where the training set: validation set: test set is 7:1:2.
[0108] B3: Select deep learning models and hyperparameters according to the classification task; further, deep learning models include ResNet, DenseNet and Inception, and hyperparameters include resolution, cropping size, maximum number of iterations, initial learning rate, decay rate, optimizer and batch size. Specifically, the specific settings of hyperparameters are shown in Table 2.
[0109] Table 2 Hyperparameter settings of trigeminal neuralgia identification and classification subsystem
[0110] Hyperparameters Trigeminal neuralgia differential classification subsystem Resolution [0.5,0.5,0.5] Cutting size [64, 192, 160] Maximum number of iterations 6000 Initial learning rate 1e-4 Decay rate 0.1 Optimizer Adam Batch Number 12
[0111] B4: Select the corresponding loss function in step S4 to determine the difference between the model output and the true label;
[0112] B5: Randomly select a number of samples from the training set, read these samples into the model after bias field correction, and obtain the position of the trigeminal nerve in the entire image based on the trigeminal nerve annotation. Randomly take image blocks of fixed size and resolution within the position range of the trigeminal nerve, perform data enhancement on them, and normalize the image. Use adaptive normalization to remove voxels with MR image intensity values higher than 99% and lower than 1%, and use maximum and minimum normalization to unify all image intensity values between 0 and 1.
[0113] B6: Input the preprocessed image into the model and predict the category probability by forward propagating the image through each neuron in the network layer by layer;
[0114] B7: Calculate the loss between the network prediction probability and the true label according to the selected loss function and calculate the gradient, and use the back propagation algorithm to update the model parameters;
[0115] B8: Repeat steps B5 to B7 to traverse the entire training set data, and then repeat this step until the maximum number of iterations is reached;
[0116] B9: Evaluate the model through the validation set, calculate the AUC, sensitivity, specificity, accuracy, precision and F1 score indicators, and select the optimal model;
[0117] B10: Use the test set data to test the selected model and obtain the AUC, sensitivity, specificity, accuracy, precision and F1 score indicators of the test set.
[0118] Furthermore, the classification reasoning steps of the trigeminal neuralgia identification classification subsystem are as follows:
[0119] C1: After bias field correction and trigeminal nerve pixel-level annotation, the test image sample is read into the model, and its position in the entire image is obtained according to the trigeminal nerve annotation, including the center point coordinates and length, width and height;
[0120] C2: The image block with fixed size and resolution is sampled with the coordinates of the center point of the trigeminal nerve in the original image as the center;
[0121] C3: Enhance and normalize the read image blocks, input the preprocessed image blocks into the model for forward propagation, and calculate the model's predicted probability distribution for each category;
[0122] C4: Calculates the performance indicators of the model on the test set based on the difference between the predicted results and the true labels, such as AUC, sensitivity, specificity, accuracy, precision, and F1 score indicators, which can help evaluate the performance of the model on the classification task.
[0123] C5: Generate confusion matrix, ROC curve, calibration curve and decision curve based on the test results.
[0124] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. For example, deep learning segmentation is implemented by cascading a coarse segmentation network and a fine segmentation network, or by using a single network or more networks for segmentation; in the classification process of trigeminal neuralgia, a segmentation algorithm and a classification algorithm are implemented in series, or by using a single network or more networks. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A trigeminal nerve magnetic resonance imaging segmentation and classification system, characterized by: It includes trigeminal nerve magnetic resonance imaging segmentation subsystem and trigeminal neuralgia identification and classification subsystem; The trigeminal nerve magnetic resonance imaging segmentation subsystem is used to segment the entire branch of the trigeminal nerve and divide the area of interest for the trigeminal neuralgia identification and classification subsystem; The trigeminal neuralgia identification and classification subsystem is used to identify trigeminal neuralgia patients and normal people, and classify them; The steps of segmentation training of the trigeminal nerve magnetic resonance imaging segmentation subsystem are as follows: S1: Collect and label all three branches of the trigeminal nerve; S2: preprocess the data and set the training set, validation set and test set in a ratio of 7:1:2; S3: Select deep learning models and hyperparameters based on task requirements; S4: Separate the trigeminal nerve roots and ganglia from the trigeminal nerve branches according to the morphological structure, and optimize the segmented area using the loss function: ; in, is the original manually marked area, The core trigeminal nerve root and ganglion, It is the trigeminal nerve branch and the peripheral trigeminal nerve root and ganglion. and for and Weight balance parameter between losses; When the loss function is When the coefficient loss function is ; When the loss function is hour, ; Will The coefficient loss function and As the loss function for network training , ; in, for Loss and Weight balance parameter between losses; The final loss function is: ; in, for Loss and The weight balance parameter between losses, is the original manually marked area, The core trigeminal nerve root and ganglion, It is the trigeminal nerve branch and the peripheral trigeminal nerve root and ganglion. and for and Weight balance parameter between losses; S5: Randomly select a number of samples from the training set, read these samples into the model after bias field correction, and randomly take image blocks of fixed size and resolution from the range of each sample according to the sampling method, perform data augmentation on them, and normalize the image; S6: Through forward propagation, the image passes through each neuron in the network layer by layer to generate the trigeminal nerve segmentation result. The loss between the trigeminal nerve segmentation result and the trigeminal nerve manual labeling is calculated according to the loss function and the gradient is calculated. The model parameters are updated using the back propagation algorithm. S7: Repeat steps S5 and S6 to traverse the entire training set data, and then repeat this step until the maximum number of iterations is reached; S8: Evaluate the model using validation set data and test Coefficient, recall and precision indicators to select the optimal model; S9: Use the test set data to test the optimal model and obtain the test set data. Coefficient, recall, and precision metrics.
2. The trigeminal nerve magnetic resonance imaging segmentation and classification system according to claim 1, characterized in that: The trigeminal nerve magnetic resonance imaging segmentation subsystem trains a coarse positioning model and a fine segmentation model according to different image resolutions.
3. The trigeminal nerve magnetic resonance imaging segmentation and classification system according to claim 2, characterized in that: The resolution of the coarse positioning model is twice the actual resolution, and its sampling method is random sampling in the entire image domain; the resolution of the fine segmentation model is the median of the actual resolution of all samples, and its sampling method is random sampling in the indicated area.
4. The trigeminal nerve magnetic resonance imaging segmentation and classification system according to claim 1, characterized in that: In step S3, the deep learning models include 3D U-Net, nnUNet, V-Net and SEVB-Ne, and the hyperparameters include resolution, cropping amount, sampling method, maximum number of iterations, initial learning rate, batch size and decay rate.
5. The trigeminal nerve magnetic resonance imaging segmentation and classification system according to claim 4, characterized in that: In step S5, voxels with MR image intensity values higher than 99% and lower than 1% are removed by adaptive normalization, and all image intensity values are unified between 0 and 1 by maximum and minimum normalization.
6. The trigeminal nerve magnetic resonance imaging segmentation and classification system according to claim 5, characterized in that: The steps of segmentation reasoning of the trigeminal nerve magnetic resonance imaging segmentation subsystem are as follows: A1: Read the bias-field-corrected image of the test sample into the model; A2: Divide the entire image into several image blocks along one axis according to the resolution and batch size of the coarse positioning model; A3: Preprocess the read image blocks and input the normalized images into the trained coarse positioning model. Through forward propagation, the images pass through each neuron in the network layer by layer and finally generate a prediction result. A4: Repeat steps A2 and A3 to obtain prediction results for all image blocks, and map the prediction results to the original image to obtain a segmentation result with the same size as the input image; A5: Locate the position of the trigeminal nerve in the entire image based on the coarse segmentation result, represented by a bounding-box. Use a sliding window to divide the bounding-box area into overlapping sub-blocks. The resolution and size of the sub-blocks are the same as those of the fine segmentation model. A6: Input the sub-blocks into the trained fine segmentation model in sequence. Through forward propagation, the image passes through each neuron in the network layer by layer, and finally generates a prediction result; A7: Repeat steps A5 and A6 to obtain fine segmentation prediction results for all image blocks. The segmentation results of the sub-blocks constitute the segmentation results of the entire trigeminal nerve area. The segmentation results of the overlapping parts are Gaussian weighted averaged. A8: Visualize the segmented image results for users to view.
7. The trigeminal nerve magnetic resonance imaging segmentation and classification system according to claim 6, characterized in that: The steps of classification training of the trigeminal neuralgia identification classification subsystem are as follows: B1: Collect, classify and label trigeminal nerve image datasets; B2: The image is corrected by bias field through N4 Bias Field Correction, and the training set, validation set and test set are set with a ratio of 7:1:2; B3: Select deep learning models and hyperparameters based on the classification task; B4: Select the corresponding loss function in step S4 to determine the difference between the model output and the true label; B5: Randomly select a number of samples from the training set, read these samples into the model after bias field correction, and obtain the position of the trigeminal nerve in the entire image based on the trigeminal nerve annotation. Randomly take image blocks of fixed size and resolution within the trigeminal nerve position range, perform data enhancement on them, and normalize the image. B6: Input the preprocessed image into the model and forward propagate the image through each neuron in the network layer by layer to predict the category probability; B7: Calculate the loss between the network prediction probability and the true label according to the selected loss function and calculate the gradient, and use the back propagation algorithm to update the model parameters; B8: Repeat steps B5 to B7 to traverse the entire training set data, and then repeat this step until the maximum number of iterations is reached; B9: Evaluate the model through the validation set, calculate the AUC, sensitivity, specificity, accuracy, precision and F1 score indicators, and select the optimal model; B10: Use the test set data to test the selected model and obtain the AUC, sensitivity, specificity, accuracy, precision and F1 score indicators of the test set.
8. The trigeminal nerve magnetic resonance imaging segmentation and classification system according to claim 7, characterized in that: In step B3, the deep learning models include ResNet, DenseNet and Inception.
9. The trigeminal nerve magnetic resonance imaging segmentation and classification system according to claim 8, characterized in that: The steps of classification reasoning of the trigeminal neuralgia identification classification subsystem are as follows: C1: After bias field correction and trigeminal nerve pixel-level annotation, the test image sample is read into the model, and its position in the entire image is obtained according to the trigeminal nerve annotation, including the center point coordinates and length, width and height; C2: The image block with fixed size and resolution is sampled with the coordinates of the center point of the trigeminal nerve in the original image as the center; C3: Enhance and normalize the read image blocks, input the preprocessed image blocks into the model for forward propagation, and calculate the model's predicted probability distribution for each category; C4: Calculates the performance of the model on the test set based on the difference between the predicted results and the true labels; C5: Generate confusion matrix, ROC curve, calibration curve and decision curve based on the test results.
Citation Information
Patent Citations
Brain image processing method, computer equipment and storage medium
CN115330748A
