🩺 DermaVision-EfficientNetV2-S (PyTorch + Dual-Output ONNX with Spatial CAM Maps)

DermaVision-EfficientNetV2-S is a clinical-grade dermoscopy skin lesion classification model fine-tuned on the 10,015-image HAM10000 dataset across 7 diagnostic risk categories.

It is packaged in two formats in this repository:

  1. model.pth (243 MB): Full PyTorch checkpoint (torchvision.models.efficientnet_v2_s backbone with p=0.6 Dropout classification head).
  2. model.onnx (80.6 MB, Opset 14): Dual-output compiled ONNX graph (DualOutputCamWrapper) that outputs both:
    • output ([B, 7]): 7-class raw classification logits
    • cam_maps ([B, 7, 7, 7]): Spatial Class Activation Maps computed via einsum("bchw,kc->bkhw", feat, weight) from the final convolutional block (1280 channels), enabling zero-server Grad-CAM heatmap rendering directly inside WebAssembly (onnxruntime-web)!

🌐 Live Interactive Demos & Cloud Ecosystem


🎯 Target Classes & Risk Stratification

Class Index HAM10000 Code Lesion Diagnosis Clinical Risk Tier Clinical Decision Rule
0 mel Melanoma πŸ”΄ High Risk Proactive Override if P(Melanoma) > 0.20
1 nv Melanocytic Nevus 🟒 Low Risk Standard Argmax
2 bcc Basal Cell Carcinoma πŸ”΄ High Risk Standard Argmax
3 akiec Actinic Keratosis 🟑 Moderate Risk Standard Argmax
4 bkl Seborrheic Keratosis 🟒 Low Risk Standard Argmax (3x training false-positive penalty)
5 df Dermatofibroma 🟒 Low Risk Standard Argmax
6 vasc Vascular Lesion 🟒 Low Risk Standard Argmax

πŸ“Š Training Lineage & Validation Metrics (Amazon SageMaker Model Registry)

Iteration SageMaker Package Loss & Sampling Strategy Val AUC-ROC Macro Sensitivity Melanoma Sensitivity Macro Specificity
v1 (Baseline) DermaVision-EfficientNetV2-S/1 (Rejected) Standard Cross-Entropy 0.9790 14.7% 5.4% 85.6%
v2 (Sensitivity) DermaVision-EfficientNetV2-S/2 (Pending) Focal Loss (gamma=4.0) + 5x Minority Sampler 0.9150 71.1% 38.1% 90.2%
v3 (Production) DermaVision-EfficientNetV2-S/3 (Approved) High-Res 384px + 3x Seborrheic Penalty + 0.20 Threshold 0.9129 71.1% 68.2% 88.2%
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train MF180/DermaVision-EfficientNet

Collection including MF180/DermaVision-EfficientNet

Evaluation results