steinbock icon indicating copy to clipboard operation
steinbock copied to clipboard

Maximum amount of segmented cells bounded from segmentation output file format (16-bit unsigned integer TIFF images)

Open asom opened this issue 1 year ago • 3 comments

Hi, I am running the following command: steinbock segment deepcell --minmax

On a big image, it works fine and segments the image quite well. However, after the segmentation reaches the 65536 cells, it assigns to all the remaining cells the same number(id). Is there any way to circumvent that? For example get as output a 32-but TIFF file?

asom avatar Aug 02 '23 07:08 asom

Hi @asom

Have a look at #132 for how to change the mask bit encoding. @Milad4849 could you please document this somewhere visible? Let's leave this issue open until it's in the docs.

nilseling avatar Aug 02 '23 18:08 nilseling

Thanks @nilseling for your quick response!

Trying to replicate it, running 0.16.1 version, I encounter continiously the same error:

[0m could not open ****my_folder***/STEINBOCK_MASK_DTYPE=uint32: failed to retrieve path for ****my_folder***/STEINBOCK_MASK_DTYPE=uint32: lstat ****my_folder***/STEINBOCK_MASK_DTYPE=uint32: no such file or directory

Somehow recognizes the "STEINBOCK_MASK_DTYPE" as folder extension.

The command I am running is the following:

singularity run -e STEINBOCK_MASK_DTYPE=uint32 -B /sc:/sc docker://ghcr.io/bodenmillergroup/steinbock:0.16.1 segment deepcell --img img --minmax --panel panel.csv -o masks

I would be more than grateful, if you could give me some further insights.

asom avatar Aug 05 '23 16:08 asom

Since you're using Singularity, you'll need to specify the STEINBOCK_MASK_DTYPE environment variable with --env:

singularity run --env STEINBOCK_MASK_DTYPE=uint32 -B /sc:/sc docker://ghcr.io/bodenmillergroup/steinbock:0.16.1 segment deepcell --img img --minmax --panel panel.csv -o masks

Note that this will only work with Singularity 3.6 or newer.

jwindhager avatar Aug 07 '23 09:08 jwindhager