"vscode:/vscode.git/clone" did not exist on "bf4388c0db511c6ec92c4831758fe20e9460471c"
Commit 8b00be1e authored by lucasb-eyer's avatar lucasb-eyer
Browse files

Even clearer message in inference.py example about 0

parent 51d31c2b
...@@ -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!")
......
Markdown is supported
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