Display tensors directly from GPU
Project description
TorchWindow
TorchWindow is a Python library that enables viewing of PyTorch Cuda Tensors on screen directly from GPU memory (No copying back and forth between GPU and CPU) via OpenGL-Cuda interop.
Install
pip install torchwindow
Use
To create a window
from torchwindow import Window
window = Window(640, 480, name="Torch Window")
To display an image tensor in the window
window.draw(image)
image must be a tensor with the following properties:
- 3 dimensions, specifically
(rows, columns, channels)in that order. channelsdimension must be of size 4 (r, g, b, a)
Example
To check if torchwindow is properly installed try running
python3 -m torchwindow.example
You should see this window appear for 5 seconds before closing
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
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 torchwindow-1.1.0.tar.gz.
File metadata
- Download URL: torchwindow-1.1.0.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.8.15+ Linux/5.15.0-52-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f19f4299a1241cc94cb30c3dec7773cec29c8e54f2538aee22ffc897630f5fc
|
|
| MD5 |
a30ec79dbf19e47054c66c28d71b4b27
|
|
| BLAKE2b-256 |
7562b90ae15b25b48d271cd0b48053cd53994733fca1ba3c079a380a00cd6ec2
|
File details
Details for the file torchwindow-1.1.0-py3-none-any.whl.
File metadata
- Download URL: torchwindow-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.2 CPython/3.8.15+ Linux/5.15.0-52-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c8554a2a9ffa0c6b2601d8dfb3c04b3deb0269abaaba0c3036ab1c32a541d5b
|
|
| MD5 |
97a3f05e54490ae7ebca5f84364dd909
|
|
| BLAKE2b-256 |
8ccb85329967281307852ccd3fe65d9fab3f4f828d956a632dde6c17f747943a
|