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

implement a batch inference #781

Closed
wingskh opened this issue Jul 12, 2021 · 5 comments
Closed

implement a batch inference #781

wingskh opened this issue Jul 12, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@wingskh
Copy link

wingskh commented Jul 12, 2021

I would like to modify the top_down_pose_tracking_demo_with_mmdet.py for batch inference.
After reading #608, I aggregate the bboxes from multiple images before collating the batch.
However, I have a question about this line of code:

batch_data = collate(batch_data, samples_per_gpu=1)

Since the model hasn't utilized the GPUs fully, I want to increase the size of samples_per_gpu but I got the error as below
assert img.size(0) == len(img_metas)

@innerlee innerlee added the enhancement New feature or request label Jul 12, 2021
@jin-s13
Copy link
Collaborator

jin-s13 commented Jul 13, 2021

see #25

@jin-s13
Copy link
Collaborator

jin-s13 commented Jul 13, 2021

I will recommend using slurm_test or dist_test for batch-inference.

@wingskh
Copy link
Author

wingskh commented Jul 13, 2021

see #25

Thank you so much for the speedy reply.
I am sorry that I have some problems about the function estimate_batch in #25
Q1: What is input_transforms in estimate_batch?
Q2: As pose detection should be processed after human detection, is the variable imgs a list of cropped human images?

@jin-s13 jin-s13 mentioned this issue Jul 16, 2021
rollingman1 pushed a commit to rollingman1/mmpose that referenced this issue Nov 5, 2021
* first commit

* update docs

* add unittest

* update changelog
@jin-s13 jin-s13 closed this as completed Dec 29, 2021
@dongrongliang
Copy link

For those who still stuck on this issue, here is quick fix:"img_metas = img_metas.data[0]"

@Lingyun97
Copy link

For those who still stuck on this issue, here is quick fix:"img_metas = img_metas.data[0]"

@dongrongliang Where to apply the fix and which version you are using?
I am still stuck on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants