
Histolab
This is a Python toolkit for working with whole slide images in digital pathology, the kind of gigapixel H&E or IHC stained tissue scans you get from microscopy. It handles the annoying parts: loading various WSI formats (SVS, TIFF, NDPI), automatically detecting tissue regions versus background, and extracting tiles in sensible ways (random sampling, grid coverage, or scored by nuclei density). The tile extraction strategies are well thought out. RandomTiler for quick sampling, GridTiler for full coverage, ScoreTiler when you want the most informative regions based on cellular content. If you're building computational pathology datasets or preprocessing slides for deep learning pipelines, this handles the boilerplate so you can focus on the actual analysis.
- skills.sh installs
- 217
- GitHub stars
- 33.2K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add davila7/claude-code-templates --skill histolab --agent claude-codeInstalls into .claude/skills of the current project.
Files
Histolab
Overview
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.
Installation
uv pip install histolab
Quick Start
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
)
# Preview tile locations
tiler.locate_tiles(slide, n_tiles=20)
# Extract tiles
tiler.extract(slide)
Core Capabilities
1. Slide Management
Load, inspect, and work with whole slide images in various formats.
Sponsors
Details
- Repository
- github.com/davila7/claude-code-templates
- Category
- Office & Documents
- First seen
- Jun 3, 2026
More from davila7/claude-code-templates
All 618- Neuropixels Analysis217
- Pydeseq2217
- Benchling Integration216
- Hypogenic216
- Notion Template Business216
- Pennylane215
- Zinc Database215
- Cirq214
- Esm214
- Geniml214
- Matchms214
- Ship Learn Next214
- Performance213
- Twilio Communications213
- Etetoolkit212
- Hubspot Integration212
- Algolia Search211
- Azure Functions211
- Form Cro211
- Openapi To Typescript211
- Vaex211
- Gtars210
- Flowio209
- Latchbio Integration209