Skip to content

How is the input segmentation updated during tracking and can that be tuned? #227

@ATB33

Description

@ATB33

Hi,

I have a general question regarding how Ultrack processes the data to track cells. The way I understand it is that you provide a foreground area which can be cells, and contours wich correspond to the edges of the segments. During the tracking the contours might be changed.

Now we segment our images with cellpose before doing the tracking, and the segmentation is pretty accurate. We tried to use the track() function and insert the segmentation as labels, but we always get an error:

TypeError: Implicit conversion to a NumPy array is not allowed. Please use .get() to construct a NumPy array explicitly.

So instead, we used the segmentation as foreground and used skimage.segmentation.find_boundaries(foreground[z].get(), mode="outer") to obtain the edges, and then we run track(config, foreground = segmentation, edges = contours_array, overwrite = True). However, during the tracking there are always cell segments that are fused together, sometimes more than 10 segments to a single one. Our samples have very dense cells, so a lot of the cells touch and therefore have the same edge.

There are two things I am unsure about:

  • In the documentation, it says the foreground is a segmentation probability. Does that mean all pixel values should be between 0 and 1? If so, then I would wonder why it works the way we do it.
  • Is there a way to avoid Ultrack changing the segmentation during tracking? I understand that this is one of the strenghts that you can use the tracking to improve the segmentation, but since our segmentation is quite good already I would like to tone that down. I tried that using parameters such as the max_area (as described in optimizing), but then the fused cells would just disappear. Do you have any tipps on that? How is the input segmentation influenced by the tracking?

Thanks in advance for your time!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions