I built a skin cancer classifier from scratch with PyTorch β 83.9% test accuracy, no pre-trained models
I built a skin cancer classifier from scratch β here's what I learned π§
No pre-trained models. No transfer learning shortcuts. Just raw PyTorch, 10,015 images, and a lot of debugging.
β Dataset: HAM10000 (benign vs malignant skin lesions)
β Architecture: 3-block CNN built entirely from scratch
β Result: 83.9% test accuracy | 85% validation accuracy
β Trained on my own home GPU cluster
The hardest part wasn't building the model β it was understanding WHY it was learning what it was learning.
Key things I picked up:
β
How convolutional layers learn spatial patterns
β
Why dropout matters (overfitting hit hard at epoch 10)
β
Class imbalance (80% benign, 20% malignant) and how it affects training β
The difference between validation and test accuracy
This was my first serious deep learning project built completely from scratch. It's not perfect β but it's real.
Full code π
https://github.com/Elijah-bino/skin_cancer_cnn-benign_vs_malignant
#MachineLearning #DeepLearning #PyTorch #DataScience #ComputerVision #MelbourneTech #AI #Monash
Posted May 10, 2026, 2:02 PM UTC