Skip to main content

Flood filling networks for segmenting electron microscopy of neural tissue.

Project description

diluvian

Flood filling networks for segmenting electron microscopy of neural tissue.

PyPI Release

PyPI Package Version

Documentation

Documentation Status

License

License: MIT

Build Status

Continuous Integration Status

Diluvian is an implementation and extension of the flood-filling network (FFN) algorithm first described in [Januszewski2016]. Flood-filling works by starting at a seed location known to lie inside a region of interest, using a convolutional network to predict the extent of the region within a small field of view around that seed location, and queuing up new field of view locations along the boundary of the current field of view that are confidently inside the region. This process is repeated until the region has been fully explored.

As of December 2017 the original paper’s authors have released their implementation.

Quick Start

This assumes you already have CUDA installed and have created a fresh virtualenv. See installation documentation for detailed instructions.

Install diluvian and its dependencies into your virtualenv:

pip install diluvian

For compatibility diluvian only requires TensorFlow CPU by default, but you will want to use TensorFlow GPU if you have installed CUDA:

pip install 'tensorflow-gpu==1.3.0'

To test that everything works train diluvian on three volumes from the CREMI challenge:

diluvian train

This will automatically download the CREMI datasets to your Keras cache. Only two epochs will run with a small sample set, so the trained model is not useful but will verify Tensorflow is working correctly.

To train for longer, generate a diluvian config file:

diluvian check-config > myconfig.toml

Now edit settings in the [training] section of myconfig.toml to your liking and begin the training again:

diluvian train -c myconfig.toml

For detailed command line instructions and usage from Python, see the usage documentation.

Limitations, Differences, and Caveats

Diluvian may differ from the original FFN algorithm or make implementation choices in ways pertinent to your use:

  • By default diluvian uses a U-Net architecture rather than stacked convolution modules with skip links. The authors of the original FFN paper also now use both architectures (personal communication). To use a different architecture, change the factory setting in the [network] section of your config file.

  • Rather than resampling training data based on the filling fraction \(f_a\), sample loss is (optionally) weighted based on the filling fraction.

  • A FOV center’s priority in the move queue is determined by the checking plane mask probability of the first move to queue it, rather than the highest mask probability with which it is added to the queue.

  • Currently only processing of each FOV is done on the GPU, with movement being processed on the CPU and requiring copying of FOV data to host and back for each move.

[Januszewski2016]

Michał Januszewski, Jeremy Maitin-Shepard, Peter Li, Jorgen Kornfeld, Winfried Denk, and Viren Jain. Flood-filling networks. arXiv preprint arXiv:1611.00421, 2016.

History

0.0.6 (2018-02-13)

  • Add CREMI evaluation command.

  • Add 3D region filling animation.

  • Fix region filling animations.

  • F_0.5 validation metrics.

  • Fix pip install.

  • Many other fixes and tweaks (see git log).

0.0.5 (2017-10-03)

  • Fix bug creating U-net with far too few channels.

  • Fix bug causing revisit of seed position.

  • Fix bug breaking sparse fill.

0.0.4 (2017-10-02)

  • Much faster, more reliable training and validation.

  • U-net supports valid padding mode and other features from original specification.

  • Add artifact augmentation.

  • More efficient subvolume sampling.

  • Many other changes.

0.0.3 (2017-06-04)

  • Training now works in Python 3.

  • Multi-GPU filling: filling will now use the same number of processes and GPUs specified by training.num_gpus.

0.0.2 (2017-05-22)

  • Attempt to fix PyPI configuration file packaging.

0.0.1 (2017-05-22)

  • First release on PyPI.

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

diluvian-0.0.6.tar.gz (72.9 kB view details)

Uploaded Source

Built Distribution

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

diluvian-0.0.6-py2.py3-none-any.whl (70.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file diluvian-0.0.6.tar.gz.

File metadata

  • Download URL: diluvian-0.0.6.tar.gz
  • Upload date:
  • Size: 72.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for diluvian-0.0.6.tar.gz
Algorithm Hash digest
SHA256 79e71fab0ef44532c87a087e8604064f083737f304daef61afcc1165f68e4327
MD5 37206e8ac0c4fb325a2239a06993d1d7
BLAKE2b-256 672d1653a7a2871be4a9c326386ee1592314b07911baccdc43ca5c2fd5a7b660

See more details on using hashes here.

File details

Details for the file diluvian-0.0.6-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for diluvian-0.0.6-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9fc5441523d0ae4a4bfc81428e923af08cba9f22f7f609fbda8e7eacb80bcd0e
MD5 d61e239fb995d84ae643fdfe85d11505
BLAKE2b-256 9cfa39e1bb0d7875b691d6031f5c89a11d5b3af75fa682859d9b52ec99106399

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