Skin Lesion Classification: CNN and KAN-ViT Hybrids
Trained checkpoints for six image classifiers on a 14-class skin condition dataset. Two are custom CNNs trained from scratch. Four are KAN-ViT hybrids that pair a pretrained backbone with Kolmogorov-Arnold Network (KAN) spline layers.
Code, training notebooks, and full documentation: https://github.com/deettoh/skin-lesion-classification
Checkpoints
| File | Model | Val acc | Test acc |
|---|---|---|---|
custom_cnn_v1/v1_custom_cnn_skin_lesion_100_epochs.pth |
Custom CNN V1 | 87.19% | 87.7% |
custom_cnn_v2/v2_custom_cnn_skin_lesion_100_epochs.pth |
Custom CNN V2 | 86.72% | — |
kanvit/kan_vit_skin_lesion_30_epochs.pth |
KAN-ViT | 80.03% | 79.62% |
efficientnetb0_kanvit/efficientnetb0_kan_vit_skin_lesion_35_epochs.pth |
EfficientNetB0-KANViT | 81.99% | 83.01% |
b0_kanvit_with_mlp_unfrozen_backbone/efficientnetb0_kan_vit_mlp_hybrid_skin_lesion_50_epochs.pth |
EfficientNetB0-KANViT-MLP | 81.39% | 82.46% |
efficientnetb3_kanvit_mlp/efficientnetb3_kan_vit_skin_lesion_50_epochs.pth |
EfficientNetB3-KANViT-MLP | 84.40% | 85.44% |
Val acc is best validation accuracy from the training logs. Test acc is held-out test accuracy, with test-time augmentation for the CNN.
Usage
from huggingface_hub import hf_hub_download
path = hf_hub_download(
"diddoe/skin-lesion-classifiers",
"custom_cnn_v1/v1_custom_cnn_skin_lesion_100_epochs.pth",
)
Rebuild the matching architecture from the
GitHub repo, then load
with model.load_state_dict(torch.load(path)). All models output 14 classes.
Dataset
Trained on the Kaggle dataset ahmedxc4/skin-ds, a 14-class set of dermoscopy
and clinical skin images. The distribution is long-tailed, so every run uses a
weighted sampler and Custom CNN V2 uses focal loss.
License
MIT for the model weights. The training images carry their own upstream terms, including ISIC archive sources. Check those before redistributing data.