🔬 PathoCNN — PathMNIST histology classifier (demo)
⚠️ Educational demo — NOT a diagnostic tool.
PathoCNN is a compact CNN (288,809 parameters) trained from scratch on the
public PathMNIST benchmark (28×28 H&E colorectal histology patches,
9 tissue classes). It has never been evaluated on clinical data and must
not be used for diagnosis, screening, or any clinical decision.
The model runs entirely in your browser (ONNX export of the released
weights) — your images are never uploaded anywhere.
Honest numbers, up front — measured on the PathMNIST test
split (CRC-VAL-HE-7K, collected at a
different clinical center
than the training data, so these include a real domain-shift gap):
| Metric | Value |
| Test accuracy | 0.8712 |
| Macro one-vs-rest AUC | 0.9855 |
| Majority-class baseline | 0.1864 |
| Weakest class: cancer-associated stroma recall | 0.3848 |
The model largely fails on cancer-associated stroma — it reads most stroma
patches as
debris. One of the examples below is a stroma patch and
is confidently misclassified (99.7% for debris); that failure is left in on
purpose. Softmax scores are
not calibrated: treat them as
rankings, not probabilities of being right.
Bundled test patches (true class under each patch):
Model: habib-analyst/pathocnn ·
Code: github.com/habib-analyst/pathocnn ·
Data: PathMNIST / MedMNIST v2 (CC BY 4.0), derived from NCT-CRC-HE-100K and
CRC-VAL-HE-7K (Kather et al.). ONNX parity vs the PyTorch weights was
measured at 5.7e-06 max logit difference.