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.3.tar.gz (3.6 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.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: edolview-0.1.3.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

Hashes for edolview-0.1.3.tar.gz
Algorithm Hash digest
SHA256 714cb3182594cfa122f054aeac9d8ad7d7b10f8bb2ff0c590d50433dd981963c
MD5 07fbd10fc46bf865cc7ea9766c61b7eb
BLAKE2b-256 5813e96afa9f9e30fe0925d9f495f56caa84da3abecf578d62657e3fa5b062ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: edolview-0.1.3-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

Hashes for edolview-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 887fe80b2abcc9a125c1f048067e9729f8815863f822fa7035267afcfacb2dfd
MD5 ebedd692b84dac95938b4a29c53b072e
BLAKE2b-256 e6adb0abea168ba961a992b15a6287a95545b9ded2a2f5942a0575d125979cb7

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