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:
- Cutting and preprocessing a whole slide image.
- Cutting individual TMA spots from a slide. [coming in the future!]
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.dev8.tar.gz
(20.5 kB
view hashes)
Built Distribution
Close
Hashes for histoprep-0.0.1.dev8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08ef05c2813446cb59863611d815cadad669eca895daa5dc7196a38196c96a05 |
|
MD5 | ff649e8695f5e2931e2b0bcf826fdeb0 |
|
BLAKE2b-256 | 6d9ee8a492c413cea27349326ebc8de5f5a9d5ba2874e73f694c4d5f211fd507 |