Skip to main content

Buy Me A Coffee Twitter Twitter PyPI version Downloads

image

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

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

Total release size: 3.4 MB

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

Download URL cudacanvas-1.0.1.post230121-cp311-cp311-win_amd64.whl
Size 98.0 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3035e16aa6eca2906fd0dc0c3942eb2518aee7fd748e8c03654cf70f88d64782
BLAKE2b-256 checksum
How to use checksums
ab58209292a9cfc034c9f62442ef93f5a7bf8aa08028ad4ccd674ffae0bcd3ea
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.post230121-cp311-cp311-manylinux2014_x86_64.whl

Download URL cudacanvas-1.0.1.post230121-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
c20640022c6e687c33804a139d01678ea4ba7e64a3835988d975b5fd77f6e408
BLAKE2b-256 checksum
How to use checksums
88a1dda61a80d1c660b191a5d3edb890f3f60cf9f2ed3830cd717e211ac4d78b
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.post230121-cp310-cp310-win_amd64.whl

Download URL cudacanvas-1.0.1.post230121-cp310-cp310-win_amd64.whl
Size 97.0 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
ad6cb2e0816f1b444ade14ca9998e323396b2d308af838bb4bab840ea2025485
BLAKE2b-256 checksum
How to use checksums
25803cb0c233b9ae976fde113b6032bf1d7b8bb5267abc7315db3bb633a3eb70
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.post230121-cp310-cp310-manylinux2014_x86_64.whl

Download URL cudacanvas-1.0.1.post230121-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
e8a33eea441db6bde5aaad6a257cd134855953e79e5c4368b35bcc1e2445bc79
BLAKE2b-256 checksum
How to use checksums
b1359f847901848b75e617fda15d1831958c40cb5843ad301803ccc8c0d4117a
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.post230121-cp39-cp39-win_amd64.whl

Download URL cudacanvas-1.0.1.post230121-cp39-cp39-win_amd64.whl
Size 98.7 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
1221af830da030374ca1959d12f171167c0b887cd5c5db3aae771ee2b4ccfae1
BLAKE2b-256 checksum
How to use checksums
b425f245905ba27bba69bb50ba6dffe143ab377f7fab42e948ef3f7670a877ec
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.post230121-cp39-cp39-manylinux2014_x86_64.whl

Download URL cudacanvas-1.0.1.post230121-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
3a596b9c01e3294723cf3a9e5403af0ee797dd3b3755d6d9feeb2a8504dfb4ff
BLAKE2b-256 checksum
How to use checksums
3ffacaa73299a981f3d5223d6df7fe9fa848ae29e8f15f3d2e27860e379de082
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.post230121-cp38-cp38-win_amd64.whl

Download URL cudacanvas-1.0.1.post230121-cp38-cp38-win_amd64.whl
Size 99.4 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
f2027bd8ada78d8e8577ffce876348fbc5d2383117faf94543b217c4ee12b663
BLAKE2b-256 checksum
How to use checksums
c793005ab2464dfbefe812be7a596f278022a47b640ffe3b900fb46f64591073
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.post230121-cp38-cp38-manylinux2014_x86_64.whl

Download URL cudacanvas-1.0.1.post230121-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
9d53ec911d6eea6a8daf2aceef6e63278c1c940a57dfac6abea4cbf9e083d1bc
BLAKE2b-256 checksum
How to use checksums
ef0e25d6472ecc0e968e9346117a18fde0669d32ed6cc4efecd27481394869cb
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.post230121

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