Commit 2c5879b6 authored by Lamping, Christian's avatar Lamping, Christian
Browse files

Update utils.py

parent 1245c580
...@@ -306,7 +306,7 @@ class Dataset(object): ...@@ -306,7 +306,7 @@ class Dataset(object):
scores.append(score) scores.append(score)
image = self.load_image(image_id) image = self.load_image(image_id)
mask = np.stack(instance_masks) mask = np.dstack(instance_masks)
class_ids = np.array(class_ids, dtype=np.int32) class_ids = np.array(class_ids, dtype=np.int32)
scores = np.array(scores, dtype=np.float32) scores = np.array(scores, dtype=np.float32)
_, window, scale, padding, crop = resize_image( _, window, scale, padding, crop = resize_image(
...@@ -315,7 +315,7 @@ class Dataset(object): ...@@ -315,7 +315,7 @@ class Dataset(object):
min_scale=None, min_scale=None,
max_dim=384) max_dim=384)
mask = resize_mask(mask, scale, padding, crop) mask = resize_mask(mask, scale, padding, crop)
print(mask.shape) mask = mask.transpose(2,0,1)
return mask, class_ids, scores return mask, class_ids, scores
def resize(image, output_shape, order=1, mode='constant', cval=0, clip=True, def resize(image, output_shape, order=1, mode='constant', cval=0, clip=True,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment