Computational Pathology Research Framework

Logo

A tested PyTorch framework for computational pathology research with working benchmarks on PatchCamelyon and CAMELYON16

View on GitHub matthewvaishnav/computational-pathology-research

Computational Pathology Research Framework

A PyTorch-based framework for whole slide image analysis and deep learning in digital pathology

Matthew Vaishnav

Python 3.9+ PyTorch MIT License Coverage

Abstract

This framework provides tested implementations for computational pathology research, enabling reproducible experiments on whole slide image (WSI) analysis. Built on PyTorch 2.0+, it includes working pipelines for PatchCamelyon and CAMELYON16 benchmarks, achieving 94% accuracy on patch-level classification and functional slide-level aggregation with multiple pooling strategies.

The codebase emphasizes research reproducibility with comprehensive unit testing (55% coverage, 972 tests), modular architecture, clinical workflow integration, and extensive documentation.

Research Use Only: This framework is designed for research purposes and has not been validated for clinical diagnostic use.

Key Contributions

Benchmark Implementations

Complete pipelines for PatchCamelyon (94% accuracy) and CAMELYON16 slide-level classification with aggregation strategies.

Pretrained Models

Integration with 1000+ models from torchvision and timm, featuring automatic extraction and dimension detection.

Analysis Tools

Model profiling, ONNX export, prediction CSV generation, and visualization utilities for publication.

Tested and Documented

55% code coverage with 972 tests across Ubuntu/macOS/Windows, comprehensive documentation, and reproducible configurations.



Installation

git clone https://github.com/matthewvaishnav/computational-pathology-research.git
cd computational-pathology-research
python -m venv venv
source venv/bin/activate  # Windows: venv\Scripts\activate
pip install -r requirements.txt
pip install -e .

See the Getting Started Guide for detailed instructions.


Citation

If you use this framework in your research, please cite:

@software{vaishnav2026sentinel,
  title = {Computational Pathology Research Framework},
  author = {Vaishnav, Matthew},
  year = {2026},
  url = {https://github.com/matthewvaishnav/computational-pathology-research},
  note = {A PyTorch framework for whole slide image analysis}
}