self-use toolkits
Project description
kiui kit
Utils for self-use.
Install
# released
pip install kiui
# latest
pip install git+https://github.com/ashawkey/kiuikit.git
Usage
import kiui
### auto import
kiui.env() # os, glob, math, time, random, argparse
kiui.env('data') # above + np, plt, cv2, Image, ...
kiui.env('torch') # above + torch, nn, F, ...
### quick inspection of array-like object
x = torch.tensor(...)
y = np.array(...)
kiui.lo(x)
kiui.lo(x, y)
kiui.lo(kiui) # or any other object (just print with name)
### visualization tools
img = torch.rand(3, 256, 256)
# tensor of [3, H, W], [1, H, W], [H, W] / array of [H, W ,3], [H, W, 1], [H, W] in [0, 1]
kiui.vis.plot_image(img)
### io utils
# read image as-is in RGB order
img = kiui.read_image('path/to/image', mode='float') # pil, float, uint8, tensor
# write image
kiui.write_image('path/to/image', img)
Project details
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
kiui-0.1.4.tar.gz
(9.5 kB
view hashes)
Built Distribution
kiui-0.1.4-py3-none-any.whl
(10.4 kB
view hashes)