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.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.post211118

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.post211118
File Actions
cudacanvas-1.0.1.post211118-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for cudacanvas-1.0.1.post211118-cp311-cp311-win_amd64.whl
cudacanvas-1.0.1.post211118-cp311-cp311-manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details for cudacanvas-1.0.1.post211118-cp311-cp311-manylinux2014_x86_64.whl
cudacanvas-1.0.1.post211118-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for cudacanvas-1.0.1.post211118-cp310-cp310-win_amd64.whl
cudacanvas-1.0.1.post211118-cp310-cp310-manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details for cudacanvas-1.0.1.post211118-cp310-cp310-manylinux2014_x86_64.whl
cudacanvas-1.0.1.post211118-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for cudacanvas-1.0.1.post211118-cp39-cp39-win_amd64.whl
cudacanvas-1.0.1.post211118-cp39-cp39-manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details for cudacanvas-1.0.1.post211118-cp39-cp39-manylinux2014_x86_64.whl
cudacanvas-1.0.1.post211118-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for cudacanvas-1.0.1.post211118-cp38-cp38-win_amd64.whl
cudacanvas-1.0.1.post211118-cp38-cp38-manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details for cudacanvas-1.0.1.post211118-cp38-cp38-manylinux2014_x86_64.whl

Total release size: 3.5 MB

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

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

Download URL cudacanvas-1.0.1.post211118-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
c444b27bea875c9901e8948fa72a973b99fd0793156111a14dd4c96f4a466f96
BLAKE2b-256 checksum
How to use checksums
a73dd0f73abc23ec99173a02cbf34d6c24add1b24199b079bb812fdaa5c68015
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.post211118-cp310-cp310-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post211118-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
379e9547b635d6c7ab826757abd8ee2fb7d75dc3a9f52850f68f008f45de72d2
BLAKE2b-256 checksum
How to use checksums
2438ac377c653176c552f19c2b921809c3dc3ccf3997f32b3d5a20303623ffc5
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.post211118-cp39-cp39-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post211118-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
199c736628789075e3a41e00bac08fe128ec3a12b899b34dc4690adb5169bcf2
BLAKE2b-256 checksum
How to use checksums
54929fa0c0816834fac3713d595a47f9af4479cd79a4871b2fcb403106c58371
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.post211118-cp38-cp38-win_amd64.whl

Download URL cudacanvas-1.0.1.post211118-cp38-cp38-win_amd64.whl
Size 98.8 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
71388130b1f5194f8aa3ce3ffbc5ec45536969a1a0d2779dede9161018500ef5
BLAKE2b-256 checksum
How to use checksums
3bf6db8f140b97155ce55171ad863cc80ad9b3587c2a155561d106cf72a8b8c8
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.post211118-cp38-cp38-manylinux2014_x86_64.whl

Download URL cudacanvas-1.0.1.post211118-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
6b5c19e2f675cde45288958cf66d5987c01d1b2285c53a2e615c6db4090ad33a
BLAKE2b-256 checksum
How to use checksums
826a28fa282f31aa5a3020394a6cdfd69e6000b4f5407e888157ee6542e0ffa5
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.post211118

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