lib-histolab

Automate tissue detection and tile extraction from whole slide images.

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/biomaps-infra/blender-opencode --skill lib-histolab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lib-histolab
Source: https://github.com/biomaps-infra/blender-opencode/tree/main/.opencode/skills/lib-histolab
Command: npx skills add https://github.com/biomaps-infra/blender-opencode --skill lib-histolab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the complex and time-consuming process of analyzing large whole slide images (WSIs) in digital pathology, enabling faster research and diagnostics.

Core Features & Use Cases

  • WSI Loading & Management: Easily load, inspect, and manage various WSI formats.
  • Tissue Detection & Masking: Automatically identify and segment tissue regions, excluding background.
  • Tile Extraction: Extract smaller, manageable tiles using random, grid, or score-based strategies.
  • Image Filtering & Preprocessing: Apply a suite of filters for stain normalization, artifact removal, and quality control.
  • Visualization: Preview masks, tile locations, and extraction results.
  • Use Case: Researchers can use this Skill to extract thousands of high-resolution tiles from gigapixel pathology slides for training deep learning models, significantly accelerating the development of AI-powered diagnostic tools.

Quick Start

Use the lib-histolab skill to extract 100 random 512x512 pixel tiles from the slide file 'slide.svs' and save them to the 'output/random_tiles/' directory.

Frequently Asked Questions about lib-histolab

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

FAQPage Schema
How do I extract tiles from whole slide images for deep learning training?

To extract tiles from whole slide images, you can use random, grid, or score-based tiling strategies. This process automatically detects tissue regions, excludes the background, and outputs manageable high-resolution tiles for model training.

What is automated tissue detection in digital pathology?

Automated tissue detection in digital pathology is the process of segmenting tissue regions while excluding the background. It identifies relevant areas in large gigapixel images to prepare high-quality datasets for downstream analysis.

How do I preprocess whole slide images for dataset preparation?

Preprocessing whole slide images involves applying stain normalization, artifact removal, and quality control filters. This prepares the extracted image tiles for large-scale dataset preparation and deep learning model training.

Can I extract specific numbers of random tiles from a WSI file?

Yes, you can extract a specific number of random tiles from a WSI file. The extraction process supports custom tile sizes, such as 512x512 pixels, and saves them directly to a specified output directory.

What is the best way to handle gigapixel whole slide images without memory issues?

Handling gigapixel whole slide images requires automated tissue detection and targeted tile extraction. By segmenting the tissue and extracting smaller grid or score-based tiles, the process avoids memory issues and accelerates deep learning preparation.

Why does WSI tile extraction include image filtering and visualization?

WSI tile extraction includes image filtering for stain normalization and artifact removal, plus visualization to preview masks and tile locations. This ensures quality control and verifies that the extracted tissue regions are accurate.