Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
UNet_pytorch
Commits
b7750bcd
"vscode:/vscode.git/clone" did not exist on "da0562fcf4883bf2e61659caf384327724a19999"
Commit
b7750bcd
authored
Sep 26, 2023
by
yongshk
Browse files
add new
parents
Pipeline
#574
canceled with stages
Changes
21
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
utils/utils.py
utils/utils.py
+13
-0
No files found.
utils/utils.py
0 → 100644
View file @
b7750bcd
import
matplotlib.pyplot
as
plt
def
plot_img_and_mask
(
img
,
mask
):
classes
=
mask
.
max
()
+
1
fig
,
ax
=
plt
.
subplots
(
1
,
classes
+
1
)
ax
[
0
].
set_title
(
'Input image'
)
ax
[
0
].
imshow
(
img
)
for
i
in
range
(
classes
):
ax
[
i
+
1
].
set_title
(
f
'Mask (class
{
i
+
1
}
)'
)
ax
[
i
+
1
].
imshow
(
mask
==
i
)
plt
.
xticks
([]),
plt
.
yticks
([])
plt
.
show
()
Prev
1
2
Next
Write
Preview
Markdown
is supported
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