浏览代码

Fix lblsave

Kentaro Wada 5 年之前
父节点
当前提交
a9f562df67
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      labelme/utils/_io.py

+ 1 - 1
labelme/utils/_io.py

@@ -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(