Commit 8edb5a94 authored by Lamping, Christian's avatar Lamping, Christian
Browse files

Update utils.py

parent d4fa2791
...@@ -586,6 +586,9 @@ def display_top_masks(image, mask, class_ids, class_names, limit=4): ...@@ -586,6 +586,9 @@ def display_top_masks(image, mask, class_ids, class_names, limit=4):
"""Display the given image and the top few class masks.""" """Display the given image and the top few class masks."""
to_display = [] to_display = []
titles = [] titles = []
image = np.array(image)
image = image.transpose(1, 2, 0)
mask = mask.transpose(1, 2, 0)
to_display.append(image) to_display.append(image)
titles.append("H x W={}x{}".format(image.shape[0], image.shape[1])) titles.append("H x W={}x{}".format(image.shape[0], image.shape[1]))
# Pick top prominent classes in this image # Pick top prominent classes in this image
......
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