Skip to main content

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


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)

Uploaded Source

Built Distribution

kiui-0.1.4-py3-none-any.whl (10.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page