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

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

Total release size: 3.5 MB

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

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

Download URL cudacanvas-1.0.1.post210121-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
1508aa7ed4d95f9ee415f7ea159a90c9ba66715a87de9c6d1b60a6f63f56cf20
BLAKE2b-256 checksum
How to use checksums
22a8975f5e08c1787d9dfdb8e74c8b90dd37659255880fc867605d430cf70f17
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.post210121-cp310-cp310-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post210121-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
1a2b1c68553794a9f6a16074c9fd67c35ac28ef7b93a6a1e82890b34e0f2f638
BLAKE2b-256 checksum
How to use checksums
bdabe9b4d6dbbb25824064ec0fded65b754205ce0beee47f7965565d6d798092
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.post210121-cp39-cp39-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post210121-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
4ce517824c4d0e25395d66a746e961d5680850beb099926bfe34f3cd25d25b9d
BLAKE2b-256 checksum
How to use checksums
2317bbff5f6a68ed1800e3aa8fc37903acd69d6964c6bf216efba053a8b49b06
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.post210121-cp38-cp38-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post210121-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
9d5d22dd031f009616830501d67ec3db09ec0d6381dd22ae8983fd427f2a2f97
BLAKE2b-256 checksum
How to use checksums
e6225f667fed632c5f11a940c10bb7e216e993fc6f671e2a6a61f192a04efa54
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.post210121

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