royerlab / ultrack

Cell tracking and segmentation software
https://royerlab.github.io/ultrack
BSD 3-Clause "New" or "Revised" License
64 stars 7 forks source link

Cell splitting when passing in single candidate segmentation #96

Closed gouthamr321 closed 2 months ago

gouthamr321 commented 2 months ago

Hello again,

I am only using a single candidate segmentation and only passing in the cell masks(no raw images) and am noticing there is a lot of cell splitting and also some missing segmentations.....

I have below the original instance segmentation on top and then the tracking output below for that timepoint

Screenshot 2024-04-04 at 12 36 39 PM

Screenshot 2024-04-04 at 12 36 26 PM

I am using the following parameters below:

config.segmentation_config.min_frontier = 0.35 # increase this to get less split cells? config.linking_config.max_neighbors = 5 config.linking_config.max_distance = 50

config.tracking_config.appear_weight = -1.0 config.tracking_config.disappear_weight = -1.0 config.tracking_config.division_weight -0.1

config.tracking_config.window_size = 15 config.tracking_config.overlap_size = 3 config.tracking_config.solution_gap = 0.01

Any suggestion on parameters that I should play around with?

JoOkuma commented 2 months ago

Hey @gouthamr321

To avoid splitting you need to filter intermediate nodes, as you did with minimum_frontier, you can increase it to any value below 1 and maintain your labels. Be sure that no cells size are exceeding the max_area parameter and that track(sigma=None).

If with these changes you're still getting splits there must be a bug and we will fix it.

To decrease the amount of disappearing cells you have to bring the tracking_config weights closer to zero, so they are not penalized for not finding a reliable pair.

gouthamr321 commented 2 months ago

Hi,

Just wanted to confirm that raising the minimum_frontier helped fixed this issue. Thank you!