Sign inSign up

labsyspharm/mcmicro-ilastik

Sponsored OSS

By Harvard Medical School

•Updated over 3 years ago

headless ilastik for mcmicro pipeline

Image
Machine learning & AI
Data science
0

10K+

labsyspharm/mcmicro-ilastik repository overview

⁠Preparation and processing of ome.tif images with Ilastik

mcmicro module for training and processing large images with Ilastik

⁠CommandIlastikPrepOME.py

Script for preparing ome.tif images to be accessed by Ilastik. Exports hdf5 formats.

Headless Ilastik execution once the classifier is ready

mkdir prob_maps/ilastik
python CommandIlastikPrepOME.py --input exemplar-001.ome.tif --output prob_maps/ilastik/ --num_channels 12

To apply an existing classifier to an hdf5 file created in the previous step:

/path/to/ilastik/run_ilastik.sh --headless --project=classifiers/exemplar_001.ilp prob_maps/ilastik/exemplar-001.hdf5

For training follow these steps

ParameterDefaultDescription
--inputNonePath to images (Ex: ./my_image.ome.tif ./my_image2.ome.tif)
--outputNonePath to output directory. Either single directory or number of directories=to number of images (Ex: ./my_outdir)
--nonzero_fraction <value>NoneIndicates fraction of pixels per crop above global threshold to ensure tissue and not only background is selected
--nuclei_index <index>1(1-based) Index of nuclei channel to use for nonzero_fraction argument
--cropOmittedIf specified, crop regions for ilastik training
--num_channels <value>NoneNumber of channels to export per image (Ex: 40 corresponds to a 40 channel ome.tif image)
--channelIDs <indices>NoneInteger (1-based) indices specifying which channels to export (Ex: 1 2 4)
--ring_maskOmittedSpecify if you have a ring mask in the same directory to use for reducing size of hdf5 image
--crop_amount <integer>NoneNumber of crops you would like to extract

For example: python CommandIlastikPrepOME.py --input /Users/joshuahess/Desktop/VV_40c.ome.tif /Users/joshuahess/Desktop/VV_40c_test.ome.tif --output /Users/joshuahess/Desktop/TestingIlastik --nonzero_fraction 0.5 --nuclei_index 1 --crop --crop_size 400 400 --num_channels 3 --channelIDs 1 2 3 --ring_mask --crop_amount 2

Tag summary

Content type

Image

Digest

sha256:0f6b79c4f…

Size

2.3 GB

Last updated

over 3 years ago

docker pull labsyspharm/mcmicro-ilastik

This week's pulls

Pulls:

288

Sep 28 to Oct 4