Giter Site home page Giter Site logo

petebankhead / wsinfer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sbu-bmi/wsinfer

0.0 2.0 0.0 2.03 MB

:fire: :rocket: Blazingly fast pipeline for patch-based classification in whole slide images

Home Page: https://wsinfer.readthedocs.io

License: Apache License 2.0

Python 99.32% Dockerfile 0.68%

wsinfer's Introduction

WSInfer: deep learning inference on whole slide images

Original H&E Heatmap of Tumor Probability

๐Ÿ”ฅ ๐Ÿš€ Blazingly fast pipeline to run patch-based classification models on whole slide images.

Continuous Integration Documentation Status Version on PyPI Supported Python versions

See https://wsinfer.readthedocs.io for documentation.

The main feature of WSInfer is a minimal command-line interface for running deep learning inference on whole slide images. Here is an example:

wsinfer run \
   --wsi-dir slides/ \
   --results-dir results/ \
   --model breast-tumor-resnet34.tcga-brca

Installation

WSInfer can be installed using pip or conda. WSInfer will install PyTorch automatically if it is not installed, but this may not install GPU-enabled PyTorch even if a GPU is available. For this reason, install PyTorch before installing WSInfer.

Install PyTorch first

Please see PyTorch's installation instructions for help installing PyTorch. The installation instructions differ based on your operating system and choice of pip or conda. Thankfully, the instructions provided by PyTorch also install the appropriate version of CUDA. We refrain from including code examples of installation commands because these commands can change over time. Please refer to PyTorch's installation instructions for the most up-to-date instructions.

You will need a new-enough driver for your NVIDIA GPU. Please see this version compatibility table for the minimum versions required for different CUDA versions.

To test whether PyTorch can detect your GPU, check that this code snippet prints True.

python -c 'import torch; print(torch.cuda.is_available())'

Install WSInfer

WSInfer can be installed with pip or conda (from conda-forge).

Pip

To install the latest stable version, use

python -m pip install wsinfer

To install the bleeding edge (which may have breaking changes), use

python -m pip install git+https://github.com/SBU-BMI/wsinfer.git

Conda

To install the latest stable version, use

conda install -c conda-forge wsinfer

If you use mamba, simply replace conda install with mamba install.

Developers

Clone this GitHub repository and install the package (in editable mode with the dev extras).

git clone https://github.com/SBU-BMI/wsinfer.git
cd wsinfer
python -m pip install --editable .[dev]

Citation

If you find our work useful, please cite our preprint!

@misc{kaczmarzyk2023open,
      title={Open and reusable deep learning for pathology with WSInfer and QuPath},
      author={Jakub R. Kaczmarzyk and Alan O'Callaghan and Fiona Inglis and Tahsin Kurc and Rajarsi Gupta and Erich Bremer and Peter Bankhead and Joel H. Saltz},
      year={2023},
      eprint={2309.04631},
      archivePrefix={arXiv},
      primaryClass={q-bio.TO}
}

wsinfer's People

Contributors

kaczmarj avatar swaradgat19 avatar xalexalex avatar petebankhead avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.