An automatic segmentation system and method for skin disease image lesions

CN122597445APending Publication Date: 2026-08-18ZHONGBEI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610981306.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-02
Publication Date
2026-08-18

AI Technical Summary

Technical Problem

[0007]本发明针对上述问题提供了一种用于皮肤病图像病变自动分割系统,用于解决现有的混合神经网络在处理低对比度皮肤病变图像时,因自注意力机制导致的高额算力消耗、病变模糊边界勾勒不精准的问题

Benefits of technology

[0046] The Local Perception Enhancement (LPE) Block designed in this invention can accurately extract the high-frequency physical edges and local fine textures of extremely small lesions under low contrast, thus avoiding the problems of local morphological blurring and feature wear that are easily caused by traditional pure global networks. The designed Visual State Space (VSS) Block module uses a two-dimensional cross-scanning mechanism to reduce the computational complexity of long-distance dependent extraction from quadratic to linear, effectively breaking through the computational bottleneck of traditional Transformer architecture. The designed Bidirectional Feature Interaction Guidance (BFIG) module, together with a dedicated deep jump connection mechanism, not only uses spatial dimensionality reduction to resolve the memory crisis of the giant attention matrix, but also independently preserves and transmits local high-frequency features, fundamentally preventing the loss of the morphological structure of extremely small lesions in the deep transmission of the network, and realizing the accurate delineation of the blurred boundaries of lesions under low contrast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122597445A_ABST
    Figure CN122597445A_ABST
Patent Text Reader

Abstract

The application discloses an automatic segmentation system and method for skin disease image lesions, comprising the following steps: S110, skin disease image data preprocessing and loading; S120, constructing a CMC-Net double-branch parallel mixed visual network architecture; S130, designing a local perception enhancement module and a visual state space module; S140, designing a bidirectional feature interaction guiding module; S150, training the constructed lesion segmentation model, and outputting a lesion segmentation mask. The LPE Block and the VSS Block proposed in the application are cooperatively parallel, which can accurately extract high-frequency texture features of a tiny target physical boundary, and can obtain a global long-distance space dependence without dead angles with linear calculation complexity; the BFIG module is designed through a spatial dimension reduction cross-attention mechanism, bidirectional interaction and deep coupling of local fine features and global macro context are realized, so that the problems of loss of extremely tiny lesions and fuzzy boundaries in the network deep down-sampling process are effectively solved, and the accuracy of lesion segmentation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of artificial intelligence, deep learning and medical image processing, and in particular to an automatic lesion segmentation system for skin disease images. Background Technology

[0002] Skin cancer is one of the most common malignant tumors worldwide, and early and accurate diagnosis is crucial for improving patient survival rates. Dermoscopy, as a non-invasive medical imaging technique, is widely used in the clinical detection of skin lesions. Because skin lesions are often irregular in shape and have complex backgrounds, using deep learning technology to achieve automatic and accurate segmentation of lesion areas has become a key research direction in the field of medical computer vision.

[0003] Currently, fully convolutional neural networks (CNNs), represented by U-Net, are the mainstream method for medical image segmentation. They achieve feature extraction and spatial resolution restoration through a symmetrical encoder and decoder structure. However, when processing real dermoscopic images, traditional CNNs are physically limited by their local receptive fields and lack the ability to acquire global contextual information. When faced with complex background noise such as body hair, light spots, bubbles, and pigmentation of normal skin present in dermoscopic images, they are prone to misclassifying irrelevant cross-regional interference as lesions, resulting in severe false positive segmentation.

[0004] To compensate for the shortcomings of traditional convolutional neural networks (CNNs) in modeling global contextual information and long-range dependencies, the Transformer architecture based on self-attention mechanisms has been gradually introduced into the field of medical image segmentation. Although the hybrid architecture combining CNNs and Transformers can, to some extent, balance local features and global representations, it still faces a severe technical bottleneck: the self-attention mechanism of the Transformer has a quadratic computational complexity, causing the computational cost to explode exponentially when the network processes high-resolution feature maps.

