vanvalenlab / deepcell-tf

Deep Learning Library for Single Cell Analysis
https://deepcell.readthedocs.io
Other
402 stars 90 forks source link

Fix untiling corner-case when no padding in one dimension #673

Closed rossbar closed 11 months ago

rossbar commented 11 months ago

What

Closes #665. As noted there, the issue arises from pads of (0, 0) which subsequently lead to 0:0 slices in untiling, giving arrays with shape 0 for that dimension.

AFAICT, the only way to hit this corner case is when one of the dimensions is smaller than model_image_shape, but the other is exactly model_image_shape. If both dimensions are >= model_image_shape, then padding should be False if I'm following the logic correctly.

Why

Bugfix