A deep learning-based condyle MRI medical image segmentation method

By combining U-Net and Transformer models with data preprocessing and feature fusion modules, the problems of boundary discontinuity and insufficient adaptability in condylar MRI image segmentation are solved, achieving high-precision and stable condylar segmentation results.

CN119941763BActive Publication Date: 2026-02-13CHONGQING UNIV OF POSTS & TELECOMM
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510038303.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2026-02-13
Estimated Expiration
2045-01-09

AI Technical Summary

Technical Problem

Existing technologies for segmenting condylar MRI medical images suffer from problems such as discontinuous or overly smoothed boundaries, insufficient segmentation accuracy, and limited adaptability. In particular, the segmentation results are unstable under the influence of complex structures and noise.

Method used

The system employs a data preprocessing module, an intelligent cropping module, a preliminary feature extraction module, a global information extraction module, a feature fusion module, and a boundary refinement module. Combining the U-Net model and the Transformer model, it improves segmentation accuracy and stability through data augmentation, cropping, feature extraction, global information capture, feature fusion, and edge correction.

Benefits of technology

It achieves precise segmentation of the condylar region, improves the accuracy and stability of segmentation, ensures the continuity and smoothness of the boundaries, and is suitable for MRI image data with high diversity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941763B_ABST
    Figure CN119941763B_ABST
Patent Text Reader

Abstract

The application provides a condyle MRI medical image segmentation method based on deep learning, relates to the technical field of medical image processing and 3D image segmentation, and first extracts basic features of a condyle region by using a convolutional neural network, and flattens a feature map output by the CNN to serve as input of a Transformer model, so as to improve global perception ability and the precision of edge detail capture by combining the core mechanism of the Transformer model; a skip connection mechanism is adopted to fuse the preliminarily extracted local features and global information, and the whole structure is constructed, so as to further improve the segmentation performance; the deep learning segmentation method based on the combination of the CNN and the Transformer model significantly improves the segmentation precision of the condyle, so that the global structure and edge details of the condyle can be accurately captured, and the limitations of traditional methods in the aspects of complex structure boundary blur and insufficient segmentation stability are overcome.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the field of medical image processing and 3D image segmentation, and particularly relates to a condyle MRI medical image segmentation method based on deep learning. BACKGROUND

[0002] The temporomandibular joint (TMJ) is an important joint structure in the human body, located between the mandible and the skull, responsible for supporting various facial activities such as chewing, speaking, and swallowing. The condyle, as a core component of the TMJ, its morphology and health status directly affect the functional performance of the TMJ. Therefore, condyle lesions can cause pain, abnormal joint movement, occlusal discomfort, and other symptoms, seriously affecting the quality of life of patients. TMJ diseases, especially temporomandibular joint disorders (TMD) and temporomandibular joint osteoarthritis (TMJOA), have a high incidence and are often accompanied by abnormal changes in the condyle. The health status of the condyle is an important indicator for evaluating these lesions, so accurately segmenting the condyle region in the image to identify its morphological changes and lesion conditions is of great significance for early detection and intervention of diseases.

[0003] Currently, imaging examination is the main means for diagnosing TMJ diseases, and CBCT and MRI are commonly used imaging techniques. CBCT can clearly show bone structures, so it is suitable for condyle morphology analysis; MRI is better for imaging soft tissues and is the first choice for observing the relationship between the condyle and the disc. In addition, in image processing and analysis, the convolutional neural network (CNN) technology based on deep learning has become the mainstream method for automatic segmentation of the condyle. Convolutional neural networks, especially improved models such as U-Net, have been widely used in condyle segmentation.

[0004] In the prior art, a MRI medical image segmentation method based on SA Net is disclosed, including the following steps: BraTS2020 data acquisition: collecting the original T1 weighted imaging, contrast-enhanced imaging, T2 weighted imaging, and fluid attenuation imaging data sets provided by BraTS2020; data annotation: manually annotating the data sets according to the same annotation protocol; data preprocessing: preprocessing the MRI images; segmentation model training: segmenting the MRI medical images using a variant of the U Net model; adjusting the model parameters through the loss function to obtain the optimal model, completing the building process of the segmentation model; saving the model when the loss function of the model no longer decreases. This method can fully utilize the full-scale information for MRI medical image segmentation by performing 5-fold cross-validation on the model to evaluate its performance.

[0005] Although deep learning technology has significantly improved the level of automation of condyle segmentation, there are still some problems in the existing technology in the condyle segmentation task; first, the condyle structure is complex, the boundary is fuzzy, and the contrast with the surrounding tissue is low, which makes the CNN model prone to errors in capturing edge details, resulting in discontinuous or over-smoothed boundaries; second, CBCT and MRI images are often affected by noise and artifacts, especially in low-resolution and non-standardized images, and the segmentation accuracy is difficult to guarantee; in addition, due to the large difference in condyle structure, the adaptability of a single deep learning model to different image data is limited, and the segmentation effect is unstable;

[0006] The above information disclosed in the above background section is only used to strengthen the understanding of the background of the present disclosure, and therefore it can include information that does not constitute prior art known to those of ordinary skill in the art. SUMMARY

[0007] The purpose of the present application is to provide a deep learning-based condyle MRI medical image segmentation method to solve the problems raised in the above background.

[0008] To achieve the above purpose, the present application provides the following technical solutions:

[0009] A deep learning-based condyle MRI medical image segmentation method, comprising a data preprocessing module, an intelligent cropping module, a preliminary feature extraction module, a global information extraction module, a feature fusion module and a boundary refinement module, and the specific steps comprise:

[0010] S1: Through the data preprocessing module, the original dcm format condyle MRI grayscale image and the corresponding labeled image are merged, and the data enhancement technology is applied to the merged image;

[0011] The condyle MRI grayscale image after data enhancement is normalized in the same range value to obtain the preprocessed condyle MRI grayscale image, and the preprocessed condyle MRI grayscale image is converted to h5 format;

[0012] S2: Through the intelligent cropping module, the intelligent cropping network based on the U-Net model architecture is used to crop the condyle MRI grayscale image converted to h5 format, and the output results of the image and the boundary box are adjusted to 256x256 resolution after cropping to obtain the cropped image;

[0013] S3: Through the preliminary feature extraction module, the convolutional neural network is used to extract low-level features from the cropped image, and the CNN feature map is generated to detect low-level features in the condyle region, including identifying the structural outline, edge information and texture features of the condyle;

[0014] S4: Capture global information of the CNN feature map through a global information extraction module to enhance the segmentation accuracy of the condyle MRI medical image, specifically:

[0015] The three-dimensional CNN feature map is flattened into a one-dimensional sequence and position encoding is added to identify the spatial position relationship of the features recognized by the Transformer model;

