Browse Source

Use gray for label2rgb

Kentaro Wada 5 years ago
parent
commit
926eca4135
1 changed files with 1 additions and 1 deletions
  1. 1 1
      labelme/cli/json_to_dataset.py

+ 1 - 1
labelme/cli/json_to_dataset.py

@@ -56,7 +56,7 @@ def main():
     for name, value in label_name_to_value.items():
     for name, value in label_name_to_value.items():
         label_names[value] = name
         label_names[value] = name
     lbl_viz = imgviz.label2rgb(
     lbl_viz = imgviz.label2rgb(
-        label=lbl, img=img, label_names=label_names, loc='rb'
+        label=lbl, img=imgviz.rgb2gray(img), label_names=label_names, loc='rb'
     )
     )
 
 
     PIL.Image.fromarray(img).save(osp.join(out_dir, 'img.png'))
     PIL.Image.fromarray(img).save(osp.join(out_dir, 'img.png'))