<!-- DO NOT EDIT THIS FILE MANUALLY. This file is generated by generate_readme.py. -->
<h1 align="center">
imgviz
</h1>
<h4 align="center">
Image Visualization Tools
</h4>
<div align="center">
<a href="https://pypi.python.org/pypi/imgviz"><img src="https://img.shields.io/pypi/v/imgviz.svg"></a>
<a href="https://pypi.org/project/imgviz"><img src="https://img.shields.io/pypi/pyversions/imgviz.svg"></a>
<a href="https://github.com/wkentaro/imgviz/actions"><img src="https://github.com/wkentaro/imgviz/workflows/ci/badge.svg"></a>
<a href="https://imgviz.readthedocs.io/en/latest/?badge=latest"><img src="https://readthedocs.org/projects/imgviz/badge/?version=latest" alt="Documentation Status" /></a>
</div>
<div align="center">
<a href="https://imgviz.readthedocs.io/en/latest/?badge=latest"><b>Documentation</b></a> |
<a href="#installation"><b>Installation</b></a> |
<a href="#getting-started"><b>Getting Started</b></a> |
<a href="#examples"><b>Examples</b></a> |
<a href="https://github.com/wkentaro/imgviz-cpp"><b>C++ Version</b></a>
</div>
<br/>
<div align="center">
<img src=".readme/getting_started.jpg" width="75%">
</div>
## Installation
```bash
pip install imgviz
# there are optional dependencies like skimage, below installs all.
pip install imgviz[all]
```
## Dependencies
- [matplotlib](https://pypi.org/project/matplotlib)
- [numpy](https://pypi.org/project/numpy)
- [Pillow>=5.3.0](https://pypi.org/project/Pillow)
- [PyYAML](https://pypi.org/project/PyYAML)
## Getting Started
```python
# getting_started.py
import imgviz
# sample data of rgb, depth, class label and instance masks
data = imgviz.data.arc2017()
# colorize depth image with JET colormap
depth = data["depth"]
depthviz = imgviz.depth2rgb(depth, min_value=0.3, max_value=1)
# colorize label image
class_label = data["class_label"]
labelviz = imgviz.label2rgb(class_label, label_names=data["class_names"])
# instance bboxes
rgb = data["rgb"]
bboxes = data["bboxes"].astype(int)
labels = data["labels"]
captions = [data["class_names"][l] for l in labels]
bboxviz = imgviz.instances2rgb(image=rgb, bboxes=bboxes, labels=labels, captions=captions)
# instance masks
masks = data["masks"] == 1
maskviz = imgviz.instances2rgb(image=rgb, masks=masks, labels=labels, captions=captions)
# tile instance masks
insviz = [(rgb * m[:, :, None])[b[0] : b[2], b[1] : b[3]] for b, m in zip(bboxes, masks)]
insviz = imgviz.tile(imgs=insviz, border=(255, 255, 255))
# tile visualization
tiled = imgviz.tile(
[rgb, depthviz, labelviz, bboxviz, maskviz, insviz],
shape=(1, 6),
border=(255, 255, 255),
border_width=5,
)
```
## [Examples](examples)
<table>
<tr>
<td><pre><a href="examples/centerize.py">examples/centerize.py</a></pre></td>
<td><img src="examples/.readme/centerize.jpg" width="53.333333333333336%" /></td>
</tr>
<tr>
<td><pre><a href="examples/depth2rgb.py">examples/depth2rgb.py</a></pre></td>
<td><img src="examples/.readme/depth2rgb.jpg" width="52.21052631578947%" /></td>
</tr>
<tr>
<td><pre><a href="examples/draw.py">examples/draw.py</a></pre></td>
<td><img src="examples/.readme/draw.jpg" width="37.79047619047619%" /></td>
</tr>
<tr>
<td><pre><a href="examples/flow2rgb.py">examples/flow2rgb.py</a></pre></td>
<td><img src="examples/.readme/flow2rgb.jpg" width="52.21052631578947%" /></td>
</tr>
<tr>
<td><pre><a href="examples/instances2rgb.py">examples/instances2rgb.py</a></pre></td>
<td><img src="examples/.readme/instances2rgb.jpg" width="66.35451505016722%" /></td>
</tr>
<tr>
<td><pre><a href="examples/label2rgb.py">examples/label2rgb.py</a></pre></td>
<td><img src="examples/.readme/label2rgb.jpg" width="76.01532567049807%" /></td>
</tr>
<tr>
<td><pre><a href="examples/nchannel2rgb.py">examples/nchannel2rgb.py</a></pre></td>
<td><img src="examples/.readme/nchannel2rgb.jpg" width="52.21052631578947%" /></td>
</tr>
<tr>
<td><pre><a href="examples/plot_trajectory.py">examples/plot_trajectory.py</a></pre></td>
<td><img src="examples/.readme/plot_trajectory.jpg" width="26.86868686868687%" /></td>
</tr>
<tr>
<td><pre><a href="examples/resize.py">examples/resize.py</a></pre></td>
<td><img src="examples/.readme/resize.jpg" width="47.238095238095234%" /></td>
</tr>
<tr>
<td><pre><a href="examples/tile.py">examples/tile.py</a></pre></td>
<td><img src="examples/.readme/tile.jpg" width="35.812274368231044%" /></td>
</tr>
</table>
没有合适的资源?快使用搜索试试~ 我知道了~
imgviz:图像可视化工具(对象检测,语义和实例分割)
共106个文件
py:60个
jpg:14个
rst:8个
需积分: 48 9 下载量 106 浏览量
2021-05-03
12:12:20
上传
评论
收藏 8.28MB ZIP 举报
温馨提示
imgviz 图像可视化工具 | | 安装 pip install imgviz # there are optional dependencies like skimage, below installs all. pip install imgviz[all] 依存关系 枕头> = 5.3.0 PyYAML 入门 # getting_started.py import imgviz # sample data of rgb, depth, class label and instance masks data = imgviz . data . arc2017 () # colorize depth image with JET colormap depth = data [ "depth" ] depthviz = imgviz . depth2rgb ( depth , mi
资源推荐
资源详情
资源评论
收起资源包目录
imgviz:图像可视化工具(对象检测,语义和实例分割) (106个子文件)
.flake8 117B
grove3.flo 2.34MB
.gitignore 91B
.gitignore 11B
.gitmodules 97B
MANIFEST.in 75B
getting_started.jpg 415KB
nchannel2rgb.jpg 105KB
tile.jpg 70KB
draw.jpg 69KB
depth2rgb.jpg 67KB
instances2rgb.jpg 61KB
resize.jpg 61KB
centerize.jpg 58KB
flow2rgb.jpg 52KB
rgb.jpg 50KB
label2rgb.jpg 43KB
rgb.jpg 42KB
plot_trajectory.jpg 24KB
getting_started.jpg 36B
LICENSE 1KB
Makefile 678B
README.md 4KB
res4.npz 2.72MB
data.npz 699KB
data.npz 426KB
grove3.png 590KB
lena.png 463KB
transformations.py 68KB
draw.py 10KB
conf.py 9KB
label.py 6KB
pyglet_imshow.py 5KB
instances.py 4KB
pyglet_threaded_image_viewer.py 4KB
color.py 4KB
tile.py 4KB
generate_readme.py 3KB
resize.py 3KB
setup.py 3KB
flow.py 3KB
depth.py 3KB
_docstring_check.py 3KB
nchannel.py 2KB
draw.py 2KB
centerize.py 2KB
getting_started.py 2KB
trajectory.py 2KB
normalize.py 2KB
label2rgb.py 1KB
instances2rgb.py 1KB
__init__.py 1KB
tile.py 954B
__init__.py 919B
centerize.py 901B
nchannel2rgb.py 883B
opencv.py 848B
__init__.py 840B
base.py 797B
resize.py 717B
__init__.py 700B
depth2rgb.py 658B
test_label.py 641B
flow2rgb.py 630B
test_centerize.py 624B
__init__.py 622B
base.py 587B
test_resize.py 574B
pyglet_imshow.py 537B
pyplot.py 506B
__init__.py 410B
test_tile.py 404B
test_pyplot.py 327B
test_text.py 308B
__init__.py 277B
plot_trajectory.py 268B
test_flow.py 256B
test_rectangle.py 254B
test_depth.py 252B
pyglet_threaded_image_viewer.py 249B
base.py 244B
test_trajectory.py 203B
__init__.py 199B
pyglet_run.py 184B
__init__.py 158B
test_arc2017.py 103B
getting_started.py 27B
__init__.py 0B
index.rst 440B
index.rst 393B
index.rst 287B
index.rst 254B
installation.rst 170B
index.rst 153B
getting_started.rst 140B
index.rst 120B
pyproject.toml 156B
00.txt 712KB
class_names.txt 595B
requirements.txt 151B
共 106 条
- 1
- 2
资源评论
刘霏霏
- 粉丝: 34
- 资源: 4717
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功