Skip to content

Commit 8b3360e

Browse files
committed
fix interpolation
1 parent db78ca0 commit 8b3360e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

SwissKnife/mrcnn/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,10 @@ def minimize_mask(bbox, mask, mini_shape):
529529
530530
See inspect_data.ipynb notebook for more details.
531531
"""
532-
mini_mask = np.zeros(mini_shape + (mask.shape[-1],), dtype=bool)
532+
mini_mask = np.zeros((mini_shape[0], mini_shape[1], mask.shape[-1]), dtype=np.uint8)
533533
for i in range(mask.shape[-1]):
534534
# Pick slice and cast to bool in case load_mask() returned wrong dtype
535-
m = mask[:, :, i].astype(bool)
535+
m = mask[:, :, i]
536536
y1, x1, y2, x2 = bbox[i][:4]
537537
m = m[y1:y2, x1:x2]
538538
if m.size == 0:

0 commit comments

Comments
 (0)