wiggins-lab / SuperSegger

A completely automated MATLAB-based trainable image cell segmentation, fluorescence quantification and analysis suite, particularly well suited for high-throughput time lapse fluorescence microscopy of in vivo bacterial cells.
GNU General Public License v3.0
32 stars 20 forks source link

Modifying Constant Help #8

Closed teranmickens closed 6 years ago

teranmickens commented 6 years ago

Hello!

I have a question about modifying constants. I'm working with E. coli cells that are much larger than the average E.coli cell, and SuperSegger isn't registering some cells as actual cells. I've trained the segments/regions and it's worked really well with cells that are labeled regions. I've attached a picture of what I'm describing. I was wondering if you could offer some advice on modifying constants so they can pick up these cells. If it helps, I'm using a trained version of 60XEc.

Thank you! capture2

stellastyl commented 6 years ago

Hi there!

It looks to me, like you have too many 'blue lines' within your cells - I would play a bit with the intensity thresholds in the modify constants before doing any training to avoid that!

As for the cells it doesn't find, my guess is that it throws them out thinking they are debris. The constants that do this are: CONST.superSeggerOpti.INTENSITY_DIF = 0.15; CONST.superSeggerOpti.PEBBLE_CONST = 1.5;

You can decrease the INTENSITY_DIF and PEBBLE_CONST and see if that works.

Instructions to resave the new constants and try them again are here (https://github.com/wiggins-lab/SuperSegger/wiki/Changing-specific-values-in-the-constants).

If that doesn't work, you can turn off the cleaning of debris CONST.superSeggerOpti.remove_debris = true; CONST.superSeggerOpti.remove_microcolonies = true; But this will cause it to keep a lot of incorrect cells!

Hope this helps

pawiggins commented 6 years ago

teranmickens (& rest of Levin lab):

Basically the cells are the wrong size.

What is available today:

(1) There is built-in support (but not documented) for resizing the cells before segmentation. If you want to do this, update to the most recent version of SS. Then add the field

CONST.superSeggerOpti.rescale = 0.5;

to the CONST structure in processExp before segmentation runs. This will rescale all the images by 50% before running.

(2) Another thing that is probably happening is that the max cell size is too small and so there is code in SS to force the breaking up of large regions that are thought to be cells. You can easily fix this by resetting another existing field like this:

CONST.superSeggerOpti.MAX_WIDTH = 1e10;

These two steps will take you a long way.

Longer term, we have a SS implementation that is resolution independent but I don't know when it will be released.

--PAW