{"id":15372463,"url":"https://github.com/wkentaro/imgviz","last_synced_at":"2025-05-15T07:04:22.141Z","repository":{"id":33899866,"uuid":"163167512","full_name":"wkentaro/imgviz","owner":"wkentaro","description":"Image Visualization Tools (object detection, semantic and instance segmentation)","archived":false,"fork":false,"pushed_at":"2024-11-22T08:44:13.000Z","size":33781,"stargazers_count":253,"open_issues_count":1,"forks_count":30,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-14T10:42:48.540Z","etag":null,"topics":["deep-learning","image-visualization","instance-segmentation","object-detection","semantic-segmentation"],"latest_commit_sha":null,"homepage":"https://imgviz.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wkentaro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["wkentaro"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2018-12-26T10:27:22.000Z","updated_at":"2025-03-28T08:15:39.000Z","dependencies_parsed_at":"2024-12-06T14:02:16.458Z","dependency_job_id":"d8431625-54b4-461a-a619-f0d13b786973","html_url":"https://github.com/wkentaro/imgviz","commit_stats":{"total_commits":676,"total_committers":7,"mean_commits":96.57142857142857,"dds":"0.12869822485207105","last_synced_commit":"ecde6c5434f0fcbc28d153f53b71a964e587256d"},"previous_names":[],"tags_count":89,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentaro%2Fimgviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentaro%2Fimgviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentaro%2Fimgviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkentaro%2Fimgviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wkentaro","download_url":"https://codeload.github.com/wkentaro/imgviz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292039,"owners_count":22046426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-learning","image-visualization","instance-segmentation","object-detection","semantic-segmentation"],"created_at":"2024-10-01T13:51:08.001Z","updated_at":"2025-05-15T07:04:22.070Z","avatar_url":"https://github.com/wkentaro.png","language":"Python","funding_links":["https://github.com/sponsors/wkentaro"],"categories":[],"sub_categories":[],"readme":"\u003c!-- DO NOT EDIT THIS FILE MANUALLY. This file is generated by generate_readme.py. --\u003e\n\n\u003ch1 align=\"center\"\u003e\n  imgviz\n\u003c/h1\u003e\n\n\u003ch4 align=\"center\"\u003e\n  Image Visualization Tools\n\u003c/h4\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://pypi.python.org/pypi/imgviz\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/imgviz.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/imgviz\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/imgviz.svg\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/wkentaro/imgviz/actions\"\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/workflows/ci/badge.svg\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"#installation\"\u003e\u003cb\u003eInstallation\u003c/b\u003e\u003c/a\u003e |\n  \u003ca href=\"#getting-started\"\u003e\u003cb\u003eGetting Started\u003c/b\u003e\u003c/a\u003e |\n  \u003ca href=\"#examples\"\u003e\u003cb\u003eExamples\u003c/b\u003e\u003c/a\u003e |\n  \u003ca href=\"https://github.com/wkentaro/imgviz-cpp\"\u003e\u003cb\u003eC++ Version\u003c/b\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr/\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/.readme/getting_started.jpg\" width=\"95%\"\u003e\n\u003c/div\u003e\n\n## Installation\n\n```bash\npip install imgviz\n\n# there are optional dependencies like skimage, below installs all.\npip install imgviz[all]\n```\n\n\n## Dependencies\n\n- [matplotlib](https://pypi.org/project/matplotlib)\n- [numpy](https://pypi.org/project/numpy)\n- [Pillow\u003e=5.3.0](https://pypi.org/project/Pillow)\n- [PyYAML](https://pypi.org/project/PyYAML)\n\n## Getting Started\n\n```python\n# getting_started.py\n\nimport imgviz\n\n# sample data of rgb, depth, class label and instance masks\ndata = imgviz.data.arc2017()\n\nrgb = data[\"rgb\"]\ngray = imgviz.rgb2gray(rgb)\n\n# colorize depth image with JET colormap\ndepth = data[\"depth\"]\ndepthviz = imgviz.depth2rgb(depth, min_value=0.3, max_value=1)\n\n# colorize label image\nclass_label = data[\"class_label\"]\nlabelviz = imgviz.label2rgb(\n    class_label, image=gray, label_names=data[\"class_names\"], font_size=20\n)\n\n# instance bboxes\nbboxes = data[\"bboxes\"].astype(int)\nlabels = data[\"labels\"]\nmasks = data[\"masks\"] == 1\ncaptions = [data[\"class_names\"][l] for l in labels]\nmaskviz = imgviz.instances2rgb(gray, masks=masks, labels=labels, captions=captions)\n\n# tile instance masks\ninsviz = [\n    (rgb * m[:, :, None])[b[0] : b[2], b[1] : b[3]] for b, m in zip(bboxes, masks)\n]\ninsviz = imgviz.tile(imgs=insviz, border=(255, 255, 255))\ninsviz = imgviz.resize(insviz, height=rgb.shape[0])\n\n# tile visualization\ntiled = imgviz.tile(\n    [rgb, depthviz, labelviz, maskviz, insviz],\n    shape=(1, 5),\n    border=(255, 255, 255),\n    border_width=5,\n)\n```\n\n## [Examples](examples)\n\n\u003ctable\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cpre\u003e\u003ca href=\"examples/centerize.py\"\u003eexamples/centerize.py\u003c/a\u003e\u003c/pre\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/examples/.readme/centerize.jpg\" width=\"53.333333333333336%\" /\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cpre\u003e\u003ca href=\"examples/depth2rgb.py\"\u003eexamples/depth2rgb.py\u003c/a\u003e\u003c/pre\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/examples/.readme/depth2rgb.jpg\" width=\"78.16091954022988%\" /\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cpre\u003e\u003ca href=\"examples/draw.py\"\u003eexamples/draw.py\u003c/a\u003e\u003c/pre\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/examples/.readme/draw.jpg\" width=\"37.79047619047619%\" /\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cpre\u003e\u003ca href=\"examples/flow2rgb.py\"\u003eexamples/flow2rgb.py\u003c/a\u003e\u003c/pre\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/examples/.readme/flow2rgb.jpg\" width=\"52.21052631578947%\" /\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cpre\u003e\u003ca href=\"examples/instances2rgb.py\"\u003eexamples/instances2rgb.py\u003c/a\u003e\u003c/pre\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/examples/.readme/instances2rgb.jpg\" width=\"66.35451505016722%\" /\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cpre\u003e\u003ca href=\"examples/label2rgb.py\"\u003eexamples/label2rgb.py\u003c/a\u003e\u003c/pre\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/examples/.readme/label2rgb.jpg\" width=\"76.01532567049807%\" /\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cpre\u003e\u003ca href=\"examples/nchannel2rgb.py\"\u003eexamples/nchannel2rgb.py\u003c/a\u003e\u003c/pre\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/examples/.readme/nchannel2rgb.jpg\" width=\"52.21052631578947%\" /\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cpre\u003e\u003ca href=\"examples/plot_trajectory.py\"\u003eexamples/plot_trajectory.py\u003c/a\u003e\u003c/pre\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/examples/.readme/plot_trajectory.jpg\" width=\"26.86868686868687%\" /\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cpre\u003e\u003ca href=\"examples/resize.py\"\u003eexamples/resize.py\u003c/a\u003e\u003c/pre\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/examples/.readme/resize.jpg\" width=\"47.238095238095234%\" /\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\t\u003ctr\u003e\n\t\t\u003ctd\u003e\u003cpre\u003e\u003ca href=\"examples/tile.py\"\u003eexamples/tile.py\u003c/a\u003e\u003c/pre\u003e\u003c/td\u003e\n\t\t\u003ctd\u003e\u003cimg src=\"https://github.com/wkentaro/imgviz/raw/main/examples/.readme/tile.jpg\" width=\"35.812274368231044%\" /\u003e\u003c/td\u003e\n\t\u003c/tr\u003e\n\u003c/table\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkentaro%2Fimgviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwkentaro%2Fimgviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkentaro%2Fimgviz/lists"}