Giter Club home page Giter Club logo

digipath_mltk's Introduction

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

digipath_mltk's People

Contributors

dlanier avatar katk303 avatar quincy-125 avatar steven-n-hart avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

digipath_mltk's Issues

Example for annotations file and priority file (annotations_to_dir)

What should the annotations file and priority file look like for the "annotations_to_dir" functionality?

I have Aperio SVS files and the .xml files produced from annotating via Image Scope. I would like to take the annotated regions and write them to a directory.

Thank you!

tensorflow version

Hi Dan. I noticed in your IPython notebooks you are using tf.python_io.TFRecordWriter. Please note that this only exists in 1.0. You will need to convert to tf.io.TFRecordWriter and make sure the rest of the code conforms to the 2.0 spec.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.