Skip to main content

Composable image chunk operators to create pipeline for distributed computation.

Project description

chunkflow

Documentation Status Build Status PyPI version Coverage Status License Docker Hub Twitter URL

Features

  • Composable operators. The chunk operators could be composed in commandline for flexible usage.
  • Hybrid Cloud Distributed computation in both local and cloud computers. The task scheduling frontend and computationally heavy backend are decoupled using AWS Simple Queue Service. The computational heavy backend could be any computer with internet connection and Amazon Web Services (AWS) authentication.
  • Operators work with 3D image volumes.
  • You can plugin your own code as an operator.

Image Segmentation Example

Perform Convolutional net inference to segment 3D image volume with one single command!

#!/bin/bash

chunkflow \
    read-tif --file-name path/of/image.tif -o image \
    inference --convnet-model path/of/model.py --convnet-weight-path path/of/weight.pt \
        --input-patch-size 20 256 256 --output-patch-overlap 4 64 64 --num-output-channels 3 \
        -f pytorch --batch-size 12 --mask-output-chunk -i image -o affs \
    agglomerate --threshold 0.7 --aff-threshold-low 0.001 --aff-threshold-high 0.9999 -i affs -o seg \
    neuroglancer -c image,affs,seg -p 33333 -v 30 6 6

you can see your 3D image and segmentation directly in Neuroglancer!

Image_Segmentation

Operators

After installation, You can simply type chunkflow and it will list all the operators with help message. We keep adding new operators and will keep it update here. For the detailed usage, please checkout our Documentation.

Operator Name Function
agglomerate Watershed and agglomeration to segment affinity map
aggregate-skeleton-fragments Merge skeleton fragments from chunks
channel-voting Vote across channels of semantic map
cloud-watch Realtime speedometer in AWS CloudWatch
connected-components Threshold the boundary map to get a segmentation
copy-var Copy a variable to a new name
create-chunk Create a fake chunk for easy test
create-info Create info file of Neuroglancer Precomputed volume
crop-margin Crop the margin of a chunk
delete-chunk Delete chunk in task to reduce RAM requirement
delete-task-in-queue Delete the task in AWS SQS queue
downsample-upload Downsample the chunk hierarchically and upload to volume
evaluate-segmentation Compare segmentation chunks
fetch-task-from-file Fetch task from a file
fetch-task-from-sqs Fetch task from AWS SQS queue one by one
generate-tasks Generate tasks one by one
inference Convolutional net inference
log-summary Summary of logs
mask Black out the chunk based on another mask chunk
mask-out-objects Mask out selected or small objects
mesh Build 3D meshes from segmentation chunk
mesh-manifest Collect mesh fragments for object
neuroglancer Visualize chunks using neuroglancer
normalize-contrast-nkem Normalize image contrast using histograms
normalize-intensity Normalize image intensity to -1:1
normalize-section-shang Normalization algorithm created by Shang
plugin Import local code as a customized operator.
quantize Quantize the affinity map
read-h5 Read HDF5 files
read-pngs Read png files
read-precomputed Cutout chunk from a local/cloud storage volume
read-tif Read TIFF files
read-nrrd Read NRRD files
remap-segmentation Renumber a serials of segmentation chunks
setup-env Prepare storage infor files and produce tasks
skeletonize Create centerlines of objects in a segmentation chunk
threshold Use a threshold to segment the probability map
view Another chunk viewer in browser using CloudVolume
write-h5 Write chunk as HDF5 file
write-pngs Save chunk as a serials of png files
write-precomputed Save chunk to local/cloud storage volume
write-tif Write chunk as TIFF file
write-nrrd Write chunk as NRRD file

Reference

We have a paper for this repo:

@article{wu_chunkflow_2021,
	title = {Chunkflow: hybrid cloud processing of large {3D} images by convolutional nets},
	issn = {1548-7105},
	shorttitle = {Chunkflow},
	url = {https://www.nature.com/articles/s41592-021-01088-5},
	doi = {10.1038/s41592-021-01088-5},
	journal = {Nature Methods},
	author = {Wu, Jingpeng and Silversmith, William M. and Lee, Kisuk and Seung, H. Sebastian},
	year = {2021},
	pages = {1--2}
}

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

chunkflow-1.0.6.tar.gz (72.4 kB view details)

Uploaded Source

File details

Details for the file chunkflow-1.0.6.tar.gz.

File metadata

  • Download URL: chunkflow-1.0.6.tar.gz
  • Upload date:
  • Size: 72.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.1

File hashes

Hashes for chunkflow-1.0.6.tar.gz
Algorithm Hash digest
SHA256 e7d6eb37a6288a5ad72bc1f663b213da0f05d09e61f0874ceaa9c96f87e30396
MD5 4d25500f65e9cf98531cc42c945cb127
BLAKE2b-256 6f3ab405597e5cc221372b8475c0ac7b993f12cf352855c9332ca29e94ccdf42

See more details on using hashes here.

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