Skip to content

Computational Pathology Toolbox developed by TIA Centre, University of Warwick.

License

Notifications You must be signed in to change notification settings

behnazelhaminia/tiatoolbox

 
 

Repository files navigation

TIA Toolbox

Computational Pathology Toolbox developed at the TIA Centre

PyPI Status pypi Downloads
conda-forge badge conda-forge downloads
Documentation Status
GitHub license

Supported Python versions
GitHub Workflow passing Code Coverage

Code Style black Code Style black

DOI DOI

Getting Started

TIAToolbox is a computational pathology toolbox developed by TIA Centre that provides an end-to-end API for pathology image analysis using best practices. It is based on PyTorch, a popular deep learning framework that enables efficient and flexible implementation of state-of-the-art algorithms. TIAToolbox supports many features through a command-line interface and can integrate with standard PyTorch modules. It also offers tools for data loading, pre-processing, model inference, post-processing, and visualization. Whether you are a computational, biomedical, or clinical researcher, TIAToolbox can help you get started in digital pathology with minimal effort.

All Users

This package is for those interested in digital pathology: including graduate students, medical staff, members of the TIA Centre and of PathLAKE, and anyone, anywhere, who may find it useful. We will continue to improve this package, taking account of developments in pathology, microscopy, computing and related disciplines. Please send comments and criticisms to tia@dcs.warwick.ac.uk.

tiatoolbox is a multipurpose name that we use for 1) a certain computer program, 2) a Python package of related programs, created by us at the TIA Centre to help people get started in Digital Pathology, 3) this repository, 4) a certain virtual environment.

Developers

Anyone wanting to contribute to this repository, please first look at our Wiki and at our web page for contributors. See also the Prepare for development section of this document.

Links, if needed

The bash shell is available on all commonly encountered platforms. Commands in this README are in bash. Windows users can use the command prompt to install conda and python packages.

conda is a management system for software packages and virtual environments. To get conda, download Anaconda, which includes hundreds of the most useful Python packages, using 2GB disk space. Alternatively, miniconda uses 400MB, and packages can be added as needed.

GitHub is powered by the version control system git, which has many users and uses. In GitHub, it is used to track versions of code and other documents.

Examples Taster

  1. Click here for jupyter notebooks, hosted on the web, with demos of tiatoolbox. All necessary resources to run the notebooks are remotely provided, so you don't need to have Python installed on your computer.
  2. Click on a filename with suffix .ipynb and the notebook will open in your browser.
  3. Click on one of the two blue checkboxes in your browser window labelled either Open in Colab or Open in Kaggle: colab and kaggle are websites providing free-of-charge platforms for running jupyter notebooks.
  4. Operate the notebook in your browser, editing, inserting or deleting cells as desired.
  5. Changes you make to the notebook will last no longer than your colab or kaggle session.

Install Python package

If you wish to use our programs, perhaps without developing them further, run the command pip install tiatoolbox or pip install --ignore-installed --upgrade tiatoolbox to upgrade from an existing installation. Detailed installation instructions can be found in the documentation.

To understand better how the programs work, study the jupyter notebooks referred to under the heading Examples Taster.

Command Line

tiatoolbox supports various features through command line. For more information, please try tiatoolbox --help

Prepare for development

Prepare a computer as a convenient platform for further development of the Python package tiatoolbox and related programs as follows.

  1. Install pre-requisite software
  2. Open a terminal window
    $ cd <future-home-of-tiatoolbox-directory>
  1. Download a complete copy of the tiatoolbox.
    $ git clone https://github.com/TissueImageAnalytics/tiatoolbox.git
  1. Change directory to tiatoolbox
    $ cd tiatoolbox
  1. Create virtual environment for TIAToolbox using
    $ conda create -n tiatoolbox-dev python=3.8 # select version of your choice
    $ conda activate tiatoolbox-dev
    $ pip install -r requirements/requirements_dev.txt

or

    $ conda env create -f requirements/requirements.dev.conda.yml # for linux/mac only.
    $ conda activate tiatoolbox-dev
  1. To use the packages installed in the environment, run the command:
    $ conda activate tiatoolbox-dev

License

The source code TIA Toolbox (tiatoolbox) as hosted on GitHub is released under the BSD-3-Clause license. The full text of the licence is included in LICENSE.

Models weights are dependent on the datasets that they were trained on. Please refer to the documentation for more details.

Cite this repository

If you find TIAToolbox useful or use it in your research, please consider citing our paper:

@article{
    Pocock2022,
    author = {Pocock, Johnathan and Graham, Simon and Vu, Quoc Dang and Jahanifar, Mostafa and Deshpande, Srijay and Hadjigeorghiou, Giorgos and Shephard, Adam and Bashir, Raja Muhammad Saad and Bilal, Mohsin and Lu, Wenqi and Epstein, David and Minhas, Fayyaz and Rajpoot, Nasir M and Raza, Shan E Ahmed},
    doi = {10.1038/s43856-022-00186-5},
    issn = {2730-664X},
    journal = {Communications Medicine},
    month = {sep},
    number = {1},
    pages = {120},
    publisher = {Springer US},
    title = {{TIAToolbox as an end-to-end library for advanced tissue image analytics}},
    url = {https://www.nature.com/articles/s43856-022-00186-5},
    volume = {2},
    year = {2022}
}

About

Computational Pathology Toolbox developed by TIA Centre, University of Warwick.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 74.4%
  • Jupyter Notebook 25.0%
  • Other 0.6%