[0016] Global feature extraction is performed on the input one-dimensional sequence through a multi-head self-attention mechanism, and a learnable weight matrix is used to convert the one-dimensional sequence into a query, key and value matrix; each attention head calculates the scaled dot product attention to capture the correlation between different positions;

[0017] Residual connection and layer normalization are applied after each sub-layer to produce normalized attention output and final output of the feedforward network in turn;

[0018] For the final output of the feedforward network, the global feature is obtained through mean pooling;

[0019] S5: Through the feature fusion module, the low-level features preliminarily extracted are fused with the global features output by the global information extraction module using the skip connection mechanism of the U-Net model architecture, specifically:

[0020] Through the skip connection, the low-level features of the convolutional layer are directly aligned and fused with the high-level features output by the global information extraction module at multiple scales, so that the U-Net model can utilize both local details and global context information;

[0021] Through the feature fusion module, the generated fusion features are used to output a preliminary segmentation image that contains edge information of the condyle region; and the preliminary segmentation result is used for edge detection and initial position setting of the active contour model in subsequent steps;

[0022] S6: Through the boundary refinement module, the segmentation edges of the preliminary segmentation image are modified and supplemented using the active contour model to ensure the accuracy and smoothness of the edges; the steps are as follows:

[0023] The initial position of the contour is defined by the preliminary segmentation image output by the feature fusion module;

[0024] Based on the gradient information and edge morphology of the image, the contour position is gradually adjusted to approach the true boundary of the image;

[0025] The active contour model optimizes the edge position by minimizing the energy function; the energy function includes edge strength, smoothness and shape constraint;

[0026] Curvature analysis is used to control the bending degree of the contour to ensure that natural curves are maintained at edge transitions;

[0027] Finally, the active contour model generates the optimized segmentation edge.

[0028] Compared with the prior art, the present application has the beneficial effects that:

[0029] Accurate cropping module: through the intelligent cropping network, the original image is cropped to the accurate area containing the condyle, ensuring the integrity of the condyle structure and improving the accuracy and efficiency of subsequent segmentation, solving the problem of insufficient segmentation precision caused by excessive field of view in traditional methods.

[0030] Combination of global and local features: the convolutional neural network (CNN) is used to extract the preliminary features of the condyle region, and the Transformer model is used to further capture the global information in the image; combined with the feature fusion mechanism of skip connection, the local details and global context information are fully utilized, greatly improving the detail fidelity and precision of segmentation;

[0031] Boundary refinement module: the active contour model is used to accurately correct the segmentation edge, ensuring the boundary continuity and smoothness of the segmentation result, effectively solving the problem of complex condyle structure and fuzzy boundary, and realizing accurate edge repair and optimization;

[0032] Adaptability and stability: through a series of preprocessing and data enhancement steps, the adaptability of the model to different image data is stronger, improving the stability and robustness of segmentation, and being suitable for a variety of MRI image data. BRIEF DESCRIPTION OF DRAWINGS

[0033] Figure 1 Flow chart of the condyle MRI medical image segmentation method based on deep learning of the present application;

[0034] Figure 2 The original gray-scale image of the condyle medical image used in the embodiment is 512*512 in size;

[0035] Figure 3 The visualized image after the size of the original image is changed to 256*256 after intelligent cropping;

[0036] Figure 4 The original data image and the data image after random rotation, random scaling and sharpening data enhancement operations, respectively;

[0037] Figure 5 The edge mask formed after the original data image and edge detection;

[0038] Figure 6 The original image, the image segmentation true value, and the visualization image of the segmentation result of the present example, respectively. DETAILED DESCRIPTION

[0039] For the purposes of the present invention, the technical solutions and advantages will be more clearly apparent, further detailed below with specific examples.

[0040] It should be noted that, unless otherwise defined, technical terms or scientific terms used in the present invention should be understood as their common meanings to those having ordinary skill in the art to which the present invention pertains. The terms "first", "second", and similar terms used in the present invention do not denote any order, quantity, or importance, but are merely used to distinguish different components. The terms "include" or "contain" and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, without excluding other elements or objects. The terms "connect" or "connected" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The terms "upper", "lower", "left", "right", and the like merely indicate relative positional relationships, which can change when the absolute positions of the described objects change.

[0041] Example 1:

[0042] Please refer to Figures 1 to 6 The present invention provides a technical solution:

[0043] A condyle MRI medical image segmentation method based on deep learning, the method comprising a data preprocessing module, an intelligent cropping module, a preliminary feature extraction module, a global information extraction module, a feature fusion module, and a boundary refinement module, the specific steps comprising:

[0044] S1: Through the data preprocessing module, the original dcm format condyle MRI grayscale image and the corresponding labeled image are merged, and the data enhancement technique is applied to the merged image;

[0045] To ensure the consistency of the gray value range, the condyle MRI grayscale image after data enhancement is normalized to the same range value to obtain the preprocessed condyle MRI grayscale image, and the preprocessed condyle MRI grayscale image is converted to h5 format;

[0046] S2: Through the intelligent cropping module, the intelligent cropping network based on the U-Net model architecture is used to crop the condyle MRI grayscale image converted to h5 format, and the output results of the image and the boundary box are adjusted to a resolution of 256x256 after cropping to obtain the cropped image;

[0047] S3: Through the preliminary feature extraction module, low-level features in the condyle region are detected by using a convolutional neural network to extract low-level features from the cropped image and generate a CNN feature map, and the low-level features include identifying the structural contour, edge information, and texture features of the condyle;

[0048] S4: Through the global information extraction module, the CNN feature map is captured to enhance the segmentation accuracy of the condyle MRI medical image, specifically:

[0049] The three-dimensional CNN feature map is flattened into a one-dimensional sequence and position encoding is added for the Transformer model to identify the spatial position relationship of the features;

[0050] Global feature extraction is performed on the input one-dimensional sequence through a multi-head self-attention mechanism, and a learnable weight matrix is used to convert the one-dimensional sequence into a query, key, and value matrix; each attention head calculates a scaled dot-product attention to capture the correlation between different positions;

[0051] The multi-head mechanism allows the model to simultaneously focus on global structures and local details in different subspaces;

[0052] Residual connections and layer normalization are applied after each sublayer to produce normalized attention outputs and final outputs of the feed-forward network in sequence; to ensure feature consistency and stable training, the feed-forward network further enhances the expressiveness of the features;

[0053] Then, for the final output of the feed-forward network, global features are obtained through mean pooling; this output contains both overall information and details, providing rich information support for subsequent segmentation modules; the S4 module effectively integrates the Transformer model and self-attention mechanism, improving the feature expression and detail capture ability of the model, and laying a foundation for high-precision medical image segmentation;

