Accurate segmentation of dermoscopic lesions is essential for computer-aided melanoma assessment, but reliable delineation remains challenging because lesions often exhibit irregular shapes, low contrast, and ambiguous boundaries. This study aimed to improve both lesion-region segmentation and contour localization by better coordinating complementary local and global image representations. We developed BGDNet, a boundary-guided dual-backbone encoder–decoder network that combines TransXNet and Swin Transformer. The model integrates local structural information with long-range contextual information and uses boundary priors to guide feature interaction. Its performance was evaluated on the ISIC-2016, ISIC-2018, and PH2 datasets and compared with representative convolutional, Transformer-based, and hybrid segmentation methods using both region-based and boundary-sensitive metrics. On ISIC-2018, BGDNet achieved an intersection over union (IoU) of 0.8813 ± 0.0014, a Dice similarity coefficient (DSC) of 0.9330 ± 0.0009, a 95th percentile Hausdorff distance (HD95) of 5.84 ± 0.11 pixels, an average surface distance (ASD) of 1.34 ± 0.03 pixels, and a boundary F-score at a 2-pixel tolerance (BF@2) of 0.868 ± 0.003. A recall (sensitivity) of 0.9602 ± 0.0021 and a specificity of 0.9847 ± 0.0007 further characterize foreground–background behavior under class imbalance. Additional in-dataset and cross-dataset experiments, together with component-wise ablation and stage-wise boundary-prior visualization, provide complementary evidence for the model design. These findings show that boundary-guided interaction between complementary encoders can improve both lesion overlap and contour accuracy, particularly for lesions with irregular or weakly defined margins. BGDNet therefore provides a promising framework for accurate dermoscopic lesion segmentation.
Citation: Jiayu Zhang, Haiyang Liu, Ying Ye, Xiaoming Huang. BGDNet: boundary-guided dual-backbone encoder–decoder network for dermoscopic lesion segmentation[J]. AIMS Bioengineering, 2026, 13(3): 394-417. doi: 10.3934/bioeng.2026019
Accurate segmentation of dermoscopic lesions is essential for computer-aided melanoma assessment, but reliable delineation remains challenging because lesions often exhibit irregular shapes, low contrast, and ambiguous boundaries. This study aimed to improve both lesion-region segmentation and contour localization by better coordinating complementary local and global image representations. We developed BGDNet, a boundary-guided dual-backbone encoder–decoder network that combines TransXNet and Swin Transformer. The model integrates local structural information with long-range contextual information and uses boundary priors to guide feature interaction. Its performance was evaluated on the ISIC-2016, ISIC-2018, and PH2 datasets and compared with representative convolutional, Transformer-based, and hybrid segmentation methods using both region-based and boundary-sensitive metrics. On ISIC-2018, BGDNet achieved an intersection over union (IoU) of 0.8813 ± 0.0014, a Dice similarity coefficient (DSC) of 0.9330 ± 0.0009, a 95th percentile Hausdorff distance (HD95) of 5.84 ± 0.11 pixels, an average surface distance (ASD) of 1.34 ± 0.03 pixels, and a boundary F-score at a 2-pixel tolerance (BF@2) of 0.868 ± 0.003. A recall (sensitivity) of 0.9602 ± 0.0021 and a specificity of 0.9847 ± 0.0007 further characterize foreground–background behavior under class imbalance. Additional in-dataset and cross-dataset experiments, together with component-wise ablation and stage-wise boundary-prior visualization, provide complementary evidence for the model design. These findings show that boundary-guided interaction between complementary encoders can improve both lesion overlap and contour accuracy, particularly for lesions with irregular or weakly defined margins. BGDNet therefore provides a promising framework for accurate dermoscopic lesion segmentation.
| [1] | Sung H, Ferlay J, Siegel RL, et al. (2021) Global cancer statistics 2020: GLOBOCAN estimates of incidence and mortality worldwide for 36 cancers in 185 countries. CA Cancer J Clin 71: 209-249. https://doi.org/10.3322/caac.21660 |
| [2] |
Garbe C, Leiter U (2009) Melanoma epidemiology and trends. Clin Dermatol 27: 3-9. https://doi.org/10.1016/j.clindermatol.2008.09.001
|
| [3] |
Gershenwald JE, Scolyer RA (2018) Melanoma staging: American Joint Committee on Cancer (AJCC) 8th edition and beyond. Ann Surg Oncol 25: 2105-2110. https://doi.org/10.1245/s10434-018-6513-7
|
| [4] |
Kittler H, Pehamberger H, Wolff K, et al. (2002) Diagnostic accuracy of dermoscopy. Lancet Oncol 3: 159-165. https://doi.org/10.1016/S1470-2045(02)00679-4
|
| [5] |
Mihulecea CRJ, Iancu GM, Leventer M, et al. (2023) The many roles of dermoscopy in melanoma detection. Life 13: 477. https://doi.org/10.3390/life13020477
|
| [6] |
Codella NCF, Gutman D, Celebi ME, et al. (2018) Skin lesion analysis toward melanoma detection: a challenge at the 2017 International Symposium on Biomedical Imaging, hosted by the International Skin Imaging Collaboration. 2018 IEEE 15th International Symposium on Biomedical Imaging . USA: 168-172. https://doi.org/10.1109/ISBI.2018.8363547
|
| [7] | Ronneberger O, Fischer P, Brox T (2015) U-Net: convolutional networks for biomedical image segmentation. Medical Image Computing and Computer-Assisted Intervention—MICCAI 2015 . Cham: Springer 234-241. https://doi.org/10.1007/978-3-319-24574-4_28 |
| [8] | Oktay O, Schlemper J, Le Folgoc L, et al. (2018) Attention U-Net: learning where to look for the pancreas. arXiv : 1804.03999. Available from: https://arxiv.org/abs/1804.03999 |
| [9] | Yu F, Koltun V (2016) Multi-scale context aggregation by dilated convolutions. arXiv : 1511.07122. Available from: https://arxiv.org/abs/1511.07122 |
| [10] | Lin TY, Dollár P, Girshick R, et al. (2017) Feature pyramid networks for object detection. 2017 IEEE Conference on Computer Vision and Pattern Recognition . USA: 936-944. https://doi.org/10.1109/CVPR.2017.106 |
| [11] | Dosovitskiy A, Beyer L, Kolesnikov A, et al. (2021) An image is worth 16 × 16 words: transformers for image recognition at scale. arXiv : 2010.11929. Available from: https://arxiv.org/abs/2010.11929. |
| [12] | Vaswani A, Shazeer N, Parmar N, et al. (2017) Attention is all you need. Advances in Neural Information Processing Systems 30 : 5998-6008. Available from: https://proceedings.neurips.cc/paper/7181-attention-is-all-you-need |
| [13] | Liu Z, Lin Y, Cao Y, et al. (2021) Swin transformer: hierarchical vision transformer using shifted windows. 2021 IEEE/CVF International Conference on Computer Vision . Canada: 9992-10002. https://doi.org/10.1109/ICCV48922.2021.00986 |
| [14] |
Chen J, Mei J, Li X, et al. (2024) TransUNet: rethinking the U-Net architecture design for medical image segmentation through the lens of transformers. Med Image Anal 97: 103280. https://doi.org/10.1016/j.media.2024.103280
|
| [15] |
Hatamizadeh A, Tang Y, Nath V, et al. (2022) UNETR: transformers for 3D medical image segmentation. 2022 IEEE/CVF Winter Conference on Applications of Computer Vision . USA: 1748-1758. https://doi.org/10.1109/WACV51458.2022.00181
|
| [16] |
Kervadec H, Bouchtiba J, Desrosiers C, et al. (2021) Boundary loss for highly unbalanced segmentation. Med Image Anal 67: 101851. https://doi.org/10.1016/j.media.2020.101851
|
| [17] |
Lou M, Zhang S, Zhou HY, et al. (2025) TransXNet: learning both global and local dynamics with a dual dynamic token mixer for visual recognition. IEEE Trans Neural Netw Learn Syst 36: 11534-11547. https://doi.org/10.1109/TNNLS.2025.3550979
|
| [18] |
Milletari F, Navab N, Ahmadi SA (2016) V-Net: fully convolutional neural networks for volumetric medical image segmentation. 2016 Fourth International Conference on 3D Vision . USA: 565-571. https://doi.org/10.1109/3DV.2016.79
|
| [19] | Zhou Z, Siddiquee MMR, Tajbakhsh N, et al. (2018) UNet++: a nested U-Net architecture for medical image segmentation. Deep Learning in Medical Image Analysis and Multimodal Learning for Clinical Decision Support . Cham: Springer 3-11. https://doi.org/10.1007/978-3-030-00889-5_1 |
| [20] |
Jha D, Smedsrud PH, Riegler MA, et al. (2019) ResUNet++: an advanced architecture for medical image segmentation. 2019 IEEE International Symposium on Multimedia . USA: 225-230. https://doi.org/10.1109/ISM46123.2019.00049
|
| [21] | Fan DP, Ji GP, Zhou T, et al. (2020) PraNet: parallel reverse attention network for polyp segmentation. Medical Image Computing and Computer-Assisted Intervention—MICCAI 2020 . Cham: Springer 263-273. https://doi.org/10.1007/978-3-030-59725-2_26 |
| [22] | Cao H, Wang Y, Chen J, et al. (2023) Swin-Unet: unet-like pure transformer for medical image segmentation. Computer Vision—ECCV 2022 Workshops . Cham: Springer 205-218. https://doi.org/10.1007/978-3-031-25066-8_9 |
| [23] | Valanarasu JMJ, Oza P, Hacihaliloglu I, et al. (2021) Medical transformer: gated axial-attention for medical image segmentation. Medical Image Computing and Computer-Assisted Intervention—MICCAI 2021 . Cham: Springer 36-46. https://doi.org/10.1007/978-3-030-87193-2_4 |
| [24] | Wang H, Cao P, Wang J, et al. (2022) UCTransNet: rethinking the skip connections in U-Net from a channel-wise perspective with transformer. Proc AAAI Conf Artif Intell 36: 2441-2449. https://doi.org/10.1609/aaai.v36i3.20144 |
| [25] | Lin A, Chen B, Xu J, et al. (2022) DS-TransUNet: dual swin transformer U-Net for medical image segmentation. IEEE Trans Instrum Meas 71: 4005615. https://doi.org/10.1109/TIM.2022.3178991 |
| [26] | Zhang Y, Liu H, Hu Q (2021) TransFuse: fusing Transformers and CNNs for medical image segmentation. Medical Image Computing and Computer-Assisted Intervention—MICCAI 2021 . Cham: Springer 14-24. https://doi.org/10.1007/978-3-030-87193-2_2 |
| [27] |
Li G, Huang Q, Wang W, et al. (2025) Skin lesion segmentation by fusing local and global features using axial shift and spatial state model. Appl Soft Comput 178: 113261. https://doi.org/10.1016/j.asoc.2025.113261
|
| [28] |
Li G, Huang Q, Dong XF (2026) Enhancing long-range contextual interactions via frequency-aware directional shifts for medical image segmentation. Appl Soft Comput 199: 115395. https://doi.org/10.1016/j.asoc.2026.115395
|
| [29] |
Fang H, Sun Y, Zhang S, et al. (2026) HSPF-Net: hybrid CNN-transformer with serial-parallel fusion for skin lesion segmentation. Digit Signal Process 172: 105891. https://doi.org/10.1016/j.dsp.2026.105891
|
| [30] |
Zhang S, Fang H, Teng X, et al. (2026) PMGAF-Net: progressive multi-granularity attention fusion network for accurate polyp segmentation. Biomed Signal Process Control 127: 111179. https://doi.org/10.1016/j.bspc.2026.111179
|
| [31] | Oda H, Roth HR, Chiba K, et al. (2018) BESNet: boundary-enhanced segmentation of cells in histopathological images. Medical Image Computing and Computer-Assisted Intervention—MICCAI 2018 . Cham: Springer 228-236. https://doi.org/10.1007/978-3-030-00934-2_26 |
| [32] |
Karimi D, Salcudean SE (2020) Reducing the Hausdorff distance in medical image segmentation with convolutional neural networks. IEEE Trans Med Imaging 39: 499-513. https://doi.org/10.1109/TMI.2019.2930068
|
| [33] |
Kuang H, Wang Y, Liang Y, et al. (2023) BEA-Net: body and edge aware network with multi-scale short-term concatenation for medical image segmentation. IEEE J Biomed Health Inform 27: 4828-4839. https://doi.org/10.1109/JBHI.2023.3304662
|
| [34] |
Fang H, Zhang S, Teng X, et al. (2025) SAFNet: a self-attention based cross layer fusion network with frequency enhancement for accurate skin lesion segmentation. Expert Syst Appl 305: 130823. https://doi.org/10.1016/j.eswa.2025.130823
|
| [35] | Sobel I, Feldman G (1968) A 3 × 3 isotropic gradient operator for image processing. Presented at the Stanford Artificial Intelligence Project, Stanford University, Stanford, CA, USA . |
| [36] |
Li X, Li L, Xing X, et al. (2025) MSDUNet: a model based on feature multi-scale and dual-input dynamic enhancement for skin lesion segmentation. IEEE Trans Med Imaging 44: 2819-2830. https://doi.org/10.1109/TMI.2025.3549011
|
| [37] | Dai J, Qi H, Xiong Y, et al. (2017) Deformable convolutional networks. 2017 IEEE International Conference on Computer Vision . Italy: 764-773. https://doi.org/10.1109/ICCV.2017.89 |
| [38] |
Woo S, Park J, Lee JY, et al. (2018) CBAM: convolutional block attention module. Computer Vision—ECCV 2018 . Cham: Springer 3-19. https://doi.org/10.1007/978-3-030-01234-2_1
|
| [39] | Paszke A, Gross S, Massa F, et al. (2019) PyTorch: an imperative style, high-performance deep learning library. Advances in Neural Information Processing Systems 32 : 8024-8035. Available from: https://proceedings.neurips.cc/paper/9015-pytorch-an-imperative-style-high-performance-deep-learning-library |
| [40] | Loshchilov I, Hutter F (2019) Decoupled weight decay regularization. arXiv : 1711.05101. https://doi.org/10.48550/arXiv.1711.05101 |
| [41] | Gutman D, Codella NCF, Celebi ME, et al. (2016) Skin lesion analysis toward melanoma detection: a challenge at ISBI 2016, hosted by the International Skin Imaging Collaboration. arXiv : 1605.01397. https://doi.org/10.48550/arXiv.1605.01397 |
| [42] | Codella NCF, Rotemberg V, Tschandl P, et al. (2019) Skin lesion analysis toward melanoma detection 2018: a challenge hosted by the International Skin Imaging Collaboration. arXiv : 1902.03368. https://doi.org/10.48550/arXiv.1902.03368 |
| [43] | Mendonça T, Ferreira PM, Marques JS, et al. (2013) PH2—A dermoscopic image database for research and benchmarking. 2013 35th Annual International Conference of the IEEE Engineering in Medicine and Biology Society . Japan: 5437-5440. https://doi.org/10.1109/EMBC.2013.6610779 |
| [44] |
Isensee F, Jaeger PF, Kohl SAA, et al. (2021) nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation. Nat Methods 18: 203-211. https://doi.org/10.1038/s41592-020-01008-z
|
| [45] |
Lin X, Yu L, Cheng KT, et al. (2023) BATFormer: towards boundary-aware lightweight Transformer for efficient medical image segmentation. IEEE J Biomed Health Inform 27: 3501-3512. https://doi.org/10.1109/JBHI.2023.3266977
|
| [46] | Rahman MM, Marculescu R (2024) G-CASCADE: efficient cascaded graph convolutional decoding for 2D medical image segmentation. 2024 IEEE/CVF Winter Conference on Applications of Computer Vision . USA: 7713-7722. https://doi.org/10.1109/WACV57701.2024.00755 |
| [47] | Azad R, Niggemeier L, Hüttemann M, et al. (2024) Beyond self-attention: deformable large kernel attention for medical image segmentation. 2024 IEEE/CVF Winter Conference on Applications of Computer Vision . USA: 1276-1286. https://doi.org/10.1109/WACV57701.2024.00132 |