Skip to content

EGG-Unverified/dermoscopy-segmentation-isic

Repository files navigation

Dermoscopic Lesion Analysis with Weakly Supervised Classification and ESC-UNet-inspired Segmentation

This repository presents two complementary approaches to skin lesion analysis in dermoscopic images, each addressing a different supervision regime and dataset:

  1. A weakly supervised classification framework used to generate pseudo-segmentation masks from image-level labels (ISIC 2024)
  2. A fully supervised segmentation model, inspired by the ESC-UNet architecture, trained on pixel-level annotations (ISIC 2018)

Overview

1. Weakly Supervised Classification (ISIC 2024)

  • Image-level supervision only
  • CNN-based classifier
  • Class activation–style localization to generate pseudo-masks
  • Pseudo-masks used as auxiliary or exploratory segmentation labels

Notebook:

01_weakly_supervised_classification_isic2024.ipynb

2. Lesion Segmentation (ISIC 2018)

  • Fully supervised semantic segmentation
  • Encoder-decoder architecture
  • EfficientNet-B7 encoder
  • ASPP + Transformer bridge
  • Attention-gated skip connections
  • SE-based feature recalibration

Notebook:

02_escunet_segmentation_isic2018.ipynb

Segmentation model architecture

Simplified view

Simplified architecture

Detailed architecture

Detailed architecture

Key components

  • Encoder: EfficientNet-B7
  • Bridge: Atrous Spatial Pyramid Pooling (ASPP) + Transformer block
  • Decoder: Progressive upsampling with attention gates
  • Feature recalibration: Squeeze-and-Excitation (SE) blocks
  • Output: Binary lesion mask

The overall structure is inspired by ESC-UNet, with adaptations for dermoscopic lesion segmentation.

Datasets

  • ISIC 2018
    Used for supervised lesion segmentation with pixel-level masks

  • ISIC 2024
    Used for weakly supervised classification and pseudo-mask generation

Datasets must be downloaded separately from the official ISIC repository.

Dependencies

Main libraries used across notebooks:

  • PyTorch
  • torchvision
  • albumentations
  • OpenCV
  • scikit-learn
  • matplotlib
  • pandas, numpy
  • tqdm

CUDA support is recommended for training.

References

ESC-UNet:

Jimi, A., Zrira, N., Guendoul, O., Benmiloud, I., Khan, H. A., & Nawaz, S. (2025). ESC-UNET: A hybrid CNN and Swin Transformers for skin lesion segmentation. Intelligence-Based Medicine, 12, 100257. https://doi.org/10.1016/j.ibmed.2025.100257

ISIC Challenge datasets:

International Skin Imaging Collaboration. (2024). SLICE-3D 2024 Permissive Challenge Dataset. International Skin Imaging Collaboration. https://doi.org/10.34970/2024-slice-3d-permissive https://challenge2024.isic-archive.com/

Codella, N., Rotemberg, V., Tschandl, P., Celebi, M. E., Dusza, S., Gutman, D., Helba, B., Kalloo, A., Liopyris, K., Marchetti, M., Kittler, H., & Halpern, A. (2019). Skin Lesion Analysis Toward Melanoma Detection 2018: A Challenge Hosted by the International Skin Imaging Collaboration (ISIC). https://arxiv.org/abs/1902.03368 https://challenge.isic-archive.com/landing/2018/

Tschandl, P., Rosendahl, C., & Kittler, H. (2018). The HAM10000 dataset: A large collection of multi-source dermatoscopic images of common pigmented skin lesions. Scientific Data, 5, 180161. https://doi.org/10.1038/sdata.2018.161 https://challenge.isic-archive.com/landing/2018/

About

Dermoscopic lesion analysis using weak supervision and ESC-UNet-inspired segmentation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors