-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
1.x branch is much more slower than main branch in webcam_demo.py with Pose Estimation use case. #2035
Comments
Thanks for pointing out this problem! Would you mind giving the details of the config files you used in both versions? We will appreciate your help with this. |
I just use the default config files both in detection ,pose and animal pose model. You can reproduce results easily. Just let me know if there's anything else I can do to support you. Notify me if there is any progress for I am very curiously about it. |
To be specific, I use the default config in |
You are right, the visualization node is much slower in 1.x since the visualizer uses matplotlib backend to align with mmengine, instead of opencv in the master version. We will look into this problem and fix it. Thank you again for your notification |
Can I just replace the visualization node to the master version to fix it? |
I think it is okay since they have the same interface |
I failed with that. Could you please give me a hand? The master version is based on follow packages: from mmcv import color_val even if I copy those to 1.x branch , there is error reported. Traceback (most recent call last): |
Instead of using Another necessary modification is to replace dataset_info = DatasetInfo(model_cfg.dataset_info)
keypoints = [obj['keypoints'] for obj in group]
imshow_keypoints(
canvas,
keypoints,
skeleton=dataset_info.skeleton,
kpt_score_thr=0.3,
pose_kpt_color=dataset_info.pose_kpt_color,
pose_link_color=dataset_info.pose_link_color,
radius=self.radius,
thickness=self.thickness) with dataset_info = model_cfg['dataset_meta']
keypoints = [obj['keypoints'] for obj in group]
imshow_keypoints(
canvas,
keypoints,
skeleton=dataset_info['skeleton_links'],
kpt_score_thr=0.3,
pose_kpt_color=dataset_info['keypoint_colors'],
pose_link_color=dataset_info['skeleton_link_colors'],
radius=self.radius,
thickness=self.thickness) |
Thanks for your patient reply. However It is showing another error. I think Traceback (most recent call last): |
Sorry for misleading. I have tried the following code and it works: dataset_info = objects[0]['dataset_meta']
keypoints = [np.concatenate((obj['keypoints'], obj['keypoint_scores'][:, None]), axis=1) for obj in group]
imshow_keypoints(
canvas,
keypoints,
skeleton=dataset_info['skeleton_links'],
kpt_score_thr=0.3,
pose_kpt_color=dataset_info['keypoint_colors'],
pose_link_color=dataset_info['skeleton_link_colors'],
radius=self.radius,
thickness=self.thickness) |
Thanks a lot! It works on my side too. I truly appreciate your timely help! |
I found that the webcam_demo.py in 1.x branch is much slower, even if they are using same detection and pose model. I found the only difference between them are the draw function. Do you know the reason that lead to this question? Can it be fixed?
main:
1.x:
The text was updated successfully, but these errors were encountered: