histolab

Extract tissue-focused tiles from whole slide images for pathology analysis.

783|65|Updated Feb 27, 2026
One-click install
npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill histolab-leonchaox
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: histolab
Source: https://github.com/LeonChaoX/qinyan-academic-skills/tree/main/skills/07-%E4%B8%B4%E5%BA%8A%E5%8C%BB%E5%AD%A6%E4%B8%8E%E7%B2%BE%E5%87%86%E5%8C%BB%E7%96%97/histolab
Command: npx skills add https://github.com/LeonChaoX/qinyan-academic-skills --skill histolab-leonchaox

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Histolab streamlines whole slide image (WSI) preprocessing by automatically finding tissue, extracting meaningful tiles, and preparing consistent datasets for downstream analysis.

Core Features & Use Cases

  • Tissue detection & masking: Generate binary tissue masks to exclude background, artifacts, and unwanted regions like pen marks.
  • Tile extraction strategies: Extract gigapixel slides into tiles via Random, Grid, or Score-based tiling for sampling, coverage, or quality-driven selection.
  • Preprocessing & visualization: Apply composable image filters, produce quality-control outputs, and visualize slide thumbnails, masks, and tile locations.
  • Use Case: You want to train a deep learning model for tissue classification—use tissue masks plus score-based tiling to export a balanced, high-quality tile dataset with a CSV report of tile coordinates and scores.

Quick Start

Run histolab to extract a set of tissue-focused H&E tiles from a slide file using RandomTiler with a fixed seed and a tissue mask.

Frequently Asked Questions about histolab

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract tissue-focused tiles from whole slide images for digital pathology datasets?

To extract tissue-focused tiles from whole slide images, you can automate WSI preprocessing by generating binary tissue masks to exclude background and artifacts, then configuring a tiler across pyramid levels to output clean tile datasets for downstream analysis.

What is the best way to prepare a whole slide image dataset for training a deep learning model?

The best way to prepare a whole slide image dataset is to use score-based tiling combined with tissue masking to select high-quality, informative regions, exporting a balanced tile dataset alongside a CSV report of tile coordinates and scores for training.

Can I sample specific regions from a WSI slide instead of extracting the entire image?

Yes, you can sample specific regions from a WSI slide using Random tiling for exploratory sampling, Grid tiling for full-slide coverage, or Score-based tiling to select only the most informative tissue regions for your dataset preparation.

Does whole slide image preprocessing automatically remove pen marks and background artifacts?

Yes, whole slide image preprocessing automatically removes pen marks and background artifacts by generating binary tissue masks that isolate the tissue and exclude unwanted regions during the tile extraction process.

How do I visualize tissue masks and tile locations on a WSI slide before dataset extraction?

You can visualize tissue masks and tile locations by enabling the visualization steps in the WSI preprocessing workflow, which produces quality-control outputs showing slide thumbnails, tissue masks, and tile locations for review.

Do I need to manually configure pyramid levels when extracting tiles from whole slide images?

Yes, you need to configure the tiler across pyramid levels when extracting tiles from whole slide images, as this step is required to manage the gigapixel slide structure and ensure accurate tissue-focused tile extraction.