{"id":23880,"library":"imgviz","title":"imgviz","description":"Image Visualization Tools for segmentation masks, bounding boxes, depth maps, and more. Latest version 2.0.0 (released 2024) with breaking changes to parameter and class names. Requires Python >=3.10. Maintained irregularly by wkentaro.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/wkentaro/imgviz","tags":["visualization","segmentation","bounding-box","depth-maps","image-processing","computer-vision"],"install":[{"cmd":"pip install imgviz","lang":"bash","label":"stable"}],"dependencies":[],"imports":[{"note":"After v2.0.0, many function arguments renamed (e.g., 'img' -> 'image', 'src' -> 'image', 'imgs' -> 'images'). Check docs for new signatures.","wrong":"from imgviz import something_old","symbol":"imgviz","correct":"import imgviz"},{"note":"Class renamed from Depth2RGB to Depth2Rgb in v2.0.0.","wrong":"from imgviz import Depth2RGB","symbol":"Depth2Rgb","correct":"from imgviz import Depth2Rgb"},{"note":"Class renamed from Nchannel2RGB to Nchannel2Rgb in v2.0.0.","wrong":"from imgviz import Nchannel2RGB","symbol":"Nchannel2Rgb","correct":"from imgviz import Nchannel2Rgb"}],"quickstart":{"code":"import numpy as np\nimport imgviz\n\n# Create a sample segmentation mask\nmask = np.zeros((100, 100), dtype=np.int32)\nmask[20:40, 30:70] = 1\nmask[60:80, 10:90] = 2\n\n# Convert label image to RGB visualization\nrgb = imgviz.label2rgb(mask)\n\n# Show or save\n# import matplotlib.pyplot as plt\n# plt.imshow(rgb)\n# plt.show()\n\n# Save an image with labels\nimgviz.io.lblsave('output.png', rgb)\n","lang":"python","description":"Label-to-RGB conversion and saving."},"warnings":[{"fix":"Use new parameter names; e.g., imgviz.draw.rectangle(yx1=(10,20), yx2=(30,40))","message":"v2.0.0 renames many function parameters: `img` -> `image`, `src` -> `image`, `imgs` -> `images`, `aabb1`/`aabb2` -> `yx1`/`yx2`, `shape` -> `height`/`width`/`row`/`col`. Update all call sites.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use new class names: from imgviz import Depth2Rgb, Nchannel2Rgb","message":"Classes `Depth2RGB` and `Nchannel2RGB` renamed to `Depth2Rgb` and `Nchannel2Rgb`.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Use alternative plotting libraries (e.g., matplotlib directly) if needed.","message":"`plot_trajectory()` function removed in v2.0.0 (no more matplotlib dependency).","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Upgrade to Python >=3.10.","message":"Python 3.9 support dropped in v1.8.0; Python 3.10 minimum required for v1.8.0+. v2.0.0 also requires Python >=3.10.","severity":"gotcha","affected_versions":">=1.8.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `image=...` instead of `img=...`.","cause":"Parameter renamed from 'img' to 'image' in v2.0.0.","error":"TypeError: label2rgb() got an unexpected keyword argument 'img'"},{"fix":"Use `from imgviz import Depth2Rgb`.","cause":"Class renamed to Depth2Rgb in v2.0.0.","error":"ImportError: cannot import name 'Depth2RGB' from 'imgviz'"},{"fix":"Use imgviz.io.imread only with imageio backend (or install optional dependencies). Alternatively, use imageio directly.","cause":"OpenCV and pyglet backends for I/O removed in v2.0.0. Default backend may be missing.","error":"FileNotFoundError: [Errno 2] No such file or directory: '...' (when using imread)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}