ABSTRACT Accurate segmentation of skin lesions is crucial for dependable computer‐aided diagnosis of melanoma. However, many existing deep learning models still have difficulty dealing with vague lesion borders, uneven appearance, and unstable performance when applied to new datasets. This paper proposes a dual‐scale boundary‐aware network (U 2 ‐DBA) for dermoscopic image segmentation. The model includes a nested U‐in‐U encoder that captures both local and global features, a dual‐branch gating module that balances semantic and structural information, and a decoder that focuses on preserving boundary details. We further propose a novel Feature‐Boundary‐Skeleton (FBS) loss function, which integrates region overlap, edge gradient, and skeleton‐level shape constraints to enhance segmentation accuracy and structural consistency. To evaluate model efficiency, we introduce the Smooth Accuracy‐Compactness Score (SACS), combining Dice and IoU metrics with a logarithmic penalty on model size. Experiments conducted on the ISIC 2018 dataset demonstrate that U 2 ‐DBA achieves high performance (Dice = 0.884, IoU = 0.799) and outperforms six state‐of‐the‐art models in SACS. When directly evaluated on PH2 and HAM10000 without fine‐tuning, the model retains strong performance. These findings indicate that U 2 ‐DBA is not only accurate and compact but also generalizes effectively across diverse datasets, offering a practical and deployable solution for clinical dermoscopic lesion segmentation. The code is available at https://github.com/kid‐od/U2‐DBA .
Che et al. (Tue,) studied this question.