[0054] S5: Through the feature fusion module, the low-level features extracted preliminarily are fused with the global features output by the global information extraction module using the skip connection mechanism of the U-Net model architecture, specifically:

[0055] Through the skip connection, the low-level features of the convolutional layer are directly aligned and fused with the global features output by the global information extraction module at multiple scales to generate fused features, so that the U-Net model can utilize both local details and global context information; this fusion method fully leverages the advantages of the U-Net model architecture in image segmentation, significantly improving the segmentation accuracy of the condyle region and the fidelity of the edge details, and providing more accurate feature support for the final segmentation result;

[0056] The feature fusion module converts the fused features into a preliminary segmentation image, which contains edge information of the condyle region; and the preliminary segmentation image is used for edge detection and initial position setting of the active contour model in subsequent steps;

[0057] S6: Through the boundary refinement module, the active contour model is used to correct and supplement the segmentation edges of the preliminary segmentation image to ensure the accuracy and smoothness of the edges; the steps are as follows:

[0058] The initial position of the contour is defined by the preliminary segmentation image output by the feature fusion module;

[0059] Based on the gradient information and edge morphology of the image, the contour position is gradually adjusted by iteration, so that the contour approaches the real boundary of the image;

[0060] The active contour model optimizes the edge position by minimizing the energy function; the energy function includes edge strength, smoothness and shape constraint; so that the edge is smooth and continuous during adjustment;

[0061] The edge strength is used to ensure that the contour is close to the significant edge of the image; the smoothness is used to keep the contour smooth and continuous, and the shape constraint is used to constrain the contour shape according to the pre-defined shape model;

[0062] The curvature analysis is used to control the bending degree of the contour to ensure that the natural curve is maintained at the edge transition;

[0063] The active contour model generates an optimized segmentation edge. Improve the detail performance of the segmentation result.

[0064] Further, the data preprocessing module specifically includes:

[0065] The original condyle MRI grayscale image includes but is not limited to morphological data features, and the morphological data features include the structural contour, edge information and texture features of the condyle;

[0066] S11: Extract the image of the condyle region from the original dcm format condyle MRI grayscale image, and merge the labeled data to form an initial training set;

[0067] S12: Apply data augmentation techniques to the initial training set to perform random rotation, translation and cropping operations on the condyle MRI grayscale image; to expand the data set and improve the generalization ability of the model, the specific operations are as follows:

[0068] Random rotation: randomly rotate the image in the range of [-15°, +15°];

[0069] Random scaling: randomly scale the image size by ±10%;

[0070] Sharpening: Enhancing image details, making edges clearer;

[0071] S13: Normalization processing is used to normalize the gray value to [0, 1], and form the pretreated condyle MRI gray image; the normalization formula is as follows:

[0072]

[0073] Where I is the input pretreated condyle MRI gray image, and are the minimum and maximum pixel values of the condyle MRI gray image, respectively;

[0074] For converting the pretreated condyle MRI gray image into h5 format, specifically including:

[0075] The data format conversion is selected from 286 condyle MRI data, 256 of which are used for training and 30 of which are used for testing; the original data is in dcm format, which is converted into nii format for subsequent data processing;

[0076] The converted nii format image and the corresponding label data are merged into h5 format to form a standardized data set; when merging, other color labels in the label data except the target label are set to 0 to ensure that the model only focuses on the condyle structure information of the target area and avoids interference from non-target areas during training;

[0077] S14: The condyle MRI gray image converted into h5 format and the corresponding label are used as the final training set and input into the deep learning model for training.

[0078] Further, the intelligent cropping module specifically includes:

[0079] During the training of the intelligent cropping network, first, the region containing the condyle structure in the condyle MRI gray image converted into h5 format is expanded to form a bounding box containing the condyle and its surrounding tissues; then, image patches containing the condyle and surrounding structures are cropped from these bounding boxes as training data for the U-Net model; the U-Net model uses these cropped patches for training to identify and crop the condyle region; ensure the integrity of the condyle structure and the preservation of key morphological features;

[0080] Training and using the intelligent cropping module specifically includes:

[0081] S21: Intelligent cropping is performed using an intelligent cropping network based on a U-Net model architecture to crop the original resolution of the input image from 512x512 to 256x256; the condylar region is centralized and the training efficiency is improved, and the training data of the intelligent cropping network includes the condylar region and the surrounding tissue in the condylar MRI grayscale image converted into h5 format, forming a bounding box containing the condylar region, which is used for model learning;

[0082] The U-Net network used for cropping is composed of an encoder and a decoder, the encoder extracts the features of the image layer by layer, and the decoder restores the original resolution to generate the cropped image; the U-Net network is referred to as Unet network hereinafter;

[0083] S22: In the cropping process, the intelligent cropping network automatically identifies the condylar region in the MRI image, generates a cropped image containing the condyle, and ensures that the condylar structure is complete and the key morphological features are preserved; the network automatically detects the condylar region and ensures that the cropped result does not lose the boundary information of the condylar region; the Intersection over Union (IoU) is used as a measure of the quality of the cropping;

[0084] S23: Verification of the cropping result, the cropped image is verified to ensure that the condylar region is completely contained in the cropped image, if the condylar structure is not complete, the parameters of the cropping network are adjusted and recropped;

[0085] In the verification of the cropped image, the Intersection over Union (IoU) is used as a measure of the quality of the cropping to verify whether the condylar region is completely contained in the cropped image;

[0086] For the Intersection over Union (IoU): the Intersection over Union (IoU) value between the condylar region and the cropped image is calculated; the IoU value ranges from 0 to 1, and the closer the value is to 1, the higher the overlap between the condylar region and the cropped image, and the closer the value is to 0, the lower the overlap between the condylar region and the cropped image;

[0087] The IoU value is defined as the following formula: IoU=condylar region intersection area / condylar region union area;

[0088] The adjustment of the parameters of the cropping network and the recropping specifically includes:

[0089] The threshold value of IoU is set as Th, Th is selected in the range (0, 1); based on the expert group system and experimental demonstration, Th is determined as 0.8 in this embodiment; if the calculated IoU value is lower than the threshold value during verification, it indicates that the condylar structure is not completely contained in the cropped image; the following quantitative measures are taken until the condylar region is completely contained in the cropped image;

[0090] Adjusting the bounding box size or position of the cropping network; enabling the condyle structure to be better cropped;

[0091] Optimizing the learning rate or loss function parameters of the cropping network; for example, by adjusting the learning rate or loss function to improve the performance of the cropping network;

[0092] Increasing the training data or improving the data augmentation strategy; to enhance the generalization ability of the cropping network;

