🔬 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):
MetricValue
Test accuracy0.8712
Macro one-vs-rest AUC0.9855
Majority-class baseline0.1864
Weakest class: cancer-associated stroma recall0.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.

Try it: upload a patch image, or click one of the bundled PathMNIST test patches below (one per class — 7 of 9 are classified correctly; the two misses are marked).

Loading the model…

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.