Abstract
Skin cancer segmentation poses a significant challenge in medical image analysis. Numerous existing solutions, predominantly CNN-based, face issues related to a lack of global contextual understanding. Alternatively, some approaches resort to large-scale Transformer models to bridge the global contextual gaps, but at the expense of model size and computational complexity. Finally, many Transformer-based approaches rely primarily on CNN-based decoders, overlooking the benefits of Transformer-based decoding models. Recognizing these limitations, we address the need for efficient lightweight solutions by introducing MobileUNETR, which aims to overcome the performance constraints associated with both CNNs and Transformers while minimizing model size. MobileUNETR features a lightweight hybrid CNN-Transformer encoder, a novel hybrid decoder that utilizes features at different resolutions, and achieves superior performance with only 3 million parameters and 1.3 GFLOPs—a 10x and 23x reduction in parameters and FLOPS, respectively. Extensive experiments on ISIC 2016, 2017, 2018, and PH2 datasets validate the effectiveness of our proposed method.
Introduction
Accurate skin cancer segmentation is a critical first step in Computer-Aided Diagnostic (CAD) systems. However, medical images are notoriously difficult to process due to artifacts like body hair, varying lighting conditions, and the diverse shapes of lesions. Current deep learning solutions generally fall into two camps, both with significant trade-offs:
- CNNs (Convolutional Neural Networks): Excellent at capturing local textures and fine details but often lack a global understanding of the image.
- Transformers: Great at modeling long-range dependencies and global context, but they are computationally heavy and often struggle with the fine-grained spatial details needed for precise mask boundaries.
Furthermore, many "hybrid" models focus only on improving the encoder, leaving the decoder to rely on standard CNN layers. This creates a bottleneck where the model cannot effectively use global information to refine the final segmentation mask.
Methods
MobileUNETR is an end-to-end hybrid framework designed for efficiency. Its architecture is built on three pillars:
- Lightweight Hybrid Encoder: Instead of starting with heavy Transformer layers, the model uses a CNN-based "Stem" (inspired by MobileNet) for initial downsampling. It then employs MobileViT blocks, which combine depth-wise separable convolutions (for local features) with self-attention (for global features) on flattened patches.
- Novel Hybrid Decoder: This is the paper's standout contribution. MobileUNETR’s decoder utilizes hybrid layers at every resolution. It takes upsampled features, refines them using local skip connections from the encoder, and then applies Transformer-based reasoning to ensure the predicted mask is globally consistent.
- Efficiency-First Design: By carefully balancing the number of layers and using parameter-efficient operations, the model maintains a tiny footprint (3M parameters) compared to the 30M–90M parameters seen in competing models.
Datasets and Evaluation
The model was validated on four gold-standard skin lesion segmentation benchmarks:
- ISIC 2016, 2017, and 2018: Large-scale datasets from the International Skin Imaging Collaboration.
- PH2: A smaller, high-quality dataset from the Hospital Pedro Hispano, used to test the model's ability to generalize even with limited data.
Key Results
MobileUNETR consistently outperformed state-of-the-art (SOTA) models across all metrics, including IoU, Dice, and Accuracy.
- Efficiency: It achieved a 10x reduction in parameters and a 23x reduction in FLOPs (1.3 GFLOPs vs. 30+ GFLOPs in other models). As shown in the distribution charts, MobileUNETR (labeled "Ours") occupies a significantly smaller footprint than traditional architectures like ResUNet or TransFuse.
- Accuracy: On the ISIC 2017 dataset, it achieved a Dice score of 86.84%, surpassing much larger models like FAT-Net and DAGAN.
- Robustness: Qualitative results showed that MobileUNETR is significantly better at ignoring "noise" like hair and skin folds, producing cleaner and more anatomically accurate lesion boundaries.
Conclusion
The results suggest that for medical tasks, massive "foundation models" might be overkill. A well-designed 3M parameter model can outperform a 140M parameter model by being more focused and less prone to overfitting on specific medical datasets. While currently tested on 2D dermoscopic images, future work could involve applying this lightweight hybrid approach to 3D medical data (like MRI or CT scans) and exploring even more efficient attention mechanisms for deployment on mobile medical devices.
Summary updated