Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Batched inference on images using DensePose? #2117

Open
RSKothari opened this issue Oct 9, 2020 · 3 comments
Open

Batched inference on images using DensePose? #2117

RSKothari opened this issue Oct 9, 2020 · 3 comments
Labels
densepose issues specific to densepose

Comments

@RSKothari
Copy link

❓ How to do something using detectron2

Currently, DensePose reads in single images and infer dense annotations. This is very slow and quite wasteful. Does DensePose have the ability to read in batches of images to perform inference?

Describe what you want to do, including:

  1. what inputs you will provide, if any:
    A video filled with images

  2. what outputs you are expecting:
    A pickle file with dense pose annotations, except inferred a lot faster.

❓ What does an API do and how to use it?

Please link to which API or documentation you're asking about from
https://detectron2.readthedocs.io/

NOTE:

  1. Only general answers are provided.
    If you want to ask about "why X did not work", please use the
    Unexpected behaviors issue template.

  2. About how to implement new models / new dataloader / new training logic, etc., check documentation first.

  3. We do not answer general machine learning / computer vision questions that are not specific to detectron2, such as how a model works, how to improve your training/make it converge, or what algorithm/methods can be used to achieve X.

@MathijsNL
Copy link

MathijsNL commented Oct 9, 2020

Hi there,

This might be a duplicate of Duplicate of #282
I haven't used DensePose myself, but I suppose the usage should be the same as described in the issue

You just need to call model with a batch of inputs

Also there is #1986 which explains how to sort images as well before doing inference. You should be able to work it out with this info, let us know if there is anything unclear.

@ppwwyyxx ppwwyyxx added the densepose issues specific to densepose label Oct 9, 2020
@RSKothari
Copy link
Author

@MathijsNL Thanks, my question however is specific to the DensePose module within Detectron2. It seems it reads in one image after the other to perform inference.

@vkhalidov
Copy link
Contributor

yes, currently DensePose doesn't provide an efficient reader that would batch video inputs. I've got a pending PR to torchvision that addresses this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
densepose issues specific to densepose
Projects
None yet
Development

No branches or pull requests

4 participants