[0093] It should be noted that how to quantitatively adjust is determined according to the expert system and experimental data, which is not described in detail. The present embodiment only gives that the adjustment range of each parameter in the cropping network is ±2% of the current value;

[0094] S24: After the cropping adjustment is completed and the condyle structure is ensured to be complete, output the cropped image and the bounding box as the input of the subsequent feature extraction module.

[0095] Further explanation, for the preliminary feature extraction module, the step of generating CNN feature map includes:

[0096] S31: Convolution layer, input the cropped image into the convolution layer, use multiple convolution kernels to extract low-level features, and use the extracted low-level features as the CNN feature map of the following pooling operation;

[0097] Design a deep convolutional network containing 2 convolutional layers;

[0098] Each convolutional layer contains 64 3x3 size convolutional kernels and 64 5x5 size convolutional kernels;

[0099] In each convolutional layer, 3x3 and 5x5 size convolutional kernels are used respectively to extract low-level features of different scales from the input image;

[0100] The input image size is 256x256 pixels;

[0101] Using ReLU activation function;

[0102] When training the model, set the learning rate to 0.001 and the batch size to 32;

[0103] The purpose of using convolution is that convolution is used to extract local features, which can efficiently capture low-level information such as edges and textures of images, while preserving the spatial structure;

[0104] S32: Pooling layer, input the output of the convolutional layer into the pooling layer, reduce the resolution of the feature map through the pooling operation, while retaining important features; the pooling layer can reduce the input size of the next layer, reduce the calculation amount and the number of parameters, and reduce the deviation of the estimated mean of the convolutional layer parameter error;

[0105] In deep learning, FeatureMap refers to the features extracted from an input image through convolution operations in a Convolutional Neural Network (CNN);

[0106] Specifically, a Max Pooling layer is added after each convolutional layer, with a pooling kernel size of 2x2 and a stride of 2, to reduce the resolution of the feature map while preserving important features.

[0107] The Max Pooling operation is used to reduce the resolution of the feature map.

[0108] S33: Activation and Standardization, using an activation function to nonlinearize the pooled feature map and batch normalization to improve training stability. Specifically, the ReLU activation function is used for nonlinearization.

[0109] Further explanation, for the global information extraction module, the step of obtaining global features, specifically includes:

[0110] S41: Feature map flattening, converting the three-dimensional CNN feature map into a one-dimensional sequence form , where and are the height and width of the feature map, is the number of channels; the flattening formula is as follows:

[0111]

[0112] where, is the CNN feature map generated after convolutional neural network processing; represents the batch size, indicating the number of samples processed at a time;

[0113] permute(0,2,1) is a tensor operation that rearranges the dimension order of the tensor, in this formula, permute(0,2,1) means changing the dimension order of the tensor from the original order (0,1,2) to (0,2,1); Specifically, this operation exchanges the positions of the second and third dimensions in the tensor;

[0114] flattened_output is a variable name representing the flattened feature tensor; in this formula, flattened_output represents the feature tensor obtained after flattening, its shape is (batch_size,HxW,C), that is, each sample is flattened into a feature vector with shape (HxW,C).

[0115] The one-dimensional sequence generated by the flattening operation is used as the input of the Transformer model to extract global features.

[0116] S42: Add position encoding;

[0117] S421: Add position encoding to the flattened one-dimensional sequence to enable the Transformer model to understand the relationship between different positions in the input one-dimensional sequence; the position encoding uses sine and cosine functions, and generates different position encoding values according to the position of the feature; the specific position encoding is as follows:

[0118]

[0119]

[0120] wherein, represents the position index, represents the dimension index, is the dimension of the feature vector, is the position encoding value;

[0121] S422: Apply the position encoding to the flattened one-dimensional sequence, and input the one-dimensional sequence after adding the position encoding into ;

[0122]

[0123] wherein is the one-dimensional sequence input after adding the position encoding, and the dimension is still , is the position encoding, which is a matrix, used to represent the position information of different positions; is the input after the flattening operation, which expands the original three-dimensional data into a one-dimensional sequence;

[0124] S43: Multi-head self-attention mechanism processing;

[0125] S431: Define the query, key and value matrices as ; wherein , and are learnable weight matrices;

[0126] Q represents the query matrix, used to query the information related to the current position;

[0127] K represents the key matrix, used to identify the key information of different positions in the input sequence;

[0128] V represents the value matrix, containing numerical information related to different positions in the input sequence;

[0129] learnable weight matrices , and are obtained by training neural networks; these weight matrices contain the parameters learned by the model to map the input one-dimensional sequence to the corresponding query, key and value space; during the training process, these weight matrices are updated by the backpropagation algorithm to enable the model to better learn the key information in the input sequence and produce appropriate output;

[0130] S432: In the Transformer model, the single-head attention calculation formula of each attention head is defined as:

[0131] V

[0132] wherein, is a scaling factor, specifically taking the dimension of the query or key, used to stabilize the numerical range and avoid excessively large values; T is the transpose operator, indicating that the matrix K is transposed to perform dot product operation with the query matrix Q; the softmax function is an activation function, used to convert the vector into a probability distribution;

[0133] S433: Based on the multi-head attention mechanism, the results of multiple attention heads are spliced to obtain the final output; the formula is:

[0134]

[0135]

[0136] wherein is the projection matrix of different attention heads, used to map the input query, key and value to the specific dimension of the attention head, is the output projection matrix, used to map the spliced multi-head output back to the desired dimension;

[0137] MultiHead represents the multi-head attention mechanism, which combines the outputs of multiple attention heads.

[0138] Concat represents the splicing of the outputs of multiple heads, specifically, the attention output of each head is combined into a longer vector by column; head is the output of each individual attention head; i1 represents the specific attention head index;

[0139] S44: For residual connection and layer normalization;

[0140] In each sub-layer, i.e. after the multi-head self-attention layer and the feedforward network layer, residual connection and layer normalization are adopted to form the output of each sub-layer; these steps produce the normalized attention output and the final output of the feedforward network in turn; to help maintain the consistency of the feature representation input to the sub-layer, while stabilizing the training process, the specific operation is:

[0141] represents the initial feature representation input to the MultiHeadAttention module, specifically the input before the multi-head self-attention computation is performed;

[0142] For each sub-layer, a residual connection is applied to add the output of the multi-head self-attention to the input , resulting in the following computational formula:

[0143]

[0144] This connection helps to preserve the information of the input features and helps to avoid the problem of gradient vanishing;

[0145] Layer normalization is performed on the result of the residual connection, resulting in the following computational formula:

[0146]

[0147] Layer normalization helps to stabilize and accelerate the training of the network; where is the output of the multi-head attention mechanism;

[0148] S45: A feedforward network is applied on the output of the multi-head attention mechanism, and the output of the feedforward network is again subjected to a residual connection and layer normalization to finally obtain the output of the Transformer model, which is transformer_output; the computational formula is as follows:

[0149]

[0150]

[0151] where, is a linear transformation matrix, is a bias term; x refers to the result after the first residual connection and layer normalization of the multi-head attention output, which is the input of the feedforward network;

[0152] S46: The output of the Transformer model is subjected to a mean pooling operation to obtain the final global feature output.

[0153]

[0154] where, seq_len refers to the length of the sequence input to the Transformer model, i.e., the number of time steps or positions contained in the sequence, represents the global feature output obtained by the mean pooling operation, which will be used as the input for subsequent modules; It is the feature vector of the i2th time step or position in the transformer model output, where i2 is the position index in the sequence.

[0155] To further explain, the feature fusion module specifically includes:

[0156] S51: The skip connection mechanism is used to fuse features from different layers to ensure the effective transmission of deep features to shallow features, thereby constructing the U-Net model architecture. The U-Net model architecture can also be called the Unet structure, both referring to the same network architecture. Specifically, the skip connection mechanism fuses features of different resolutions in the encoder with features of the corresponding stage in the decoder.

[0157] S52: Multi-level features are fused using a weighted method to obtain the final segmentation feature map. :

[0158]

[0159] in, It is the initial feature map. Here, L represents the weighting coefficients for each layer, and L is the number of skip connections. Indicates the first Layer index; This represents the global feature representation extracted from the Transformer model, which is obtained through mean pooling. Indicates the first in a multi-level feature Characteristics of the layer. It is used to identify and locate which specific level or stage of features in the network structure are used for fusion; this allows information from different levels of features to be processed more systematically and explicitly during the integration process.

[0160] To further explain, the boundary refinement module specifically includes:

[0161] S61: Perform edge detection on the initially segmented image to generate an edge mask. This implementation method uses Canny edge detection to find significant edge regions on the edge mask to determine condylar boundaries; and uses this edge mask as the initial position of the active contour model. The specific steps of Canny edge detection are as follows:

[0162] Image smoothing: A Gaussian filter is used to smooth the initial segmented input image to reduce the impact of noise;

[0163] Calculate the gradient: Apply the Sobel operator to calculate the gradient strength and direction for each pixel;

[0164] Non-maximum suppression: Non-maximum suppression is performed on the gradient intensity map, only local maximums are reserved to refine the edges;

[0165] Double threshold processing: Set a high threshold and a low threshold to mark strong edges and weak edges;

[0166] Edge connection: Connect weak edges to strong edges by tracking, form the final edge pixels, get the edge map ;

[0167] And As the initial position of the following active contour model ;

[0168] The use of the preliminary segmentation image in Canny edge detection aims to optimize the results of edge detection by reducing noise and focusing on specific areas, further providing a more accurate initial position for the active contour model;

[0169] S611: First, continue the inverse Gaussian filter on the preliminary segmentation image to remove noise:

[0170]

[0171] Here, σ is the standard deviation of the Gaussian filter, which determines the degree of smoothing, and (x1, y1) represents the pixel coordinates in the image;

[0172] Smooth with this filter and the image;

[0173] S622: Gradient calculation, calculate the gradient intensity and direction of the preliminary segmentation image by Sobel operator:

[0174] Horizontal direction gradient :

[0175]

[0176] Where I represents the pixel intensity value at coordinates (x1, y1);

[0177] Vertical direction gradient :

[0178]

[0179] Gradient amplitude :

[0180]

[0181] Gradient direction :

[0182]

[0183] S623: Non-maxima suppression: along the gradient direction Check local maximum, only keep the maximum value along the gradient direction; if the gradient value of the current pixel is not the local maximum, suppress to 0;

[0184] S624: Double threshold and edge linking;

[0185] Set high threshold and low threshold :

[0186] If the gradient amplitude , mark as strong edge;

[0187] If , mark as weak edge;

[0188] If , suppress to 0;

[0189] Finally, track the weak edge to connect to the strong edge to form the final edge pixel, and obtain ;

[0190] Take as the initial position of the following active contour model ;

[0191] S62: In the boundary correction stage, the position of the segmentation edge is gradually adjusted to fit the true boundary of the condylar process more closely by using the energy minimization principle of the active contour model; the energy function is defined by the active contour model as , including internal energy and external energy two parts, to ensure the smoothness of the edge and the attraction to the target boundary; the specific formula is as follows:

[0192] For internal energy, consider the length and curvature of the curve to ensure that the contour will not be too distorted, represented as:

[0193]

[0194] Wherein, is the internal energy function of the contour curve, C(s) is the contour curve, is the first derivative of the curve, representing the tangent vector of the curve, is the second derivative of the curve, representing the curvature of the curve, and are weight parameters, controlling the influence of length and curvature; and The specific values of and are determined by the expert group through experimental data, and will not be described here. In this embodiment, and are set to and The values of the are selected in (0, 1) ;

[0195] C represents a parameterized form of the contour curve, C is a function that defines the shape and position of the contour in the image;

[0196] C is expressed in terms of parameter s, C(s) is a point on the contour, s is a parameter that describes different positions of the contour; C(s) is expressed as a two-dimensional coordinate point (x1, y1), that is , wherein and are the horizontal and vertical coordinates of the contour at parameter s;

[0197] For external energy, this part of the energy is associated with the edges and textures of the image features, and is intended to attract the contour to move towards the edges or feature areas of the object; the form of the external energy is calculated using the Sobel operator:

[0198]

[0199] wherein, is the external energy function of the contour curve, is the input real image, is the gradient of the real image; by taking the negative of the gradient, the contour is driven to the high gradient area, thereby automatically adapting to the edges in the image;

[0200] The real image plays a guiding role in the segmentation of the contour in the calculation of the external energy of the active contour model, ensuring that the contour can accurately track the real boundary of the object;

[0201] The total energy function of the active contour model is defined as a linear combination of the internal energy and the external energy, and the calculation formula is as follows:

[0202]

[0203] wherein, is the total energy function of the contour curve;

[0204] By minimizing this total energy function, the optimal contour position is obtained, which closely surrounds the edges of the target object;

[0205] The weights of the internal energy in the total energy function are defined as and image gradient information;

[0206] The following convergence condition threshold is specifically set:

[0207] The total energy change threshold is set to ; the embodiment is set to 0.01;

[0208] Set the maximum iteration number as ; the embodiment sets 100;

[0209] Set the point movement threshold on the contour curve as ; the embodiment sets 0.02;

[0210] Determine the initial position of the initialized active contour as ;

[0211] 3.1) Start iteration: any iteration number is denoted as k, and set the initial iteration number as k=0, and record the initial total energy ;

[0212] 3.2) Update contour: in each iteration, update the contour position according to the optimization strategy of the energy function ;

[0213] Calculate the total energy of the current iteration ;

[0214] 3.3) Energy change check: calculate the amount of change of energy ;

[0215] If the amount of change of energy is within the set threshold , it is considered that the energy has converged;

[0216] 3.4) Maximum iteration number check: check whether the current iteration number k exceeds the maximum iteration number ;

[0217] 3.5) Contour point movement check: calculate the movement amount of the contour point ;

[0218] If the maximum movement amount is within , it is considered that the contour has also converged;

[0219] 3.6) Stop iteration: if any of the following convergence conditions is met, stop iteration;

[0220] The amount of change of energy is less than the threshold , the current iteration number exceeds the maximum iteration number , or the maximum movement amount of the contour point is less than ;

[0221] 3.7) Output the final contour position and the corresponding total energy .

[0222] In the correction process, the active contour model adjusts the edge to the position of energy minimization through iterative steps. The optimization process of energy minimization makes the boundary gradually converge to the target boundary position in the adjustment process, while ensuring the continuity and smoothness of the boundary, eliminating the noise of the edge and making it more consistent with the true shape of the condyle.

[0223] Further, the threshold value of IoU is determined as Th, and the total energy change threshold is set to , the adjustment upper limit value of the point on the contour curve is set to , and the adjustment upper limit value of ; The value strategy of is ; A1 represents an adjustment coefficient for adjusting the corresponding threshold value;

[0224] If the total energy change is less than in the iteration process, and greater than , it is considered that the model has converged;

[0225] If the total energy change is less than in the iteration, it indicates that the convergence of the model is good, and M1 of the current value of the threshold value Th is increased; M1 is in the range of (0.01, 0.05); to ensure the quality improvement of the clipping result;

[0226] If the maximum movement of the contour point is less than in the iteration, it is considered that the contour converges well, and M2 of the current value of the threshold value Th is increased; M2 is in the range of (0.02, 0.06);

[0227] The specific values of M1, M2, and A1 are demonstrated by experimental data according to the expert group system; no further description is made;

[0228] The initial value of Th is set to 0.75, which requires that the IoU value of the condyle structure in the clipped image reaches or exceeds 75% to be considered as a successful clipping;

[0229] If the IoU value obtained in the verification stage is 0.70, adjustment needs to be made according to the energy feedback;

[0230] The initial value of is set to 0.01, and if the total energy change is less than 0.01 in the iteration process, it is considered that the model has converged;

[0231] If the total energy change is 0.005 in the iteration, it indicates that the convergence of the model is good, and the current value of the threshold value Th is increased by 5%; to ensure the quality improvement of the clipping result;

[0232] The initial value of A value of 0.02 indicates the maximum movement of the contour point;

[0233] If the maximum movement of the contour point in the current iteration is less than 0.01, the contour is considered to have converged well, and the threshold Th will be increased by 7% of the current value.

[0234] To further improve the edge accuracy of segmentation, an edge loss function is defined. Its expression is:

[0235]

[0236] in, This indicates the edge position obtained from the current segmentation. This represents the edge position obtained through Canny edge detection; by minimizing the edge loss function, it is easier to match the segmented edge with the real edge, thereby improving the edge accuracy of the segmentation; this process is optimized iteratively, adjusting the position of the segmentation contour in each step to ensure that the final segmented edge is close to the real condylar edge, so as to obtain a fine edge structure;

[0237] Obtain the edge map obtained in step S61 within the boundary refinement module. and initial position Initialize the segmented contour as ;

[0238] Use the same Canny edge detection method to obtain the true edge location. ;

[0239] Let the number of iterations for minimizing the marginal loss function be... The final contour position output by the active contour model In the In this iteration, the segmented contour obtained by minimizing the edge loss function is: ;

[0240] If the active contour model successfully captures the edge information in the image, and its contour matches the segmentation result obtained through edge detection, the output of the active contour model is... With the current segmentation contour equal;

[0241] In the In the next iteration, the current segmented contour is used. Calculate the segmentation edge Use edge detection algorithms to extract;

[0242] Calculate the current edge loss:

[0243]

[0244] in, This represents the loss in the current iteration, reflecting the distance between the current segmentation edge and the ground truth edge;

[0245] Update the segmented contours using the gradient descent method. :

[0246]

[0247] in, It is the learning rate, which controls the step size of each update;

[0248] It is in the In each iteration, the gradient of the loss function relative to the segmented contour reflects the rate of change of the loss function relative to the contour.

[0249] After each iteration, the convergence condition is checked to determine whether to continue iterating; the convergence condition is judged according to the following criteria:

[0250] Calculate the change in the loss function:

[0251]

[0252] like If the change in the loss function is small, it is considered that the function has converged. The specific values ​​were determined by the expert panel based on experimental data.

[0253] Calculate the change in the contour position:

[0254]

[0255] like If the update magnitude of the contour position is small, it indicates that the convergence has occurred. The specific values ​​were determined by the expert panel based on experimental data.

[0256] Set the maximum number of iterations. ,when achieve When this happens, the iteration is forcibly stopped;

[0257] Output optimized segmentation results That is, the segmentation contour of the last iteration. ;in This indicates the last iteration number; seg is short for "segmented," meaning the image has been segmented; it refers to the state of the output image after segmentation.

[0258] Output the corresponding edge position The segmentation effect is visualized and compared with the real edge .

[0259] In summary, the application first extracts the basic features of the condyle region using a convolutional neural network, and then flattens the feature map output by the CNN as the input of the Transformer model. The core mechanism of the Transformer model is combined to improve the global perception ability and the accuracy of edge detail capture.

[0260] The jump connection mechanism is used to fuse the locally extracted features and global information to construct an overall structure, thereby further improving the segmentation performance. The deep learning segmentation method based on the combination of CNN and Transformer model significantly improves the segmentation accuracy of the condyle, enabling the global structure and edge details of the condyle to be accurately captured, thereby overcoming the limitations of traditional methods in terms of complex structure boundary ambiguity and insufficient segmentation stability.

[0261] The above formulas are dimensionless numerical calculations, and the formulas are obtained by software simulation of a large amount of data to obtain the most real situation. The preset parameters in the formula are set by a person skilled in the art according to the actual situation.

[0262] The above embodiments can be realized wholly or partially by software, hardware, firmware or any combination thereof. When realized by software, the above embodiments can be realized in the form of a computer program product wholly or partially. Those skilled in the art can realize that the units and algorithm steps of the examples described in connection with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized by hardware or software methods depends on the specific application and design constraints of the technical solutions.

