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:
- A weakly supervised classification framework used to generate pseudo-segmentation masks from image-level labels (ISIC 2024)
- A fully supervised segmentation model, inspired by the ESC-UNet architecture, trained on pixel-level annotations (ISIC 2018)
- 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
- 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
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.
-
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.
Main libraries used across notebooks:
- PyTorch
- torchvision
- albumentations
- OpenCV
- scikit-learn
- matplotlib
- pandas, numpy
- tqdm
CUDA support is recommended for training.
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/

