<!-- DO NOT EDIT THIS FILE MANUALLY. This file is generated by generate_readme.py. -->
# imgviz: Image Visualization Tools
[![PyPI Version](https://img.shields.io/pypi/v/imgviz.svg)](https://pypi.python.org/pypi/imgviz)
[![Python Versions](https://img.shields.io/pypi/pyversions/imgviz.svg)](https://pypi.org/project/imgviz)
[![Build Status](https://travis-ci.com/wkentaro/imgviz.svg?token=zM5rExyvuRoJThsnqHAF&branch=master)](https://travis-ci.com/wkentaro/imgviz)
## Installation
```bash
pip install imgviz
```
## Dependencies
- [matplotlib](https://pypi.org/project/matplotlib)
- [numpy](https://pypi.org/project/numpy)
- [Pillow](https://pypi.org/project/Pillow)
- [scikit-image](https://pypi.org/project/scikit-image)
## 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=(2, 3),
border=(255, 255, 255),
)
```
<img src=".readme/getting_started.jpg" width="75%" />
## [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="63.33333333333333%" /></td>
</tr>
<tr>
<td><pre><a href="examples/depth2rgb.py">examples/depth2rgb.py</a></pre></td>
<td><img src="examples/.readme/depth2rgb.jpg" width="62.149532710280376%" /></td>
</tr>
<tr>
<td><pre><a href="examples/draw.py">examples/draw.py</a></pre></td>
<td><img src="examples/.readme/draw.jpg" width="57.081545064377686%" /></td>
</tr>
<tr>
<td><pre><a href="examples/flow.py">examples/flow.py</a></pre></td>
<td><img src="examples/.readme/flow.jpg" width="62.149532710280376%" /></td>
</tr>
<tr>
<td><pre><a href="examples/instances2rgb.py">examples/instances2rgb.py</a></pre></td>
<td><img src="examples/.readme/instances2rgb.jpg" width="76.657060518732%" /></td>
</tr>
<tr>
<td><pre><a href="examples/label2rgb.py">examples/label2rgb.py</a></pre></td>
<td><img src="examples/.readme/label2rgb.jpg" width="78.31412103746398%" /></td>
</tr>
<tr>
<td><pre><a href="examples/resize.py">examples/resize.py</a></pre></td>
<td><img src="examples/.readme/resize.jpg" width="56.9593147751606%" /></td>
</tr>
<tr>
<td><pre><a href="examples/tile.py">examples/tile.py</a></pre></td>
<td><img src="examples/.readme/tile.jpg" width="63.55140186915888%" /></td>
</tr>
<tr>
<td><pre><a href="examples/trajectory.py">examples/trajectory.py</a></pre></td>
<td><img src="examples/.readme/trajectory.jpg" width="33.333333333333336%" /></td>
</tr>
</table>
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
imgviz-0.1.12.tar.gz (43个子文件)
imgviz-0.1.12
MANIFEST.in 57B
PKG-INFO 6KB
imgviz.egg-info
PKG-INFO 6KB
requires.txt 37B
SOURCES.txt 1KB
top_level.txt 19B
dependency_links.txt 1B
imgviz
centerize.py 1KB
data
arc2017
1532900700692405455.npz 11.43MB
1532900700692405455.jpg 50KB
__pycache__
__init__.cpython-36.pyc 889B
class_names.txt 595B
__init__.py 657B
middlebury
grove3.flo 2.34MB
grove3.png 590KB
__init__.py 1KB
kitti
odometry
00.txt 712KB
__init__.py 700B
__pycache__
__init__.cpython-36.pyc 158B
__init__.py 116B
resize.py 2KB
label.py 3KB
flow.py 3KB
trajectory.py 2KB
__init__.py 580B
depth.py 2KB
_io
opencv.py 421B
pyplot.py 242B
__init__.py 232B
_pyglet.py 2KB
base.py 258B
tile.py 2KB
instances.py 3KB
color.py 2KB
draw.py 2KB
external
transformations.py 68KB
__init__.py 0B
setup.cfg 121B
requirements.txt 37B
setup.py 2KB
README.md 3KB
github2pypi
__init__.py 53B
replace_url.py 1002B
共 43 条
- 1
资源评论
- 芬儿听雨眠2022-06-22用户下载后在一定时间内未进行评价,系统默认好评。
- 2301_771407632023-09-19资源简直太好了,完美解决了当下遇到的难题,这样的资源很难不支持~
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功