A medical image segmentation method based on heterogeneous phantom convolution

By introducing heterogeneous phantom convolution and parameterless attention jump connections in the U-Net model, combined with the W-Jaccard-Generalized Focal Loss loss function, the shortcomings of existing medical image segmentation methods in complex structure and noise image processing are solved, and a medical image segmentation method with high accuracy and lightweight deployment is realized.

CN117994276BActive Publication Date: 2025-03-18ANHUI UNIV OF SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410085496.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-22
Publication Date
2025-03-18
Estimated Expiration
2044-01-22

AI Technical Summary

Technical Problem

Existing medical image segmentation methods are not effective when processing complex structures, weak boundaries, or noisy medical images, and are difficult to deploy on edge devices.

Method used

Using the U-Net medical image lightweight segmentation model based on heterogeneous phantom convolution, features are extracted through heterogeneous phantom convolution, combined with the jump connection without parameter attention and the W-Jaccard-Generalized Focal Loss loss function, the model is optimized to improve segmentation accuracy and lightweight deployment friendliness.

Benefits of technology

While maintaining segmentation accuracy, the model is lightweight design, suitable for deployment on edge devices, improving the processing capability of complex structures and noisy images, and reducing the loss of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117994276B_ABST
    Figure CN117994276B_ABST
Patent Text Reader

Abstract

The present invention provides a medical image segmentation method based on heterogeneous phantom convolution, which belongs to the field of medical image intelligent processing, and includes the following steps: S1, obtaining medical images, dividing them into training sets, validation sets and test sets, and only performing data enhancement processing on the training set images; S2, building heterogeneous phantom convolution basic convolution units; S3, constructing a medical image segmentation model based on heterogeneous phantom convolution for training, and extracting training set image features; S4, using Adam optimizer to optimize parameter updates, observing the output mixed loss curve, and stopping the training round when an overfitting trend appears; S5, using the validation set to verify the medical image segmentation model based on heterogeneous phantom convolution, selecting the weight of a training model with the best Dice coefficient, MIou and Recall indicators to save; S6, inputting the test set into the optimal medical image segmentation model based on heterogeneous phantom convolution to obtain the segmentation result. The beneficial effects of the present invention are: the model constructed using heterogeneous phantom convolution not only achieves accurate segmentation, but also takes into account the lightweight of the model, and is more suitable for deployment on edge devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of intelligent processing of medical images, and in particular relates to a medical image segmentation method based on heterogeneous phantom convolution. Background Art

[0002] Medical image segmentation plays an important role in clinical practice. It can help doctors accurately identify and locate various tissues, organs and abnormal lesions in the patient's body. By segmenting images, doctors can diagnose diseases more accurately, develop individualized treatment plans, and improve patient survival rates.

[0003] Traditional medical image segmentation methods have some shortcomings that limit their application in certain situations. Traditional methods usually rely on manually designed features or use heuristic rules to describe the structure in the image. This makes the algorithm less adaptable to different types of images or cases, and difficult to capture complex structures and textures. Traditional methods often do not work well for medical images with complex structures, weak boundaries, or more noise. These methods have difficulty capturing subtle changes in complex structures.

[0004] U-Net is a deep learning architecture suitable for medical image segmentation tasks. Its structure consists of an encoder and a decoder, which can effectively extract multi-scale features of images. The encoder gradually reduces the resolution of the image through convolution and pooling operations to capture local features. The decoder gradually restores the resolution through upsampling operations and learns global context information. This structure helps the model better understand the structure and texture in medical images. U-Net uses skip connections to connect the features of corresponding layers in the encoder and decoder. This helps the rapid transmission of information in the network and avoids the information loss problem that deep networks may face. Skip connections enable U-Net to utilize both low-level and high-level features, improving the perception of local and global information. However, U-Net requires large computing resources, which is not conducive to deployment on edge devices, especially when processing high-resolution images or large datasets. In addition, U-Net uses downsampling to help information pass faster in the network, but for very large or deep medical images, important speech information may be lost in the information transmission, resulting in limited understanding of the overall context by the model.

