Skip to main content

Preprocessing module for large histological images.

Project description

HistoPrep

Preprocessing large histological slides for machine learning made easy!

Description

This module allows you to cut and preprocess large histological slides. Some of the features include:

  • Cut large whole slide image (WSI) into tiles of desired size.
  • Dearray individual tissue microarray (TMA) spots from a large slide image.
  • Easily detect and discard blurry images or images with artifacts after cutting.
  • Save a lot of tears while preprocessing images.

Installation

# install as a module   
pip install histoprep

# install as an executable
git clone https://github.com/jopo666/HistoPrep
cd HistoPrep
pip install -r requirements.txt

You should also have openslide-tools installed on your machine.

sudo apt-get install openslide-tools

Usage

HistoPrep can be used either as a module...

import histoprep as hp
cutter = hp.Cutter('/path/to/slide', width=512, overlap=0.25)
metadata = cutter.save('/path/to/output_folder')

or as an excecutable!

python3 HistoPrep cut ./input_dir ./output_dir --width 512 --overlap 0.25 --img_type jpeg

Documentation

Documentation can be found here!

Examples

Detailed examples with best practices:

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

histoprep-0.0.1.dev11.tar.gz (20.5 kB view hashes)

Uploaded Source

Built Distribution

histoprep-0.0.1.dev11-py3-none-any.whl (26.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page