Performance is reported on a held-out test set (n=1 515) combining google_scin and fitzpatrick17k sources.
1import torch
2import json
3from torchvision.models import efficientnet_b0
4from huggingface_hub import hf_hub_download
5
6# Download artifacts
7ckpt_path = hf_hub_download("RevelaCap/clinical-skin-condition-v1", "best_model.pth")
8idx_path = hf_hub_download("RevelaCap/clinical-skin-condition-v1", "class_to_idx.json")
9
10with open(idx_path) as f:
11 class_to_idx = json.load(f)
12idx_to_class = {v: k for k, v in class_to_idx.items()}
13
14# Build model
15model = efficientnet_b0(weights=None)
16model.classifier[1] = torch.nn.Linear(model.classifier[1].in_features, 5)
17model.load_state_dict(torch.load(ckpt_path, map_location="cpu"))
18model.eval()
Revela — Educational Skin Condition Prototype
Repository:
github.com/romanpoluden/revela