roboflow / supervision

We write your reusable computer vision tools. 💜
https://supervision.roboflow.com
MIT License
24.04k stars 1.79k forks source link

Visualizer #178

Closed hardikdava closed 1 year ago

hardikdava commented 1 year ago

Search before asking

Description

supervision does not have any image or frame visualizer. Once the sv.Detections are processed then it is visualized by matplotlib or opencv. It would be nice to have a API for visualization. The idea is to create wrapper around opencv function as opencv is already dependency to the project.

Use case

Usage:

import supervision as sv
image = (...)

sv.Visualizer("Result", image, 0) # for single image viewer

sv.Visualizer("Result", image, 1) # for video frames viewer

Additional

Suggestion:

def Visualizer(window_name: str, frame: wait_key=0):
    cv2.imshow(window_name, frame)
    cv2.waitKey(wait_key)

Are you willing to submit a PR?

SkalskiP commented 1 year ago

Hi, @hardikdava 👋🏻! Thanks a lot for all the time you take to think about new supervision features. As for this one, let's keep it for later. I guess we have higher-priority stuff - model evaluation and composable annotators that we should build first. But let's save it for later.

SkalskiP commented 1 year ago

@hardikdava, should that task still be on our TODO list?

hardikdava commented 1 year ago

@SkalskiP It is a minor but very useful feature. I let you to decide on this.

hardikdava commented 1 year ago

@SkalskiP May be we can add it to hacktoberfest issue.

onuralpszr commented 1 year ago

@SkalskiP @hardikdava also please consider this, if we add Visualizer that means they need to use full version opencv instead of headless as well. Somehow we need to check that in case of visualizer via "cv"

SkalskiP commented 1 year ago

@onuralpszr, good point!

hardikdava commented 1 year ago

@SkalskiP Then let's cancel it.

SkalskiP commented 1 year ago

Closing ;)