[0005] In recent years, state-space models, especially the Mamba architecture, have provided a novel paradigm for long-distance dependency modeling. Mamba, by introducing a selective state transition mechanism, can dynamically filter background noise and memorize key features based on the input content; more importantly, it successfully reduces computational complexity from the quadratic time complexity of the Transformer to linear time complexity. This linear complexity characteristic allows the model to directly process uncompressed high-resolution feature sequences, fundamentally avoiding the loss of spatial information caused by image patching or aggressive downsampling, and providing a highly promising alternative path for global context modeling in high-resolution medical images.

[0006] However, relying solely on the Mamba model when processing two-dimensional medical images often lacks the ability to extract high-frequency local features of lesion physical boundaries and microscopic textures. For extremely small and indistinctly defined skin lesions, no single architecture can overcome the current performance bottlenecks. Therefore, it is particularly important to deeply couple the core mechanisms of CNN, Mamba, and Transformer. Existing methods often simply concatenate CNN, Mamba, and Transformer without truly utilizing the characteristics of each architecture, leading to incomplete segmentation and loss of small lesions in images. Constructing such a complementary and collaborative network is a key breakthrough in solving the problem of missed detection of extremely small lesions and further improving the accuracy of automatic segmentation of early skin lesions. Summary of the Invention

[0007] This invention provides an automatic lesion segmentation system for skin disease images to address the above-mentioned problems. It solves the problems of high computational power consumption and inaccurate delineation of blurred lesion boundaries caused by the self-attention mechanism in existing hybrid neural networks when processing low-contrast skin lesion images.

[0008] To solve the above problems, the present invention adopts the following technical solution:

[0009] An automatic segmentation method for lesions in skin disease images includes the following steps S110-S150:

[0010] S110: Preprocess and augment the original skin disease image data to construct the input image and the real segmentation mask for network training;

[0011] S120: Construct a dual-branch, collaborative, and parallel CMC-Net (CNN-Mamba Collaborative Network) multi-stage encoder-decoder network architecture;

[0012] S130: Design the feature extraction module, including the feature perception enhancement module (LPEBlock) responsible for local feature extraction and the visual state space module (VSS Block) responsible for global dependency modeling.

[0013] S140: Design a bidirectional feature interaction guidance module (BFIG) to achieve bidirectional decoupling and calibration of local and global features through a spatial dimensionality reduction cross-attention mechanism;

[0014] S150: The constructed automatic segmentation model is trained end-to-end using multiple loss functions, and the final segmentation prediction result of the lesion region is output.

[0015] The automatic segmentation method for lesions in skin disease images, wherein the end-to-end mapping and data flow of the CMC-Net network architecture in S120 includes an encoder, a cross-domain feature fusion layer, and a decoder:

[0016] The encoder includes four serially connected encoding stages. For a given image, within each encoding stage, the feature stream is isolated into parallel local perceptual branches and global state branches. After each stage, an independent spatial dimensionality reduction operation halves the spatial resolution of the two feature maps and expands the channel dimension to twice its original value. The cross-domain feature fusion layer receives the two deep features output from the fourth stage of the encoder and performs channel-level stitching and fusion.

[0017] The decoder comprises three serially connected decoding stages. It utilizes a skip connection mechanism to receive features output from the local perceptual branch in the corresponding stage of the encoder, concatenates them with the upsampled deep features, restores the feature space resolution layer by layer, and maps the output convolution to the final segmentation result.

[0018] The automatic lesion segmentation method for skin disease images, wherein the calculation formula for the Local Perception Enhancement (LPE Block) is as follows:

[0019]

[0020]

[0021]

[0022] Among them, F in F represents the input feature of each LPE Block. SCB and F FCB F represents spatial convolutional features and local detail features, respectively. out represents the output feature of each LPE Block, AvgPool represents the average pooling operation, and d represents the channel scaling factor.

[0023] The automatic segmentation method for skin disease images, described above, involves deploying the VisionState Space (VSS Block) in the global state branch of the encoder. Employing a two-dimensional cross-scanning mechanism (SS2D), it flattens the two-dimensional image features along four directions: top-left to bottom-right, bottom-right to top-left, top-right to bottom-left, and bottom-left to top-right, into four independent one-dimensional sequences. These sequences are then fed into the underlying state space model for selective feature transfer and memorization. For any input sequence x in any direction... k Its hidden state h kWith output response y k The following discretized state-space equations are satisfied:

[0024]

[0025]

[0026] in, and C represents the dynamic discretized state parameters that depend on the input, and C is the projection matrix. The output sequences in the four directions are added together and then recombined into global two-dimensional spatial features.

[0027] In the automatic segmentation method for lesions in skin disease images, in step S140, the Bidirectional Feature Interactive Guidance (BFIG) module is deployed after the feature extraction operation in each encoding stage. It contains two parallel cross-attention branches: "global guidance for local" and "local constraint for global." It utilizes spatial dimensionality reduction techniques to achieve deep coupling between the two heterogeneous features. The specific calculation steps are as follows:

[0028] First, in the "global guidance local" branch, the feature X of the local awareness branch is used. LPE Based on the query criteria, the feature X of the global state branch VSS Provides a global context; for X VSS After spatial average pooling (Pool) dimensionality reduction, the key matrix K is generated. V The sum-value matrix V V At the same time, for X LPE Generate query matrix Q while maintaining the original resolution L The cross-attention output of this branch is Out. LPE for:

[0029]

[0030]

[0031] Similarly, in the "local constraints global" branch, the feature X of the global state branch is used. VSS As the basis for the query, using local perceptual features X LPE Provide fine-grained edge constraints; similarly, for X LPE After dimensionality reduction, a key matrix K is generated. L The sum-value matrix V L At the same time, for X VSS Generate query matrix Q V The cross-attention output of this branch is Out. VSS for:

[0032]

[0033]

[0034] Finally, the output feature matrices of the two branches are recombined into two-dimensional spatial structures and their residuals are added to the corresponding input features to serve as independent inputs for the next layer of the network.

[0035] The automatic segmentation method for skin disease images is described above. The spatial dimensionality reduction operation in the encoder is performed in two branches: the local perception branch adopts a downsampling structure with a max pooling layer and a 1×1 convolution in series; the global state branch adopts a patch merging structure with a stride of 2; and the upsampling operation in the decoder consists of a 2×2 transposed convolution with a stride of 2.

[0036] The automatic segmentation method for lesions in skin disease images, in step S150, optimizes the training process of the classification model using a joint loss function combining binary cross-entropy loss (BCE Loss) and region overlap structure loss (Dice Loss), calculated as follows:

[0037]

[0038] Where P is the probability map predicted by the model after Sigmoid activation, G is the true segmentation mask label, ℇ is a smoothing term to prevent the denominator from being zero, and ω bce With ω dice These are the weighting coefficients for the two loss terms.

[0039] An automatic segmentation system for lesions in skin disease images based on any of the methods described above includes:

[0040] Data preprocessing module: preprocesses and augments the raw skin disease image data, and constructs the input image and the real segmentation mask for network training;

[0041] Network building block: Constructs a dual-branch, collaborative, parallel CMC-Net (CNN-Mamba Collaborative Network) multi-stage encoder-decoder network architecture;

[0042] The feature extraction module includes the Feature Perception Enhancement Block (LPE Block), which is responsible for local feature extraction, and the Visual State Space Block (VSS Block), which is responsible for global dependency modeling.

[0043] The Bidirectional Feature Interaction Guidance Module (BFIG) achieves bidirectional decoupling and calibration of local and global features through a spatial dimensionality reduction cross-attention mechanism.

[0044] Segmentation prediction module: The automatic segmentation model is trained end-to-end using multiple loss functions, and the final segmentation prediction result of the lesion region is output.

[0045] The beneficial effects of this invention are:

[0046] The Local Perception Enhancement (LPE) Block designed in this invention can accurately extract the high-frequency physical edges and local fine textures of extremely small lesions under low contrast, thus avoiding the problems of local morphological blurring and feature wear that are easily caused by traditional pure global networks. The designed Visual State Space (VSS) Block module uses a two-dimensional cross-scanning mechanism to reduce the computational complexity of long-distance dependent extraction from quadratic to linear, effectively breaking through the computational bottleneck of traditional Transformer architecture. The designed Bidirectional Feature Interaction Guidance (BFIG) module, together with a dedicated deep jump connection mechanism, not only uses spatial dimensionality reduction to resolve the memory crisis of the giant attention matrix, but also independently preserves and transmits local high-frequency features, fundamentally preventing the loss of the morphological structure of extremely small lesions in the deep transmission of the network, and realizing the accurate delineation of the blurred boundaries of lesions under low contrast. Attached Figure Description

[0047] Figure 1 : A schematic diagram of an automatic lesion segmentation system for skin disease images;

[0048] Figure 2 LPE block module structure diagram;

[0049] Figure 3 SCB structure diagram;

[0050] Figure 4 FCB structure diagram;

[0051] Figure 5 VSS structure diagram;

[0052] Figure 6 BFIG structure diagram;

[0053] Figure 7 Visualization of the proposed CMCNet and other methods on the ISIC dataset; Detailed Implementation

[0054] The present invention will be described in detail below with reference to specific embodiments.

[0055] This invention provides an automatic lesion segmentation method for skin disease images, comprising steps S110-S150:

[0056] S110: Preprocess and augment the original skin disease image data to construct the input image and the real segmentation mask for network training;

[0057] S120: Construct a dual-branch, collaborative, and parallel CM-Net (CNN-Mamba Collaborative Network) multi-stage encoder-decoder network architecture;

[0058] S130: Design the feature extraction module, including the Local Perception Enhancement Module (LPEBlock) responsible for local feature extraction and the Visual State Space Module (VSS Block) responsible for global dependency modeling.

[0059] S140: Design a bidirectional feature interaction guidance module (BFIG) to achieve bidirectional decoupling and calibration of local and global features through a spatial dimensionality reduction cross-attention mechanism;

[0060] S150: The constructed automatic segmentation model is trained end-to-end using multiple loss functions, and the final segmentation prediction result of the lesion region is output.

[0061] In the data processing, the original skin disease images are first normalized and resized, and spatial transformation techniques such as horizontal and vertical flipping are used to expand sample diversity. The processed images and masks are converted into tensor format to provide a suitable input format for subsequent bi-branch visual feature modeling.

[0062] The CMC-Net network structure, such as Figure 1 As shown, it includes an encoder, a cross-domain feature fusion layer, and a decoder, as follows: Figure 1 :

[0063] The encoder comprises four serially connected encoding stages. For a given image, within each encoding stage, the feature stream is isolated into parallel local perceptual branches and global state branches. After each stage, an independent spatial dimensionality reduction operation halves the spatial resolution of the two feature maps and doubles the channel dimension. The cross-domain feature fusion layer receives the two deep features output from the fourth stage of the encoder and performs channel-level stitching and fusion.

[0064] The decoder comprises three serially connected decoding stages. It utilizes a skip connection mechanism to receive features output from the local perceptual branch in the corresponding stage of the encoder, concatenates them with the upsampled deep features, restores the feature space resolution layer by layer, and maps the output convolution to the final segmentation result.

[0065] The Local Perception Enhancement (LPE) Block, such as Figure 2 As shown, the calculation formula is as follows:

[0066]

[0067]

[0068]

[0069] Among them, F in F represents the input feature of each LPE Block. SCB ,like Figure 3 As shown and F FCB ,like Figure 4 As shown, F represents spatial convolutional features and local detail features, respectively. out represents the output feature of each LPE Block, AvgPool represents the average pooling operation, and d represents the channel scaling factor.

[0070] The Vision State Space (VSS) Block, such as Figure 5 As shown, the global state branch deployed in the encoder employs a two-dimensional cross-scanning mechanism (SS2D) to flatten the two-dimensional image features into four independent one-dimensional sequences along four directions: top-left to bottom-right, bottom-right to top-left, top-right to bottom-left, and bottom-left to top-right. These sequences are then fed into the underlying state space model for selective feature transfer and memorization. For any input sequence x in any direction... k Its hidden state h k With output response y k The following discretized state-space equations are satisfied:

[0071]

[0072]

[0073] in, and C represents the dynamic discretized state parameters that depend on the input, and C is the projection matrix. The output sequences in the four directions are added together and then recombined into global two-dimensional spatial features.

[0074] The automatic segmentation system for lesion images of skin diseases according to claim 1, characterized in that, in S140, the Bidirectional Feature Interactive Guidance (BFIG) module, as follows: Figure 6 As shown, after the feature extraction operation in each encoding stage, it contains two parallel cross-attention branches: "global guidance for local" and "local constraint for global." It uses spatial dimensionality reduction techniques to achieve deep coupling of the two heterogeneous features. The specific calculation steps are as follows:

[0075] First, in the "global guidance local" branch, the feature X of the local awareness branch is used. LPE Based on the query criteria, the feature X of the global state branch VSS Provides a global context; for X VSS After spatial average pooling (Pool) dimensionality reduction, the key matrix K is generated. V The sum-value matrix V V At the same time, for X LPE Generate query matrix Q while maintaining the original resolution L The cross-attention output of this branch is Out. LPE for:

[0076]

[0077]

[0078] Similarly, in the "local constraints global" branch, the feature X of the global state branch is used. VSS As the basis for the query, using local perceptual features X LPE Provide fine-grained edge constraints; similarly, for X LPE After dimensionality reduction, a key matrix K is generated. L The sum-value matrix V L At the same time, for X VSS Generate query matrix Q V The cross-attention output of this branch is Out. VSS for:

[0079]

[0080]

[0081] Finally, the output feature matrices of the two branches are recombined into two-dimensional spatial structures and their residuals are added to the corresponding input features to serve as independent inputs for the next layer of the network.

[0082] In S150, the training process of the classification model is optimized using a joint loss function combining binary cross-entropy loss (BCE Loss) and region overlap structure loss (Dice Loss), calculated as follows:

[0083]

[0084] Where P is the probability map predicted by the model after Sigmoid activation, G is the true segmentation mask label, ℇ is a smoothing term to prevent the denominator from being zero, and ω bce With ω dice These are the weighting coefficients for the two loss terms.

[0085] Example 1: Application to skin lesions in the ISIC-2017 dataset

[0086] The specific steps are as follows:

[0087] The first step is to download the ISIC-2017 dataset from the official website.

[0088] The second step involves inputting an image and constructing and training the proposed CMC-Net method for automatic lesion segmentation in skin disease images. The specific steps are as follows:

[0089] First, a Local Perception Enhancement (LPE) Block and a Visual State Space (VSS) Block are constructed. In the LPE Block, parallel SCB and FCB branches are used, combined with local convolution and local self-attention mechanisms, to accurately extract the high-frequency boundaries of the target points. In the VSS Block, the SS2D mechanism is used to obtain long-range global dependencies.

[0090] Secondly, a bidirectional feature interaction guidance module (BFIG) is constructed. Two independent features are subjected to dimensionality reduction and cross-attention calculation through spatial average pooling to realize the interaction guidance of global context on local edges. Residual connections are added while maintaining the independence of feature flows, and the input is fed into the next layer downsampling module.

[0091] The third step involves training the model using the pre-defined training and test sets. Training set images are input into the network to calculate the error, and backpropagation is performed using a joint loss function of BCE and Dice to update the parameters. This process iterates until the predetermined error requirement is met. Finally, test set images are input into the trained model to obtain the final segmentation result. The experimental results of the CM-Net network in this embodiment are shown in Table 1.

[0092] In Table 1, HD95 refers to the Hausdorff Distance of 95%, with smaller values ​​indicating better performance; Dice refers to the Dice similarity coefficient, with larger values ​​indicating better performance. It can be observed that CMC-Net achieves the best performance on the ISIC2018 dataset for Dice, improving upon UNet and UNet++ by 9% and 5% respectively. It also achieves the best performance for HD95, with scores decreasing by 9.61 and 3.04 compared to UNet and UNet++ respectively.

[0093] Table 1 Comparative experimental results of CMC-Net on the ISIC-2017 dataset

[0094]

[0095] Figure 7This paper presents a visual comparison of the proposed CMC-Net with UNet and UNet++ on a skin disease dataset. The experiments cover four typical skin lesion images. In the first lesion image, both UNet and UNet++ exhibit partial region missegmentation. In the second lesion image, the segmentation results of both methods show incompleteness. Notably, in the third lesion image, UNet and UNet++ misclassify some normal structures as lesions. In the fourth lesion image, UNet++'s segmentation results show significant region missingness, with extremely poor results. In contrast, CMC-Net demonstrates the best segmentation performance in all the aforementioned lesions, with its segmentation results highly consistent with the Ground Truth, fully demonstrating the effectiveness and robustness of the proposed method.

[0096] It should be understood that those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. An automatic segmentation method for lesions in skin disease images, characterized in that, The process includes the following steps S110-S150: S110: Preprocess and augment the original skin disease image data to construct the input image and the real segmentation mask for network training; S120: Construct a dual-branch, collaborative, parallel CMC-Net (CNN-Mamba Collaborative Network) multi-stage encoder-decoder network architecture; S130: Design a feature extraction module, including a feature perception enhancement module (LPE Block) responsible for local feature extraction and a visual state space module (VSS Block) responsible for global dependency modeling; S140: Design a bidirectional feature interaction guidance module (BFIG), which achieves bidirectional decoupling and calibration of local and global features through a spatial dimensionality reduction and cross-attention mechanism; S150: Use multiple loss functions to train the constructed automatic segmentation model end-to-end, and output the final segmentation prediction result of the lesion region.

2. The automatic segmentation method for lesions in skin disease images according to claim 1, characterized in that, The end-to-end mapping and data flow of the CMC-Net network architecture in S120 includes an encoder, a cross-domain feature fusion layer, and a decoder: the encoder includes four serially connected encoding stages, and for a given image, within each encoding stage, the feature flow is isolated into parallel local perceptual branches and global state branches. After each stage of processing, an independent spatial dimensionality reduction operation halves the spatial resolution of the two feature maps and doubles the channel dimension. The cross-domain feature fusion layer receives the two deep features output from the fourth stage of the encoder and performs channel-level splicing and fusion. The decoder includes three serially connected decoding stages. It uses a skip connection mechanism to receive the features output from the local perceptual branch in the corresponding stage of the encoder, splices them with the upsampled deep features, restores the feature spatial resolution layer by layer, and maps the output convolution to the final segmentation result.

3. The method for automatic lesion segmentation in skin disease images according to claim 2, characterized in that, The calculation formula for the Local Perception Enhancement (LPE Block) is as follows: ; ; ; ; Among them, F in F represents the input feature of each LPE Block. SCB and F FCB F represents spatial convolutional features and local detail features, respectively. out represents the output feature of each LPE Block, AvgPool represents the average pooling operation, and d represents the channel scaling factor.

