Skip to content

Commit

Permalink
Support imgviz >= 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Sep 23, 2021
1 parent 1a425b2 commit 783f1f7
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions examples/instance_segmentation/labelme2voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ def main():
np.save(out_cls_file, cls)
if not args.noviz:
clsv = imgviz.label2rgb(
label=cls,
img=imgviz.rgb2gray(img),
cls,
imgviz.rgb2gray(img),
label_names=class_names,
font_size=15,
loc="rb",
Expand All @@ -126,8 +126,8 @@ def main():
instance_ids = np.unique(ins)
instance_names = [str(i) for i in range(max(instance_ids) + 1)]
insv = imgviz.label2rgb(
label=ins,
img=imgviz.rgb2gray(img),
ins,
imgviz.rgb2gray(img),
label_names=instance_names,
font_size=15,
loc="rb",
Expand Down
4 changes: 2 additions & 2 deletions examples/semantic_segmentation/labelme2voc.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def main():

if not args.noviz:
viz = imgviz.label2rgb(
label=lbl,
img=imgviz.rgb2gray(img),
lbl,
imgviz.rgb2gray(img),
font_size=15,
label_names=class_names,
loc="rb",
Expand Down
4 changes: 2 additions & 2 deletions labelme/cli/draw_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def main():
for name, value in label_name_to_value.items():
label_names[value] = name
lbl_viz = imgviz.label2rgb(
label=lbl,
img=imgviz.asgray(img),
lbl,
imgviz.asgray(img),
label_names=label_names,
font_size=30,
loc="rb",
Expand Down
2 changes: 1 addition & 1 deletion labelme/cli/json_to_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def main():
label_names[value] = name

lbl_viz = imgviz.label2rgb(
label=lbl, img=imgviz.asgray(img), label_names=label_names, loc="rb"
lbl, imgviz.asgray(img), label_names=label_names, loc="rb"
)

PIL.Image.fromarray(img).save(osp.join(out_dir, "img.png"))
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_install_requires():
assert PY3 or PY2

install_requires = [
"imgviz>=0.11,<1.3",
"imgviz>=0.11",
"matplotlib<3.3", # for PyInstaller
"numpy",
"Pillow>=2.8",
Expand Down

0 comments on commit 783f1f7

Please sign in to comment.