Abstract
Accurate segmentation of skin lesions is a fundamental challenge in computer-aided diagnosis, often complicated by low contrast, high morphological variability, and artifacts such as hair. Traditional Convolutional Neural Networks (CNNs) primarily focus on local structural textures, frequently failing to distinguish lesions from healthy skin when boundaries are ambiguous. We propose SkinFormer, a novel transformer-based architecture that explicitly models global statistical texture—the distribution of pixel intensities—alongside local structural features. By incorporating a Kurtosis-guided Statistical Counting Operator (KSCO) and specialized fusion transformers, SkinFormer achieves state-of-the-art performance, notably a 93.2% Dice score on the ISIC 2018 dataset. Our results demonstrate that integrating global statistical context significantly improves segmentation accuracy and boundary definition in complex dermoscopic images.
Introduction
Accurate segmentation of skin lesions, such as melanoma, is a critical first step in computer-aided diagnosis. However, dermoscopic images present several significant challenges:
- Low Contrast: Lesions often blend into the surrounding skin, creating ambiguous boundaries.
- High Variability: Lesions vary significantly in size, shape, and color.
- Interference: Hair, blood vessels, and air bubbles can obscure the lesion and confuse standard algorithms.
Current methods based on Convolutional Neural Networks (CNNs) excel at capturing structural texture—local patterns like edges and shapes. However, they often ignore statistical texture, which refers to the global distribution of pixel intensities across the entire image. Incorporating these global statistical relationships is key to distinguishing a lesion from healthy skin when visual boundaries are unclear.
Methodology
SkinFormer adopts a hybrid U-Net-like backbone, enhanced by three novel components designed to capture and fuse multi-scale texture information:
- Kurtosis-guided Statistical Counting Operator (KSCO): The KSCO quantifies continuous features into discrete levels, effectively creating a learnable histogram. It utilizes kurtosis—a statistical measure of the "tailedness" of a distribution—as a weighting mechanism. High absolute kurtosis indicates a distribution that deviates significantly from a normal curve, signaling complex contextual information that requires increased model attention.
- Statistical Texture Fusion Transformer (STFT): The STFT module employs a gating mechanism to adaptively merge local structural features with global statistical features derived from the KSCO. It utilizes "comprehensive attention" to process height and width dimensions simultaneously, ensuring robust feature integration.
- Statistical Texture Enhance Transformer (STET): To address lesions at varying scales, the STET module enhances statistical texture across multi-scale feature maps. It incorporates a Texture-enhanced Feed-Forward Network (T-FFN) with dilated convolutions, increasing the receptive field without sacrificing fine-grained detail.
Experimental Evaluation
The model was rigorously evaluated on major public benchmarks, including ISIC 2016, 2017, 2018, PH2, and HAM10000. SkinFormer consistently outperformed existing state-of-the-art (SOTA) methods across all metrics:
- ISIC 2018: Achieved a 93.2% Dice score, surpassing advanced models such as Ms RED and BAT.
- ISIC 2016: Demonstrated a 7.6% improvement in the Dice metric compared to standard Fully Convolutional Networks (FCN).
Results and Discussion
Visual analysis confirms that SkinFormer produces smoother and more accurate boundaries than competing methods, even in cases with significant hair interference or low contrast. By leveraging the global processing capabilities of transformers to analyze intensity distributions, the model provides a context that spatial filters alone miss.
Conclusion
SkinFormer demonstrates that statistical texture is a powerful "hidden" feature for medical image segmentation. Future work will explore adapting this architecture for 3D medical imaging (e.g., CT or MRI) and further optimizing the attention modules for real-time clinical applications.
Summary updated