TIAToolbox Joins The PyTorch Ecosystem!

John Pocock
PyTorch
Published in
2 min readJun 22, 2023

by John Pocock, Shan E Ahmed Raza, and the TIAToolbox team.

A five panel diagram highlighting the main features of TIA Toolbox. The panels are titled Data Loading, Pre-Processing, Local Level Analysis, WSI Level Analysis, and Visualization.

We are excited to announce that TIAToolbox, an end-to-end library for advanced tissue image analytics, has been added to the PyTorch Ecosystem. PyTorch Ecosystem is a collection of high-quality open source projects that are compatible with PyTorch, one of the most popular deep learning frameworks in the world.

TIAToolbox supports reading data from many whole slide image (WSI) file formats, such as SVS, NDPI, MIRAX, DICOM, NGFF (OME-Zarr) and OME-TIFF. The toolbox includes handy utilities for handling masking, annotation, patch extraction, data visualization, and more. There are also ready to use pre-trained PyTorch models for patch classification, semantic segmentation, nucleus instance segmentation, nucleus instance classification, and multitask models. You can use models such as HoVer-Net [arxiv] out of the box, fine-tune them on your own data, or integrate entirely new models with the toolbox. Check out our extensive documentation notebooks (tia-toolbox.readthedocs.io/en/latest/notebooks.html), which include tutorials and full pipelines for end-to-end processing of whole slide images using methods such as SlideGraph+ [arxiv] and IDaRS.

A short three line code snippet demonstrating how to import a pre-trained HovVerNet nucleus instance segmentation model and generate predictions for an image.
With TIAToolbox you can start running inference with a pre-trained state-of-the art model in just a few lines of code.

We based TIAToolbox around PyTorch because of its ease of use with an intuitive and Pythonic API. The eager execution and a dynamic computation graph made it easier to experiment and debug during development. We have also enjoyed integration with many other Python libraries and the PyTorch Ecosystem, including albumentations and PyG (torch geometric) while developing TIAToolbox. We look forward to adopting exciting PyTorch technologies such as torch.amp (automatic mixed precision) and the new torch.compile released in PyTorch 2.0 to accelerate inference with TIAToolbox.

Screenshot of the TIA Toolbox Github repository web page.
Check out the TIA Toolbox GitHub repository for more information.

If you are interested in learning more about TIAToolbox and how it can help you with your tissue image analysis challenges check out our paper in Nature Communications Medicine at TIAToolbox as an end-to-end library for advanced tissue image analytics | Communications Medicine (nature.com). Also be sure to visit the GitHub repository at github.com/TissueImageAnalytics/tiatoolbox and give us a star if you find the toolbox useful. Extensive documentation is also available at tia-toolbox.readthedocs.io/. We welcome your feedback and contributions to make TIAToolbox even better.

--

--

John Pocock
PyTorch
Writer for

PhD student in the Tissue Image Analytics (TIA) centre at the University of Warwick. I also develop TIA Toolbox tia-toolbox.readthedocs.io/en/latest/readme.html