[0005] Nowadays, it is a challenge to develop accurate and lightweight medical image segmentation methods. Summary of the invention

[0006] To solve the above problems, the present invention provides a medical image segmentation method based on heterogeneous phantom convolution, and proposes a method that partially takes lightweight into account while maintaining accurate segmentation.

[0007] The present invention provides a medical image segmentation method based on heterogeneous phantom convolution, comprising:

[0008] S1. Obtain medical images, divide them into training set, validation set and test set, and only perform data augmentation processing on the training set images;

[0009] S2, build heterogeneous phantom convolution basic convolution unit;

[0010] S3, build a U-Net medical image lightweight segmentation model based on heterogeneous phantom convolution for training and extract the image features of the training set;

[0011] S4. Use the Adam optimizer to optimize parameter updates, observe the output W-Jaccard-Generalized FocalLoss loss curve, and stop the training round when an overfitting trend appears;

[0012] S5. Use the validation set to validate the improved U-Net medical image lightweight segmentation model, and select the weight of the first training model with the best Dice coefficient, MIou and Recall indicators to save;

[0013] S6. Input the test set into the improved U-Net medical image lightweight segmentation model to obtain the segmentation result.

[0014] According to a specific implementation of the embodiment of the present invention, step S1 specifically includes:

[0015] S11. Divide the medical image dataset into training set, validation set and test set in a ratio of 8:1:1. Each set includes image data and corresponding segmentation labels;

[0016] S12, use image enhancement techniques such as center point rotation, horizontal flipping, zooming in and out, etc. to process the training set;

[0017] S13. Normalize the training set.

[0018] According to a specific implementation of the embodiment of the present invention, step S13 specifically includes:

[0019] The calculation formula of the training set normalization processing method in step S13 is as follows:

[0020]

[0021] Among them, dst(i,j) is the normalized color image pixel matrix element value, src(i,j) is the input original image pixel matrix element value, max represents the upper limit of the mapping interval, min represents the lower limit of the mapping interval, max(src(x,y)) represents the maximum value of the original matrix of the input image, and similarly, min(src(x,y)) represents the minimum value of the original matrix of the input image.

[0022] According to a specific implementation of the embodiment of the present invention, step S2 specifically includes:

[0023] The heterogeneous phantom convolution basic convolution unit in step S2 is expressed as follows:

[0024] Y=Y 1 +Y 2 +Y 3

[0025] Among them, Y 1 Represents the feature matrix of the ordinary convolution output, Y 2 Represents the heterogeneous simple linear convolution to generate redundant feature matrix, Y 3 Represents the feature matrix generated by the heterogeneous deformed convolution, and Y represents the addition of three different feature matrices.

[0026] Y 1 =Y'=X*conv'

[0027] Where conv'∈R c×k×k×m is a normal convolution for generating intrinsic feature maps, with the bias term omitted in the calculation, Y 1 Represents the feature matrix of the output of ordinary convolution.

[0028]

[0029] The above is a simple linear convolution calculation formula for heterogeneity. i Denote the i-th filter set with the number of channels C, and denote the input as X = [x 1 ,x 2 ,K,x C ]∈R C×H×W , after convolution the output is y ij is the i-th intrinsic feature map in Y'.

[0030]

[0031] Among them, Φ ij is the jth cheap linear mapping, and the final Φ is is an identity mapping used to preserve the inherent feature mapping.

[0032]

[0033] The above is the calculation formula of heterogeneous deformable convolution. Among them, k i Denote the i-th filter set with the number of channels C, and denote the input as X = [x 1 ,x 2 ,K,x C ]∈R C×H×W , after convolution the output is is the i-th intrinsic feature map in Y'.

[0034]

[0035] in, is the i-th intrinsic feature map, ΔP n is the offset, P 0 +P n +ΔP n is the new coordinate corresponding to the mapping, X(P 0 +P n +ΔP n ) means to take out the element value of the characteristic matrix at that location, Y 1 (P n ) represents the weight value of the pixel at that location, and the final iteration outputs the pixel value.

[0036] According to a specific implementation of the embodiment of the present invention, step S3 specifically includes:

[0037] S31, heterogeneous phantom convolution is constructed in the U-Net encoder part to extract features, and the input medical image passes through two heterogeneous phantom convolution base convolution unit layers;

[0038] S32, downsampling is achieved through a convolutional layer with a stride of 2 through the feature matrices of the two heterogeneous phantom convolution base convolution units;

[0039] S33. At the same time, the feature matrix is ​​passed to the right and concatenated with the decoder's partial feature matrix by using a jump connection with parameter-free attention;

[0040] S34, the model repeats the operations of S32 and S33 three times again to complete the encoder feature extraction part;

[0041] S35, the feature matrix undergoes two ordinary convolutions, is upsampled through a transposed convolution layer, and enters the decoding part;

[0042] S36, after the feature matrix is ​​upsampled, it is concatenated with the feature matrix of the left jump connection and then passes through two heterogeneous phantom convolution basic convolution units;

[0043] S37, the model repeats the operations of S35 and S36 three times again to complete the decoder feature extraction part;

[0044] S38. After the feature extraction part, it enters the output layer and outputs a segmented grayscale image with the same size as the input image through a convolution layer with a convolution kernel of 1.

[0045] According to a specific implementation of the embodiment of the present invention, step S33 specifically includes:

[0046] The skip connection expression of the parameter-free attention used in step S33 is as follows:

[0047]

[0048] Among them, σ represents the sigmoid function, E is the energy function of parameter-free attention, e represents element-by-element multiplication, Y' is the feature matrix passed through the ordinary convolution layer, and Y is the output feature matrix of the skip connection structure of the parameter-free attention used.

[0049] Y'=X*conv

[0050] Where conv∈R c×k×k×m is a normal convolution for generating intrinsic feature maps, and Y' represents the feature matrix output by the normal convolution.

[0051] According to a specific implementation of the embodiment of the present invention, step S4 specifically includes:

[0052] S41 and Adam are used as optimizers, and the learning rate is initially set to 0.001;

[0053] S42. At the same time, the learning rate is adjusted according to the rounds during training, and the learning rate decay occurs every 100 rounds;

[0054] S43, W-Jaccard-Generalized Focal Loss will output a Loss value at the end of each round. When the downward trend of the Loss value gradually stabilizes, it means that the model training process is normal.

[0055] The combined loss function used in step S4 is W-Jaccard-Generalized Focal Loss. Its expression is as follows:

[0056]

[0057] Among them, w is the weight hyperparameter, Jaccard is JaccardLoss, and Generalized Focal is Generalized Focal Loss.

[0058] The expression of the JaccardLoss loss function is as follows:

[0059]

[0060] Wherein, Jaccard(X,Y) is the ratio of the expected overlapping mutual combination values ​​of positive instances between two sets, X is the actual segmentation area, and Y is the predicted segmentation area.

[0061] The expression of the Generalized Focal Loss loss function is as follows:

[0062] QEL(σ)=-|y-σ| β ((1-y)log(1-σ)+ylog(σ))

[0063] Among them, y is a quality label ranging from 0 to 1, σ is the predicted value, β is the scaling factor, and σ=y is the global minimum solution.

[0064] According to a specific implementation of the embodiment of the present invention, step S5 specifically includes:

[0065] S51, input the validation set image into the model to obtain the Dice coefficient, MIou and Recall indicators;

[0066] S52, saving the indicators, and drawing a line graph with the horizontal axis being the training rounds and the vertical axis being the three indicators;

[0067] S53, after completing the input of the validation set each time, save the model weight file of the current round;

[0068] S54. Repeat the model training multiple times and select the best model weight.

[0069] According to a specific implementation of the embodiment of the present invention, step S6 specifically includes:

[0070] S61, input the test set into the model;

[0071] S62, model generates Dice coefficient, MIou and Recall index;

[0072] S63. The model outputs a segmentation mask image of the same size as the input image to complete the prediction.

[0073] Compared with the prior art, the present invention has the following beneficial effects:

[0074] 1. Due to the design of heterogeneous phantom convolution for feature extraction, the present invention is more accurate in detail processing in the problem of lesion edge segmentation than the prior art. In addition, heterogeneous phantom convolution is designed based on a lightweight design concept, which is very friendly to deployment on edge devices.

[0075] 2. Designing a parameter-free attention skip connection structure improves segmentation performance. For lesions that are difficult to segment accurately by other methods, this invention can avoid these errors. At the same time, using the attention mechanism in the skip connection process can more finely control the weight of information when combining features, slowing down information loss.

[0076] 3. Using the W-Jaccard-Generalized Focal Loss loss function can speed up the model training process and reduce the loss of computing resources. Compared with the pixel-level cross entropy loss, it is more capable of handling the situation of category imbalance. This makes the model focus more on the correctly segmented areas and is not easily affected by a large number of categories. BRIEF DESCRIPTION OF THE DRAWINGS

[0077] The specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings to make the technical solutions and intended effects of the present invention apparent.

[0078] Figure 1 A flowchart of a medical image segmentation method based on heterogeneous phantom convolution of the present invention;

[0079] Figure 2 A schematic diagram of the present invention for enhancing a medical image of skin melanoma;

[0080] Figure 3 Schematic diagram of the module of the heterogeneous phantom convolution basic unit in the present invention;

[0081] Figure 4 This is a schematic diagram of a skip connection parameter-free attention splicing module in the present invention;

[0082] Figure 5 This is an overall framework diagram of a medical image segmentation method based on heterogeneous phantom convolution of the present invention;

[0083] Figure 6 This is a result diagram of the precise segmentation method for skin melanoma according to the present invention. DETAILED DESCRIPTION

[0084] In order to make the purpose and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with embodiments. The examples described with reference to the accompanying drawings are only used to explain the present invention and cannot be interpreted as limiting the present invention.

[0085] See also Figures 1 to 6, this embodiment provides a medical image segmentation method based on heterogeneous phantom convolution, comprising the following steps:

[0086] S1. Obtain medical images, divide them into training set, validation set and test set, and only perform data augmentation processing on the training set images;

[0087] When implementing it, Figure 2 As shown, Figure 2 Schematic diagram of the enhancement of skin melanoma medical images. In order to expand the scarce medical image dataset and improve the model's robustness, it is important to perform data enhancement on the training set. Obtain skin melanoma medical images, divide them into training set, validation set and test set, and only perform data enhancement on the training set images. The dataset contains N pairs of 24-bit deep human surface skin melanoma images and corresponding tumor segmentation maps. The divided training sets are divided into three groups, and three data enhancement processes are used: rotating the center point by 30°, horizontally flipping, and zooming in and out. Then normalization is performed.

[0088] S2, build heterogeneous phantom convolution basic convolution unit;

[0089] When implementing it, Figure 3 As shown, Figure 3 This is a schematic diagram of the module of the heterogeneous phantom convolution basic unit. The heterogeneous convolution basic unit is used to extract the features of melanoma images, and the three different convolution methods built into the heterogeneous convolution are used to fuse the feature maps of three different scales;

[0090] Furthermore, the heterogeneous phantom basic convolution is constructed by three small modules, and the small convolution modules are ordinary convolution, heterogeneous simple linear convolution and heterogeneous deformable convolution.

[0091] Furthermore, the simple linear convolution introduces a smaller subset channel for fusion with the ordinary convolution, which can greatly reduce the amount of computation.

[0092] Furthermore, the deformable convolution allows the convolution kernel to be dynamically adjusted in space, so it can capture the spatial structure of the target object more flexibly. This gives the deformable convolution a stronger receptive field and helps the model model complex targets.

[0093] Furthermore, learnable parameters are introduced into the above two special convolutions, so that the convolution kernel can automatically learn and adjust weights during training to build a heterogeneous structure. This enables the model to better adapt to the distribution and characteristics of input data and improves the ability to model complex structures. In particular, it is more robust when facing noisy or irregular inputs. By automatically adjusting the convolution kernel, the model can better filter noise and unnecessary information.

[0094] Furthermore, the heterogeneous phantom convolution basic convolution unit in step S2 is expressed as follows:

[0095] Y=Y 1 +Y 2 +Y 3

[0096] Among them, Y 1 Represents the feature matrix of the ordinary convolution output, Y 2 Represents the heterogeneous simple linear convolution to generate redundant feature matrix, Y 3 Represents the feature matrix generated by the heterogeneous deformed convolution, and Y represents the addition of three different feature matrices.

[0097] Y 1 =Y'=X*conv'

[0098] Where conv'∈R c×k×k×m is a normal convolution for generating intrinsic feature maps, with the bias term omitted in the calculation, Y 1 Represents the feature matrix of the output of ordinary convolution.

[0099]

[0100] The above is a simple linear convolution calculation formula for heterogeneity. i Denote the i-th filter set with the number of channels C, and denote the input as X = [x 1 ,x 2 ,K,x C ]∈R C×H×W , after convolution the output is y ij is the i-th intrinsic feature map in Y'.

[0101]

[0102] Among them, Φ ij is the jth cheap linear mapping, and the final Φ is is an identity mapping used to preserve the inherent feature mapping.

[0103]

[0104] The above is the calculation formula of heterogeneous deformable convolution. Among them, k i Denote the i-th filter set with the number of channels C, and denote the input as X = [x 1 ,x 2 ,K,x C ]∈R C×H×W , after convolution the output is is the i-th intrinsic feature map in Y'.

[0105]

[0106] in, is the i-th intrinsic feature map, ΔP n is the offset, P 0 +P n +ΔP n is the new coordinate corresponding to the mapping, X(P 0 +P n +ΔP n ) means to take out the element value of the characteristic matrix at that location, Y 1 (P n ) represents the weight value of the pixel at that location, and the final iteration outputs the pixel value.

[0107] S3. Design a U-Net medical image lightweight segmentation model based on heterogeneous phantom convolution for training and extract the image features of the training set;

[0108] When implementing it, Figure 5 As shown, this is an overall framework diagram of a medical image segmentation method based on heterogeneous phantom convolution.

[0109] Furthermore, the U-Net medical image lightweight segmentation model based on heterogeneous phantom convolution includes a codec structure and a parameter-free attention module with jump connections between the codec.

[0110] Furthermore, the step S3 specifically includes:

[0111] S31, heterogeneous phantom convolution is constructed in the U-Net encoder part to extract features, and the input medical image passes through two heterogeneous phantom convolution base convolution unit layers;

[0112] S32, downsampling is achieved through a convolutional layer with a stride of 2 through the feature matrices of the two heterogeneous phantom convolution base convolution units;

[0113] S33. At the same time, the feature matrix is ​​passed to the right and concatenated with the decoder's partial feature matrix by using a jump connection with parameter-free attention;

[0114] S34, the model repeats the operations of S32 and S33 three times again to complete the encoder feature extraction part;

[0115] S35, the feature matrix undergoes two ordinary convolutions, is upsampled through a transposed convolution layer, and enters the decoding part;

[0116] S36, after the feature matrix is ​​upsampled, it is concatenated with the feature matrix of the left jump connection and then passes through two heterogeneous phantom convolution basic convolution units;

[0117] S37, the model repeats the operations of S35 and S36 three times again to complete the decoder feature extraction part;

[0118] S38. After the feature extraction part, it enters the output layer and outputs a segmented grayscale image with the same size as the input image through a convolution layer with a convolution kernel of 1.

[0119] Furthermore, the encoding part includes 8 heterogeneous phantom convolution basic convolution units, 4 downsampling layers and 3 skip-connected parameter-free attention modules. The decoding part includes 8 heterogeneous phantom convolution basic convolution units and 4 upsampling layers.

[0120] Furthermore, in the downsampling layer part, because the maximum pooling process may cause information loss for small targets, replacing the maximum pooling layer in the downsampling process with a convolutional layer can improve the perception of small targets, and the use of the convolutional layer can better retain detail information.

[0121] Furthermore, in the upsampling layer, bilinear interpolation may introduce some smoothness during upsampling, resulting in loss of detail information. Transposed convolution can retain details more flexibly and can adapt to features of different scales and structures during learning. Moreover, the operation of transposed convolution can involve a larger receptive field, which helps the network learn feature representations in a larger range and better capture global context information.

[0122] Furthermore, the skip connection structure without parameter attention in S33 is as follows Figure 4 As shown, it is a schematic diagram of the skip connection parameter-free attention splicing module. The skip connection expression of the parameter-free attention mechanism used in step S33 is as follows:

[0123]

[0124] Among them, σ represents the sigmoid function, E is the energy function of the parameter-free attention mechanism, e represents element-by-element multiplication, Y' is the feature matrix passed through the ordinary convolution layer, and Y is the output feature matrix of the skip connection structure of the parameter-free attention mechanism used.

[0125] Y'=X*conv

[0126] Where conv∈R c×k×k×m is a normal convolution for generating intrinsic feature maps, and Y' represents the feature matrix output by the normal convolution.

[0127] S4. Use the Adam optimizer to optimize parameter updates, observe the output W-Jaccard-Generalized FocalLoss loss curve, set early stopping, and stop the training round when an overfitting trend appears;

[0128] In the specific implementation, the skin melanoma medical image segmentation experiment was based on Windows 11 64-bit system, deep learning Pytorch 1.13.0 framework, using Python 3.8 version on a computer with a CPU of 12th Gen Intel(R) Core(TM) i7-12700K (20CPUs) and a GPU of NVIDIA GeForce RTX 3090 graphics card, and 32GB RAM for training and testing. In order to make the model more stable and convergent in the later stage of training, StepLR was used to adjust the learning rate.

[0129] Furthermore, the combined loss function used in step S4 is W-Jaccard-Generalized Focal Loss. Its expression is as follows:

[0130]

[0131] Among them, w is the weight hyperparameter, Jaccard is JaccardLoss, and Generalized Focal is Generalized Focal Loss.

[0132] The expression of the JaccardLoss loss function is as follows:

[0133]

[0134] Among them, Jaccard(X,Y) is the ratio of the expected mutual combination values ​​of the overlap of positive instances between the two sets, X is the actual segmented area, and Y is the predicted segmented area. JaccardLoss uses the ratio of intersection and union in calculation, which is more capable of handling category imbalance than pixel-level cross entropy loss. This makes the model focus more on the correctly segmented areas and is not easily affected by a large number of categories.

[0135] The expression of the Generalized FocalLoss loss function is as follows:

[0136] QEL(σ)=-|y-σ| β ((1-y)log(1-σ)+ylog(σ))

[0137] Among them, y is the quality label of 0 to 1, σ is the predicted value, β is the scaling factor, and σ = y is the global minimum solution. It introduces two additional adjustable parameters to make the loss function more flexible.

[0138] S5. Use the validation set to validate the U-Net medical image lightweight segmentation model based on heterogeneous phantom convolution, and select the weights of the first training model with the best Dice coefficient, MIou and Recall indicators to save;

[0139] In specific implementation, the Dice coefficient is an important indicator to measure the similarity between the predicted mask and the true label, MIoU represents the average value of the intersection over union of the predicted area and the true area, and Recall measures the recall rate of the model for the target.

[0140] Furthermore, step S5 specifically includes: by conducting multiple experiments on the validation set, the performance of the model under different weights can be obtained. The model weight with the best Dice coefficient is selected to ensure the highest accuracy at the pixel level, while the model weight with better MIoU and Recall is selected to ensure excellent performance of integrity and target recall rate.

