Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase granularity of watershed bypass #318

Closed
ArtemSokolov opened this issue Aug 24, 2021 · 0 comments · Fixed by #321
Closed

Increase granularity of watershed bypass #318

ArtemSokolov opened this issue Aug 24, 2021 · 0 comments · Fixed by #321
Labels
segmentation Issues related to segmentation (including probability map generation)

Comments

@ArtemSokolov
Copy link
Collaborator

Currently, instance segmentation models are accommodated via --s3seg-opts '--nucleiRegion bypass', which bypasses the watershed segmentation step. However, --s3seg-opts is applied universally, making it impossible to run probability map generators in parallel with instance segmenters. The current workaround is to do the parallelization by hand:

# Steps up to registration are in common
nextflow run labsyspharm/mcmicro --in exemplar-001 --stop-at registration

# Run probability map computation separately
nextflow run labsyspharm/mcmicro --in exemplar-001 --start-at probability-maps --probability-maps unmicst,ilastik

# ...from instance segmentation, which requires watershed bypass
nextflow run labsyspharm/mcmicro --in exemplar-001 --start-at probability-maps --probability-maps mesmer --s3seg-opts '--nucleiRegion bypass'

I propose to allow watershed bypass to be specified on a per-module basis. The most straightforward way is to introduce a new configuration setting bypass, which will be true for instance segmenters and false for probability map generators. Taking into account #317, example specs may look as follows:

[
  name      : 'unmicst',
  container : 'labsyspharm/unmicst',
  version   : '2.7.0',
  cmd       : 'python /app/unmicstWrapper.py --stackOutput --outputPath .',
  input     : ''
  channel   : '--channel'
  idxBase   : 1
  bypass    : false
]
[
  name      : 'mesmer',
  container : 'vanvalenlab/deepcell-applications',
  version   : '0.1.0',
  cmd       : 'python /usr/src/app/run_app.py mesmer --output-directory .',
  input     : '--nuclear-image'
  channel   : '--nuclear_channel'
  idxBase   : 0
  bypass    : true
]
@ArtemSokolov ArtemSokolov added the segmentation Issues related to segmentation (including probability map generation) label Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
segmentation Issues related to segmentation (including probability map generation)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant