Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wkentaro/imgviz
Image Visualization Tools (object detection, semantic and instance segmentation)
https://github.com/wkentaro/imgviz
deep-learning image-visualization instance-segmentation object-detection semantic-segmentation
Last synced: 8 days ago
JSON representation
Image Visualization Tools (object detection, semantic and instance segmentation)
- Host: GitHub
- URL: https://github.com/wkentaro/imgviz
- Owner: wkentaro
- License: mit
- Created: 2018-12-26T10:27:22.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-12-30T07:57:10.000Z (11 months ago)
- Last Synced: 2024-10-30T02:37:12.842Z (21 days ago)
- Topics: deep-learning, image-visualization, instance-segmentation, object-detection, semantic-segmentation
- Language: Python
- Homepage: https://imgviz.readthedocs.io
- Size: 31.9 MB
- Stars: 245
- Watchers: 11
- Forks: 30
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
imgviz
Image Visualization Tools
## 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.pyimport imgviz
# sample data of rgb, depth, class label and instance masks
data = imgviz.data.arc2017()rgb = data["rgb"]
gray = imgviz.rgb2gray(rgb)# 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, image=gray, label_names=data["class_names"], font_size=20
)# instance bboxes
bboxes = data["bboxes"].astype(int)
labels = data["labels"]
masks = data["masks"] == 1
captions = [data["class_names"][l] for l in labels]
maskviz = imgviz.instances2rgb(gray, 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))
insviz = imgviz.resize(insviz, height=rgb.shape[0])# tile visualization
tiled = imgviz.tile(
[rgb, depthviz, labelviz, maskviz, insviz],
shape=(1, 5),
border=(255, 255, 255),
border_width=5,
)
```## [Examples](examples)
examples/centerize.py
examples/depth2rgb.py
examples/draw.py
examples/flow2rgb.py
examples/instances2rgb.py
examples/label2rgb.py
examples/nchannel2rgb.py
examples/plot_trajectory.py
examples/resize.py
examples/tile.py