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.1.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.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: edolview-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0f566e16a3e9faf824c4e083a95f9a680438c07249ea0ce6563c221d6d5c3afe
MD5 17ac8b35d8694bc8080914a79a943512
BLAKE2b-256 f08b6689dd97ff0390cec6e0af799c5c4f86a764977f872fa467a24ac4cb9f42

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edolview-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f6ece13065cb0dceb60c3774d9073080bf74b7ad39bda74869ac34e655cbaa1
MD5 a84c2f9586190a6acab753b2ca574127
BLAKE2b-256 7aaea5f5ef94c83d6db098f511060829f76d6aff701b23d17b590f715c3bc1d9

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