[0141] Furthermore, the Dice coefficient expression is as follows:

[0142]

[0143] Among them, Dice(X,Y) is the similarity ratio of two set samples, X is the actual segmentation area, and Y is the predicted segmentation area.

[0144] S6. Input the test set into the optimal U-Net medical image lightweight segmentation model based on heterogeneous phantom convolution. Finally, the network outputs a binary grayscale segmentation image to obtain the segmentation result.

[0145] When implementing it, Figure 6 As shown, it is the result diagram of the accurate segmentation method for skin melanoma of the present invention. The present invention designs a heterogeneous phantom convolution structure with a lightweight design. The weights and parameters obtained by the model after training enable it to effectively capture the key features in medical images. After the model receives the input of the test set, the model performs segmentation prediction on the input image through the forward propagation of the network. Finally, the output of the model is a binary grayscale segmentation image, in which each pixel represents the prediction of the lesion at the corresponding position.

[0146] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modification, replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A medical image segmentation method based on heterogeneous phantom convolution, characterized in that: The following steps are involved: S1. Obtain medical images, divide them into training set, validation set and test set, and only perform data augmentation processing on the training set images; S2, build heterogeneous phantom convolution basic convolution unit; Among them, the heterogeneous phantom basic convolution is constructed by three small modules: ordinary convolution, heterogeneous simple linear convolution and heterogeneous deformed convolution. Learnable parameters are introduced into the heterogeneous simple linear convolution and heterogeneous deformed convolution, so that the convolution kernel can automatically learn and adjust the weights during the training process to construct a heterogeneous structure. The expression of the heterogeneous phantom convolution basic convolution unit is as follows: Y=Y1+Y2+Y3 Where, Y1 is the feature matrix of the ordinary convolution output; Y2——heterogeneous simple linear convolution generates redundant feature matrix; Y3 – feature matrix generated by heterogeneous deformable convolution; Y——the sum of three different characteristic matrices; Y1=Y'=X×conv' Where conv'∈R c×k×k×m It is a normal convolution for generating intrinsic feature maps, with the bias term omitted in the calculation; Y1——The feature matrix of ordinary convolution output; The calculation formula of heterogeneous simple linear convolution is as follows: In the formula, k i ——The i-th filter set with the number of channels C, and the input is recorded as X = [x1, x2, K, x C ]∈R c ×H×W , after convolution, the output is Y2 = [y1,y2,K,y C ]∈R c×H×W ; y ij ——the i-th intrinsic feature map in Y'; y ij =Φ ij (Y1),∀i=1,...,m,j=1,...,s In the formula, Φ ij ——The jth cheap linear mapping, the final Φ is It is an identity mapping used to preserve the inherent feature mapping; The calculation formula of heterogeneous deformable convolution is as follows: In the formula, k i ——The i-th filter set with the number of channels C, and the input is recorded as X = [x1, x2, K, x C ]∈R c ×H×W , after convolution, the output is Y3 = [y1, y2, K, y C ]∈R c×H×W ; ——the i-th intrinsic feature map in Y'; In the formula, ——the i-th intrinsic feature map; Δ ——Offset, P0+P n +ΔP n are the new coordinates of the corresponding mapping; X(P0+P n +ΔP n )——Take out the element value of the characteristic matrix at that location; Y1(P n )——The weight value of the position pixel, and finally iterate to output the pixel value; S3, build a medical image segmentation model based on heterogeneous phantom convolution for training and extract the image features of the training set; S31, heterogeneous phantom convolution is constructed in the U-Net encoder part to extract features, and the input medical image passes through two heterogeneous phantom convolution base convolution unit layers; S32, downsampling is achieved through a convolutional layer with a stride of 2 through the feature matrices of the two heterogeneous phantom convolution base convolution units; S33. At the same time, the feature matrix is ​​transferred to the right and concatenated with the decoder's partial feature matrix by using the jump connection of the parameter-free attention mechanism; S34, the model repeats the operations of S32 and S33 three times again to complete the encoder feature extraction part; S35, the feature matrix undergoes two ordinary convolutions, is upsampled through a transposed convolution layer, and enters the decoding part; S36, after the feature matrix is ​​upsampled, it is concatenated with the feature matrix of the left jump connection and then passes through two heterogeneous phantom convolution basic convolution units; S37, the model repeats the operations of S35 and S36 three times again to complete the decoder feature extraction part; S38, after the feature extraction part, enter the output layer, through the convolution layer with a convolution kernel of 1, and output a segmented grayscale image with the same size as the input image S4. Use the Adam optimizer to optimize parameter updates, observe the output W-Jaccard-Generalized Focal Loss loss curve, and stop the training round when an overfitting trend appears; S5. Use the validation set to validate the medical image segmentation model based on heterogeneous phantom convolution, and select the training model weights for preservation according to the Dice coefficient, MIou and Recall indicators; S6. Input the test set into the optimal medical image segmentation model based on heterogeneous phantom convolution to obtain the segmentation result.

