-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Batched inference on images using DensePose? #2117
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
Comments
Hi there, This might be a duplicate of Duplicate of #282
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. |
@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. |
yes, currently DensePose doesn't provide an efficient reader that would batch video inputs. I've got a pending PR to |
For batched input inference, you can make the following change to apply_net.py(InferenceAction class):-
You would also need to change the call function of the DefaultPredictor class in detectron2/engine/defaults.py
I have modified the predictor function to take in a list of images and dump the results in the same format as the sequential image processing. |
#5330 is dealing with this. |
❓ 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:
what inputs you will provide, if any:
A video filled with images
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:
Only general answers are provided.
If you want to ask about "why X did not work", please use the
Unexpected behaviors issue template.
About how to implement new models / new dataloader / new training logic, etc., check documentation first.
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.
The text was updated successfully, but these errors were encountered: