https://github.com/rendeirolab/lazyslide
Accessible and interoperable whole slide image analysis
https://github.com/rendeirolab/lazyslide
deep-learning digital-pathology
Last synced: about 1 month ago
JSON representation
Accessible and interoperable whole slide image analysis
- Host: GitHub
- URL: https://github.com/rendeirolab/lazyslide
- Owner: rendeirolab
- License: mit
- Created: 2023-11-20T15:07:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2026-02-28T02:03:55.000Z (4 months ago)
- Last Synced: 2026-02-28T08:06:45.071Z (4 months ago)
- Topics: deep-learning, digital-pathology
- Language: Python
- Homepage: https://lazyslide.rtfd.io/
- Size: 106 MB
- Stars: 185
- Watchers: 5
- Forks: 12
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# LazySlide
Accessible and interoperable whole slide image analysis
[](https://lazyslide.readthedocs.io/en/stable)




[](https://doi.org/10.1038/s41592-026-03044-7)
[Installation](https://lazyslide.readthedocs.io/en/stable/installation.html) |
[Tutorials](https://lazyslide.readthedocs.io/en/stable/tutorials/index.html) |
[Preprint](https://doi.org/10.1101/2025.05.28.656548) |
[Nature Methods](https://doi.org/10.1038/s41592-026-03044-7)
LazySlide is a Python framework for whole slide image (WSI) analysis, designed to integrate seamlessly with the scverse
ecosystem.
By adopting standardized data structures and APIs familiar to the single-cell and genomics community, LazySlide enables
intuitive, interoperable, and reproducible workflows for histological analysis. It supports a range of tasks from basic
preprocessing to advanced deep learning applications, facilitating the integration of histopathology into modern
computational biology.
💬 We warmly welcome contributions for documentation,
tests, or even suggestions on what to add!
Start by submitting an issue or pull request!
## Key features
- **Interoperability**: Built on top of SpatialData, ensuring compatibility with scverse tools like scanpy, anndata, and
squidpy.
- **Accessibility**: User-friendly APIs that cater to both beginners and experts in digital pathology.
- **Scalability**: Efficient handling of large WSIs, enabling high-throughput analyses.
- **Multimodal integration**: Combine histological data with transcriptomics, genomics, and textual annotations.
- **Foundation model support**: Native integration with state-of-the-art models (e.g., UNI, CONCH, Gigapath, Virchow)
for tasks like zero-shot classification and captioning.
- **Deep learning ready**: Provides PyTorch dataloaders for seamless integration into machine learning pipelines.​

## Documentation
Comprehensive documentation is available at [https://lazyslide.readthedocs.io](https://lazyslide.readthedocs.io). It
includes tutorials, API references, and guides to help you get started.​
## System requirements
LazySlide has been tested from Python 3.11 to 3.13 (with GitHub Action) on Windows, Linux, and MacOS.
Version for dependencies is usually flexible, for the specific version used in development,
please see `pyproject.toml` and `uv.lock`.
## Installation
Lazyslide is available at the [PyPI](https://pypi.org/project/lazyslide). This means that you can get it with your
favourite package manager:
- `pip install lazyslide` or
- `uv add lazyslide`
A typical installation time on a MacBook Pro with `uv` takes ~4s.
For full instructions, please refer to
the [Installation page in the documentation](https://lazyslide.readthedocs.io/en/stable/installation.html).
## Quick start
With a few lines of code, you can quickly run process a whole slide image (tissue segmentation, tesselation, feature
extraction) (~7s on a MacBook Pro):
```python
import lazyslide as zs
wsi = zs.datasets.sample()
# Pipeline
zs.pp.find_tissues(wsi)
zs.pp.tile_tissues(wsi, tile_px=256, mpp=0.5)
zs.tl.feature_extraction(wsi, model='resnet50')
# Access the features
features = wsi['resnet50_tiles']
# Visualize the 1st and 99th features
zs.pl.tiles(wsi, feature_key="resnet50", color=["1", "99"])
```
To use your slide file
```python
from wsidata import open_wsi
wsi = open_wsi("path_to_slide")
```
## Contributing
We welcome contributions from the community. Please refer to our
[contributing guide](https://lazyslide.readthedocs.io/en/latest/contributing/index.html) for guidelines on how to contribute.
## Licence
LazySlide is released under the [MIT License](LICENCE).