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.
- ISIC 2018 Challenge data: https://challenge.isic-archive.com/data/
- Tschandl, P., Rosendahl, C. & Kittler, H. The HAM10000 dataset. Scientific Data 5, 180161 (2018). https://doi.org/10.1038/sdata.2018.161
- Codella et al. Skin Lesion Analysis Toward Melanoma Detection 2018. https://arxiv.org/abs/1902.03368
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