[0263] The units described as separate components can or can not be physically separated, and the components shown as units can or can not be physical units, which can be located in one place or distributed on multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0264] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application.

Claims

1. A deep learning-based condyle MRI medical image segmentation method, characterized in that, The method comprises a data preprocessing module, an intelligent cropping module, a preliminary feature extraction module, a global information extraction module, a feature fusion module and a boundary refinement module, and the specific steps comprise: S1: through the data preprocessing module, the original dcm format condyle MRI gray image and the corresponding labeled image are merged, and the data enhancement technology is applied to the merged image; The condyle MRI gray image after data enhancement is normalized in the same range value to obtain a preprocessed condyle MRI gray image, and the preprocessed condyle MRI gray image is converted into an h5 format; S2: through the intelligent cropping module, the intelligent cropping network based on the U-Net model architecture is used to crop the condyle MRI gray image converted into the h5 format, and the output results of the image and the boundary box are adjusted to the resolution of 256x256 after cropping, so as to obtain a cropped image; S3: through the preliminary feature extraction module, the low-level features of the cropped image are extracted by using the convolutional neural network, and the CNN feature map is generated, so as to detect the low-level features in the condyle region, and the low-level features include the structural contour, edge information and texture features of the condyle; S4: through the global information extraction module, the global information of the CNN feature map is captured to enhance the segmentation accuracy of the condyle MRI medical image, and the specific steps are as follows: The three-dimensional CNN feature map is flattened into a one-dimensional sequence, and position encoding is added, which is used for the spatial position relationship of the feature recognized by the Transformer model; The one-dimensional sequence is input into the multi-head self-attention mechanism to extract the global features, and the one-dimensional sequence is converted into a query, key and value matrix by using a learnable weight matrix; each attention head calculates the scaled dot-product attention to capture the correlation between different positions; After each sublayer, a residual connection and layer normalization are applied to sequentially generate the normalized attention output and the final output of the feedforward network; The global features are obtained by mean pooling for the final output of the feedforward network; S5: through the feature fusion module, the low-level features extracted preliminarily are fused with the global features output by the global information extraction module by using the skip connection mechanism of the U-Net model architecture, and the specific steps are as follows: The low-level features of the convolutional layer are directly aligned and fused with the global features output by the global information extraction module at multiple scales through the skip connection, so as to generate the fusion features, and the U-Net model can utilize the local details and global context information at the same time; The fusion features are converted into a preliminary segmentation image by the feature fusion module, the preliminary segmentation image contains the edge information of the condyle region, and the preliminary segmentation image is used for the edge detection and the initial position setting of the active contour model in the subsequent steps; S6: through the boundary refinement module, the segmentation edge of the preliminary segmentation image is modified and supplemented by using the active contour model, so as to ensure the accuracy and smoothness of the edge; the steps are as follows: The initial position of the contour is defined by the preliminary segmentation image output by the feature fusion module; Based on the gradient information and edge morphology of the image, the contour position is iteratively adjusted step by step, so that the contour approaches the real boundary of the image; The active contour model optimizes the edge position by minimizing an energy function, which includes edge strength, smoothness, and shape constraints. The curvature analysis is used to control the degree of bending of the contour, ensuring natural curves at edge transitions. Finally, the active contour model generates the optimized segmentation edge.

2. The deep learning-based condyle MRI medical image segmentation method according to claim 1, characterized in that: The data preprocessing module specifically includes: The original condyle MRI grayscale image includes but is not limited to morphological data features, and the morphological data features include the structural contour, edge information, and texture features of the condyle; S11: Extract the image of the condyle region from the original dcm format condyle MRI grayscale image, and merge the labeled data to form an initial training set; S12: Apply data augmentation techniques to the initial training set to perform random rotation, translation, and cropping operations on the condyle MRI grayscale image; S13: Normalize the grayscale values to [0, 1] to form the preprocessed condyle MRI grayscale image; S14: Convert the condyle MRI grayscale image into h5 format and the corresponding label as the final training set, and input it into the deep learning model for training.

3. The deep learning based condyle MRI medical image segmentation method according to claim 2, characterized in that: The intelligent cropping module specifically includes: During the training of the intelligent cropping network, first, the region containing the condyle structure in the condyle MRI grayscale image converted into h5 format is expanded to form a bounding box containing the condyle and its surrounding tissues; then, image patches containing the condyle and surrounding structures are cropped from these bounding boxes as training data for the U-Net model; the U-Net model is trained using these cropped patches to identify and crop the condyle region; S21: Use the intelligent cropping network based on the U-Net model architecture to crop the input image from the original resolution of 512x512 to 256x256; the training data for the intelligent cropping network includes the condyle region and its surrounding tissues in the condyle MRI grayscale image converted into h5 format, forming a bounding box containing the condyle region for model learning; The U-Net network used during cropping consists of an encoder and a decoder, the encoder extracts features from the image layer by layer, and the decoder restores the original resolution to generate the cropped image; S22: During the cropping process, the intelligent cropping network automatically identifies the condyle region in the MRI image, generates a cropped image containing the condyle, and ensures that the boundary information of the condyle region is not lost, using the intersection over union (IoU) as the measurement standard for cropping quality; S23: Verify the cropping result, ensure that the condyle region is completely contained in the cropped image, if the condyle structure is not complete, adjust the parameters of the cropping network and recrop; The adjustment of the parameters of the cropping network and the recropping specifically include: Set the threshold value of IoU as Th, Th is selected in the range (0, 1); if the calculated IoU value during verification is lower than the threshold value, it means that the condyle structure is not completely contained in the cropped image; the following quantitative measures are taken until the condyle region is completely contained in the cropped image; Adjust the size or position of the bounding box of the cropping network; Optimizing the learning rate or loss function parameters of the cropping network; Increasing the training data or improving the data augmentation strategy; S24: After the cropping adjustment is completed and the condyle structure is ensured to be complete, output the cropped image and the bounding box as the input of the subsequent feature extraction module.

4. The deep learning-based condyle MRI medical image segmentation method according to claim 3, characterized in that: The steps of generating the CNN feature map include: S31: input the cropped image into the convolutional layer through the convolutional layer, extract low-level features using multiple convolutional kernels, and use the extracted low-level features as the CNN feature map for the following pooling operation; S32: input the output of the convolutional layer into the pooling layer, reduce the resolution of the feature map through the pooling operation, and retain important features at the same time; S33: use an activation function to perform non-linearization on the pooled feature map, and perform batch normalization to improve training stability.

