pytorch / pytorch/vision

Adding imshow function to directly display image/video without moving tensor off GPU.

Open
#4,331 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
17.9k
Forks
7.3k
Avg merge
1d 15h
Merged PRs (30d)
13

Description

🚀 Feature

Looking for a imshow function similar to that of cv2 to directly display tensor without moving it off GPU.

Motivation

The main use case is for displaying video frames for real-time applications (such as webcam demo etc).

If the image is already on the graphics card, it should be a way to directly display it. I currently cannot find other tools available to achieve this and I don't know how to implement it. I think it would be a useful function to include in torchvision.

Alternatives

Moving tensor to CPU every frame, but this is very slow for real-time.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names torchvision and cv2 but no source file, entry point, or test. Start by reviewing torchvision's existing image and video display capabilities and how GPU tensors are handled; define the supported display path and verify that real-time frames can be shown without a per-frame CPU transfer.

Written by the indexing model from the issue text.

Assessment

Tech stack
opencv, python
Domain
computer-vision, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.