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

inference speed is low #40

Closed
ioir123ju opened this issue Jul 29, 2020 · 11 comments
Closed

inference speed is low #40

ioir123ju opened this issue Jul 29, 2020 · 11 comments
Assignees

Comments

@ioir123ju
Copy link

I simply tested the speed.
GPU: T4
There are two people in the test video.

mmpose:
res50_coco_256x192: 27 FPS
mobilenetv2_coco_256x192: 31 FPS

alphapose:
fast_res50_256x192: 50 FPS

Why is there such a big gap in keypoint_head.

@innerlee
Copy link
Contributor

could you share the configs and starting commands of both testing? a random guess is that mmpose is using single-video testing, and maybe alphapose is using batch

@ioir123ju
Copy link
Author

ioir123ju commented Jul 29, 2020

@innerlee
mmpose
python demo/top_down_video_demo_with_mmdet.py ../mmdetection/configs/faster_rcnn/faster_rcnn_r50_fpn_1x_coco.py ../mmdetection/checkpoints/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth configs/top_down/mobilenet_v2/coco/mobilenetv2_coco_256x192.py checkpoints/mobilenetv2_coco_256x192-d1e58e7b_20200727.pth --video-path /home/juzheng/dataset/action/video/test/fall_down_test_2.avi --show

in top_down_video_demo_with_mmdet.py

t1 = time.time()
pose_results = inference_pose_model(
pose_model,
img,
person_bboxes,
bbox_thr=args.bbox_thr,
format='xyxy')
t2 = time.time()
print(t2-t1, 1/(t2-t1))

alphapose
I use my own test code.I can make sure the batch size is 1.

@innerlee
Copy link
Contributor

Could you also share how to compute fps from this delta time?

@innerlee
Copy link
Contributor

Also are the two frameworks using the same set of bboxes?

@ioir123ju
Copy link
Author

@innerlee
Yes, I use yolov4 model for both.

@innerlee
Copy link
Contributor

could you share the configs

Could you also share how to compute fps from this delta time?

@jin-s13
Copy link
Collaborator

jin-s13 commented Jul 29, 2020

In MMPose, flip testing is used by default.
Could you please check if you use flip testing in AlphaPose?

@ioir123ju
Copy link
Author

@innerlee @jin-s13
Hi, I tested it with ‘flip_test=False’ .
res50_coco_256x192: 45 FPS
mobilenetv2_coco_256x192: 50 FPS

This result is close to alphapose, but I think it can still be optimized.
I feel that the FPS of the ‘res50_coco_256x192’ can reach 50.

I will close this question.
Thanks for your answers.

@innerlee innerlee added the enhancement New feature or request label Jul 30, 2020
@innerlee
Copy link
Contributor

innerlee commented Jul 30, 2020

Thanks for your sharing. Very true that 45fps is not ideal. Speed & Accuracy are top-priorities. We will diagnose & optimize the inference speed soon.

btw how about the training speed? is it normal, slow or fast?

@ioir123ju
Copy link
Author

I didn’t train, I used your trained model

@innerlee
Copy link
Contributor

thanks!

@innerlee innerlee added performance and removed enhancement New feature or request labels Jul 30, 2020
This was referenced Jul 30, 2020
rollingman1 pushed a commit to rollingman1/mmpose that referenced this issue Nov 5, 2021
HAOCHENYE added a commit to HAOCHENYE/mmpose that referenced this issue Jun 27, 2023
* Fix BaseDataset docs

* Fix basedataset doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants