Skip to main content

Buy Me A Coffee Twitter Twitter PyPI version Downloads

cudacanvas

CudaCanvas: 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():
        #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():
        #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.2.2 or 2.1.2) and (11.8 or 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+cu181 the Cudacanvas package you require is 1.0.1.post212181

pip install cudacanvas==1.0.1.post212181

Support

Also support my channel ☕ ☕ : https://www.buymeacoffee.com/outofai

Metadata

Release files for cudacanvas 1.0.1.post212121

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for cudacanvas 1.0.1.post212121
File Actions
cudacanvas-1.0.1.post212121-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for cudacanvas-1.0.1.post212121-cp311-cp311-win_amd64.whl
cudacanvas-1.0.1.post212121-cp311-cp311-manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for cudacanvas-1.0.1.post212121-cp311-cp311-manylinux2014_x86_64.whl
cudacanvas-1.0.1.post212121-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for cudacanvas-1.0.1.post212121-cp310-cp310-win_amd64.whl
cudacanvas-1.0.1.post212121-cp310-cp310-manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for cudacanvas-1.0.1.post212121-cp310-cp310-manylinux2014_x86_64.whl
cudacanvas-1.0.1.post212121-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for cudacanvas-1.0.1.post212121-cp39-cp39-win_amd64.whl
cudacanvas-1.0.1.post212121-cp39-cp39-manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for cudacanvas-1.0.1.post212121-cp39-cp39-manylinux2014_x86_64.whl
cudacanvas-1.0.1.post212121-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for cudacanvas-1.0.1.post212121-cp38-cp38-win_amd64.whl
cudacanvas-1.0.1.post212121-cp38-cp38-manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for cudacanvas-1.0.1.post212121-cp38-cp38-manylinux2014_x86_64.whl

Total release size: 3.5 MB

Release files / cudacanvas-1.0.1.post212121-cp311-cp311-win_amd64.whl

Download URL cudacanvas-1.0.1.post212121-cp311-cp311-win_amd64.whl
Size 97.7 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
efd0a7089f3ba584b2795c15c2b6b18947e47704b7a066951fa08b02500b50e4
BLAKE2b-256 checksum
How to use checksums
d083bcd993cf6c15e71a146d299fa9a6258d7dd29dd7fdc6918e78c98bdbd1f2
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.post212121-cp311-cp311-manylinux2014_x86_64.whl

Download URL cudacanvas-1.0.1.post212121-cp311-cp311-manylinux2014_x86_64.whl
Size 83.1 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
6a9b63f37d94480addf0a1ddc1baa5936ff546d4b95949e60ec9bd842bca80c9
BLAKE2b-256 checksum
How to use checksums
79dbb7f2b42b25c26e4fcb5ec810094c6482b0815ff02e54257863c3ebab5a56
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.post212121-cp310-cp310-win_amd64.whl

Download URL cudacanvas-1.0.1.post212121-cp310-cp310-win_amd64.whl
Size 96.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
60fdb90fad57e0635cc2c6c1d6cbd00279c7b3b68b1ed57667897e9e5029b3c4
BLAKE2b-256 checksum
How to use checksums
16f854e90d10454c65de89ffefcf006bc933204d00f0a3c19b0146957b0dfe3e
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.post212121-cp310-cp310-manylinux2014_x86_64.whl

Download URL cudacanvas-1.0.1.post212121-cp310-cp310-manylinux2014_x86_64.whl
Size 81.0 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
843ae1ba7a6b62c94016051476a1fc387344a760bd0e7a0811f99346be644b71
BLAKE2b-256 checksum
How to use checksums
5f37eb4a9308e74290e4329534cca21c0a263527f8f05be2d094cae7b42b2442
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.post212121-cp39-cp39-win_amd64.whl

Download URL cudacanvas-1.0.1.post212121-cp39-cp39-win_amd64.whl
Size 98.3 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
f0e4f2c235dc34860d427b33f253ec3bbda426e27f0633de76f2470d5ef3b1f2
BLAKE2b-256 checksum
How to use checksums
d792c2c9dcc601eddb6fc842b79ce5139eb442ae18b0144aa09a6abe450f0f36
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.post212121-cp39-cp39-manylinux2014_x86_64.whl

Download URL cudacanvas-1.0.1.post212121-cp39-cp39-manylinux2014_x86_64.whl
Size 80.6 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
82a756903074bf9b0a968f85b73a7cc35f0520f1496bcf0370e8d9f9dd22fae8
BLAKE2b-256 checksum
How to use checksums
e372a96a0ab2ddd1341ddae4f21876da5951d5bc04491568668e612ee36830ca
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.post212121-cp38-cp38-win_amd64.whl

Download URL cudacanvas-1.0.1.post212121-cp38-cp38-win_amd64.whl
Size 98.8 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
812dd0ee588d5c7e85e47c915d4f2f1b40e82451ccda27b4d34aabc62268f4bf
BLAKE2b-256 checksum
How to use checksums
f295a99165e9c5281a6380d69d2e8e3f989fe6397cdf2215ba84054615806c5a
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.post212121-cp38-cp38-manylinux2014_x86_64.whl

Download URL cudacanvas-1.0.1.post212121-cp38-cp38-manylinux2014_x86_64.whl
Size 2.9 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e41f87d5e3565dc3be157263cbedcba84fe627ad575420e9ea28561cddec8c1d
BLAKE2b-256 checksum
How to use checksums
52f327f0a5d88ec684cc5ff392fbfedd352348bad56d6ac82ae718ba7953c69f
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.post212121

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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page