imgviz 1.7.6
pip install imgviz
Latest version
Released:
Image Visualization Tools
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Kentaro Wada
- Requires: Python >=3.9
-
Provides-Extra:
all
,test
Classifiers
- Development Status
- Environment
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Project description
imgviz
Image Visualization Tools
Installation
pip install imgviz
# there are optional dependencies like skimage, below installs all.
pip install imgviz[all]
Dependencies
Getting Started
# getting_started.py
import 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
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: Kentaro Wada
- Requires: Python >=3.9
-
Provides-Extra:
all
,test
Classifiers
- Development Status
- Environment
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file imgviz-1.7.6.tar.gz
.
File metadata
- Download URL: imgviz-1.7.6.tar.gz
- Upload date:
- Size: 8.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4708429c90a3220ac39fa8ad330908fdbdec4fffca01b514a7f581241a536107 |
|
MD5 | ec6521e560157f17ee617850767ba3e4 |
|
BLAKE2b-256 | 58abb4c7671e36c426de4bb7341602cb51d3dfe2d18efb1dd0b6f1c98003032c |
File details
Details for the file imgviz-1.7.6-py3-none-any.whl
.
File metadata
- Download URL: imgviz-1.7.6-py3-none-any.whl
- Upload date:
- Size: 7.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6afccf52e66ad49032ca748f86580dca8c5fa8462f23836da8fe2ed2249fc4a9 |
|
MD5 | c6f8f7703b23ee59509a9c17a69e45b9 |
|
BLAKE2b-256 | cacdfed922713ddd01279e9751f8fff85ab9302754364c6c7e22c9de54b9ca29 |