Clinical Skin Condition Classifier β v1
Model ID: clinical_skin_condition_v1
Architecture: EfficientNet-B0 (PyTorch / torchvision)
Input type: Clinical / macroscopic skin photographs
Task: 5-class educational skin condition classification
β οΈ Important Disclaimers
- This is an educational prototype only.
- It is not a diagnostic device and has not been validated for clinical use.
- It does not provide treatment advice.
- Model confidence scores are not clinical certainty.
- Performance varies across image quality, skin tone, lighting, and dataset source.
- Clinical (macroscopic) images and dermoscopic images are different input modalities and must not be mixed. This model is trained on clinical photos only.
- Do not use this model for patient triage, diagnosis, or treatment decisions.
Taxonomy β 5-Class Educational Labels
| Class index | Label |
|---|---|
| 0 | Eczema / dermatitis |
| 1 | Urticaria / allergic reaction |
| 2 | Folliculitis / acne-like |
| 3 | Psoriasis / papulosquamous |
| 4 | Lesion β dermoscopic review recommended |
Class 4 is a lesion-routing class β it signals that a dermoscopic review may be appropriate, not that a malignancy is present.
Input Requirements
- Image type: Clinical / macroscopic skin photos (smartphone or camera photos of skin)
- Input size: 224 Γ 224 px (resized internally)
- Normalisation: ImageNet mean/std (
[0.485, 0.456, 0.406]/[0.229, 0.224, 0.225]) - Format: RGB, any standard image format (JPEG, PNG)
- Do not use dermoscopic (dermatoscope-captured) images with this model
Training
- Base weights: ImageNet-pretrained EfficientNet-B0 (torchvision)
- Training datasets: Clinical V2 β a curated mix of public clinical skin image datasets
- Optimiser: AdamW, lr=1e-4, weight_decay=0.01
- Epochs: 5 (best checkpoint by validation macro-F1)
- Class balancing: Weighted cross-entropy loss
- Split: Fixed train / val / test β test set never seen during training
Performance (test set)
| Metric | Value |
|---|---|
| Macro-F1 | 0.6527 |
| Balanced accuracy | 0.6700 |
| Lesion-routing false negatives | 70 |
Performance is reported on a held-out test set (n=1 515) combining google_scin and fitzpatrick17k sources.
Artifacts in This Repository
| File | Description |
|---|---|
best_model.pth |
PyTorch state dict (EfficientNet-B0, 5-class head) |
class_to_idx.json |
Label β class index mapping |
training_history.csv |
Per-epoch train/val loss and macro-F1 |
Loading the Model
import torch
import json
from torchvision.models import efficientnet_b0
from huggingface_hub import hf_hub_download
# Download artifacts
ckpt_path = hf_hub_download("RevelaCap/clinical-skin-condition-v1", "best_model.pth")
idx_path = hf_hub_download("RevelaCap/clinical-skin-condition-v1", "class_to_idx.json")
with open(idx_path) as f:
class_to_idx = json.load(f)
idx_to_class = {v: k for k, v in class_to_idx.items()}
# Build model
model = efficientnet_b0(weights=None)
model.classifier[1] = torch.nn.Linear(model.classifier[1].in_features, 5)
model.load_state_dict(torch.load(ckpt_path, map_location="cpu"))
model.eval()
Known Limitations
- Trained on public research datasets; real-world distribution shift may degrade performance.
- SCIN subset (smartphone clinical photos) shows lower macro-F1 (0.43) than the fitzpatrick17k subset.
- Skin tone representation in training data is uneven β performance may vary across Fitzpatrick skin types.
- Model has not been evaluated on paediatric populations.
- Not suitable for telemedicine, clinical decision support, or any patient-facing application without independent validation.
Citation / Project
Revela β Educational Skin Condition Prototype
Repository: github.com/romanpoluden/revela