vanvalenlab / deepcell-tracking

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

Cast data to correct type in `get_image_features` #114

Closed msschwartz21 closed 1 year ago

msschwartz21 commented 1 year ago

This PR fixes a bug in get_image_features. If the X data is passed in with an integer type (instead of float), the output of crop_mode='fixed' and norm=True is incorrect. In the examples below, the first image is incorrect while the second is correct.

This PR eliminates the bug by casting X data to float32 and y data to int32 to avoid incorrect use of the function.

Screen Shot 2023-01-24 at 7 34 48 PM Screen Shot 2023-01-24 at 7 34 38 PM