Skin disease segmentation method and system based on texture martingale and CNN-Mamba
By constructing a skin lesion segmentation method based on texture martingale and CNN-Mamba, combining texture martingale features and Mamba modules, the problem of insufficient robustness of traditional methods in skin lesion segmentation is solved, and high-precision skin lesion segmentation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-20
- Publication Date
- 2026-07-21
Smart Images

Figure CN122435265A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, specifically to a skin disease segmentation method and system based on texture martingale and CNN-Mamba. Background Technology
[0002] Automatic segmentation of skin lesions is a key research problem in the field of medical image processing, especially important for the early screening and clinical intervention of serious diseases such as skin cancer (e.g., melanoma). With the rapid development of computer vision, deep learning, and artificial intelligence technologies, image segmentation technology has gradually become a core tool in the auxiliary diagnosis of skin lesions. The core objective of this task is to accurately extract lesion regions from skin lesion images to assist doctors in lesion identification, disease progression tracking, and efficacy evaluation. However, accurate segmentation of skin lesions faces many challenges, including background interference during image acquisition, variable lesion morphology, blurred boundaries, and the high similarity in color and texture between the lesion region and the surrounding healthy skin. Skin lesion images are usually acquired by dermatologists using dermatoscopes or other high-resolution imaging equipment, which can meticulously display the structural features and texture information of lesions on the skin surface, providing a rich visual data foundation for subsequent image analysis and lesion localization.
[0003] Despite significant progress in skin lesion segmentation in recent years, numerous challenges remain. Traditional methods, such as thresholding, region growing, edge detection, and manual feature extraction, often rely on empirical rules or low-level visual features. These methods lack robustness when dealing with complex lesion morphologies, diverse textures, blurred boundaries, and uneven lighting, making them ill-suited to the highly variable characteristics of various skin lesion images. Furthermore, traditional methods are typically sensitive to noise and have limitations in feature representation, failing to fully extract deep semantic information and thus failing to meet the high-precision segmentation requirements of clinical practice. In contrast, deep learning-based segmentation methods possess stronger feature learning and representation capabilities. By constructing end-to-end neural network models, high-dimensional features can be automatically extracted from large-scale data, improving the model's accuracy in recognizing and segmenting complex lesion regions. Especially with the support of structures such as CNNs and Mamba, the models demonstrate significant advantages in capturing spatial structure, global contextual relationships, and boundary details. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for skin disease segmentation based on texture martingale and CNN-Mamba, so as to solve the problems mentioned in the background art.
[0005] To achieve the above objectives, the present invention provides the following technical solution:
[0006] Compared with the prior art, the beneficial effects of the present invention are: the present invention starts with texture features, constructs texture martingale, and constructs a new segmentation framework based on CNN and Mamba. Compared with other algorithms, it can better utilize the texture information of skin lesion images and obtain better image segmentation results. Attached Figure Description
[0007] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention.
[0008] Figure 1 This is a structural block diagram of a skin disease segmentation method based on texture martingale and CNN-Mamba provided in an embodiment of the present invention.
[0009] Figure 2 This is a structural diagram of the semantic feature fusion module provided in an embodiment of the present invention.
[0010] Figure 3 This is a structural diagram of the dual-branch feature interaction fusion module provided in an embodiment of the present invention.
[0011] Figure 4 The following are the experimental results of the algorithm: (a) is a medical skin lesion image; (b) is a standard image annotated by a radiologist; (c) is the experimental result image of the present invention; and (d) is the segmentation result image of the PSO algorithm. Detailed Implementation
[0012] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.
[0013] In this embodiment of the invention, a skin disease segmentation method based on texture martingale and CNN-Mamba is provided, the method comprising:
[0014] Acquire medical skin images and construct texture martingale features based on the gray-level co-occurrence matrix of the medical skin images;
[0015] Construct an encoder-decoder segmentation model, the model including an encoder, a decoder, and skip connections connecting the encoder and the decoder;
[0016] The encoder includes a first encoding branch and a second encoding branch in parallel. The first encoding branch is used to extract local features of the preprocessed image based on a convolutional neural network and fuse the texture martingale features as supplementary input. The second encoding branch is used to extract global features of the preprocessed image based on a Mamba module.
[0017] The jump connection is provided with a semantic feature fusion module, which is used to interactively fuse the corresponding hierarchical features output by the first coding branch and the second coding branch;
[0018] The encoder is provided with a hierarchical dual-branch feature interaction fusion module at the bottom, which is used to fuse the output features of at least two different levels of the first coding branch and the second coding branch.
[0019] The decoder is used to decode the outputs of the semantic feature fusion module and the hierarchical dual-branch feature interaction fusion module to generate a segmentation result;
[0020] The codec segmentation model is trained using the labeled dataset, and the trained model is used to predict the image to be segmented to obtain the binarized segmentation result.
[0021] In this embodiment,
[0022] As a preferred embodiment of the present invention, constructing the textured martingale feature specifically includes:
[0023] Preprocessing medical skin images;
[0024] Calculate the gray-level co-occurrence matrix of the preprocessed medical skin image in at least two different directions;
[0025] The gray-level co-occurrence matrix is normalized.
[0026] At least one texture feature is extracted based on the normalized gray-level co-occurrence matrix;
[0027] The extracted texture features are subjected to a martingale transform based on an exponential process.
[0028] In this embodiment, the medical skin image is preprocessed:
[0029] Noise suppression processing was performed on medical dermoscopy images, including median filtering to preserve the texture features of skin lesion edges and remove the influence of background noise; histogram equalization was used to adjust the gray-level histogram of the image to enhance contrast.
[0030] After noise suppression, the images were normalized to 256x256, and the skin disease images of different sizes were resized to ensure that all experimental images had a uniform spatial resolution.
[0031] Constructing a textured martingale involves the following steps:
[0032] Texture martingales are constructed based on the image's gray-level co-occurrence matrix (GLCM). First, the GLCM is obtained, and then it is constructed into a texture martingale. The mathematical expression for the GLCM is:
[0033] ;
[0034] in: Represents the grayscale value of the image; (x,y) represents the current pixel coordinates in the image. It is determined by the direction θ and the distance d, specifically:
[0035] The directions θ are 0°, 45°, 90°, and 135° respectively; The corresponding order is: d, d, 0, -d; The corresponding order is: 0, -d, -d, -d;
[0036] Normalized gray-level co-occurrence matrix The mathematical expression is:
[0037] ;
[0038] in: This represents the number of times a pixel with gray value i co-occurs with its neighboring pixel with gray value j at a specified direction and distance.
[0039] Texture features are calculated on the normalized gray-level co-occurrence matrix. Texture features include contrast features, correlation features, energy features, and homogeneity features.
[0040] The mathematical expression for the contrast feature is:
[0041] ;
[0042] The mathematical expression for the correlation feature is:
[0043] ;
[0044] in: , Represents the average gray level. , Represents standard deviation;
[0045] The mathematical expression for the energy characteristic is:
[0046] ;
[0047] The mathematical expression for homogeneity is:
[0048] ;
[0049] The above four texture feature matrices are transformed by texture martingale to construct texture martingale features;
[0050] Performing a martingale transform on the gray-level co-occurrence feature matrix includes the following steps:
[0051] The mathematical expression for performing a martingale transform based on an exponential process on the gray-level co-occurrence matrix is as follows:
[0052] ;
[0053] Where: X(i,j) represents the feature matrices of Contrast, Correlation, Energy, and Homogeneity;
[0054] The martingale transformation is proved to be a martingale process, as follows:
[0055] ;
[0056] Calculate the conditional expected value of the next position, i.e. ;
[0057] Based on the properties of exponential functions, decompose the conditional expectation. Its mathematical expression is:
[0058] ;
[0059] The four features are set as log-normal distribution features, and their increments follow a log-normal distribution, that is:
[0060] ;
[0061] in: It follows a mean of 0 and a variance of . The normal distribution;
[0062] Perform the transformation, that is:
[0063] ;
[0064] Substitute the expected value into the calculation:
[0065] ;
[0066] because Therefore, we get:
[0067] ;
[0068] It perfectly satisfies the martingale property, transforming the gray-level co-occurrence feature matrix into a texture martingale.
[0069] In a preferred embodiment of the present invention, the Mamba module is a parallel visual Mamba module, and its processing includes:
[0070] The input features are divided into multiple sub-features along the channel dimension;
[0071] Each sub-feature is fed into a Mamba unit for processing.
[0072] The output of each Mamba unit is introduced into a residual connection and multiplied by an adjustment factor;
[0073] The adjusted sub-feature results are connected along the channel dimension, and then output after layer normalization and projection operations.
[0074] In this embodiment, a segmentation model based on CNN and Mamba is constructed. The constructed texture martingale features are used as supplementary features and combined with CNN to form the local feature branch in the encoder, namely the first encoding branch. Mamba is used to construct the global feature branch and the second encoding branch in the encoder. The two branches together constitute the encoder part.
[0075] The second encoding branch mainly consists of parallel visual Mamba modules;
[0076] The parallel vision Mamba module mainly consists of Mamba combined with residual connections and adjustment factors;
[0077] First, feature X with C channels. C Passing through LayerNorm;
[0078] The number of channels C is divided into four equal parts, and the output is :
[0079] ;
[0080] All features are fed into Mamba, and the output is subjected to residual joins and adjustment factors are added:
[0081] ;
[0082] in, It is the adjustment factor in residual connectivity;
[0083] The four output features are concatenated to form a feature with C channels, and then output through LayerNorm and Projection operations respectively:
[0084] ;
[0085] ;
[0086] Finally, we obtain the four outputs f of the Mamba branch. M1 f M2 f M3 f M4 .
[0087] In a preferred embodiment of the present invention, the processing of the first coded branch includes:
[0088] The preprocessed image is input into a convolutional neural network to extract convolutional features at least two different scales;
[0089] Perform the martingale transformation on the convolutional features during the texture martingale feature construction process to obtain the martingale process convolutional features;
[0090] The preprocessed image is subjected to gray-level co-occurrence matrix extraction and martingale transformation to obtain image-level texture martingale features;
[0091] The convolutional features, martingale process convolutional features, and image-level texture martingale features of the same scale are channel-connected and output as local features at that scale.
[0092] In this embodiment, the second encoding branch mainly consists of a texture martingale module based on ResNet101;
[0093] The input image is fed into the ResNet101 feature extraction module for feature extraction. A total of four feature extraction layers were designed. The final output features are R1, R2, R3, and R4, with feature sizes of (64, 128, 128), (128, 64, 64), (256, 32, 32), and (512, 64, 64), respectively.
[0094] The output features R1, R2, R3, and R4 are subjected to exponential transformation using the exponential texture martingale transform method, thus converting the features extracted based on ResNet101 into martingale process features. ;
[0095] The input image is subjected to gray-level co-occurrence matrix feature extraction, exponential texture martingale transform, and finally the results M1, M2, M3, and M4 are concatenated to obtain the final CNN branch output features C1, C2, C3, and C4.
[0096] ;
[0097] ;
[0098] ;
[0099] ;
[0100] At the jump connection, such as Figure 2 As shown, a semantic feature fusion module is constructed to fuse features from the outputs of each layer of CNN and Mamba, and new skip connections are built based on these features. The specific steps include the following:
[0101] In the semantic feature fusion module, the semantic features from two different branches of the encoder are first fused based on the cross-attention mechanism.
[0102] For feature F1, construct the query, key, and value vectors respectively, as defined below:
[0103] , , ;
[0104] Output features for:
[0105] ;
[0106] For feature F2:
[0107] , , ;
[0108] Output features for:
[0109] ;
[0110] Where F1 represents the input features of the first branch, and F2 represents the input features of the second branch. This represents the output feature obtained after the first branch undergoes interactive attention calculation. This represents the output feature obtained after interactive attention computation for the second branch. Q1 and Q2 represent the query matrix, K1 and K2 represent the key matrix, and V1 and V2 represent the value matrix. and These represent the weight matrices of the query mapping. and These represent the weight matrices of the key mapping. and These represent the weight matrices for value mapping, with superscript "1" indicating the mapping parameters for the first branch and superscript "2" indicating the mapping parameters for the second branch. and Let d represent the transpose of the bond matrix, respectively. k This represents the dimension of the key vector. This represents the scaling factor, and softmax() represents the normalization function.
[0111] After completing the cross-attention feature fusion, the channel semantic information of the fused features is extracted through a global average pooling operation to obtain the output feature F. CA ;
[0112] Next, we will analyze feature F. CA To perform multi-scale feature extraction, the features are first evenly divided into four parts along the channel dimension:
[0113] ;
[0114] In multi-scale feature extraction, four branches were designed, including one depthwise convolutional branch and three deformable convolutional branches. The results of the four branches were then concatenated along the channel dimension to perform residual concatenation to complete the multi-scale feature extraction.
[0115] ;
[0116] ;
[0117] ;
[0118] ;
[0119]
[0120] in, It is a depthwise convolution using a 1×1 kernel. It is a deformable convolution operation with an i×i kernel and an expansion rate of k. Cat indicates a concatenation operation, which concatenates channel by channel to restore the original number of channels.
[0121] In a preferred embodiment of the present invention, the processing procedure of the hierarchical dual-branch feature interaction fusion module includes:
[0122] The outputs of at least two different levels of the first coding branch are respectively received as the first set of features, and the outputs of at least two different levels of the second coding branch are respectively received as the second set of features.
[0123] Pooling and convolution are performed on the first group of features and the second group of features respectively to obtain the first interactive feature and the second interactive feature.
[0124] The first interaction feature and the second interaction feature are fused together and then passed through a spatial attention module and a dot product operation in sequence to output a dual-branch fused feature.
[0125] The decoder comprises multiple decoding layers, each configured with a residual attention structure for fusing and decoding the upsampled features output from the previous decoding layer with the output of the semantic feature fusion module at the corresponding layer.
[0126] The loss function used to train the codec segmentation model is a weighted sum of binary cross-entropy loss and Dice loss.
[0127] In this embodiment, at the bottom part of the encoder, such as Figure 3 As shown, a hierarchical dual-branch feature interaction fusion module is designed to fuse shallow and deep features from the dual branches of the encoder.
[0128] First, we select the second and fourth layers from the CNN branch and the Mamba branch of the encoder as inputs, namely C2, C4, and f. M2 ,f M4 ;
[0129] First, perform the Cat operation on the two outputs of the CNN branch:
[0130] ;
[0131] Then perform average pooling and max pooling operations on them respectively, and then apply Cat to the output:
[0132] ;
[0133] Perform a two-dimensional convolution on it, and then pass the result through the Sigmoid function:
[0134] ;
[0135] Output result f H2 Then perform a matrix multiplication operation with C2, followed by a Cat operation:
[0136] ;
[0137] The second and fourth level outputs of the Mamba branch f M2 ,f M4 Perform the same operation and output f. H3 ;
[0138] For feature f H2and f H3 Perform the Cat operation and send the output to the Spatial Attention Block (SA Block):
[0139] ;
[0140] f H5 respectively with f H2 ,f H3 Perform a dot product, perform a Cat operation on the output, and then feed it into the spatial attention module (SABlock):
[0141] ;
[0142] f H6 with f H2 ,f H3 Perform dot product operations, then perform the Cat operation, and finally feed the output into a 2D convolutional layer to adjust the number of channels.
[0143] ;
[0144] In a preferred embodiment of the present invention, the processing procedure of the semantic feature fusion module includes:
[0145] A cross-attention operation is performed on the first feature from the first coding branch and the second feature from the second coding branch to obtain bidirectional fused features;
[0146] Global average pooling is applied to the bidirectional fused features;
[0147] The pooled features are divided into multiple sub-features along the channel dimension;
[0148] Multi-scale feature extraction is performed on the multiple sub-features using depthwise convolution and at least one deformable convolution, respectively.
[0149] The results of multi-scale extraction are concatenated along the channel dimension and then residually concatenated with the input before being output.
[0150] In this embodiment, the decoder part is designed to decode features from the encoder based on the classic U-Net decoder structure;
[0151] The constructed semantic feature fusion module is located at the jump connection between the encoder and the decoder. The output of each layer of the encoder's dual-branch is input into this module. Therefore, the semantic feature fusion module has four outputs, namely F1, F2, F3, and F4.
[0152] Output f H7The results are fed into the decoder and the residual attention structure. F4 is fed into the residual attention structure. After the two outputs are processed (Cat), they are upsampled and fed into the next layer of the decoder.
[0153] ;
[0154] The output f4 is fed into this layer's decoder and residual attention structure, while F3 is fed into the residual attention structure. After the two outputs are cated, they are upsampled and fed into the next layer's decoder.
[0155] ;
[0156] The output f3 is fed into this layer's decoder and residual attention structure, while F2 is fed into the residual attention structure. After the two outputs are cated, they are upsampled and fed into the next layer's decoder.
[0157] ;
[0158] The output f2 is fed into this layer's decoder and residual attention structure, while F1 is fed into the residual attention structure. After the two outputs are cated, they are upsampled and fed into the next layer's decoder.
[0159] ;
[0160] Upsampling f1 yields a result of the same size as the input image.
[0161] During training, a newly defined loss function is used to train the model. The loss function consists of the binary cross-entropy loss L. BCE and L Dice composition:
[0162] ;
[0163] ;
[0164] ;
[0165] Where: y i and p i These represent the predicted label and the true label, respectively.
[0166] The network is trained on the dataset, and the final binarized segmentation result is obtained on the test set.
[0167] The feasibility of the skin lesion segmentation method based on texture martingale and CNN-Mamba provided in this invention will be verified by specific tests. The segmentation results of the method of this invention will be compared with the PSO segmentation results.
[0168] Working conditions:
[0169] The experiment used an Intel(R) Core(TM) i7-13700KF CPU @ 3.40GHz processor, a Windows PC, an NVIDIA GeForce RTX 4080 graphics card, and Python as the programming language.
[0170] Experimental content and results analysis:
[0171] By comparing the PSO segmentation results with four evaluation metrics, it can be seen that this algorithm performs the segmentation task better and achieves better segmentation results. Table 1 compares the algorithm of this invention with the PSO algorithm, specifically the Dice, Jaccard, and Accuracy of the segmented images with the gold standard images annotated by radiologists.
[0172] Table 1 Experimental Results
[0173]
[0174] The experimental results above demonstrate that this experiment, by constructing a textured martingale and building a novel segmentation network based on CNN and Mamba structures, achieves significant improvements in three key performance indicators compared to the traditional PSO method. Figure 4 As shown, the better segmentation effect can also be seen intuitively in the segmentation results.
[0175] This invention also provides a skin disease segmentation system based on texture martingale and CNN-Mamba, the system comprising:
[0176] The texture martingale construction module is used to acquire medical skin images and construct texture martingale features based on the gray-level co-occurrence matrix of the medical skin images;
[0177] A model building module is used to build an encoder-decoder segmentation model, the model including an encoder, a decoder, and jump connections connecting the encoder and the decoder;
[0178] The encoder includes a first encoding branch and a second encoding branch in parallel. The first encoding branch is used to extract local features of the preprocessed image based on a convolutional neural network and fuse the texture martingale features as supplementary input. The second encoding branch is used to extract global features of the preprocessed image based on a Mamba module.
[0179] The jump connection is provided with a semantic feature fusion module, which is used to interactively fuse the corresponding hierarchical features output by the first coding branch and the second coding branch;
[0180] The encoder is provided with a hierarchical dual-branch feature interaction fusion module at the bottom, which is used to fuse the output features of at least two different levels of the first coding branch and the second coding branch.
[0181] The decoder is used to decode the outputs of the semantic feature fusion module and the hierarchical dual-branch feature interaction fusion module to generate segmentation results.
[0182] The output module is used to train the encoder-decoder segmentation model using the labeled dataset, and to use the trained model to predict the image to be segmented, thereby obtaining a binarized segmentation result.
[0183] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A skin disease segmentation method based on texture martingale and CNN-Mamba, characterized in that, The method includes: Acquire medical skin images and construct texture martingale features based on the gray-level co-occurrence matrix of the medical skin images; Construct an encoder-decoder segmentation model, the model including an encoder, a decoder, and skip connections connecting the encoder and the decoder; The encoder includes a first encoding branch and a second encoding branch in parallel. The first encoding branch is used to extract local features of the preprocessed image based on a convolutional neural network and fuse the texture martingale features as supplementary input. The second encoding branch is used to extract global features of the preprocessed image based on a Mamba module. The jump connection is provided with a semantic feature fusion module, which is used to interactively fuse the corresponding hierarchical features output by the first coding branch and the second coding branch; The encoder is provided with a hierarchical dual-branch feature interaction fusion module at the bottom, which is used to fuse the output features of at least two different levels of the first coding branch and the second coding branch. The decoder is used to decode the outputs of the semantic feature fusion module and the hierarchical dual-branch feature interaction fusion module to generate a segmentation result; The codec segmentation model is trained using the labeled dataset, and the trained model is used to predict the image to be segmented to obtain the binarized segmentation result.
2. The skin disease segmentation method based on texture martingale and CNN-Mamba according to claim 1, characterized in that, Constructing the texture martingale features specifically includes: Preprocessing medical skin images; Calculate the gray-level co-occurrence matrix of the preprocessed medical skin image in at least two different directions; The gray-level co-occurrence matrix is normalized. At least one texture feature is extracted based on the normalized gray-level co-occurrence matrix; The extracted texture features are subjected to a martingale transform based on an exponential process.
3. The skin disease segmentation method based on texture martingale and CNN-Mamba according to claim 2, characterized in that, The orientation includes 0°, 45°, 90° and 135°; the texture features include at least one of contrast, correlation, energy and homogeneity.
4. The skin disease segmentation method based on texture martingale and CNN-Mamba according to claim 2, characterized in that, The Mamba module is a parallel visual Mamba module, and its processing includes: The input features are divided into multiple sub-features along the channel dimension; Each sub-feature is fed into a Mamba unit for processing. The output of each Mamba unit is introduced into a residual connection and multiplied by an adjustment factor; The adjusted sub-feature results are connected along the channel dimension, and then output after layer normalization and projection operations.
5. The skin disease segmentation method based on texture martingale and CNN-Mamba according to claim 4, characterized in that, The processing of the first encoded branch includes: The preprocessed image is input into a convolutional neural network to extract convolutional features at least two different scales; Perform the martingale transformation on the convolutional features during the texture martingale feature construction process to obtain the martingale process convolutional features; The preprocessed image is subjected to gray-level co-occurrence matrix extraction and martingale transformation to obtain image-level texture martingale features; The convolutional features, martingale process convolutional features, and image-level texture martingale features of the same scale are channel-connected and output as local features at that scale.
6. The skin disease segmentation method based on texture martingale and CNN-Mamba according to claim 1, characterized in that, The processing procedure of the semantic feature fusion module includes: A cross-attention operation is performed on the first feature from the first coding branch and the second feature from the second coding branch to obtain bidirectional fused features; Global average pooling is applied to the bidirectional fused features; The pooled features are divided into multiple sub-features along the channel dimension; Multi-scale feature extraction is performed on the multiple sub-features using depthwise convolution and at least one deformable convolution, respectively. The results of multi-scale extraction are concatenated along the channel dimension and then residually concatenated with the input before being output.
7. The skin disease segmentation method based on texture martingale and CNN-Mamba according to claim 1, characterized in that, The processing procedure of the hierarchical dual-branch feature interaction fusion module includes: The outputs of at least two different levels of the first coding branch are respectively received as the first set of features, and the outputs of at least two different levels of the second coding branch are respectively received as the second set of features. Pooling and convolution are performed on the first group of features and the second group of features respectively to obtain the first interactive feature and the second interactive feature. The first interaction feature and the second interaction feature are fused together and then passed through a spatial attention module and a dot product operation in sequence to output a dual-branch fused feature. The decoder comprises multiple decoding layers, each configured with a residual attention structure for fusing and decoding the upsampled features output from the previous decoding layer with the output of the semantic feature fusion module at the corresponding layer. The loss function used to train the codec segmentation model is a weighted sum of binary cross-entropy loss and Dice loss.
8. A skin disease segmentation system based on texture martingale and CNN-Mamba, used to implement the skin disease segmentation method based on texture martingale and CNN-Mamba as described in any one of claims 1-7, characterized in that, The system includes: The texture martingale construction module is used to acquire medical skin images and construct texture martingale features based on the gray-level co-occurrence matrix of the medical skin images; A model building module is used to build an encoder-decoder segmentation model, the model including an encoder, a decoder, and jump connections connecting the encoder and the decoder; The encoder includes a first encoding branch and a second encoding branch in parallel. The first encoding branch is used to extract local features of the preprocessed image based on a convolutional neural network and fuse the texture martingale features as supplementary input. The second encoding branch is used to extract global features of the preprocessed image based on a Mamba module. The jump connection is provided with a semantic feature fusion module, which is used to interactively fuse the corresponding hierarchical features output by the first coding branch and the second coding branch; The encoder is provided with a hierarchical dual-branch feature interaction fusion module at the bottom, which is used to fuse the output features of at least two different levels of the first coding branch and the second coding branch. The decoder is used to decode the outputs of the semantic feature fusion module and the hierarchical dual-branch feature interaction fusion module to generate segmentation results. The output module is used to train the encoder-decoder segmentation model using the labeled dataset, and to use the trained model to predict the image to be segmented, thereby obtaining a binarized segmentation result.