A remote tool for edolview
Project description
edolview
Lightweight Python client for sending images (numpy or torch tensors) to the edolview-rs application for interactive inspection.
Features
- Accepts
numpy.ndarrayortorch.Tensorinput - Shape normalization:
(B,C,H,W),(C,H,W),(H,W),(H,W,C)->(H,W,C) - Channels 1–4 supported
- Optional area downscale (fast average pooling)
- Optional compression: PNG for integer types (if OpenCV available) or zlib for float data
- Optional float16 conversion for reduced bandwidth
Install
pip install edolview
Usage
import numpy as np
from edolview import send_image
# Example image (H,W,C) uint8
img = np.random.randint(0, 255, (512, 512, 3), dtype=np.uint8)
# Send to viewer running at host:port
send_image("127.0.0.1", 4567, "random", img, float_to_half=True, do_compression=True)
Or use the class directly:
from edolview import EdolView
viewer = EdolView("127.0.0.1", 4567)
viewer.send_image("frame0", img, do_compression=True)
Torch tensor example
import torch
from edolview import send_image
x = torch.rand(1, 3, 256, 256) # BCHW float32
send_image("127.0.0.1", 4567, "torch_example", x, do_compression=True)
Downscale
send_image("127.0.0.1", 4567, "big_image", big_img, downscale_factor=4)
API
send_image(host, port, name, image, float_to_half=True, do_compression=False, downscale_factor=1)
EdolView(host, port).send_image(...)
License
MIT. See LICENSE.
Development
# from python/ directory
python -m pip install -e .[dev]
pytest
Publish (manual)
# Ensure version bumped in pyproject.toml
python -m pip install --upgrade build twine
python -m build
python -m twine upload dist/*
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file edolview-0.1.2.tar.gz.
File metadata
- Download URL: edolview-0.1.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa2d05472271598def0300341a5ebcaadacece1daca027472bbbd8ba30cced99
|
|
| MD5 |
807f09119ef420fbad14e4658de95bc8
|
|
| BLAKE2b-256 |
3f5f9455293be7cfbb6322cbbb3d9524ab6f5fe216e49f986425527b5c4a45d6
|
File details
Details for the file edolview-0.1.2-py3-none-any.whl.
File metadata
- Download URL: edolview-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21a9e2cb61e1e1889785b1c2af6c82340f00bd6239266a386bc8427faeffd5c4
|
|
| MD5 |
d8101513b3d2405d40b7c8b12383f56b
|
|
| BLAKE2b-256 |
8e6abd5622343da9de8018d53f62354ad33e05cf013a8abf3bb38f73d0aa246a
|