Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

PathMNIST Image Classification

Comparison of three machine learning approaches on PathMNIST. We are given 28×28 RGB patches of haematoxylin and eosin–stained colorectal cancer histology, across 9 tissue classes.

Write-up: PathMNIST: a battle of classifiers. -> Describes how the three models were chosen, what the tuning turned up, and where they disagree.

Model Description
SVM (RBF) + PCA StandardScaler -> PCA -> SVC(kernel="rbf"), tuned by grid search with 3-fold stratified CV
MLP Two dense hidden layers with dropout, Keras
CNN Small VGG-style network (2 conv blocks + dense head), Keras

Each model follows the same pipeline: a baseline run, a hyper-parameter search selected on a held-out validation split, then a final tuned model evaluated once on the test set. The notebook closes with a cross-model comparison of test accuracy, macro-F1, runtime, confusion matrices and per-class F1.

Data

The dataset/ folder holds the pre-split arrays:

  • X_train.npy — (32000, 28, 28, 3) uint8
  • y_train.npy — (32000,) integer labels in {0, ..., 8}
  • X_test.npy — (8000, 28, 28, 3) uint8
  • y_test.npy — (8000,)

Classes: Adipose, Background, Debris, Lymphocytes, Mucus, Smooth muscle, Normal colon mucosa, Cancer-associated stroma, Colorectal adenocarcinoma epithelium.

PathMNIST is part of the MedMNIST collection (Yang et al., 2023).

Running

pip install numpy pandas matplotlib seaborn scikit-learn tensorflow
jupyter lab pathmnist_image_classification.ipynb

Tested with Python 3.12, scikit-learn 1.3+ and TensorFlow/Keras 2.15+. Everything runs on CPU; the SVM is tuned on a 6000-image stratified subset and trained on 12000 images to keep the kernel computation tractable.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages