Skin lesion region segmentation method based on Mamba
Through the multi-scale and dynamic feature fusion of the Mamba model, the problem that the existing model cannot effectively extract global information is solved, efficient skin lesion area segmentation is achieved, and the segmentation accuracy and generalization ability of the model are improved.
Patent Information
- Application Number
- CN202510933183.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-08
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-07-08
AI Technical Summary
Existing image segmentation models cannot effectively consider the global information of medical images, resulting in poor segmentation performance of target structures with large differences in texture, shape and size between different patients.
A Mamba-based skin lesion area segmentation method is adopted, including a patch embedding layer, an encoder, a decoder, a skip connection module, a dynamic feature fusion module and a final projection layer. Through multi-scale feature fusion and dynamic feature fusion, the feature extraction capability and segmentation accuracy are improved.
While maintaining a balance between computational complexity and parameter count, the method achieves efficient extraction of lesion features, improves the accuracy and generalization ability of skin lesion image segmentation, and is significantly superior to existing models.
Smart Images

Figure CN120451145B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image segmentation, and in particular relates to a skin lesion area segmentation method based on Mamba. Background Art
[0002] Skin diseases are a common and diverse category, some of which, such as melanoma and psoriasis, pose a serious threat to human health. Early and accurate diagnosis is crucial for the effective treatment of skin diseases, and precise segmentation of skin lesions plays a central role in this process. By segmenting the lesion area, doctors can clearly observe key features such as the morphology, color, and boundaries of the lesions to determine the type, stage, and severity of the disease, and then develop personalized treatment plans. During treatment, continuous monitoring of changes in the lesion area also helps to evaluate treatment effectiveness and adjust strategies in a timely manner.
[0003] Traditionally, image segmentation of skin lesions has relied primarily on manual analysis by pathologists. This means that diagnostic results often rely on the experience of medical experts. This manual analysis process not only requires doctors to invest significant time and effort in examining images pixel by pixel and region by region, but also, due to differences in subjective perception and judgment among doctors, subjective biases are inevitable in diagnostic results. This can easily lead to misdiagnosis or missed diagnosis, creating uncertainty and potential risks for subsequent patient treatment.
[0004] Today, with the continuous advancement of human expertise and skills, and the increasing diversification and sophistication of medical needs, medical practitioners are facing higher demands in the diagnosis and research of skin lesions. Images of various skin lesions exhibit extremely complex characteristics, with a wide range of morphology, color, and boundaries, making traditional methods inadequate. Clearly, achieving breakthroughs and developments in skin lesion research in the medical field urgently requires the use of more advanced and efficient technologies.
[0005] With the rapid development of deep learning technology, deep learning-based automatic segmentation methods for skin lesions have emerged and demonstrated significant advantages. Current common image segmentation models, such as the traditional UNet and its variants, are limited in modeling long-range relationships due to the local nature of convolution operations. They fail to consider the global information of medical images and perform poorly on target structures with significant differences in texture, shape, and size between patients.
[0006] With the recent success of the Transformer, researchers have attempted to introduce it into the field of image processing, with some success. However, traditional models based on convolutional neural networks and Transformers still face challenges such as insufficient global information extraction capabilities and high computational complexity. Summary of the Invention
[0007] To address the technical problem that existing image segmentation models cannot consider the global information of medical images and have poor segmentation performance for target structures with large differences in texture, shape, and size between different patients, the present invention provides a skin lesion area segmentation method based on Mamba, which comprises the following steps:
[0008] S1. Preprocess and enhance the skin lesion images and divide the dataset.
[0009] S2. Build a skin lesion area segmentation model, wherein the segmentation model includes a patch embedding layer, an encoder, a decoder, a skip connection module, a dynamic feature fusion module, and a final projection layer;
[0010] The input image enters the patch embedding layer to generate an embedded image, which is then input to the encoder to extract feature maps. The feature maps extracted by each layer of the encoder are input to the skip connection module for multi-scale fusion to obtain global information, and the fused feature maps are output to the dynamic feature fusion module. The feature maps extracted by the encoder are input to the decoder, and the feature maps output by each layer of the decoder are output to the dynamic feature fusion module for dynamic feature fusion with the feature maps output by the skip connection module. After the decoder, a final projection layer is used to further restore the size of the feature map to match the segmentation target, and finally a segmentation map of the skin lesion area is output.
[0011] S3. Use the data set to train the skin lesion area segmentation model, and use the trained skin lesion area segmentation model to segment the skin lesion image to obtain a segmentation result map of the lesion area.
[0012] Furthermore, the preprocessing includes normalization and tensor conversion, the data enhancement operation includes random flipping and image scaling, and the data set includes a training set, a validation set, and a test set.
[0013] Furthermore, the patch embedding layer divides the input image into non-overlapping patches of fixed size, and then maps the channel dimension of the image to C to generate an embedded image.
[0014] Furthermore, the encoder part contains 4 layers from input to output, namely the 1st layer, the 2nd layer, the 3rd layer and the 4th layer; the 1st layer, the 2nd layer and the 3rd layer each contain two VSSC modules and a patch merging layer in sequence, and the 4th layer contains only two VSSC modules. The VSSC module is used to extract features, and the subsequent patch merging layer is used to reduce the height and width of the input features while increasing the number of channels. The number of channels of each layer of the encoder part from input to output is [C, 2C, 4C, 8C].
[0015] Furthermore, the VSSC module is improved from the VSS module. The specific improvements are: introducing the PCFN network based on the VSS module, and performing layer normalization and residual connection processing on the features.
[0016] Furthermore, the decoder part includes 4 layers from input to output, namely the 1st layer, the 2nd layer, the 3rd layer and the 4th layer; the 1st layer includes two VSSC modules in sequence, the 2nd layer and the 3rd layer each include two VSSC modules and a patch expansion layer in sequence, and the 4th layer includes a VSSC module and a patch expansion layer in sequence. The patch expansion layer is used to reduce the number of feature channels and increase the height and width of the input features. The number of channels of each layer of the decoder part from input to output is [8C, 4C, 2C, C].
[0017] Furthermore, the jump connection module performs multi-scale feature fusion on the feature maps output by each layer of the encoder through the SDI module and outputs the fused feature .
[0018] Furthermore, the feature fusion in the dynamic feature fusion module is achieved by:
[0019] ;
[0020] Conduct, among which represents the feature map output by the layer in the decoder connected to the dynamic feature fusion module, and Respectively and The weight of .
[0021] Furthermore, the final projection layer specifically operates as follows: first, a patch expansion operation is performed to restore the height and width of the feature map, and then a projection layer is performed to restore the number of channels, so that the output features match the segmentation target in both spatial size and channel dimension.
[0022] The beneficial effects of the method of the present invention are:
[0023] This paper proposes a novel U-shaped VMCF model for skin lesion image segmentation. This model efficiently extracts lesion features while maintaining a balanced computational and parameter count. Compared to current state-of-the-art models, this model achieves breakthroughs in multiple metrics, including segmentation accuracy, providing a superior solution for the automated processing of skin lesion images.
[0024] A feature extraction module VSSC was designed. By introducing the PCFN network based on the VSS module and performing layer normalization and residual connection processing on the features, efficient collaboration between Mamba and convolution was achieved. This design further enhanced the feature extraction capability with almost no increase in computational complexity. This design achieved a dual breakthrough in performance and efficiency, and provided solid technical support for clinical applications with its high computational efficiency.
[0025] A dynamic feature fusion module (SDFM) is designed, which receives the shallow detail information output by the skip connection module and the deep semantic information output by the decoder. Through adaptive weighted fusion, it dynamically adjusts the importance of different features to generate the final feature map, fully exploring the complementarity of information at different levels.
[0026] A series of experiments were conducted on two public datasets, ISIC 2017 and ISIC 2018, and five metrics were used for evaluation. Quantitative analysis of the results from both datasets demonstrated that the proposed segmentation model leads the industry in all core evaluation metrics. The model not only achieves high-precision segmentation of skin lesions but also demonstrates excellent generalization across different datasets, fully demonstrating its advanced nature and reliability in the field of skin lesion image segmentation. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a flowchart of the Mamba-based skin lesion area segmentation method of the present invention;
[0028] Figure 2 Schematic diagram of the skin lesion image preprocessing and data enhancement process of the present invention;
[0029] Figure 3 This is a schematic diagram of the model training process of the present invention;
[0030] Figure 4 This is a structural diagram of the VMCF model of the present invention;
[0031] Figure 5 This is a structural diagram of the VSSC module in the model of the present invention;
[0032] Figure 6 This is a working principle diagram of the dynamic feature fusion module SDFM in the model of the present invention;
[0033] Figure 7 This is the structural diagram of the VSS module. DETAILED DESCRIPTION
[0034] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0035] Example 1
[0036] This embodiment provides a skin lesion area segmentation method based on Mamba. Figure 1 As shown, the method includes the following steps:
[0037] S1. Preprocess and enhance the skin lesion images and divide the dataset.
[0038] S2. Build a skin lesion area segmentation model, wherein the segmentation model includes a patch embedding layer, an encoder, a decoder, a skip connection module, a dynamic feature fusion module, and a final projection layer;
[0039] The input image enters the patch embedding layer to generate an embedded image, which is then input to the encoder to extract feature maps. The feature maps extracted by each layer of the encoder are input to the skip connection module for multi-scale fusion to obtain global information, and the fused feature maps are output to the dynamic feature fusion module. The feature maps extracted by the encoder are input to the decoder, and the feature maps output by each layer of the decoder are output to the dynamic feature fusion module for dynamic feature fusion with the feature maps output by the skip connection module. After the decoder, a final projection layer is used to restore the size of the feature map to match the segmentation target, and finally a segmentation map of the skin lesion area is output.
[0040] S3. Use the data set to train the skin lesion area segmentation model, and use the trained skin lesion area segmentation model to segment the skin lesion image to obtain a segmentation result map of the lesion area.
[0041] Example 2
[0042] This embodiment further limits the embodiment 1 and further explains step S1.
[0043] like Figure 2 As shown, step S1 specifically includes: S11: normalizing the skin lesion image; S12: converting the skin lesion image into a tensor; S13: randomly flipping the skin lesion image; S14: scaling the skin lesion image.
[0044] S11: Normalization: Normalize the skin lesion images to accurately scale the image's pixel values to a specific range. This operation is crucial as it enables all input images to have similar scales and distributions, helping the optimizer to more stably update model parameters, accelerate model convergence, and improve training efficiency. At the same time, the normalized image features are more comparable, allowing the model to treat features from different images more fairly, effectively avoiding overemphasis or neglect of certain features due to differences in pixel value scales, thereby helping the model to better learn the essential features associated with skin lesions and improve the model's feature extraction capabilities and segmentation accuracy. In addition, deep learning models have specific requirements for the range of input data when they are designed. Image normalization ensures that the input data meets the model requirements, allowing the model to work properly and perform at its best.
[0045] S12: Convert to Tensor: Convert the input image into a tensor to adapt to the input format requirements of the deep learning model and prepare for subsequent model processing.
[0046] S13: Random Flip: Flip the input image horizontally and vertically with a probability of 50% respectively. This is a simple and efficient data augmentation method. Skin lesions in images may appear in different orientations and symmetries. By performing random flipping operations, a large number of new training samples can be generated, greatly increasing the diversity of training data. This helps the model learn more comprehensive skin lesion characteristics and improves the model's ability to recognize lesions in different orientations and postures, thereby significantly enhancing the model's generalization ability. In the actual medical image acquisition process, skin lesion images may appear in different orientations due to factors such as patient position and shooting angle. The random flip operation can effectively simulate these changes in real-world scenarios, enabling the model to better adapt to various situations in real applications and improving the model's practicality and reliability.
[0047] S14: Image Scaling: Performs an image scaling operation to adjust the height and width of the input image to a specified size. Different medical image acquisition devices may generate images of different sizes. By uniformly scaling the image size, we ensure consistency in the model input, facilitate feature extraction and processing, and improve the model's versatility and compatibility.
[0048] Example 3
[0049] This embodiment further limits the embodiment 1 and further explains step S2.
[0050] like Figure 3 As shown, step S2 specifically includes the following steps:
[0051] S21: Feature Map Extraction: Construct a neural network model VMCF consisting of an encoder, decoder, and skip connection modules. The preprocessed and data-enhanced skin lesion image is input into the encoder to extract the feature map of the skin lesion image. This model uses the VSSC module as the core basic module and is a new U-shaped architecture proposed based on the SSM. The VSSC module introduces the PCFN network based on the VSS module and performs layer normalization and residual connection processing on the features, achieving efficient collaboration between Mamba and convolution. The VSSC module structure diagram is shown in the figure. Figure 5 As shown in the figure, this design further enhances the feature extraction capability without increasing the computational complexity. This design achieves a double breakthrough in performance and efficiency, and provides solid technical support for clinical applications with high computational efficiency. The structure of the VSS module is shown in the figure. Figure 7 shown.
[0052] S22: Multi-scale fusion: The feature maps extracted by each layer of the encoder are input into the skip connection module. The skip connection module introduces the SDI module for multi-scale fusion to extract more global features, and then outputs the fused feature maps to the dynamic feature fusion module. The main function of the SDI module is to process multiple input feature maps. First, the feature maps pass through the channel attention layer and the spatial attention layer to uniformly adjust their sizes to the same as the target feature maps, and then pass through the corresponding convolution layers in sequence. Finally, the convolution results are multiplied element by element to obtain the final output feature map. The semantic information from high-level features and the finer details from low-level features are explicitly integrated into the feature maps of each level generated by the encoder.
[0053] S23: Dynamic Feature Fusion: Dynamically fuses the feature maps output by each decoder layer with the feature maps output by the skip connection module. During the fusion process, the dynamic feature fusion module (SDFM) adaptively adjusts the fusion coefficient to enhance the complementarity between features at different levels, achieving a better feature fusion effect and ultimately outputting a segmentation map of the skin lesion area.
[0054] S24: Model Training: The difference between the model output and the true label is quantified using a loss function to obtain a loss value. Based on this loss value, the AdamW optimizer is then used to iteratively update the model parameters to gradually improve the model's performance and accuracy.
[0055] like Figure 4Figure 2 shows the structure of the VMCF model for skin lesion segmentation. The model uses an encoder-decoder architecture and proposes a new U-shaped VMCF model based on the SSM architecture, which improves segmentation accuracy while avoiding excessive time complexity. Furthermore, the SDI module (Semantics and Detail Infusion) is introduced in the skip connection module to perform multi-scale fusion to obtain more global features.
[0056] The basic structure of the model includes a patch embedding layer (Patch Embedding), an encoder, a decoder, a skip connection module, a dynamic feature fusion module SDFM and a final projection layer (Final Projection).
[0057] The patch embedding layer divides the input image into non-overlapping patches of size 4*4, and then maps the channel dimension of the patch to C.
[0058] The encoder part consists of four layers from input to output, namely the 1st layer, the 2nd layer, the 3rd layer and the 4th layer. The 1st layer, the 2nd layer and the 3rd layer each contain two VSSC modules and a patch merging layer. The 4th layer contains only two VSSC modules. The VSSC module is used to extract features. The subsequent patch merging layer is used to reduce the height and width of the input features and increase the number of channels. The number of channels of each layer from input to output of the encoder part is [C, 2C, 4C, 8C].
[0059] The decoder part is similar to the encoder and also contains 4 layers, namely the 1st layer, 2nd layer, 3rd layer and 4th layer from input to output; the 1st layer contains two VSSC modules in sequence, the 2nd layer and the 3rd layer each contain two VSSC modules and a patch expansion layer in sequence, and the 4th layer contains a VSSC module and a patch expansion layer in sequence. The patch expansion layer is used to reduce the number of feature channels and increase the height and width of the input features. The number of channels of each layer of the decoder part from input to output is [8C, 4C, 2C, C].
[0060] The skip connection module processes the feature maps output by each layer of the encoder and passes them through a spatial attention layer and a channel attention layer to fuse the global features. Finally, the dynamic feature fusion module fuses them with the output feature maps of the decoder, and achieves better feature fusion by adaptively adjusting the fusion coefficient.
[0061] like Figure 5 As shown, the forward propagation process of the VSSC module can be expressed as follows:
[0062] The input data will first undergo layer normalization (Layer Norm) operation, expressed as:
[0063] ;
[0064] after It is divided into two branches. In the first branch, the normalized input data enters a linear layer (Linear Layer) and undergoes linear transformation. Then, it passes through the activation function SiLU, thereby introducing nonlinear features, which can be expressed as:
[0065] ;
[0066] In the second branch, the normalized input data also first enters a linear layer for linear transformation, and then undergoes a deep convolution operation (DW-Conv). Deep convolution can effectively extract the spatial information of features while reducing the amount of computation. Next, the feature map introduces nonlinearity through the activation function SiLU to further enhance the expressiveness of the model. After that, the processed feature map will be input into the 2D selective scanning (SS2D) module, which will further extract features from the feature map and mine the deep feature information in the feature map. The feature map processed by the 2D selective scanning module will undergo layer normalization again to stabilize the data distribution, expressed as:
[0067] ;
[0068] After completing the processing of the two branches, the layer-normalized output of the second branch is element-wise multiplied with the output of the first branch to combine the feature information of the two branches. The combined features are then passed through a linear layer for feature blending to further integrate and optimize the feature representation. The blended features are then added to the residual connection of the input data. This residual connection method helps alleviate the vanishing gradient problem and improves model training and performance, as expressed as:
[0069] ;
[0070] Next, the features are saved for subsequent residual connections, and then the features are layer normalized. Then, a 1*1 convolutional layer is used to change the number of channels, cross-channel interaction is performed on the expanded latent space, and nonlinearity is introduced using the activation function GELU, which is expressed as:
[0071] ;
[0072] After that, the features are split in the channel dimension at a ratio of 1:3. The first branch first passes through a 3*3 convolution and then passes through the activation function GELU to encode local context information, and the second branch remains unchanged. The processed first branch and the second branch are then concatenated along the channel dimension and then processed through a second 1*1 convolution layer for further feature mixing and reducing the number of hidden channels to the original input dimension. Finally, they are fused with the residual connection to form the output of VSSC, which is expressed as:
[0073] ;
[0074] ;
[0075] .
[0076] like Figure 6 The figure shows the working principle of the dynamic feature fusion module SDFM. During initialization, the module creates trainable weight parameters to control the fusion ratio of different input features, and converts the weights into probability distributions through the Softmax function. During forward propagation, according to Figure 6 In the process shown, input features are weighted and summed to achieve dynamic feature fusion. This module can adaptively adjust feature fusion, is computationally efficient, and can be easily integrated into other models, significantly improving the performance of skin lesion image segmentation.
[0077] The dynamic fusion process can be expressed as follows:
[0078] ;
[0079] in, and Represent the fusion weight values of the skip connection module and the decoder respectively. represents the features of the decoder output, It represents the fused features outputted after the feature map is fused with multi-scale features through the SDI module.
[0080] Through trainable weight parameters, the module can automatically adjust the importance of skip connection output and decoder output according to the input data, avoiding the limitations of traditional feature splicing methods and improving the effectiveness of feature fusion.
[0081] Example 4
[0082] This embodiment further limits the embodiment 1 and uses specific experiments and data to further illustrate the beneficial effects of the skin lesion region segmentation model VMCF designed in the method of the present invention.
[0083] This example uses the ISIC 2017 and ISIC 2018 datasets for model training, validation, and testing. By fully leveraging the rich image samples and precise annotation information of these two datasets, the model learns comprehensive and accurate skin lesion characteristics, effectively improving its segmentation performance and generalization capabilities. This ensures that the model can accurately identify and segment skin lesions in actual clinical applications, providing strong support for the diagnosis and treatment of skin diseases.
[0084] The ISIC 2017 dataset, published by the International Skin Imaging Collaboration (ISIC), is one of the most authoritative and widely applicable datasets in the field of skin lesion image research. The dataset contains 2,150 segmented and labeled dermoscopic images, including a large number of skin lesion images from a variety of patients and different types, covering samples of common skin diseases such as melanoma, seborrheic keratosis, and nevi. The images are acquired from different imaging devices and clinical environments, resulting in a high degree of diversity, with variations in image quality, resolution, and lighting conditions. This allows the dataset to effectively simulate the various conditions encountered in real-world clinical scenarios. The ISIC 2017 dataset provides precise lesion annotation information, rigorously reviewed by professional dermatologists to ensure accuracy and reliability, providing high-quality annotated samples for training and evaluating skin lesion segmentation models.
[0085] The ISIC 2018 dataset further expands and improves upon the ISIC 2017 dataset. Compared to the ISIC 2017 dataset, the ISIC 2018 dataset significantly increases the number of samples, including 2,694 dermoscopic images with segmentation labels. This dataset covers a wider range of skin lesion types and cases, further enriching the data diversity. This dataset provides researchers with a higher-quality data resource for skin lesion image segmentation research.
[0086] The model training in this example was performed on the Ubuntu 20.04 LTS operating system, using an RTX 3090 graphics card to accelerate the calculation. Pytorch 1.13 was selected as the deep learning framework.
[0087] The AdamW optimizer was used during model training, with an initial learning rate of 1e-3 and a batch size of 32. The AdamW optimizer's adaptive learning rate mechanism automatically adjusts the learning rate of each parameter based on the gradient changes of different parameters, allowing the model to quickly move toward the optimal solution in the early stages of training. This greatly improves the model's convergence speed, significantly reduces training time, and improves training efficiency. In addition, the AdamW optimizer effectively controls model complexity through independent weight decay operations, preventing the model from overfitting the training data, allowing the model to learn more generalizable features, and enhancing the model's segmentation performance on unseen skin lesion images. Its adaptive learning rate adjustment feature also avoids training instability or slow convergence caused by inappropriate learning rates. When processing complex medical data, it can ensure that the model training process maintains a good convergence state, reduce fluctuations, and improve training results.
[0088] In addition, CosineAnnealingLR was used as the scheduler, with a maximum number of iterations of 50, a minimum learning rate of 1e-5, and a training period of 300 epochs. BceDiceLoss was used as the loss function during training. This loss function combines the advantages of binary cross entropy loss (BCE) and Dice loss to more comprehensively and accurately evaluate the model's performance in the skin lesion image segmentation task. The expression of BceDiceLoss is:
[0089] ;
[0090] in, 、 is the coefficient, is the Dice loss function, is the binary cross entropy loss function;
[0091] The activation functions used in the model training process are SiLU function and GELU function. The SiLU function expression is:
[0092] ;
[0093] in x is the input data, Is the Sigmoid function. The Sigmoid function expression is:
[0094] ;
[0095] The GELU function expression is:
[0096] ;
[0097] in, xis the input variable, is the cumulative distribution function of the standard normal distribution.
[0098] Evaluation indicators: Five indicators, namely mean intersection over union (mIoU), dice similarity coefficient (DSC), accuracy (Acc), sensitivity (Sen), and specificity (Spe), are used to objectively measure the proposed model and other segmentation networks to verify the segmentation effect of this embodiment.
[0099] mIoU is the average of the intersection area of the predicted area and the true area divided by the union area. Its formula is:
[0100] ;
[0101] in, For the The predicted region of the class, is the real area, is the total number of categories. mIoU reflects the model's overall coverage of the target area and is suitable for multi-category segmentation tasks. In this example, this metric is used to assess the degree of separation between skin lesions and normal tissue. A higher value indicates a more accurate delineation of lesion boundaries.
[0102] The dice similarity coefficient DSC is the degree of overlap between the predicted area and the true area, and the formula is:
[0103] ;
[0104] in, is the prediction area, The dice similarity coefficient (DSC) is sensitive to the balance between the lesion area and the background and can effectively measure the model's ability to segment small objects. In skin lesion segmentation, DSC directly reflects whether the model fully captures the lesion area, avoiding clinical misdiagnosis due to over-segmentation or under-segmentation.
[0105] Accuracy Acc (Accuracy) is the ratio of correctly classified pixels to the total number of pixels. The formula is:
[0106] ;
[0107] in, For a real example, is a true negative example, For a false positive example, is a false negative example. It is generally used to measure the model's ability to classify overall pixels.
[0108] Sensitivity (Sen), also known as recall, is the proportion of correct predictions in true positive examples. The formula is:
[0109] ;
[0110] in, For a real example, is a false negative example. It reflects the degree of missed detection of the lesion area by the model. In medical diagnosis, high sensitivity can reduce the risk of missed diagnosis and ensure that the model can identify all potential lesion areas as much as possible. It is especially important for early screening of malignant lesions.
[0111] Specificity Spe (Specificity) is the proportion of true negative examples that are correctly predicted, and the formula is:
[0112] ;
[0113] in, is a true negative example, It is a false positive example. It is generally used to measure a model's ability to protect normal tissue, preventing the misidentification of healthy areas as lesions. High specificity can reduce unnecessary follow-up examinations or treatments, improving clinical efficiency.
[0114] Experimental results:
[0115] To comprehensively and scientifically evaluate the effectiveness of the proposed model in skin lesion image segmentation, this study conducted systematic comparative experiments with several state-of-the-art segmentation algorithms using five core evaluation metrics: mean intersection over union (mIoU), dice similarity coefficient (DSC), accuracy (Acc), sensitivity (Sen), and specificity (Spe). Data preprocessing, training parameters, and hardware environment were strictly controlled throughout the experiment to ensure fair competition among all models within the same experimental framework. The results are shown in Tables 1 and 2.
[0116] In experiments on the ISIC 2017 dataset, this model demonstrated excellent segmentation performance. Its mean intersection over union (mIoU) reached 80.58%, its dice similarity coefficient (DSC) was 89.25%, its accuracy (Acc) reached 96.46%, and its specificity (Spe) reached 98.18%. These four key metrics significantly outperformed the other algorithms tested, placing it first with a clear advantage. Its sensitivity (Sen) metric was slightly lower than that of the VM-UNet model, which ranked second with a score of 87.87%.
[0117] Further verification on the ISIC 2018 dataset showed that the model continued its excellent performance, with a mean intersection over union (mIoU) of 80.64%, a dice similarity coefficient (DSC) of 89.28%, an accuracy (Acc) of 94.75%, and a sensitivity (Sen) of 89.84%. All four indicators surpassed all compared algorithms, achieving a performance breakthrough. At the same time, the specificity (Spe) indicator also achieved a good score of 96.33%, fully demonstrating the robustness of the model under multi-dimensional evaluation criteria.
[0118] Based on the quantitative analysis results of the two datasets, this model is at the industry-leading level in all core evaluation indicators. It not only achieves high-precision segmentation of skin lesion areas, but also demonstrates excellent generalization ability across different datasets, which strongly demonstrates its advancement and reliability in the field of skin lesion image segmentation.
[0119] Table 1
[0120]
[0121] Table 2:
[0122]
Claims
1. Mamba-based skin lesion area segmentation method, characterized by: The method comprises the following steps: S1. Preprocess and enhance the skin lesion images and divide the dataset. S2. Build a skin lesion area segmentation model, wherein the segmentation model includes a patch embedding layer, an encoder, a decoder, a skip connection module, a dynamic feature fusion module, and a final projection layer; The input image enters the patch embedding layer to generate an embedded image, which is then input into the encoder to extract the feature map. The feature map extracted by each layer of the encoder is input into the skip connection module for multi-scale fusion to obtain global information, and the fused feature map is output to the dynamic feature fusion module; The feature map extracted by the encoder is input into the decoder. The feature maps output by each layer of the decoder are output to the dynamic feature fusion module, and are dynamically fused with the feature maps output by the skip connection module. After the decoder, a final projection layer is used to further restore the size of the feature map to match the segmentation target, and finally a segmentation map of the skin lesion area is output; The encoder part consists of four layers from input to output, namely the 1st layer, the 2nd layer, the 3rd layer, and the 4th layer. The 1st layer, the 2nd layer, and the 3rd layer each contain two VSSC modules and a patch merging layer in sequence. The 4th layer only contains two VSSC modules in sequence. The VSSC module is used to extract features. The subsequent patch merging layer is used to reduce the height and width of the input features and increase the number of channels. The number of channels in each layer of the encoder part from input to output is [C, 2C, 4C, 8C]. The VSSC module is improved from the VSS module. The specific improvements are: introducing the PCFN network based on the VSS module, and performing layer normalization and residual connection processing on the features; The decoder consists of four layers from input to output: the first, second, third, and fourth layers. The first layer contains two VSSC modules, the second and third layers each contain two VSSC modules and a patch expansion layer, and the fourth layer contains a VSSC module and a patch expansion layer. The patch expansion layer is used to reduce the number of feature channels and increase the height and width of the input features. The number of channels in each layer of the decoder from input to output is [8C, 4C, 2C, C]. The jump connection module performs multi-scale feature fusion on the feature map output by each layer of the encoder through the SDI module and outputs the fused feature map. ; S3. Use the data set to train the skin lesion area segmentation model, and use the trained skin lesion area segmentation model to segment the skin lesion image to obtain a segmentation result map of the lesion area.
2. The skin lesion area segmentation method based on Mamba according to claim 1, characterized in that: The preprocessing includes normalization and tensor conversion, the data enhancement operation includes random flipping and image scaling, and the dataset includes a training set, a validation set, and a test set.
3. The skin lesion area segmentation method based on Mamba according to claim 2, characterized in that: The patch embedding layer divides the input image into non-overlapping patches of fixed size, and then maps the channel dimension of the image to C to generate an embedded image.
4. The skin lesion area segmentation method based on Mamba according to claim 3, characterized in that: Feature fusion in the dynamic feature fusion module is achieved through: ; Conduct, among which represents the feature map output by the layer in the decoder connected to the dynamic feature fusion module, and Respectively and The weight of .
5. The skin lesion area segmentation method based on Mamba according to claim 4, characterized in that: The specific operation of the final projection layer is to first restore the height and width of the feature map through a patch expansion operation, and then restore the number of channels through a projection layer, so that the output features match the segmentation target in both spatial size and channel dimension.
Citation Information
Patent Citations
Skin disease image segmentation method and system based on joint attention convolutional neural network
CN115457021A
Medical image segmentation model and segmentation method
CN120259671A