dchaley / deepcell-imaging

Tools & guidance to scale DeepCell imaging on Google Cloud Batch
8 stars 2 forks source link

Split tiff output by compartment #298

Closed dchaley closed 2 months ago

dchaley commented 3 months ago

Predictions for compartment=both are saved as 2 channels:

In [15]: predictions.shape
Out[15]: (9777, 14239, 1)

In [16]: predictions_both.shape
Out[16]: (9777, 14239, 2)

but we need to output them as separate tiffs.

It's a bit awkward: when running in one mode at a time, we can just specify where to output the tiff.

Running as both is special, maybe we take the given path and MODIFY it,

e.g.

/path/to/my/output.tiff

becomes

/path/to/my/output_wholecell.tiff
/path/to/my/output_nuclear.tiff

Implicit behavior = 😩

Maybe we can "play dumb" and accept a --whole-cell-output-tiff argument and a --nuclear-output-tiff argument … but then complain if the compartment doesn't correspond.

OTOH this could be irritating if we're just trying to output a tiff, changing the compartment. Maaaaybe … we also accept an unqualified input, that only works if compartment isn't both.

🤔