vanvalenlab / deepcell-tracking

Track cells and build cell lineages
Other
29 stars 6 forks source link

Tracking object does not correctly skip empty frames #35

Closed MekWarrior closed 3 years ago

MekWarrior commented 3 years ago

In _get_cost_matrix there is a check for empty frames via input_pairs. However, this will not catch empty frames correctly because _get_input_pairs will fail when attempting to assemble an empty list with np.stack resulting in ValueError: need at least one array to stack. This error could more appropriately be circumvented by checking for empty frames at the beginning of _get_cost_matrix via cells_in_frame. A warning should also be logged in this circumstance.

willgraf commented 3 years ago

This will be resolved by #53 as the _get_input_pairs function is removed and the method for getting cell classifications is changed.