question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enhance torchvision's draw_keypoint method

See original GitHub issue

🚀 The feature

Follow up of #4216 . The current utility works fine, but we can make it better 😃

Motivation, pitch

I think the following can be added.

  • Support multiple colors

There were 2 proposals one by @fmassa and one by me. The problem was handling excess colors. I think that in fmassa’s version we can broadcast to bigger dimensions and make it work?

  • Support specifying line color.

In my opinion, we shouldn’t complicate this and just allow a single string. Happy to hear thoughts though.

  • Plot the circle above the line or vice versa?

We currently plot the line above the circle. So at places I see that the line comes above the circle, somehow it looks like the line cuts / bisects the circle. I feel we should do the opposite.

  • Don’t use default white for all colors. Use either a random palette / better default one.

I guess we should extend this functionality to all plotting utils, by default both draw_bounding_boxes and draw_keypoints plot with white color. While segmentation masks uses a fixed color palette. Either we could use random colors / just have a nice fixed default palette. (Also see #4658 )

cc @fmassa @datumbox @NicolasHug

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
shivaang12commented, Sep 26, 2022

Thank you for the response. I completely understand. I would happy to help in future if you work on it. Also want to appreciate all the good work you folks are putting in the repository.

Thanks again!!

1reaction
oke-adityacommented, Sep 26, 2022

Yeah it’s a bit tight. And please don’t say sorry 😐

Multiple projects like, transforms, datasets with datapipes, newer models, batteries included phase 1/2/3, multi weight support, newer Operators, adding new tasks like optical flow, stereo.

The torchvision team is really working so hard. Just that this is a bit lower on priority but will get back to it soon!

Read more comments on GitHub >

github_iconTop Results From Across the Web

draw_keypoints — Torchvision main documentation - PyTorch
Draws Keypoints on given RGB image. The values of the input image should be uint8 between 0 and 255. Parameters: image (Tensor) –...
Read more >
Python OpenCV - drawKeypoints() Function - GeeksforGeeks
We utilize the drawKeypoints() method in OpenCV to be able to draw the identified key points on a given picture. The input picture,...
Read more >
Keypoint and Bounding Box Detection using PyTorch ...
In this tutorial, we are going to learn how we can detect keypoints and bounding boxes using Keypoint RCNN deep learning model and...
Read more >
Visualizing OpenCV KeyPoints - Stack Overflow
Is there a built-in method or other approach similar to drawKeypoints() that will help me more efficiently visualize the KeyPoints of an ...
Read more >
Cv2.DrawKeypoints Method
public static void DrawKeypoints( InputArray image, IEnumerable<KeyPoint> keypoints, InputOutputArray outImage, Nullable<Scalar> color = null, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found