I built a skin cancer classifier from scratch with PyTorch β€” 83.9% test accuracy, no pre-trained models

Project

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

10
Loading comments…