Skip to main content

Visualize torch tensors EASILY.

Project description

ShowTens : visualize torch tensors EASILY

ShowTens is a simple pytorch package that allows painless and flexible visualizations of image and video tensors.

<ADD VISUALIZATION VIDEO HERE>

Installation

pip install showtens

Make sure torchand torchvision are installed, as the package depends on them.

Usage

import torch
from showTens import showImage

image1 = torch.rand((3,100,100)) # (C,H,W) image
showImage(image1) # Displays the image using matplotlib
image2 = torch.rand((4,4,3,100,100)) # (B1,B2,C,H,W), two batch dimensions
showImage(image2,colums=4) # Will display as a 4*4 grid

from showTens import saveImage
saveImage(tensor=image1,folder='saved_images',name='imagetensor')

from showTens import saveVideo
video1 = torch.rand((60,3,200,200))
saveVideo(tensor=video1,folder='save_videos',name='videotensor',fps=30)
video2 = torch.rand((4,3,200,200)) # (B,T,C,H,W), batch of videos
saveVideo(tensor=video2,folder='save_videos',name='videobatch',fps=30,columns=2) # 2*2 video grid

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

showtens-0.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

showtens-0.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file showtens-0.0.tar.gz.

File metadata

  • Download URL: showtens-0.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for showtens-0.0.tar.gz
Algorithm Hash digest
SHA256 b099b2cb55b5154fc9963ac8dd6af602119abf5d3c829d1a53b42e51ef1bf585
MD5 b6db05d54659c8ccd7215810232304f4
BLAKE2b-256 2338a962ea24b7b92c9f2798ca27dd6ded6af3b8a09956ce6622ffdb22236041

See more details on using hashes here.

File details

Details for the file showtens-0.0-py3-none-any.whl.

File metadata

  • Download URL: showtens-0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for showtens-0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 affea66376dd573967f8abfcb7557a40316183e9ba1c2b6b129b32ffac28e390
MD5 46a8fe2b9100377d4126f579cb419bb4
BLAKE2b-256 7ffb1390ed463afa88c929d280c295432036835ad28897ecf99e9a80e213fcc5

See more details on using hashes here.

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