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

weights question #86

Open tischi opened 4 months ago

tischi commented 4 months ago

cfg.tracking_config.division_weight = -0.001

If we want to encourage that divisions are happening, should we put this to a low or high value?

JoOkuma commented 4 months ago

Hi, @tischi, you should increase it.

When it's zero, it will not penalize divisions.

When positive, the ILP will try to maximize divisions, which is not ideal, and I don't recommend but you're free to do that.

tischi commented 4 months ago

Thanks @JoOkuma!

What would be the use-case for cfg.tracking_config.division_weight = -0.001? Would that still allow divisions? How would that compare to, e.g. cfg.tracking_config.division_weight = -0.1 and cfg.tracking_config.division_weight = -1?

JoOkuma commented 4 months ago

@tischi

division_weight = -1 will have fewer divisions than division_weight = -0.1 which will have fewer divisions than division_weight = -0.01, etc.

Be aware that divisions compete with appearing cells, so if division_weight + w_ij < appear_weight, where w_ij is the association score between two cells, then it will favor creating a new cell rather than dividing it, the ILP selects the variables to maximize our objective.

As a rule of thumb, I usually have division_weight be an epsilon smaller than appear_weight, so appearance still takes priority, but a small overlap (w_ij) will make it favor divisions.