Skip to main content
QUICK REVIEW

[Paper Review] Transfer learning with class-weighted and focal loss function for automatic skin cancer classification

Duyen N. T. Le, Hieu X. Le|arXiv (Cornell University)|Sep 13, 2020
Cutaneous Melanoma Detection and ManagementMedicine27 references50 citations
TL;DR

The paper presents an ensemble of modified ResNet50 models trained with transfer learning, class-weighted loss and focal loss to classify HAM10000 skin lesion images into seven categories, achieving 93% top accuracy with cross-validation and 90% on a test set.

ABSTRACT

Skin cancer is by far in top-3 of the world's most common cancer. Among different skin cancer types, melanoma is particularly dangerous because of its ability to metastasize. Early detection is the key to success in skin cancer treatment. However, skin cancer diagnosis is still a challenge, even for experienced dermatologists, due to strong resemblances between benign and malignant lesions. To aid dermatologists in skin cancer diagnosis, we developed a deep learning system that can effectively and automatically classify skin lesions into one of the seven classes: (1) Actinic Keratoses, (2) Basal Cell Carcinoma, (3) Benign Keratosis, (4) Dermatofibroma, (5) Melanocytic nevi, (6) Melanoma, (7) Vascular Skin Lesion. The HAM10000 dataset was used to train the system. An end-to-end deep learning process, transfer learning technique, utilizing multiple pre-trained models, combining with class-weighted and focal loss were applied for the classification process. The result was that our ensemble of modified ResNet50 models can classify skin lesions into one of the seven classes with top-1, top-2 and top-3 accuracy 93%, 97% and 99%, respectively. This deep learning system can potentially be integrated into computer-aided diagnosis systems that support dermatologists in skin cancer diagnosis.

Motivation & Objective

  • Motivate automatic, accurate seven-class skin lesion classification to aid dermatologists.
  • Leverage transfer learning with pre-trained CNNs to handle imbalanced skin lesion data.
  • Employ class weighting and focal loss to improve performance on minority classes.
  • Develop an end-to-end pipeline with minimal feature engineering for robust diagnosis.

Proposed method

  • Use ResNet50 architectures pre-trained on ImageNet with slight modifications (global average pooling, dropout, two dense layers).
  • Apply class-weighted loss based on class ratios to address imbalance.
  • Incorporate focal loss to focus training on hard examples and reduce the impact of easy negatives.
  • Augment training data (rotation, flipping, cutout, cropping) and use stratified sampling and 5-fold cross-validation.
  • Ensemble multiple models and apply test-time augmentation (TTA) for final predictions.

Experimental results

Research questions

  • RQ1Can transfer learning with ResNet50, using class-weighted and focal loss, achieve high multi-class skin lesion classification on HAM10000?
  • RQ2What is the impact of each technique (dropout, augmentation, CW loss, focal loss, GAP) on classification performance?
  • RQ3Which base architecture among ResNet50, VGG16, MobileNet, and EfficientNetB1 yields the best balance of accuracy and deployment feasibility?
  • RQ4Does an ensemble with TTA improve generalization across folds and datasets?
  • RQ5How does the proposed method compare to existing HAM10000 studies in accuracy and class-wise performance?

Key findings

  • An ensemble of modified ResNet50 models with all techniques achieves 93% accuracy across 5-fold cross-validation and 90% accuracy on the test set.
  • The full method (dropout, augmentation, class-weighted loss, focal loss, and global average pooling) outperforms ablations across accuracy, precision, recall, and F1-score.
  • Per-class precision, recall, and F1-score show strong performance on several classes, with average metrics indicating competitive results against prior work.
  • ResNet50 outperformed VGG16, MobileNet, and EfficientNetB1 in their stage-1 experiments, though EfficientNetB1 offers a trade-off for mobile deployment.
  • GradCAM visualizations indicate the model focuses on lesion regions, with some misfocus on artifacts, prompting a segmentation-based analysis that did not improve performance.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.