UCM-Net: A lightweight and efficient solution for skin lesion segmentation using MLP and CNN

Chunyu Yuan, Dongfang Zhao, Sos S. Agaian

TL;DR

UCM-Net is an ultra-lightweight neural network designed to bring high-accuracy skin lesion segmentation to resource-constrained devices like smartphones. By hybridizing Multi-Layer Perceptrons (MLPs) and Convolutional Neural Networks (CNNs), the model achieves state-of-the-art efficiency—boasting fewer than 50,000 parameters and a tiny 1.19MB memory footprint—while outperforming much larger models.

What Problem Does This Paper Address?

Skin cancer is a global health crisis, and early diagnosis is the single most important factor in patient survival. While computer-aided diagnosis (CAD) systems have become highly capable, the "segmentation" step—precisely outlining a lesion against healthy skin—remains difficult. Lesions vary wildly in shape, color, and texture, and images are often cluttered with artifacts like hair, bubbles, or poor lighting.

The current trend in AI is "bigger is better," but massive deep-learning models require expensive GPUs and significant power. This creates a barrier for mobile health (mHealth) applications and point-of-care diagnostics in remote or low-resource areas. The authors sought to bridge this gap by creating a model that is "heavy" on performance but "light" on hardware requirements.

Methods

The core innovation is the UCM-Net Block, which deviates from the standard UNet architecture by synergizing two different types of neural layers:

  • CNNs for Spatial Context: Traditional convolutions are used to capture the spatial relationships and local patterns within the image.
  • MLPs for Feature Learning: Multi-Layer Perceptrons are integrated to enhance the model's pattern recognition capabilities. The authors use a specific reshaping technique to pass data between these two structures efficiently.
  • The U-Shape Design: The model follows a 6-stage encoder-decoder structure. It uses 3x3 kernels in the initial layers to preserve spatial integrity and 1x1 kernels in later stages to mix channels while keeping the parameter count low.
  • Group Loss Function: Instead of only calculating error at the final output, UCM-Net uses a "Group Loss" strategy. It supervises the learning process at five internal stages using a combination of Binary Cross-Entropy and a novel Squared Dice Loss, which penalizes boundary errors more aggressively to ensure sharper segmentation.

Datasets

The researchers evaluated UCM-Net on three gold-standard public datasets:

  1. PH2: A dermoscopic image database containing 400 images with manual segmentations.
  2. ISIC 2017: A larger set of 2,150 dermoscopy images.
  3. ISIC 2018: A dataset featuring 2,694 images.

These datasets are widely used in the field, allowing for a direct "apples-to-apples" comparison with existing state-of-the-art models.

Key Insights and Ideas

  • Efficiency is a Choice, Not a Compromise: The paper proves that you don't need millions of parameters to achieve high accuracy. UCM-Net is 622 times smaller and 1,177 times faster than the original U-Net, yet it delivers superior segmentation results on skin lesions.
  • The Power of Hybridization: By combining MLPs and CNNs, the model gains the "best of both worlds." The CNN handles the "where" (spatial location), while the MLP handles the "what" (complex feature representation), allowing the network to stay shallow and efficient.
  • Internal Supervision Matters: By applying loss functions to the intermediate stages of the network, the authors ensure that every part of the model is contributing to the final result, preventing the "vanishing gradient" problem common in deep networks.

Key Results

UCM-Net sets a new benchmark for "TinyML" in medical imaging:

  • Ultra-Low Parameters: Only 49,932 parameters. For context, many popular models in this space have millions.
  • Minimal Computation: It requires less than 0.05 GFLOPs (Giga-Operations Per Second), making it exceptionally fast on standard CPUs.
  • Memory Efficiency: The model occupies just 1.19MB of memory, easily fitting onto mobile devices or embedded hardware.
  • Superior Accuracy: On the ISIC 2018 dataset, UCM-Net achieved a mean Intersection over Union (mIoU) of 81.26%, outperforming the previous lightweight leader, EGE-UNet (81.16%), despite being smaller and faster.

Limitations and Future Work

The authors acknowledge that while UCM-Net is the leader among lightweight, non-pretrained models, it still trails slightly behind massive models that use "pre-trained" weights (models already trained on millions of general images like ImageNet).

Future work will focus on:

  • Closing the Accuracy Gap: Further optimizing the architecture to match the performance of heavy, pre-trained models.
  • Expanding Scope: Testing the UCM-Net architecture on other medical imaging tasks, such as organ segmentation in CT or MRI scans.
  • Real-world Deployment: Moving toward clinical validation on mobile devices for real-time skin cancer screening.

Summary updated

BibTeX
@article{yuan2024ucm,
  author = {Chunyu Yuan and Dongfang Zhao and Sos S. Agaian},
  title = {{UCM-Net: A lightweight and efficient solution for skin lesion segmentation using MLP and CNN}},
  journal = {Biomedical Signal Processing and Control},
  year = {2024},
  doi = {10.1016/j.bspc.2024.106573},
}
Figure