ISIC 2018 EfficientNet-B0 Skin Lesion Classifier (7-Class)

ISIC 2018 Task 3/HAM10000 ํ”ผ๋ถ€ ๋ณ‘๋ณ€ ์ด๋ฏธ์ง€๋ฅผ 7๊ฐœ ํด๋ž˜์Šค๋กœ ๋ถ„๋ฅ˜ํ•˜๋Š” EfficientNet-B0 ๊ธฐ๋ฐ˜ PyTorch ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค. ๋ฉ”ํƒ€๋ฐ์ดํ„ฐ๋Š” ์‚ฌ์šฉํ•˜์ง€ ์•Š์œผ๋ฉฐ RGB ํ”ผ๋ถ€๊ฒฝ ์ด๋ฏธ์ง€ ํ•œ ์žฅ๋งŒ ์ž…๋ ฅ์œผ๋กœ ๋ฐ›์Šต๋‹ˆ๋‹ค.

๊ต์œกยท์—ฐ๊ตฌ์šฉ ๋ชจ๋ธ์ž…๋‹ˆ๋‹ค. ์˜๋ฃŒ ์ง„๋‹จ, ์น˜๋ฃŒ ๊ฒฐ์ • ๋˜๋Š” ํ™˜์ž ์„ ๋ณ„์— ์‚ฌ์šฉํ•˜์ง€ ๋งˆ์„ธ์š”.

Model details

ํ•ญ๋ชฉ ๊ฐ’
Backbone EfficientNet-B0, ImageNet pretrained
Input RGB, 320 x 320
Output 7 classes
Fine-tuning Last 4 feature blocks and classifier
Trainable parameters 3,707,855
Optimizer AdamW
Learning rate 0.0002 for backbone and classifier
Epochs 20; best checkpoint at epoch 17
Main metric Macro-F1

Class order:

0 MEL   Melanoma
1 NV    Melanocytic nevus
2 BCC   Basal cell carcinoma
3 AKIEC Actinic keratosis / intraepithelial carcinoma
4 BKL   Benign keratosis-like lesion
5 DF    Dermatofibroma
6 VASC  Vascular lesion

Evaluation

ISIC 2018 training images were split by lesion_id so photographs of the same lesion could not appear in both train and development sets. The internal development set contains 2,026 images. This is not an external clinical validation set.

Metric Score
Macro-F1 0.7641
Balanced accuracy 0.7958
Accuracy 0.8638
Macro AUROC 0.9343

Brightness robustness

The same development images were evaluated after deterministic brightness changes. A factor of 1.0 is the original image.

Brightness factor 0.50 0.70 0.85 1.00 1.15 1.30 1.50
Macro-F1 0.5113 0.6678 0.7476 0.7641 0.7182 0.6937 0.5617

The full measurements are provided in brightness_metrics.csv.

Files

  • model.safetensors: recommended tensor-only model weights.
  • isic2018_7class_efficientnet_b0_320.pt: original self-contained PyTorch checkpoint.
  • config.json: architecture, preprocessing, and class mapping.
  • inference_example.py: standalone single-image inference example.
  • brightness_metrics.csv: robustness results for seven brightness levels.

Usage

pip install -r requirements.txt
python inference_example.py path/to/dermoscopic_image.jpg

The example downloads model.safetensors from this repository automatically. It prints the predicted class and probabilities for all seven classes.

Training data and license

The model was trained on the ISIC 2018 Task 3/HAM10000 training data. The dataset is distributed under CC BY-NC terms. Use of these weights is therefore limited to non-commercial research and education, with attribution to the data creators.

Limitations

  • The model recognizes only the seven ISIC 2018 classes and cannot identify other diseases or normal skin.
  • Performance was measured on an internal lesion-disjoint split, not at an independent hospital or in prospective clinical use.
  • The dataset is imbalanced, with melanocytic nevi forming the majority class.
  • Predictions are sensitive to large brightness changes, as shown above.
  • Results may not generalize across cameras, clinics, skin tones, body sites, or non-dermoscopic photographs.
  • A high-confidence prediction is not a diagnosis.

Source code

Downloads last month
15
Safetensors
Model size
4.06M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for adeIaide/skin-lesion-7class-efficientnet