提交 a9f562df 编写于 作者: K Kentaro Wada

Fix lblsave

上级 8edd2182
......@@ -14,7 +14,7 @@ def lblsave(filename, lbl):
if lbl.min() >= -1 and lbl.max() < 255:
lbl_pil = PIL.Image.fromarray(lbl.astype(np.uint8), mode='P')
colormap = imgviz.label_colormap()
lbl_pil.putpalette((colormap * 255).astype(np.uint8).flatten())
lbl_pil.putpalette(colormap.flatten())
lbl_pil.save(filename)
else:
raise ValueError(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册