Open source · Featured · 2023

SkinGuard - Skin Cancer Classifier.

Five models, one answer.

RoleAuthor & maintainer
ShippedMay 2023
StackNext.js · TypeScript · Flask
abdelmaksoud.dev
presents
Admit one
github.com
SkinGuard - Skin Cancer Classifier

Act I

The challenge

Skin-lesion datasets are painfully imbalanced, and a naive model just learns to guess the common class. The challenge was dragging accuracy well past a weak baseline with transfer learning, then serving three different models to a browser fast enough to feel interactive.

Act II

What I built

A skin-lesion classifier: a Next.js frontend uploads an image through a Next edge proxy to a Flask service that normalizes it and runs a CNN over seven HAM10000 classes. Three real models ship, and transfer learning takes accuracy from a 68.8% baseline to 83.9%.

Intermission, the demo

The product, playing itself

modelDenseNet201
test accuracy83.9%
lesion classes7

three CNN models to choose from, an educational tool, not a diagnosis

The cast

What actually makes it work

Read the card, then flip it to watch the mechanism run.

0x01

Transfer learning

DenseNet201 truncated at its last relu with a GlobalMaxPooling + Dense(512) + Dropout head, lifting accuracy from 68.8% to 83.9% on the imbalanced HAM10000 set.

how it works

Transfer learning

0x02

Training / serving parity

The exact dataset mean and std and each model’s input geometry are replicated in the Flask handler, so what serves matches what trained.

how it works

Training / serving parity

0x03

Browser to model plumbing

Base64 images flow through a Next edge proxy (4MB limit) into Flask, PIL, and OpenCV, with a model-selector UI on top.

how it works

Browser to model plumbing
View on GitHub