4. The automatic segmentation method for lesions in skin disease images according to claim 1, characterized in that, The Vision State Space (VSS Block) is deployed in the global state branch of the encoder. It employs a two-dimensional cross-scanning mechanism (SS2D) to flatten the two-dimensional image features into four independent one-dimensional sequences along four directions: top-left to bottom-right, bottom-right to top-left, top-right to bottom-left, and bottom-left to top-right. These sequences are then fed into the underlying state space model for selective feature transfer and memorization. For any input sequence x in any direction... k Its hidden state h k With output response y k The following discretized state-space equations are satisfied: ; ;in, and C represents the dynamic discretized state parameters that depend on the input, and C is the projection matrix. The output sequences in the four directions are added together and then recombined into global two-dimensional spatial features.

5. The automatic segmentation method for lesions in skin disease images according to claim 1, characterized in that, In step S140, the Bidirectional Feature Interactive Guidance (BFIG) module is deployed after the feature extraction operation in each encoding stage. It contains two parallel cross-attention branches: "Global Guidance for Local" and "Local Constraint for Global." It utilizes spatial dimensionality reduction techniques to achieve deep coupling between the two heterogeneous features. The specific calculation steps are as follows: First, in the "Global Guidance for Local" branch, the feature X from the local perception branch... LPE Based on the query criteria, the feature X of the global state branch VSS Provides a global context; for X VSS After spatial average pooling (Pool) dimensionality reduction, the key matrix K is generated. V The sum-value matrix V V At the same time, for X LPE Generate query matrix Q while maintaining the original resolution L The cross-attention output of this branch is Out. LPE for: ; Similarly, in the "local constraints global" branch, the feature X of the global state branch is... VSS Based on the query criteria, using local perceptual features X LPE Provide fine-grained edge constraints; similarly, for X LPE After dimensionality reduction, a key matrix K is generated. L The sum-value matrix V L At the same time, for X VSS Generate query matrix Q V The cross-attention output of this branch is Out. VSS for: ; Finally, the output feature matrices of the two branches are recombined into two-dimensional spatial structures and added to their corresponding input features as residuals, serving as independent inputs to the next layer of the network.

6. The automatic segmentation method for lesions in skin disease images according to claim 1, characterized in that, The spatial dimensionality reduction operation within the encoder is performed in two branches: the local perception branch uses a downsampling structure consisting of a max pooling layer and a 1×1 convolution; the global state branch uses a patch merging structure with a stride of 2; and the upsampling operation within the decoder consists of a 2×2 transposed convolution with a stride of 2.

7. The automatic segmentation method for lesions in skin disease images according to claim 1, characterized in that, In S150, the training process of the classification model is optimized using a joint loss function combining binary cross-entropy loss (BCE Loss) and region overlap structure loss (Dice Loss), calculated as follows: Where P is the probability map predicted by the model after Sigmoid activation, G is the true segmentation mask label, ℇ is a smoothing term to prevent the denominator from being zero, and ω bce With ω dice These are the weighting coefficients for the two loss terms, respectively.

8. An automatic segmentation system for lesions in skin disease images based on the method of any one of claims 1-7, characterized in that, include: Data preprocessing module: preprocesses and augments the raw skin disease image data, and constructs the input image and the real segmentation mask for network training; Network building blocks: Constructing a dual-branch, collaborative, and parallel CMC-Net (CNN-MambaCollaborative Network) multi-stage encoder-decoder network architecture; The feature extraction module includes a feature perception enhancement module (LPE Block) responsible for local feature extraction and a visual state space module (VSSBlock) responsible for global dependency modeling; a bidirectional feature interaction guidance module (BFIG) achieves bidirectional decoupling and calibration of local and global features through a spatial dimensionality reduction and cross-attention mechanism; and a segmentation prediction module that uses multiple loss functions to train the constructed automatic segmentation model end-to-end and outputs the final segmentation prediction result of the lesion region.