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
OpenDAS
pydensecrf
Commits
8b00be1e
Commit
8b00be1e
authored
Apr 24, 2017
by
lucasb-eyer
Browse files
Even clearer message in inference.py example about 0
parent
51d31c2b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
examples/inference.py
examples/inference.py
+2
-1
No files found.
examples/inference.py
View file @
8b00be1e
...
@@ -45,7 +45,8 @@ colors, labels = np.unique(anno_lbl, return_inverse=True)
...
@@ -45,7 +45,8 @@ colors, labels = np.unique(anno_lbl, return_inverse=True)
# But remove the all-0 black, that won't exist in the MAP!
# But remove the all-0 black, that won't exist in the MAP!
HAS_UNK
=
0
in
colors
HAS_UNK
=
0
in
colors
if
HAS_UNK
:
if
HAS_UNK
:
print
(
"Found a full-black pixel in annotation image, assuming it means 'unknown' label!"
)
print
(
"Found a full-black pixel in annotation image, assuming it means 'unknown' label, and will thus not be present in the output!"
)
print
(
"If 0 is an actual label for you, consider writing your own code, or simply giving your labels only non-zero values."
)
colors
=
colors
[
1
:]
colors
=
colors
[
1
:]
#else:
#else:
# print("No single full-black pixel found in annotation image. Assuming there's no 'unknown' label!")
# print("No single full-black pixel found in annotation image. Assuming there's no 'unknown' label!")
...
...
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