cudacanvas : PyTorch Tensor Image Display in CUDA
(Real-time PyTorch Tensor Image Visualisation in CUDA, Eliminating CPU Transfer)
CudaCanvas is a simple Python module that eliminates CPU transfer for Pytorch tensors for displaying and rendering images in the training or evaluation phase, ideal for machine learning scientists and engineers.
Simplified version that directly displays the image without explicit window creation (cudacanvas >= v1.0.1)
import torch
import cudacanvas
#REPLACE THIS with you training loop
while (True):
#REPLACE THIS with you training code and generation of data
noise_image = torch.rand((4, 500, 500), device="cuda")
#Visualise your data in real-time
cudacanvas.im_show(noise_image)
#OPTIONAL: Terminate training when the window is closed
if cudacanvas.should_close():
cudacanvas.clean_up()
#end process if the window is closed
break
And with explicit window creation
import torch
import cudacanvas
noise_image = torch.rand((4, 500, 500), device="cuda")
cudacanvas.set_image(noise_image)
cudacanvas.create_window()
#replace this with you training loop
while (True):
cudacanvas.render()
if cudacanvas.should_close():
cudacanvas.clean_up()
#end process if the window is closed
break
Installation
Before instllation make sure you have torch with cuda support already installed on your machine
We aligned pytorch and cuda version with our package the supporting packages are torch (2.0.1, 2.1.2 and 2.2.2) and (11.8 and 12.1)
Identify your current torch and cuda version
import torch
torch.__version__
Depending on your torch and cuda you can install the relevant cudacanvas package, for the latest 2.2.2+cu121 you can simply download the latest package
pip install cudacanvas
For other torch and cuda packages put the torch and cuda version after that cudacanvas version for example for 2.1.2+cu118 the Cudacanvas package you require is 1.0.1.post212118
pip install cudacanvas==1.0.1.post212118 --force-reinstall
Support
Also support my channel ☕ ☕ : https://www.buymeacoffee.com/outofai
Metadata
Release files for cudacanvas 1.0.1.post230118
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 3.4 MB
Release files / cudacanvas-1.0.1.post230118-cp311-cp311-win_amd64.whl
| Download URL | cudacanvas-1.0.1.post230118-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 98.0 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4d6d527bb803bbbe70e8153f601ac4532d272fdd53f6acc79af7a891a53bed08
|
|
BLAKE2b-256 checksum How to use checksums |
21c74fca161e1b85c977f042f539d54b6212d6798254887d1ce0584209b13bb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / cudacanvas-1.0.1.post230118-cp311-cp311-manylinux2014_x86_64.whl
| Download URL | cudacanvas-1.0.1.post230118-cp311-cp311-manylinux2014_x86_64.whl |
|---|---|
| Size | 83.8 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
9b775e2192b7c57d13fa3ba2f97b82942d7fc14a2e13d1839bbed5da43fb409a
|
|
BLAKE2b-256 checksum How to use checksums |
35013e6a692421283b5db3cb9ff275ad7b9cb16a380abad6bae9241aaac897c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / cudacanvas-1.0.1.post230118-cp310-cp310-win_amd64.whl
| Download URL | cudacanvas-1.0.1.post230118-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 97.0 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4b9f31ca2bd6e581ac7abac5d7013ffbd01a12bd19738bc34c45d687f572e9f5
|
|
BLAKE2b-256 checksum How to use checksums |
880cb53193310fadb196aa4db1338f00e0bef9e3e3e243b0a9b90d4bd2ad0174
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / cudacanvas-1.0.1.post230118-cp310-cp310-manylinux2014_x86_64.whl
| Download URL | cudacanvas-1.0.1.post230118-cp310-cp310-manylinux2014_x86_64.whl |
|---|---|
| Size | 82.2 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
b0ea4ecfbdd7aba618307aea8ff40edecd6c08367cdd1af4459b77a5785bd63f
|
|
BLAKE2b-256 checksum How to use checksums |
e60610f6d863bef20000800b952fd8d7ed89bcc35760028a7559fe053bb91f14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / cudacanvas-1.0.1.post230118-cp39-cp39-win_amd64.whl
| Download URL | cudacanvas-1.0.1.post230118-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 98.7 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fd5f9cdff922d1dec7e778f1ce64f7534054c0223115fd0e2a344b15a14e7041
|
|
BLAKE2b-256 checksum How to use checksums |
4ce8d82d84944220bc9ada2f950eaab1a828ded0920603ce387f6557714a9e86
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / cudacanvas-1.0.1.post230118-cp39-cp39-manylinux2014_x86_64.whl
| Download URL | cudacanvas-1.0.1.post230118-cp39-cp39-manylinux2014_x86_64.whl |
|---|---|
| Size | 81.7 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
beb80154d8379e0a58cd7905ab711fd866afaded34e19270ed88dbb789def872
|
|
BLAKE2b-256 checksum How to use checksums |
c8608b92803b2d76d15ca3e1c16ef029798b3a39135504af06c2377501a038c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / cudacanvas-1.0.1.post230118-cp38-cp38-win_amd64.whl
| Download URL | cudacanvas-1.0.1.post230118-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 99.4 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b67d50bf0a83096d815174b80e9160795798f3a9c7640c4bf16dbbe3ccaa7dd3
|
|
BLAKE2b-256 checksum How to use checksums |
97c2e3576b15410d2fec332147ff325e790cbdf99989d73c03a86b85ed8cceb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / cudacanvas-1.0.1.post230118-cp38-cp38-manylinux2014_x86_64.whl
| Download URL | cudacanvas-1.0.1.post230118-cp38-cp38-manylinux2014_x86_64.whl |
|---|---|
| Size | 2.7 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
09aea358a524bdef5c2d14c0e0873c4210c9e593326d7c1a07bb62643aebdf8a
|
|
BLAKE2b-256 checksum How to use checksums |
b17be90ebcc0a29f209dbc6fe733e5c17593e1eade83673e8d0c41f45d319d6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Security for cudacanvas 1.0.1.post230118
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.