5. The deep learning based condyle MRI medical image segmentation method according to claim 4, characterized in that: The steps of obtaining global features include: S41: flatten the feature map, convert the three-dimensional CNN feature map into a one-dimensional sequence form wherein and are the height and width of the feature map, respectively, is the number of channels;​ Use the one-dimensional sequence generated by the flattening operation as the input of the Transformer model for global feature extraction; S42: add position encoding; S421: add position encoding to the one-dimensional sequence after flattening to enable the Transformer model to understand the relationship between different positions in the input one-dimensional sequence; the position encoding uses sine and cosine functions, and generates different position encoding values according to the position of the feature; S422: apply the position encoding to the flattened one-dimensional sequence, and input the one-dimensional sequence after adding the position encoding into the memory denoted as ; S43: multi-head self-attention mechanism processing; S431 : define query, key and value matrices as ; where , and are learnable weight matrices; S432: In the Transformer model, define the single-head attention of each attention head as ; S433: based on the multi-head attention mechanism, splice the results of multiple attention heads to obtain the final output; S44: residual connection and layer normalization; In each sub-layer, i.e., after the multi-head self-attention layer and the feedforward network layer, residual connection and layer normalization are adopted to form the output of each sub-layer; these steps sequentially produce the normalized attention output and the final output of the feedforward network; S45: apply a feedforward network to the output of the multi-head attention mechanism, and perform residual connection and layer normalization on the output of the feedforward network again to finally obtain the output of the Transformer model; S46: perform mean pooling operation on the output of the Transformer model to obtain the final global feature output.

6. The deep learning-based condyle MRI medical image segmentation method according to claim 5, characterized in that: The feature fusion module specifically includes: S51: use a skip connection mechanism to fuse features of different layers; the different layers refer to the convolutional layers in the encoder and the decoder of the U-Net model and the Transformer model layers, which have different feature representations and resolutions in the depth of the network; S52: fuse the multi-level features by a weighting manner to obtain a final segmentation feature map : in, These are CNN feature maps obtained from the initial feature extraction module. Here, L represents the weighting coefficients for each layer, and L is the number of skip connections. Indicates the first Layer index; This represents the global feature representation extracted from the Transformer model, which is obtained through mean pooling.

7. The deep learning-based condyle MRI medical image segmentation method according to claim 6, characterized in that: The boundary refinement module specifically includes: S61: perform edge detection on the preliminary segmentation image to generate an edge mask; find significant edge regions on the edge mask to determine the condyle boundary; and use the edge mask as the initial position of the active contour model; the specific steps of Canny edge detection are as follows: Image smoothing: use a Gaussian filter to smooth the input preliminary segmentation image to reduce the influence of noise; Calculate the gradient: apply the Sobel operator to calculate the gradient intensity and direction of each pixel; Non-maximum suppression: perform non-maximum suppression on the gradient intensity map to retain only the local maximum value to refine the edge; Double threshold processing: set a high threshold and a low threshold to mark strong edges and weak edges; Edge linking: By tracing the weak edge to the strong edge, the final edge pixel is formed, and the edge map is obtained ; And will As the initial position of the following activity contour model ; S62: In the boundary correction stage, the position of the segmentation edge is adjusted step by step to make it more consistent with the true boundary of the condylar process by using the energy minimization principle of the active contour model; the energy function is defined by the active contour model as , including two parts of internal energy and external energy, and the internal energy is defined as is the total energy function of the contour curve; By minimizing this total energy function to get the best contour position, which tightly surrounds the edge of the target object; The following convergence condition threshold is specifically set: The total energy change threshold is set to ; The maximum number of iterations is set to ; Setting the point movement threshold on the profile curve to ; determining an initial position of the initialization active contour as ; 3.1) Start iteration: Let any iteration number be denoted by k and set the initial iteration number to k = 0 and record the initial total energy ; 3.2) Update the contours: In each iteration, update the contour positions according to the optimization strategy of the energy function ; calculating the total energy of the current iteration ; 3.3) Energy change check: Calculate the amount of change in energy , denotes the total energy of the th iteration; If the amount of change in energy is within a set threshold Below, it is considered that the energy has converged; 3.4) Maximum iteration number check: check if the current iteration number k exceeds the maximum iteration number ; 3.5) Contour point movement check: Calculate the amount of movement of the contour points ; If the maximum movement is within then the contour is considered to have converged. 3.6) Stopping iteration: if any of the following convergence conditions is met, the iteration is stopped; a change in energy is less than a threshold , a current iteration number exceeds a maximum iteration number or a maximum contour point movement is less than ; 3.7) output final contour position and the corresponding total energy .

8. The deep learning-based condyle MRI medical image segmentation method according to claim 7, characterized in that: A threshold value of IoU is determined as Th, and a total energy change threshold value is set ; an adjustment upper limit value of the profile curve is ; a point movement threshold value on the profile curve is set ; an adjustment upper limit value of the profile curve is ; , and the value strategy of is ; A1 represents an adjustment coefficient, used for adjusting the corresponding threshold value; If the total energy change is less than , and greater than , the model is considered to have converged. If the total energy change is less than in the iteration, it indicates that the model has good convergence, and M1 of the current value of the threshold Th is increased; M1 is in the range of (0.01, 0.05). If in the iteration, the maximum moving amount of the contour point is less than the contour is considered to converge well, and the M2 of the current threshold value Th is increased; the value range of M2 is (0.02, 0.06).

9. The deep learning based condyle MRI medical image segmentation method according to claim 8, characterized in that: Defining an edge loss function whose expression is: wherein, represents the edge position obtained by the current segmentation, represents the edge position obtained by the Canny edge detection; obtaining the edge map in the boundary refinement module and the initial position ; initializing the segmentation contour to ; The same Canny edge detection method is used to obtain the true edge position ; Set any iteration number of the edge loss function minimization as , the final contour position output according to the active contour model , in the first iteration, the segmentation contour obtained by minimizing the edge loss function is ; and ; If the active contour model successfully captures the edge information in the image, and its contour is consistent with the segmentation result obtained by edge detection, the output of the active contour model is equal to the current segmentation contour ​​ In the first iteration, the current segmentation contour is used to calculate the segmentation edges ;​​ Calculate the current edge loss: wherein, represents the loss in the current iteration, reflecting the distance between the current segmentation edge and the real edge; According to the gradient descent method, the segmentation contour is updated : wherein, is a learning rate, controlling the step size of each update; is the updated segmentation mask; is the loss function at the first iteration The gradient of the loss function with respect to the segmentation contour in the first iteration reflects the rate of change of the loss function with respect to the contour. After each iteration, check the convergence condition to decide whether to continue iteration.

Citation Information

Patent Citations

  • A MRI medical image segmentation method based on SA-Net

    CN112950639B

  • Medical image segmentation method based on edge optimization and attention mechanism

    CN116958160A

  • Medical image multi-organ segmentation method based on global context interaction Transform

    CN118570222A