2. The medical image segmentation method based on heterogeneous phantom convolution according to claim 1, characterized in that: The step S1 includes the following steps: S11, dividing the medical image dataset into a training set, a validation set, and a test set in a ratio of 8:1:1, each set includes image data and corresponding segmentation labels; S12, use image enhancement techniques such as center point rotation, horizontal flipping, zooming in and out, etc. to process the training set; S13. Normalize the training set.

3. The medical image segmentation method based on heterogeneous phantom convolution according to claim 1, characterized in that: The step S2 includes the following steps: S21, the basic unit of heterogeneous phantom convolution is composed of ordinary convolution, heterogeneous simple linear convolution and heterogeneous deformable convolution; S22, after the input feature matrix enters the heterogeneous phantom convolution basic unit, it first undergoes a dimensionality reduction operation through ordinary convolution; S23, after passing through the common convolution layer, the feature matrix is ​​respectively input into the heterogeneous simple linear convolution and the heterogeneous deformable convolution to extract the redundant feature matrix; S24. Finally, the feature matrix output by the heterogeneous simple linear convolution and the heterogeneous deformed convolution is added to the feature matrix generated by the ordinary convolution for feature fusion, and then the feature matrix is ​​output.

4. The medical image segmentation method based on heterogeneous phantom convolution according to claim 1, characterized in that: The step S4 includes the following steps: S41 and Adam are used as optimizers, and the learning rate is initially set to 0.001; S42. At the same time, the learning rate is adjusted according to the rounds during training, and the learning rate decay occurs every 100 rounds; S43, W-Jaccard-Generalized Focal Loss will output a Loss value at the end of each round. When the downward trend of the Loss value gradually stabilizes, it means that the model training process is normal.

5. The medical image segmentation method based on heterogeneous phantom convolution according to claim 1, characterized in that: The step S5 includes the following steps: S51, input the validation set image into the model to obtain the Dice coefficient, MIou and Recall indicators; S52, saving the indicators, and drawing a line graph with the horizontal axis being the training rounds and the vertical axis being the three indicators; S53, after completing the input of the validation set each time, save the model weight file of the current round; S54. Repeat the model training multiple times and select the model weights based on the Dice coefficient, MIou and Recall indicators.

6. The medical image segmentation method based on heterogeneous phantom convolution according to claim 1, characterized in that: The step S6 includes the following steps: S61, input the test set into the model; S62, model generates Dice coefficient, MIou and Recall index; S63. The model outputs a segmentation mask image of the same size as the input image to complete the prediction.

Citation Information

Patent Citations

  • Cerebral stroke CT image segmentation method

    CN113177943A

  • Visual SLAM method and system based on interpolation network

    CN114897975A

  • Brain tumor multi-mode MRI image segmentation method based on deep learning

    CN114926477A