Skip to main content

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.ndarray or torch.Tensor input
  • 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

edolview-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

edolview-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file edolview-0.1.0.tar.gz.

File metadata

  • Download URL: edolview-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for edolview-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3cb615f00549c2aa4b9f892b4bb44bed1a1b2fc9cf6825be94da1e1e4bbf4446
MD5 0bb1b9f9afdba162301837a2f8cc4f66
BLAKE2b-256 94f361df38ec38f3c96c54ab1b61938c44b1ae2fd80fb5eaf22ca179a56a4c57

See more details on using hashes here.

File details

Details for the file edolview-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: edolview-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for edolview-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f20b5088956d80f996c46f1ca6cefe8e8ac580c22d64b722223a41e3806605a5
MD5 6d3ade33d51f8162744615ce4a011134
BLAKE2b-256 7b2d655f641a93332f63e03aeed5620a72a4c6d8585bcc1d1c95d642efe45da7

See more details on using hashes here.

Supported by

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