Skin lesion segmentation method and system based on dual-path perception multi-stage fusion
By using a dual-path perception multi-stage fusion network, combined with sparse attention mechanism and multi-scale feature fusion, the segmentation problem of irregular boundaries and complex scenes in skin lesion segmentation is solved, and high-precision skin lesion segmentation is achieved.
Patent Information
- Application Number
- CN202511184699.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2026-01-13
AI Technical Summary
Existing skin lesion segmentation methods have poor segmentation performance when faced with irregular boundaries, uneven color distribution, and other tissue interference, especially in low-contrast lesions and complex scenarios such as hair, blood vessels, and bubble artifacts, making accurate segmentation difficult.
A skin lesion segmentation method based on dual-path perception and multi-stage fusion is adopted. Key lesion areas are filtered through a regional sparse attention mechanism, a multi-scale feature pyramid is constructed, and feature fusion is performed using a spatial frequency dual-path cascaded perception module and a spatial channel dual-path parallel perception module. The model is optimized by combining Tversky loss and Dice loss to generate a pixel-level lesion probability map.
It significantly improves the accuracy and efficiency of skin lesion segmentation, enhances the global perception of low-contrast lesion structures, suppresses high-frequency noise and artifacts, and improves segmentation accuracy and robustness.
Smart Images

Figure CN121330281A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, and in particular to a method and system for skin lesion segmentation based on dual-path perception and multi-stage fusion. Background Technology
[0002] Global cancer statistics show that skin cancer is the most frequently diagnosed cancer worldwide. Among its various forms, melanoma is particularly threatening, causing approximately 55,500 deaths annually. Notably, if diagnosed at an advanced stage, the 5-year survival rate drops sharply from 99% to 25%. Therefore, early detection of melanoma is a crucial factor in improving patient prognosis. However, diagnosing skin lesions by visual inspection is subjective. Even experienced specialists can make significant differences in their diagnoses. Therefore, to more effectively and accurately detect and analyze skin diseases, some research efforts have focused on applying computer-aided diagnostics (CAD) to skin disease diagnosis.
[0003] Traditional skin lesion segmentation methods primarily rely on the size, shape, color, and texture of the lesion region, extracting fixed features using techniques such as thresholding, edge detection, and wavelet transform. However, due to the diverse nature of skin lesions, their irregular shapes, and blurred boundaries, these traditional algorithms exhibit poor segmentation performance in such complex scenarios.
[0004] In contrast, deep learning models can adaptively learn different features of dermoscopy images and achieve better segmentation performance than traditional algorithms. In recent years, deep learning techniques, especially convolutional neural networks (CNNs), have achieved significant success in medical image segmentation. Recent advances in deep learning methods have greatly propelled progress in skin lesion segmentation. Over the past few years, U-Net has become one of the most successful and influential architectures in the field of medical image segmentation. Some researchers have introduced useful strategies into the U-Net structure to improve the network's performance in skin lesion segmentation. For example, to capture more high-level information and preserve spatial information, CE-Net was proposed, which includes a context information extraction module in the highest-dimensional layer between the encoder and decoder to enhance the network's global information. Dilated residual convolutions and pyramid pooling blocks are utilized to improve segmentation accuracy. Deep convolutional-deconvolutional networks with small convolutional kernels are used to extract discriminative feature representations for skin lesion segmentation.
[0005] Despite the significant progress made by the methods described above, achieving accurate segmentation of skin lesions remains a formidable challenge. Lesions in dermoscopy images exhibit irregular boundaries and uneven, irregular color distribution. In the early stages of malignant lesions, the contrast between the lesion and normal skin areas is low, and the boundaries are blurred. Furthermore, artifacts from other tissues such as hair, blood vessels, and air bubbles make automated skin lesion segmentation by computer systems extremely challenging. Summary of the Invention
[0006] In view of the aforementioned existing problems, the present invention is proposed.
[0007] Therefore, this invention provides a skin lesion segmentation method based on dual-path perception and multi-stage fusion to solve the problem that existing precise skin lesion segmentation methods face significant challenges in automatic skin lesion segmentation by computer systems due to artifacts from other tissues such as hair, blood vessels, and air bubbles.
[0008] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0009] In a first aspect, the present invention provides a skin lesion segmentation method based on dual-path perception and multi-stage fusion, which includes dividing a skin image into blocks, inputting the image into an encoder, and using a region sparse attention mechanism to filter key lesion areas.
[0010] The feature map is downsampled using a block merging operation, and a multi-scale feature pyramid is constructed.
[0011] Skin image features are processed using a dual-path sensing multi-stage fusion network. The deepest features generated by the encoder are processed by the spatial-frequency dual-path cascaded sensing module SFDCP, performing two-stage spatial-frequency collaborative optimization.
[0012] A skip connection is established between the encoder and the corresponding decoder through the spatial channel dual-path parallel sensing module SCDPP. The encoder features modulated by the decoder are combined with the SCDPP to restore the spatial resolution through block expansion operation and generate a pixel-level lesion probability map.
[0013] As a preferred embodiment of the skin lesion segmentation method based on dual-path perception and multi-stage fusion described in this invention, the skin image segmentation includes: inputting a skin image and dividing it into non-overlapping blocks; converting the blocks into feature tensors through linear embedding and inputting them into the first layer of the encoder; and in each encoding stage, using a regional sparse attention mechanism to filter key lesion regions to achieve preliminary integration of local details and global semantics.
[0014] As a preferred embodiment of the skin lesion segmentation method based on dual-path perception multi-stage fusion described in this invention, the dual-path perception multi-stage fusion network includes the ability to accurately segment the skin lesion region by perceiving high-level contextual information through a dual-path framework.
[0015] The specific network architecture includes an encoder-decoder backbone built with bidirectional sparse attention blocks (BiFormer Blocks) as basic units, a spatial frequency dual-path cascaded sensing module (SFDCP) in the bottleneck layer, and a spatial channel dual-path parallel sensing module (SCDPP) in the skip connection.
[0016] During the training of the dual-path perception multi-stage fusion network for skin lesion segmentation, a hybrid loss function consisting of Tversky loss and Dice loss is used for optimization.
[0017] As a preferred embodiment of the skin lesion segmentation method based on dual-path perception and multi-stage fusion described in this invention, the processing by the spatial frequency dual-path cascaded perception module SFDCP includes the following: the spatial frequency dual-path cascaded perception module SFDCP integrates information processing paths from the spatial domain and frequency domain through progressive feature interaction, suppresses high-frequency noise and captures long-range dependencies.
[0018] SFDCP constructs a dual-path cascade architecture by integrating two space-frequency cooperation modules (SFCM) into the basic BiFormer Block framework.
[0019] As a preferred embodiment of the skin lesion segmentation method based on dual-path perception and multi-stage fusion described in this invention, the two-stage spatial-frequency cooperation optimization includes, in the first stage, using the spatial-frequency cooperation module SFCM to extract local details of the spatial domain through a dual-path perception mechanism.
[0020] The spatial path of SFCM is processed using a spatial attention module consisting of two-layer 3×3 convolution, LeakyReLU, and batch normalization; the frequency path transforms the features using Fast Fourier Transform (FFT) for spectral analysis; the specific process includes: bandpass filtering the complex-valued spectral representation of the frequency path and spatial reconstruction using inverse FFT;
[0021] Regarding cross-domain feature interaction, adaptive fusion weights are calculated through feature projection and similarity measurement processes; for each pixel location, the spatial feature F... s and frequency characteristics F f The shared embedding space is projected through a 1×1 convolution with batch normalization; channel-level similarity is calculated and distributed by batch normalization before Sigmoid activation; the adaptive gating parameter δ∈[0,1] generated during batch normalization dynamically balances the contributions of the two domains.
[0022] BiFormer Block introduces a hierarchical processing mechanism, which processes the input feature map F fusion1 Divide the system into n×n non-overlapping regions; for each region, apply linear projection to obtain the value V, key K, and query Q; calculate the regional average of Q and K across regions to obtain the region query and region key; calculate the region query Q. r and transpose of the region key K r The similarity between them is used to construct the adjacency matrix A, which produces a matrix array;
[0023] Perform coarse-grained filtering on the matrix array to select the top k matrices with the highest similarity; for the filtered regions, collect key and value tensors and process them using a fine-grained token-to-token attention method;
[0024] The second stage of SFCM optimizes feature representation by decomposing the output features of the BiFormer Block; based on a pixel-level adaptive weighting strategy, it dynamically balances the contributions of spatial and frequency branches, enhances global perception of low-contrast lesion structures, and suppresses high-frequency artifacts.
[0025] As a preferred embodiment of the skin lesion segmentation method based on dual-path perception and multi-stage fusion described in this invention, the method includes: SCDPP integrating an entropy-driven channel attention mechanism and multi-granularity asymmetric convolution; the spatial channel dual-path parallel perception module SCDPP uses two independent but complementary information processing paths to achieve synchronous multi-dimensional feature enhancement;
[0026] In the spatial path, the input feature map F input After a 5×5 convolution to enhance the local context; then the feature map F... input The process is performed through three parallel asymmetric convolution chains; the fine-grained path uses a combination of 1×5 and 5×1 asymmetric convolutions to focus on microstructures; the medium-grained path uses a combination of 1×9 and 9×1 asymmetric convolutions to capture medium-scale edges; and the coarse-grained path uses a combination of 1×11 and 11×1 asymmetric convolutions to perceive large-scale morphological features, up to the overall outline.
[0027] After connecting the outputs of the three paths, a 1×1 convolution is used to fuse them to generate multi-scale spatial features F. S Within the channel path, information entropy is used to measure the richness of contextual information within the channel; global normalization is performed independently for each channel to eliminate interference from illumination differences; for each channel c, the normalized feature map...
[0028] Spatial entropy is used to quantify the information richness of each normalized channel, reflecting the statistical distribution of pixel intensity; Transform into probability distribution P c (x,y);
[0029] Calculate the spatial entropy of channel c, perform batch normalization, apply Sigmoid activation, and generate normalized channel weights; obtain the channel-optimized features F by reweighting. C ;
[0030] Spatial features F S and channel features F C The final output feature map F is generated by fusing elements by element. output .
[0031] As a preferred embodiment of the skin lesion segmentation method based on dual-path perception and multi-stage fusion described in this invention, the optimization of the hybrid loss function includes using a hybrid loss function composed of Tversky loss and Dice loss.
[0032] The Tversky loss balances the weights of false positives (FP) and false negatives (FN) by introducing two hyperparameters, α and β. By adjusting α and β, the model's sensitivity to different types of errors can be flexibly adjusted for different types of skin lesions.
[0033] Dice loss directly measures the degree of overlap between the predicted result and the true label. In skin lesion segmentation, it highlights the lesion area, making the model pay more attention to the segmentation accuracy of the lesion part. The contribution weights of the loss function to the total loss are used to weight and fuse Tversky loss and Dice loss to form a hybrid loss function.
[0034] In a second aspect, the present invention provides a skin lesion segmentation system based on dual-path perception and multi-stage fusion, including a spatial frequency dual-path cascaded perception module and a spatial channel dual-path parallel perception module.
[0035] The space-frequency dual-path cascaded sensing module includes a cascaded two-stage space-frequency cooperation unit for joint optimization of long-range dependency modeling and high-frequency noise suppression.
[0036] The dual-path parallel perception module employs entropy-driven channel attention to prioritize key features and utilizes multi-granularity asymmetric convolution to comprehensively capture subtle lesion details across spatial scales.
[0037] Thirdly, the present invention provides a computer device including a memory and a processor, wherein the memory stores a computer program, wherein when the computer program is executed by the processor, it implements any step of the skin lesion segmentation method based on dual-path perception multi-stage fusion as described in the first aspect of the present invention.
[0038] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the skin lesion segmentation method based on dual-path perception multi-stage fusion as described in the first aspect of the present invention.
[0039] The beneficial effects of this invention are as follows: A novel dual-path perceptive multi-stage fusion network (DPMF-Net) is proposed for skin lesion segmentation. This framework significantly enhances context awareness across spatial and frequency domains by hierarchically optimizing lesion representation through dual-path multi-stage feature fusion. Extensive experiments validate its state-of-the-art performance on four skin lesion datasets. A spatial-frequency dual-path cascaded perceptive module (SFDCP) is designed. Through cascading two-stage spatial-frequency cooperative units, it achieves joint optimization of long-range dependency modeling and high-frequency noise suppression. A spatial-channel dual-path parallel perceptive module (SCDPP) is proposed. It employs entropy-driven channel attention to prioritize key features and utilizes multi-granularity asymmetric convolutions to comprehensively capture subtle lesion details across spatial scales. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart of a skin lesion segmentation method based on dual-path perception and multi-stage fusion.
[0042] Figure 2 This is a network structure diagram of the spatial frequency dual-path cascaded sensing module SFDCP for skin lesion segmentation based on a dual-path sensing multi-stage fusion method.
[0043] Figure 3 This is a structural diagram of the spatial channel dual-path parallel sensing module (SCDPP) for a skin lesion segmentation method based on dual-path perception and multi-stage fusion.
[0044] Figure 4 This is a comparison of visual segmentation results of different methods on the ISIC2016 dataset for skin lesion segmentation based on a dual-path perception multi-stage fusion method.
[0045] Figure 5 This is a comparison of visual segmentation results of different methods on the ISIC2017 dataset for skin lesion segmentation based on a dual-path perception multi-stage fusion method.
[0046] Figure 6 This is a comparison of visual segmentation results of different methods on the ISIC2018 dataset for skin lesion segmentation based on a dual-path perception multi-stage fusion method.
[0047] Figure 7This is a comparison of visual segmentation results of different methods on the PH2 dataset, based on a dual-path perception multi-stage fusion method for skin lesion segmentation.
[0048] Figure 8 This is a visualization of the final layer heatmap of the encoder in a skin lesion segmentation method based on dual-path perception and multi-stage fusion. Detailed Implementation
[0049] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0050] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0051] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0052] Reference Figures 1-3 This is one embodiment of the present invention, which provides a skin lesion segmentation method based on dual-path perception multi-stage fusion, including the following steps:
[0053] S1: Divide the skin image into blocks and input them into the encoder. Use a regional sparse attention mechanism to filter key lesion areas.
[0054] Furthermore, the dual-path perception multi-stage fusion network, namely DPMF-Net, completes the accurate segmentation of skin lesions by perceiving high-level contextual information through a dual-path framework. Its architecture includes an encoder-decoder backbone built with BiFormer Block
[39] as the basic unit, a spatial frequency dual-path cascaded perception module (SFDCP) in the bottleneck layer, and a spatial channel dual-path parallel perception module (SCDPP) in the skip connection. The core advantage of BiFormer Block lies in its regional sparse attention mechanism, which can automatically focus on lesion areas with high information content while filtering out most low-value areas.
[0055] Given a skin image First, the data is divided into non-overlapping patches. These patches are then converted into feature tensors through linear embedding and fed into the first layer (E1) of the encoder. At each encoding stage (E1, E2, E3), the BiFormer Block employs a region sparse attention mechanism to filter key lesion regions, achieving an initial integration of local details and global semantics.
[0056] It should be noted that the Dual-Path Sensing Multi-Stage Fusion Network (DPMF-Net) integrates multiple feature optimization stages, utilizing hierarchical context to optimize lesion representation. Specifically, the Spatial-Frequency Dual-Path Cascaded Sensing Module (SFDCP) employs a two-stage collaborative framework, combining frequency domain global context and spatial domain local details. The Spatial-Channel Dual-Path Parallel Sensing Module (SCDPP) effectively optimizes and integrates channel and spatial information.
[0057] S2: Use block merging operations to downsample the feature map and construct a multi-scale feature pyramid.
[0058] Furthermore, as processing continues, the patch merging operation downsamples the feature maps, halving the spatial resolution at each stage while doubling the channel dimension to construct a multi-scale feature pyramid.
[0059] The deepest features generated by the encoder (E3) are then processed by a spatial-frequency dual-path cascaded sensing module (SFDCP), which performs a two-stage spatial-frequency collaborative optimization. In the spatial path, a spatial attention module (SAM) models long-range dependencies to enhance lesion-background discriminability, such as connecting fragmented lesion regions. In the frequency path, the feature maps undergo a Fast Fourier Transform (FFT) and are then bandpass filtered in the frequency domain to suppress high-frequency noise while preserving low-frequency structural information. The outputs of these two paths are adaptively fused using dynamic weights to balance spatial detail and frequency robustness.
[0060] The decoder progressively restores spatial resolution through patch expanding operations while halving the channel dimensions. During this process, skip connections between the encoder stages (E1 / E2 / E3) and the corresponding decoder layers (D1 / D2 / D3) are established through a Spatial Channel Dual-Path Parallel Sensing Module (SCDPP). This module uses an entropy-driven channel selection method to dynamically enhance high-entropy channels containing rich lesion information by calculating channel-level information entropy. It also employs a multi-granularity spatial optimization technique with asymmetric convolution to extract edge responses at different scales in parallel and fuse them to sharpen the boundaries of small lesions.
[0061] It should be noted that the encoder features of SCDPP modulation are fused with the decoder output at each layer to progressively reconstruct a high-resolution segmentation mask. This generates pixel-level lesion probability maps, ensuring accurate and detailed skin lesion segmentation results.
[0062] S3: Skin image features are processed using a dual-path sensing multi-stage fusion network. The deepest features generated by the encoder are processed by the spatial-frequency dual-path cascaded sensing module SFDCP, performing two-stage spatial-frequency collaborative optimization.
[0063] Furthermore, the Spatial Frequency Dual Path Cascaded Sensing Module (SFDCP) integrates information processing paths from the spatial and frequency domains through progressive feature interaction, effectively capturing long-range dependencies while suppressing high-frequency noise. For example... Figure 2 As shown, SFDCP constructs a dual-path cascade architecture by integrating two space-frequency cooperation modules (SFCM) into the basic BiFormer Block framework.
[0064] In the first stage, the Spatial-Frequency Collaboration Module (SFCM) addresses the limitations of the spatial domain in extracting local details through a dual-path awareness mechanism. The spatial path of the SFCM employs a Spatial Attention Module (SAM) consisting of two layers of 3×3 convolutions, LeakyReLU, and batch normalization (BN) to enhance the representation of edge continuity. Simultaneously, the frequency path transforms the features using Fast Fourier Transform (FFT) for spectral analysis. Crucially, the frequency path represents the complex-valued spectrum through the following operations. Perform bandpass filtering:
[0065] F low (f)=F(f)⊙M low
[0066] Among them, M low This represents a low-pass filter mask used to preserve structural information in low-frequency components while suppressing high-frequency noise. Here, F(·) represents the Fast Fourier Transform (FFT) that transforms spatial features to the frequency domain. -1 (·) indicates its inverse operation.
[0067] Spatial reconstruction is then performed using inverse FFT (IFFT):
[0068] F f =F -1 (F low (f))
[0069] Regarding cross-domain feature interaction, adaptive fusion weights are calculated through feature projection and similarity measurement processes. For each pixel location, the spatial feature F... s and frequency characteristics Ff First, the data is projected into the shared embedding space using a 1×1 convolution with batch normalization:
[0070]
[0071] Among them, C and C mid Let represent the original and reduced channel dimensions, respectively. Then, calculate the channel-level similarity:
[0072]
[0073] The similarity measure is batch normalized for distribution calibration before Sigmoid activation:
[0074]
[0075] This process produces an adaptive gating parameter δ∈[0,1], which dynamically balances the contributions of the two domains:
[0076]
[0077] BiFormer Block introduces a hierarchical processing mechanism. It takes the input feature map F fusion1 The system is divided into n×n non-overlapping regions. For each region, a linear projection is applied to obtain the value V, key K, and query Q. Then, the regional averages of Q and K are calculated across regions to obtain the region query and region key. The region query Q is then calculated. r and transpose of the region key K r The similarity between them is used to construct the adjacency matrix A, which in turn produces a matrix array.
[0078] Perform coarse-grained filtering on this matrix array, selecting the top k matrices with the highest similarity. For the selected regions, collect key-value tensors, and then apply fine-grained token-to-token attention. This process can be calculated using the following formula:
[0079] K g =gather(K,I) r ),V g =gather(V,I) r )
[0080] Where K and V represent the collected key and value tensors, respectively.
[0081] It should be noted that the second-stage SFCM further optimizes the feature representation by decomposing the output features of the BiFormer Block. Based on a pixel-level adaptive weighting strategy, it dynamically balances the contributions of spatial and frequency branches. This post-processing step enhances the global perception of low-contrast lesion structures while suppressing high-frequency artifacts such as hair.
[0082] S4: A skip connection is established between the encoder and the corresponding decoder through the spatial channel dual-path parallel sensing module SCDPP. The encoder features modulated by the decoder are combined with the SCDPP, and the spatial resolution is restored through block expansion operation to generate a pixel-level lesion probability map.
[0083] Furthermore, such as Figure 3 As shown, the design of SCDPP revolves around two main objectives: effectively mining key information within each feature map channel, and comprehensively extracting lesion details at different spatial scales. To achieve these objectives, SCDPP integrates an entropy-driven channel attention mechanism and multi-granularity asymmetric convolution. The Spatial Channel Dual-Path Parallel Perception Module (SCDPP) employs two independent but complementary information processing paths to achieve synchronous multidimensional feature enhancement.
[0084] Input feature map in the spatial path First, a 5×5 convolution is applied to enhance the local context. To address the computational efficiency challenges in dermoscopy analysis, the feature maps are then processed through three parallel chains of asymmetric convolutions. The fine-grained path uses a combination of 1×5 and 5×1 asymmetric convolutions to focus on minute structures, such as pigment points. The medium-grained path employs a combination of 1×9 and 9×1 asymmetric convolutions to capture mesoscale edges, such as lesion lobes.
[0085] The coarse-grained path perceives large-scale morphological features, down to the overall contour, through a combination of 1×11 and 11×1 asymmetric convolutions. After connecting the outputs of the three paths, a 1×1 convolution fuses them to generate the multi-scale spatial feature F. S It effectively addresses the diversity of skin lesion shapes.
[0086] Within the channel path, information entropy is used to measure the richness of contextual information within the channel. Global normalization is performed independently for each channel to eliminate interference from illumination differences. For each channel c, the normalized feature map... The calculation is as follows:
[0087]
[0088] in and This represents the minimum and maximum values in channel c. This represents the normalized feature map.
[0089] Subsequently, spatial entropy is used to quantify the information richness of each normalized channel, which reflects the statistical distribution of pixel intensity. First, the information richness of each channel is quantified. Convert to probability distribution:
[0090]
[0091] Where ∈=10 -8 Used to prevent numerical instability.
[0092] Then calculate the spatial entropy of channel c:
[0093]
[0094] Higher entropy ε c It provides richer information, corresponding to discriminative features such as lesion texture and boundaries.
[0095] Calculated entropy value After batch normalization, sigmoid activation is performed to generate normalized channel weights:
[0096]
[0097] Where μ ε and σ ε These are the mean and standard deviation of the entropy values in the batch, respectively.
[0098] Features obtained through reweighting:
[0099]
[0100] Finally, spatial feature F S and channel features F C The final output feature map F is generated by fusing elements by element. output This effectively combines multi-scale spatial details and channel dimension information, improving the accuracy of skin lesion segmentation.
[0101] During the training of DPMF-Net for skin lesion segmentation, in order to enhance the model's performance and segmentation accuracy, a loss function based on Tversky loss was used. and Dice loss The resulting hybrid loss function.
[0102] Tversky loss The weights of false positives (FP) and false negatives (FN) are balanced by introducing two hyperparameters, α and β. The formula is as follows:
[0103]
[0104] Where p i It is a predicted value, g i α represents the true value, and N is the total number of pixels. By adjusting α and β, the model's sensitivity to different types of errors can be flexibly adjusted for different types of skin lesions, thereby better capturing the boundaries and details of the lesion area.
[0105] Dice loss The formula for directly measuring the overlap between the predicted results and the true labels is as follows:
[0106]
[0107] In skin lesion segmentation, it can effectively highlight the lesion area, allowing the model to focus more on the segmentation accuracy of the lesion.
[0108] By fusing these loss functions, a hybrid loss function is formed. It can be represented as:
[0109]
[0110] Here, ω1 and ω2 are weighting coefficients used to adjust the contribution of each loss function to the total loss. Through this hybrid loss function, DPMF-Net can comprehensively utilize the advantages of different loss functions. Ultimately, the coefficients ω1 and ω2 are empirically set to 0.6 and 0.4, respectively.
[0111] It should be noted that the significance of skin lesion segmentation lies in the fact that DPMF-Net improves the detection rate of skin lesions by reducing the variability associated with manual diagnosis, thereby improving the accuracy and efficiency of diagnosis. The novelty and effectiveness of the proposed method are also highlighted: DPMF-Net integrates the SFDCP and SCDPP modules, surpassing state-of-the-art models such as PVT-GCASCADE in metrics such as JI, Dice, accuracy, sensitivity, and specificity. Enhanced boundary segmentation accuracy is achieved through the crucial roles of SCDPP and SFDCP in DPMF-Net. SFDCP utilizes a dual-path cascade architecture to achieve synergistic optimization of long-range dependency modeling and high-frequency noise suppression. SCDPP employs an entropy-driven channel attention mechanism to explore key information within each channel of the feature map. It leverages multi-granularity asymmetric convolution to comprehensively extract lesion details at different spatial scales. Despite significant progress, DPMF-Net still has some limitations. For example, in extreme cases such as poor lighting conditions or extremely complex lesion morphologies, the model's performance may not be as expected. Future work will involve integrating DPMF-Net with classification networks within a unified optimization framework, aiming to improve diagnostic accuracy. This structured approach highlights the advancements DPMF-Net has made in skin lesion segmentation and its potential to improve clinical outcomes in skin cancer detection.
[0112] Reference Figures 4-8 As an embodiment of the present invention, a skin lesion segmentation method based on dual-path perception and multi-stage fusion is provided. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiment.
[0113] First, to evaluate the performance of the Dual Path Aware Multi-Stage Fusion Network (DPMF-Net) in skin lesion segmentation, comprehensive experiments were conducted on four different datasets: ISIC2016, ISIC2017, ISIC2018, and PH2. These datasets were chosen to represent diverse scenarios in skin lesion segmentation. Specifically, ISIC2016, ISIC2017, and ISIC2018 were used for comparative analysis, while the PH2 dataset was used to evaluate generalization ability. Among these, ISIC2018 was used as the primary dataset for ablation studies due to its large size and diverse lesion types.
[0114] The datasets used in this study include ISIC2016
[40] , ISIC2017
[41] , ISIC2018
[42] , and PH2
[43] . These datasets are widely recognized benchmarks in the field of skin lesion segmentation, providing diverse and representative data for model training and validation.
[0115] ISIC2016: Contains 1279 images of skin lesions and their corresponding segmentation masks. This dataset is divided into 900 training samples and 379 test samples.
[0116] ISIC2017: As an extended version of ISIC2016, this set contains 2000 training images, 150 validation images, and 600 test images with pixel-level annotations, with a consistent acquisition protocol across the subsets.
[0117] ISIC2018: Representing the most extensive version of ISIC, this dataset provides 2594 labeled training images. The entire set is stratified by random sampling into a training set (70%), a validation set (10%), and a test set (20%).
[0118] PH2: This dataset contains 200 dermoscopic images with a resolution of 768×560 pixels. Due to the limited number of images, this set is used to supplement experiments to evaluate the robustness of the method under limited data conditions.
[0119] To optimize computational efficiency while preserving anatomical features, all images were scaled to 224×224 pixels and normalized based on channel mean and standard deviation. During network training, random data augmentation techniques, including random cropping and horizontal flipping, were implemented to enhance the model's generalization ability and reduce the risk of overfitting.
[0120] The segmentation performance is quantitatively evaluated using five established metrics: Jaccard Index (JI), Dice coefficient (Dice), Accuracy (ACC), Sensitivity (SE), and Specificity (SP). The mathematical definitions of these metrics are as follows:
[0121]
[0122] Among them, true positive (TP) corresponds to a lesion pixel that is accurately detected, true negative (TN) represents a correctly identified background area, false positive (FP) represents a non-lesion pixel that is incorrectly classified as a lesion area, and false negative (FN) represents a lesion pixel that is not detected.
[0123] DPMF-Net and several ablation variants were trained on an Nvidia GeForce RTX 4090 graphics card with 24GB of RAM. The implementation used Python 3.10 and PyTorch 2.1.0. All images were resized to a uniform resolution of 224×224 pixels. All models were trained for 200 epochs using the Adam optimizer with a batch size of 16. A cosine annealing learning rate scheduler was used with an initial learning rate of 5e-4. To enhance the diversity of the training data, data augmentation techniques including horizontal flipping, vertical flipping, rotation, and cropping were applied, each with a probability of 0.25.
[0124] It is worth noting that DPMF-Net achieves 29.31 FPS on an RTX 4090 GPU, which ensures that DPMF-Net can be used for dermoscopy video processing.
[0125] In comparison with state-of-the-art methods, the study compared the proposed DPMF-Net with state-of-the-art medical image segmentation networks, including U-Ne
[12] , CE-Net
[13] , DuAT
[44] , DCSAU-Net
[45] , GFANet
[20] , MHorUNet
[46] , and PVT-GCASCADE
[47] . All networks were retrained on four skin lesion datasets. The experimental setup was the same as described in the previous section to ensure a fair comparison.
[0126] In this study, the segmentation performance of the proposed DPMF-Net on the ISIC2016 dataset was compared with six other state-of-the-art medical image segmentation networks. As shown in Table 1, DPMF-Net achieved the best performance across all evaluation metrics. Specifically, DPMF-Net achieved a Jaccard index (JI) of 88.26%, a Dice coefficient of 93.51%, an accuracy (ACC) of 96.31%, a sensitivity (SE) of 95.25%, and a specificity (SP) of 96.95%, all of which outperformed the other comparison methods.
[0127] Table 1: Segmentation performance comparison on the ISIC2016 dataset. Best performance is shown in red.
[0128] method JI Dice ACC SE SP U-Net (2015) 67.09 77.14 75.71 79.85 82.49 CE-Net (2019) 73.23 77.64 92.86 91.91 93.95 DuAT (2023) 72.41 83.02 82.04 83.86 86.64 DCSAU-Net(2023) 85.18 91.59 95.24 92.12 96.20 GFANet (2023) 86.02 90.89 95.81 91.36 95.61 MHorUNet(2024) 83.15 90.93 94.21 91.28 93.75 PVT-GCASCADE(2024) 87.41 92.64 95.28 94.23 94.44 DPMF-Net(Our) 88.26 93.51 96.31 95.25 96.95
[0129] Furthermore, compared to the superior performance of PVT-GCASCADE, DPMF-Net improves the Dice score by 0.87% while maintaining a high accuracy (ACC) of 96.31%. Even against the robust DCSAU-Net, DPMF-Net still stands out with the highest Dice score of 93.51%, higher than DCSAU-Net's 91.59%. These results demonstrate that DPMF-Net surpasses existing state-of-the-art techniques across various metrics, becoming the leading method in the field of skin lesion image segmentation.
[0130] like Figure 4 The image shows a comparison of visual segmentation results from different methods on the ISIC2016 dataset. Green indicates true positives (correctly segmented regions), red indicates false positives (over-segmented regions), and yellow indicates false negatives (under-segmented regions).
[0131] Figure 4 This section presents the visualized segmentation results of various methods on the ISIC2016 dataset. The first column displays the original image, the second column shows the corresponding ground truth (GT) segmentation, and the third through ninth columns show the segmentation results for each method. Highlighted segmentation differences are marked in green (true positives), red (false positives), and yellow (false negatives).
[0132] exist Figure 4 In the first row, the skin lesion being processed is large and irregularly shaped. In this case, the DuAT and DCSAU-Net algorithms failed to effectively capture the complex features of the lesion, leading to oversegmentation. In contrast, DPMF-Net, with its multi-stage fusion mechanism, can more accurately identify and segment the lesion, avoiding the problem of oversegmentation.
[0133] In the second row of images, the contrast of the lesion region is not obvious, posing a greater challenge to the segmentation algorithm. GFANet exhibits limitations in handling low-contrast lesions. Due to its reliance on spatial attention without frequency domain noise suppression, GFANet misclassifies subtle background textures near the lesion boundary. MHorUNet and PVT-GCASCADE algorithms misclassify nearby normal spots as lesion regions in this situation. DPMF-Net utilizes the information entropy channel attention mechanism in the SCDPP module to more accurately explore the key information in each feature map channel, thereby reducing misclassification and achieving more accurate segmentation.
[0134] The results on the ISIC2017 dataset, as shown in Table 2's comparison of segmentation performance on the ISIC2017 dataset, demonstrate that the proposed DPMF-Net performs exceptionally well across all evaluation metrics. Specifically, DPMF-Net achieves a Dice of 91.78%, highlighting its significant advantage in handling complex skin lesion image segmentation tasks. GFANet achieves a Dice coefficient of 90.19% and a Jaccard index of 83.62% on ISIC2017. While competitive, these metrics are significantly lower than the performance of DPMF-Net (91.78% Dice, 85.90% Jaccard index). The 1.59% Dice gap primarily stems from GFANet's limitations in handling complex boundary scenes.
[0135] Table 2: Segmentation performance comparison on the ISIC2017 dataset
[0136] method JI Dice ACC SE SP U-Net (2015) 51.87 64.16 88.05 79.17 89.24 CE-Net (2019) 56.98 70.71 90.25 88.07 89.64 DuAT (2023) 74.01 83.52 94.04 92.02 93.01 DCSAU-Net(2023) 81.37 88.26 95.41 90.32 97.61 GFANet (2023) 83.62 90.19 95.03 92.15 97.28 MHorUNet(2024) 79.61 87.68 95.51 95.02 97.24 PVT-GCASCADE(2024) 84.63 90.98 95.13 94.61 94.45 DPMF-Net(Our) 85.90 91.78 95.79 96.83 98.43
[0137] Compared to the recent high-performance PVT-GCASCADE, DPMF-Net improves Dice by 0.79%. Furthermore, it achieves a peak accuracy (ACC) of 95.79% and a peak sensitivity (SE) of 96.83%.
[0138] Even compared to the equally excellent DCSAU-Net, DPMF-Net still improves the Dice coefficient by 3.52% and achieves a specificity (SP) of 98.43%, further demonstrating its superiority.
[0139] These results demonstrate that DPMF-Net not only outperforms existing state-of-the-art techniques, but also represents a significant step forward in improving the accuracy of skin lesion image segmentation.
[0140] Figure 5 Comparison of visual segmentation results of different methods on the ISIC2017 dataset. Green indicates true positives (correctly segmented regions), red indicates false positives (over-segmented regions), and yellow indicates false negatives (under-segmented regions).
[0141] like Figure 5 As shown, in visual comparisons on the ISIC2017 dataset, DPMF-Net demonstrates a significant segmentation advantage. For lesions with blurred boundaries in the first row, CE-Net and MHorUNet suffer from incomplete edge segmentation due to a lack of multi-scale spatial awareness and dynamic channel selection mechanisms. In contrast, DPMF-Net captures gradient details through multi-granularity asymmetric convolutions of the SCDPP module and enhances high semantic boundary features by integrating information entropy channel attention, thereby achieving continuous and smooth segmentation contours.
[0142] For lesions with uneven color in the third row, GFANet exhibits discontinuous segmentation contours and fails to capture subtle gradient transitions. CE-Net and DUAT algorithms can only identify obvious lesion regions and are insufficient in identifying lighter-colored lesion regions, indicating their poor performance in handling lesions with inconsistent color. DPMF-Net, through the dual-path cascaded synergistic resonance of the SFDCP module, can flexibly integrate features from the spatial and frequency domains, thereby accurately segmenting lesion regions with inconsistent color.
[0143] Experimental results on the ISIC2018 dataset are shown in Table 3. Compared to the recently released high-performance network PVT-GCASCADE, DPMF-Net achieves a slight but significant improvement in JI of 1.01%. Furthermore, it achieves state-of-the-art results in accuracy (ACC) of 94.90%, sensitivity (SE) of 94.65%, and specificity (SP) of 96.44%.
[0144] Even compared to another well-performing model, DCSAU-Net, DPMF-Net improved the Dice score by 2.68%, further validating its superiority. These results not only highlight DPMF-Net's leading position across various metrics but also demonstrate its significant advantage in accurately distinguishing complex lesion regions, emphasizing the importance of this model in improving the quality of skin lesion segmentation.
[0145] Table 3: Segmentation performance comparison on the ISIC2018 dataset
[0146] method JI Dice ACC SE SP U-Net (2015) 61.04 71.69 86.04 83.73 84.27 CE-Net (2019) 72.74 81.95 93.03 88.66 92.21 DuAT (2023) 77.15 84.44 92.46 90.74 93.37 DCSAU-Net(2023) 81.44 88.25 94.25 90.32 95.61 GFANet (2023) 83.85 90.11 94.39 92.94 95.23 MHorUNet(2024) 82.04 87.26 94.15 89.35 95.08 PVT-GCASCADE(2024) 84.72 90.82 94.02 93.33 94.40 DPMF-Net(Our) 85.71 90.93 94.90 94.65 96.44
[0147] like Figure 6 The image shows a visual comparison of the segmentation results of various methods on the ISIC2018 dataset. In the case of blurred boundaries in the second row, MHorUNet results in incomplete segmentation due to a lack of long-range dependency modeling. GFANet, due to its limited ability to model long-range dependencies, produces discontinuous lesion contours. Unlike DPMF-Net's SFDCP module, which utilizes frequency domain analysis to enhance boundary continuity, GFANet's gated fusion attention lacks explicit space-frequency optimization. The SFDCP module effectively enhances the continuity of irregular boundaries through a dual-path cascade collaborative mechanism.
[0148] In cases where the third row boundary is rugged, DCSAU-Net and PVT-GCASCADE suffer from oversegmentation due to limitations in the local receptive field. On the other hand, DPMF-Net guides precise localization by analyzing the high-frequency components of the boundary in the frequency domain through its two-stage space-frequency cooperation module (SFCM).
[0149] like Figure 6The image shows a comparison of visual segmentation results from different methods on the ISIC2018 dataset. Green indicates true positives (correctly segmented regions), red indicates false positives (oversegmented regions), and yellow indicates false negatives (undersegmented regions).
[0150] These visual results validate the significant advantages of the dual-path perception multi-stage fusion mechanism in segmenting complex skin lesions.
[0151] The results on the PH2 dataset are shown in Table 4. The generalization ability test results on the PH2 dataset show that the proposed DPMF-Net outperforms other state-of-the-art algorithms. Although GFANet achieves the highest accuracy (ACC) among the comparison methods, it exhibits a key limitation in generalization, with its Dice being 2.37% lower than DPMF-Net, indicating poor boundary delineation.
[0152] Among the state-of-the-art methods evaluated on the PH2 dataset, our method shows significant improvements, achieving a 0.41% improvement over PVT-GCASCADE and a 2.05% improvement over DCSAU-Net in Dice. Notably, our framework achieves a JI score of 87.21%, outperforming PVT-GCASCADE and MHorUNet by 0.96% and 1.88%, respectively.
[0153] Figure 7 Comparison of visual segmentation results of different methods on the PH2 dataset. Green indicates true positives (correctly segmented regions), red indicates false positives (over-segmented regions), and yellow indicates false negatives (under-segmented regions).
[0154] Table 4: Comparison of segmentation performance on the PH2 dataset
[0155]
[0156]
[0157] Figure 7 The visual comparison of segmentation results from various methods in the PH2 cross-domain generalization experiment is shown. In the case of hair interference in the second row, MHorUNet is sensitive to high-frequency noise in the spatial domain features, causing it to misinterpret hair texture as lesion boundaries, resulting in fragmented segmentation regions. DPMF-Net addresses the hair interference challenge through a collaborative dual-module approach. The SFDCP module first uses its bandpass filtering mechanism to suppress high-frequency noise in the frequency domain, effectively attenuating hair artifacts while preserving basic structural information. Based on this frequency domain preprocessing, the SCDPP module then performs detailed texture analysis in the spatial domain through its multi-granularity asymmetric convolution.
[0158] To address the challenge of low-contrast lesions in the third row, DUAT and DCSAU-Net, due to limitations in single-domain feature modeling, failed to adequately enhance the distinguishability between lesions and background in the channel domain, leading to oversegmentation. DPMF-Net's SFDCP module extracts the energy distribution features of the lesions through FFT in the frequency domain. The low-frequency components locate the main regions of the lesions.
[0159] High-frequency components depict edge details, enabling the network to accurately identify the anatomical boundaries of lesions even under low-contrast conditions.
[0160] Ablation experiments. Module combination analysis: To verify the effectiveness of the proposed SCDPP and SFDCP modules, an ablation study was conducted on the ISIC2018 dataset. The framework containing only BiFormerBlock was used as the baseline. Model I incorporated the SCDPP module, and Model II incorporated the SFDCP module. When both modules were integrated, the complete DPMF-Net was obtained.
[0161] As shown in Table 5, based on quantitative analysis of ablation experiments, the SCDPP and SFDCP modules exhibited significant complementary properties when applied to the ISIC2018 dataset. Model I, through multi-scale spatial awareness and information entropy channel enhancement, improved the sensitivity (SE) from 92.72% to 93.65%, validating its ability to capture details of heterogeneous lesions. Particularly in regions with brightness differences, it resulted in a 0.35% improvement in Dice. Model II, relying on the advantages of global modeling in the frequency domain, achieved a specificity (SP) exceeding 96.03%, and Dice improved by 1.5% compared to the baseline. However, the sensitivity (SE) decreased slightly to 93.23%, suggesting that its long-range dependency modeling may have sacrificed sensitivity to local lesions.
[0162] Table 5: Comparison of segmentation performance in ablation experiments on the ISIC2018 dataset
[0163]
[0164]
[0165] The complete DPMF-Net achieves an optimal balance between SE and SP through the collaborative optimization of two modules. Compared with the single-module model, Dice shows a significant improvement, revealing that the optimization of multi-scale channel-spatial features by SCDPP and the resonance of frequency-spatial attention by SFDCP form a closed-loop enhancement. The former suppresses the interference of high-frequency noise, while the latter compensates for the global contextual awareness of minor lesions.
[0166] Visualization Analysis: To enhance the interpretability of DPMF-Net and visually demonstrate the regions of interest for different modules, heatmaps were used to analyze three challenging scenarios: low contrast, blurred boundaries, and small-area lesions. For example... Figure 8 As shown, these heatmaps reveal the dynamic attention mechanism of the SFDCP and SCDPP modules during the feature extraction process.
[0167] The heatmap of SCDPP under low contrast conditions ( Figure 8 Column c) exhibits strong activation in the core region of the lesion, attributed to its entropy-driven channel attention. This mechanism prioritizes high-information-entropy channels, effectively capturing key texture and structural details in low-contrast regions. Meanwhile, the SFDCP heatmap ( Figure 8 (Column d) Low-frequency energy distribution is extracted using a frequency domain path based on Fourier transform, which enhances the global profile while suppressing background noise interference.
[0168] For fuzzy boundaries, SFDCP ( Figure 8 Column d) precisely focuses its thermal distribution within the boundary transition region. Its dual-path collaboration—spatial modeling for long-range dependencies and frequency domain suppression of high-frequency noise—generates gradient diffusion activation along the edges, effectively sharpening blurry edges. SCDPP ( Figure 8 (Column c) Employs multi-granularity asymmetric convolution chains to extract cross-scale edge responses, ensuring seamless activation coverage from microstructure to macromorphology.
[0169] Regarding small-area lesions, the thermal map of SCDPP ( Figure 8 Column c) demonstrates precise activation strictly confined to minute lesions. Its synergistic multi-granularity spatial pathways and channel reweighting prevent signal diffusion into surrounding tissues. SFDCP ( Figure 8 Column d) extends the activation coverage through global context modeling, eliminating the risk of missing small targets.
[0170] Overall DPMF-Net heatmap ( Figure 8 The e-th column achieved near-complete lesion coverage, demonstrating the collaborative optimization of multi-stage modules and jointly improving the robustness and interpretability of the network under complex conditions.
[0171] This embodiment also provides a skin lesion segmentation system based on dual-path perception and multi-stage fusion, including: a spatial frequency dual-path cascaded perception module and a spatial channel dual-path parallel perception module;
[0172] The space-frequency dual-path cascaded sensing module includes a cascaded two-stage space-frequency cooperation unit for joint optimization of long-range dependency modeling and high-frequency noise suppression.
[0173] The dual-path parallel perception module employs entropy-driven channel attention to prioritize key features and utilizes multi-granularity asymmetric convolution to comprehensively capture subtle lesion details across spatial scales.
[0174] This embodiment also provides a computer device applicable to the skin lesion segmentation method based on dual-path perception multi-stage fusion, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the skin lesion segmentation method based on dual-path perception multi-stage fusion as proposed in the above embodiment.
[0175] The computer device can be a terminal, comprising a processor, memory, communication interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0176] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the skin lesion segmentation method based on dual-path perception and multi-stage fusion as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0177] In summary, this invention achieves the following: skin images are divided into blocks and input into an encoder; a regional sparse attention mechanism is used to filter key lesion areas; block merging operations are used to downsample the feature map and construct a multi-scale feature pyramid; a dual-path perception multi-stage fusion network is used to process skin image features, with the deepest features generated by the encoder being processed by the spatial-frequency dual-path cascaded perception module SFDCP, performing two-stage spatial-frequency collaborative optimization; a skip connection is established between the encoder and the corresponding decoder through the spatial channel dual-path parallel perception module SCDPP; the decoder is used in conjunction with the encoder features modulated by SCDPP, and spatial resolution is restored through block expansion operations to generate a pixel-level lesion probability map.
[0178] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A skin lesion segmentation method based on dual-path perception and multi-stage fusion, characterized in that: This includes dividing the skin image into blocks, inputting them into the encoder, and using a region sparse attention mechanism to filter key lesion areas; The feature map is downsampled using a block merging operation, and a multi-scale feature pyramid is constructed. Skin image features are processed using a dual-path sensing multi-stage fusion network. The deepest features generated by the encoder are processed by the spatial-frequency dual-path cascaded sensing module SFDCP, performing two-stage spatial-frequency collaborative optimization. A skip connection is established between the encoder and the corresponding decoder through the spatial channel dual-path parallel sensing module SCDPP. The encoder features modulated by the decoder are combined with the SCDPP to restore the spatial resolution through block expansion operation and generate a pixel-level lesion probability map.
2. The skin lesion segmentation method based on dual-path perception and multi-stage fusion as described in claim 1, characterized in that: The skin image segmentation process includes: inputting a skin image and dividing it into non-overlapping blocks; converting the blocks into feature tensors through linear embedding and inputting them into the first layer of the encoder; and using a region sparse attention mechanism at each encoding stage to filter key lesion areas, thereby achieving preliminary integration of local details and global semantics.
3. The skin lesion segmentation method based on dual-path perception and multi-stage fusion as described in claim 2, characterized in that: The dual-path perception multi-stage fusion network includes the precise segmentation of skin lesion areas by perceiving high-level contextual information through a dual-path framework. The specific network architecture includes an encoder-decoder backbone built with bidirectional sparse attention blocks (BiFormer Blocks) as basic units, a spatial frequency dual-path cascaded sensing module (SFDCP) in the bottleneck layer, and a spatial channel dual-path parallel sensing module (SCDPP) in the skip connection. During the training of the dual-path perception multi-stage fusion network for skin lesion segmentation, a hybrid loss function consisting of Tversky loss and Dice loss is used for optimization.
4. The skin lesion segmentation method based on dual-path perception and multi-stage fusion as described in claim 3, characterized in that: The processing by the spatial frequency dual-path cascaded sensing module SFDCP includes the following: the spatial frequency dual-path cascaded sensing module SFDCP integrates information processing paths from the spatial domain and frequency domain through progressive feature interaction, suppresses high-frequency noise and captures long-range dependencies. SFDCP constructs a dual-path cascade architecture by integrating two space-frequency cooperation modules (SFCM) into the basic BiFormer Block framework.
5. The skin lesion segmentation method based on dual-path perception and multi-stage fusion as described in claim 4, characterized in that: The two-stage space-frequency cooperation optimization includes, in the first stage, using the space-frequency cooperation module SFCM to extract local details of the spatial domain through a dual-path sensing mechanism; The spatial path of SFCM is processed using a spatial attention module consisting of two-layer 3×3 convolution, LeakyReLU, and batch normalization. The frequency path transforms the features using Fast Fourier Transform (FFT) for spectral analysis; the specific process includes: bandpass filtering the complex-valued spectral representation of the frequency path and spatial reconstruction using inverse FFT; Regarding cross-domain feature interaction, adaptive fusion weights are calculated through feature projection and similarity measurement processes; for each pixel location, the spatial feature F... s and frequency characteristics F f The shared embedding space is projected through a 1×1 convolution with batch normalization; channel-level similarity is calculated and distributed by batch normalization before Sigmoid activation; the adaptive gating parameter δ∈[0,1] generated during batch normalization dynamically balances the contributions of the two domains. BiFormer Block introduces a hierarchical processing mechanism, which processes the input feature map F fusion1 Divide the system into n×n non-overlapping regions; for each region, apply linear projection to obtain the value V, key K, and query Q; calculate the regional average of Q and K across regions to obtain the region query and region key; calculate the region query Q. r and transpose of the region key K r The similarity between them is used to construct the adjacency matrix A, which produces a matrix array; Perform coarse-grained filtering on the matrix array to select the top k matrices with the highest similarity; for the filtered regions, collect key and value tensors and process them using a fine-grained token-to-token attention method; The second stage of SFCM optimizes feature representation by decomposing the output features of BiFormerBlock; based on a pixel-level adaptive weighting strategy, it dynamically balances the contributions of spatial and frequency branches, enhances global perception of low-contrast lesion structures, and suppresses high-frequency artifacts.
6. The skin lesion segmentation method based on dual-path perception and multi-stage fusion as described in claim 5, characterized in that: The SCDPP integrates an entropy-driven channel attention mechanism and multi-granularity asymmetric convolution; the spatial channel dual-path parallel perception module SCDPP uses two independent but complementary information processing paths to achieve synchronous multi-dimensional feature enhancement. In the spatial path, the input feature map F input After a 5×5 convolution to enhance the local context; then the feature map F... input The process is performed through three parallel asymmetric convolution chains; the fine-grained path uses a combination of 1×5 and 5×1 asymmetric convolutions to focus on microstructures; the medium-grained path uses a combination of 1×9 and 9×1 asymmetric convolutions to capture medium-scale edges; and the coarse-grained path uses a combination of 1×11 and 11×1 asymmetric convolutions to perceive large-scale morphological features, up to the overall outline. After connecting the outputs of the three paths, a 1×1 convolution is used to fuse them to generate multi-scale spatial features F. S Within the channel path, information entropy is used to measure the richness of contextual information within the channel; global normalization is performed independently for each channel to eliminate interference from illumination differences; for each channel c, the normalized feature map... Spatial entropy is used to quantify the information richness of each normalized channel, reflecting the statistical distribution of pixel intensity; Transform into probability distribution P c (x,y); Calculate the spatial entropy of channel c, perform batch normalization, apply Sigmoid activation, and generate normalized channel weights; obtain the channel-optimized features F by reweighting. C ; Spatial features F S and channel features F C The final output feature map F is generated by fusing elements by element. output .
7. The skin lesion segmentation method based on dual-path perception and multi-stage fusion as described in claim 6, characterized in that: The optimization of the hybrid loss function includes using a hybrid loss function composed of Tversky loss and Dice loss; The Tversky loss balances the weights of false positives (FP) and false negatives (FN) by introducing two hyperparameters, α and β. By adjusting α and β, the model's sensitivity to different types of errors can be flexibly adjusted for different types of skin lesions. Dice loss directly measures the degree of overlap between the predicted result and the true label. In skin lesion segmentation, it highlights the lesion area, making the model pay more attention to the segmentation accuracy of the lesion part. The contribution weights of the loss function to the total loss are used to weight and fuse Tversky loss and Dice loss to form a hybrid loss function.
8. A skin lesion segmentation system based on dual-path perception multi-stage fusion, based on the skin lesion segmentation method based on dual-path perception multi-stage fusion as described in any one of claims 1 to 7, characterized in that: This includes a spatial frequency dual-path cascaded sensing module and a spatial channel dual-path parallel sensing module; The space-frequency dual-path cascaded sensing module includes a cascaded two-stage space-frequency cooperation unit for joint optimization of long-range dependency modeling and high-frequency noise suppression. The dual-path parallel perception module employs entropy-driven channel attention to prioritize key features and utilizes multi-granularity asymmetric convolution to comprehensively capture subtle lesion details across spatial scales.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the skin lesion segmentation method based on dual-path perception multi-stage fusion as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the skin lesion segmentation method based on dual-path perception multi-stage fusion as described in any one of claims 1 to 7.
Citation Information
Cited By
Tooth image segmentation method combined with SAM2 algorithm
CN121837302A