Skip to main content

No project description provided

Project description

Parameterized large image pre-processing with pychunklbl.toolkit

The package module pychunklbl.toolkit provides eight parameterized functions designed to work with large image files and provide pre-processing for machine learning.

The package module is intended developers to create machine learning datasets leveraging the openslide library for usage with tensorflow 2.0.


Installation

pip install digipath_mltk

# requires python 3.5 or later
pip3 install -r requirements.txt

Development install from clone in /DigiPath_MLTK/ directory:

pip3 install -r requirements.txt
pip3 install --upgrade ../DigiPath_MLTK

Command line examples

Images used in the examples below was downloaded from openslide data, the other data files are in the repository data/ directory.

Find the patches in a wsi file and write to an image file for preview.

python3 -m digipath_mltk.cli -m write_mask_preview_set -i yourpath/images/CMU-1-Small-Region.svs -o results

Find the patches in a wsi file and write to a directory.

python3 -m digipath_mltk.cli -m wsi_to_patches_dir -i CMU-1-Small-Region.svs -o results

Find the patches in a wsi file and write to a .tfrecords file.

python3 -m digipath_mltk.cli -m wsi_to_tfrecord -i CMU-1-Small-Region.svs -o results

View the patch locations in a .tfrecoreds file.

python3 -m digipath_mltk.cli -m tfrecord_to_masked_thumb -i CMU-1-Small-Region.svs -r CMU-1-Small-Region.tfrecords -o results

( test data not currently available in DigiPath_MLTK repository for the following examples )

Find pairs of patches with registration offset in two wsi files and write to a directory.

python3 -m digipath_mltk.cli -m registration_to_dir -i wsi_fixed.tiff -f wsi_float.tiff -D wsi_pair_sample_offset.csv -o results

Find pairs of patches with registration offset in two wsi files and write to a tfrecords file.

python3 -m digipath_mltk.cli -m registration_to_tfrecord -i  wsi_fixed.tiff -f wsi_float.tiff -D wsi_pair_sample_offset.csv -o results

Find the patches in a wsi file defined in an annotations file with a priority file and write to a directory.

python3 -m digipath_mltk.cli -m annotations_to_dir -i wsi_float.tiff -p wsi_float_annotation.csv -a wsi_float_annotation.xml -o results

Find the patches in a wsi file defined in an annotations file with a priority file and write to a tfrecords file.

python3 -m digipath_mltk.cli -m annotations_to_tfrecord -i wsi_float.tiff -p wsi_float_annotation.csv -a wsi_float_annotation.xml -o results

Project details


Download files

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

Source Distribution

digipath_mltk-0.0.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

digipath_mltk-0.0.0-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file digipath_mltk-0.0.0.tar.gz.

File metadata

  • Download URL: digipath_mltk-0.0.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.3

File hashes

Hashes for digipath_mltk-0.0.0.tar.gz
Algorithm Hash digest
SHA256 f189bb96cb0fe55f2f9a6d8aae3ed6954ffd830ccf4920dc0bcd2621100b0d64
MD5 a3d65a782d1bc1ca217b0015ef5c6627
BLAKE2b-256 c0900773d34cb4ba13fbf991da037c8ae6a3f77838f7d2c5db0e53db9c48aa47

See more details on using hashes here.

File details

Details for the file digipath_mltk-0.0.0-py3-none-any.whl.

File metadata

  • Download URL: digipath_mltk-0.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.3

File hashes

Hashes for digipath_mltk-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b49e6269fdede6c595fe1c6a894237a1da69009078c418f9481ce5002668f883
MD5 1f980a623cd77ac7e89ab2a4e01650ff
BLAKE2b-256 3ad196873ffe4e747086edd08da2d5e5e93d788ebd3d91c377daef0634ddda2c

See more details on using hashes here.

Supported by

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