Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lamping, Christian
chicken_segmentation_dataset
Commits
8edb5a94
Commit
8edb5a94
authored
Oct 18, 2021
by
Lamping, Christian
Browse files
Update utils.py
parent
d4fa2791
Changes
1
Hide whitespace changes
Inline
Side-by-side
utils.py
View file @
8edb5a94
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment