Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Extracts tiles from whole slide images, detects tissue, and normalizes H&E stains for dataset preparation.
36% 100%+64 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 8 of 22 without it.
3 of 3 safety checks passed
61 agent runs
Histolab is a Python library for processing whole slide images (WSI) in digital pathology. It automates tissue detection, extracts informative tiles from gigapixel images, and prepares datasets for deep learning pipelines. The library handles multiple WSI formats, implements sophisticated tissue segmentation, and provides flexible tile extraction strategies.
Install OpenSlide system libraries first (OpenSlide download), then install histolab:
uv pip install histolab
For built-in TCGA sample slides via histolab.data, also install pooch:
uv pip install pooch
Histolab 0.7.0 (latest stable) supports Python 3.8–3.11 on Linux and macOS. Windows is not supported as of 0.7.0.
Basic workflow for extracting tiles from a whole slide image:
from histolab.slide import Slide
from histolab.tiler import RandomTiler
# Load slide
slide = Slide("slide.svs", processed_path="output/")
# Configure tiler
tiler = RandomTiler(
tile_size=(512, 512),
n_tiles=100,
level=0,
seed=42
)
Published skills whose descriptions closely match this one, with their benchmark result.
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.