histolab
Lightweight WSI tile extraction and preprocessing. Use for basic slide processing, tissue detection, tile extraction, and stain normalization for H&E images. Best for simple pipelines, dataset preparation, and quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.
npx skills add K-Dense-AI/scientific-agent-skills --skill histolab --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 Install OpenSlide system libraries first ([OpenSlide download](https://openslide.org/download/)), then install histolab: ```bash uv pip install histolab ``` For built-in TCGA sample slides via `histolab.data`, also install pooch: ```bash 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. ## Quick Start Basic workflow for extracting tiles from a whole slide image: ```python 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) ``` #
- Overview
- Installation
- Quick Start
- Core Capabilities
- Best Practices
- Slide Loading and Inspection
- Tissue Detection
- Tile Extraction
- Performance
- Quality Control
- Common Use Cases
- Training Deep Learning Models
- Whole Slide Analysis
- Tissue Characterization
uv pip install histolab uv pip install pooch
What does the histolab skill do?
Lightweight WSI tile extraction and preprocessing. Use for basic slide processing, tissue detection, tile extraction, and stain normalization for H&E images. Best for simple pipelines, dataset preparation, and quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.
How do I install it?
Run `npx skills add K-Dense-AI/scientific-agent-skills --skill histolab --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From K-Dense-AI/scientific-agent-skills, a repository with 32,619 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
