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

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

Total release size: 3.5 MB

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

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

Download URL cudacanvas-1.0.1.post212118-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
3ccb26ca0e3890079cc665cbe0120388cf7e17d69a4f639ea46acfdd7b0f6434
BLAKE2b-256 checksum
How to use checksums
5a73116211b059464662810603b754e697147c673b595e4eedc43d1e3c8c196f
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.post212118-cp310-cp310-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post212118-cp310-cp310-manylinux2014_x86_64.whl
Size 80.9 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d53abb4b1a9823c8cde7ee996ae39f6026b4bdd4df6f40481e6bc4a8fdaff49e
BLAKE2b-256 checksum
How to use checksums
6876a90ad16efc66bfc78582e23fd82ecbdc388e30177d4f0394fd111e2aa80f
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.post212118-cp39-cp39-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post212118-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
782ca7f28407a19d03061e90b476c5b83e5c42af9b4886d1f7ad6777bdb17036
BLAKE2b-256 checksum
How to use checksums
95bc32c655297d10524156cd454251434bf82f1e4d08185bd13bb92ccf45e473
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.post212118-cp38-cp38-win_amd64.whl

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

Download URL cudacanvas-1.0.1.post212118-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
943114801f847ee9b839570dbe0c24153af670ef6093ae2b6482f744ab37c361
BLAKE2b-256 checksum
How to use checksums
03bf1f3da1266eb76fb4bcd929b1283f964aa55e5a2a1d0f77da29d4c1ae0e99
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.post212118

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