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

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

Total release size: 3.5 MB

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

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

Download URL cudacanvas-1.0.1.post211121-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
ff3ce76087420c487b4f5dacd9b690f13b1650430612f84e1aa0b977fc59ecd5
BLAKE2b-256 checksum
How to use checksums
2d23597aa11d63094ad62b5f52809dbbd0d68c143cac0da140f361541db047b4
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.post211121-cp310-cp310-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post211121-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
49566534d318914fd36af201180dadaf81c77286abe1b925773fd0fe4c7b7f89
BLAKE2b-256 checksum
How to use checksums
d151487fa612b06ba837683baf085e8ee650f45ab14c599263b414a0cefc6e65
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.post211121-cp39-cp39-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post211121-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
fd99c937371cf52344411ef8cb63950ae3cc1765b5a944bb2ce5491a8ed03792
BLAKE2b-256 checksum
How to use checksums
a855379bec50926d9d2bcb828d82e30a12ebd116e645f4aaea2c518f3dcb30ef
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.post211121-cp38-cp38-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post211121-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
c2c69beb77b5c7ed9412ea6b2c99140bceac0d65bc2366f37c9001bce2980207
BLAKE2b-256 checksum
How to use checksums
a39bbf60e4481652a4678966f7c04c5bcfb88764db064dfc63ce25d00b9c3693
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.post211121

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