Skip to content

Commit

Permalink
Update draw_label in labelme2voc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
708yamaguchi committed Jul 9, 2018
1 parent 328d50c commit 65bbb12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions examples/instance_segmentation/labelme2voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,8 @@ def main():
)

np.save(out_cls_file, cls)
label_names = ['%d: %s' % (cls_id, cls_name)
for cls_id, cls_name in enumerate(class_names)]
clsv = labelme.utils.draw_label(
cls, img, label_names, colormap=colormap)
cls, img, class_names, colormap=colormap)
PIL.Image.fromarray(clsv).save(out_clsv_file)

# instance label
Expand Down
4 changes: 1 addition & 3 deletions examples/semantic_segmentation/labelme2voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,8 @@ def main():

np.save(out_lbl_file, lbl)

label_names = ['%d: %s' % (cls_id, cls_name)
for cls_id, cls_name in enumerate(class_names)]
viz = labelme.utils.draw_label(
lbl, img, label_names, colormap=colormap)
lbl, img, class_names, colormap=colormap)
PIL.Image.fromarray(viz).save(out_viz_file)


Expand Down

0 comments on commit 65bbb12

Please sign in to comment.