A classical machine learning approach to classify ischemic stroke subtypes (Cardioembolic vs. Large Artery Atherosclerosis) from whole-slide digital pathology images. Despite using no deep learning, this solution achieved 79% accuracy and a WMCLL score of 0.66588, placing 5th on the Kaggle leaderboard and outperforming several deep learning baselines including stacked EfficientNet/ResNet/VGG ensembles and CNN/Visual Transformer models.
Identifying the origin of a blood clot in ischemic stroke patients is critical for determining the correct treatment and reducing the risk of recurrence. Traditional diagnosis methods (echocardiograms, Doppler ultrasound, blood tests) are accurate but time-consuming. This project automates that classification using digital pathology images of blood clots stained with Martius Scarlet Blue (MSB).
Dataset: Mayo Clinic - STRIP AI Kaggle Competition
547 CE images and 207 LAA images as high-resolution TIFF whole-slide pathology images (1–2 GB each on average).
Whole Slide Image → Tiling → Tile Selection → HSV Segmentation → Feature Extraction → Feature Selection → XGBoost Classifier → Prediction
Raw images are 1–2 GB TIFF files that cannot be processed directly. Using libvips, each image is first downsampled to a 20,000×20,000 thumbnail, then tiled into 1024×1024 patches. The 16 darkest tiles (highest thrombus content) are selected per image.
To address class imbalance (73% CE / 27% LAA), fewer tiles are sampled from the majority CE class.
MSB staining produces distinctive color signatures for each blood clot component:
- RBCs → Yellow/brown hues
- WBCs → Purple hues
- Fibrin/Platelets → Reddish-violet hues
Each tile is converted to HSV color space and binary masks are generated per component, enabling component-level feature extraction.
Tiles and their component masks are fed into PyRadiomics via SimpleITK, extracting:
- First Order Statistics
- Shape-based features (2D & 3D)
- Gray Level Co-occurrence Matrix (GLCM)
- Gray Level Run Length Matrix (GLRLM)
- Gray Level Size Zone Matrix (GLSZM)
- Neighboring Gray Tone Difference Matrix (NGTDM)
- Gray Level Dependence Matrix (GLDM)
The Mann–Whitney U test is applied to select statistically significant features (P-value threshold: 0.07), discarding redundant features and reducing computation time.
An XGBoost classifier is trained on individual tiles. At inference, each tile of a test image is classified independently and the final prediction is the average of tile-level probabilities.
Key XGBoost settings:
- 200 estimators, max depth 4
- Minimal Cost-Complexity Pruning (MCCP alpha: 0.0007) to prevent overfitting
- Log loss as the objective function
| Model | WMCLL | Accuracy |
|---|---|---|
| Stacked EfficientNet-B0, VGG19, ResNet-152 | 0.69312 | – |
| Deep CNNs and Visual Transformers | 0.67188 | – |
| Naïve Bayes Classifier (different dataset) | – | 0.77 ± 0.06 |
| XGBoost (this work) | 0.66588 | 0.79 |
5th place on the Kaggle private leaderboard — the only classical ML solution in the top rankings.
Python XGBoost PyRadiomics SimpleITK OpenCV libvips Pandas NumPy Scikit-Learn