Skip to content
New issue

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

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

Already on GitHub? # to your account

[Enhance] Refine body3d_two_stage_video_demo.py #1490

Merged
merged 1 commit into from
Jul 20, 2022

Conversation

liqikai9
Copy link
Collaborator

@liqikai9 liqikai9 commented Jul 15, 2022

Motivation

Inrich the keypoint conversions from pose_lift_dataset to pose_det_dataset.

Now, the demo support the following conversions:

  1. from Body3DH36MDataset to ['TopDownCocoDataset', 'TopDownPoseTrack18Dataset', 'TopDownPoseTrack18VideoDataset', 'TopDownAicDataset'], ['TopDownCrowdPoseDataset'];
  2. from Body3DMpiInf3dhpDataset to ['TopDownCocoDataset', 'TopDownPoseTrack18Dataset', 'TopDownPoseTrack18VideoDataset', 'TopDownAicDataset'], ['TopDownCrowdPoseDataset'];

Fix the problem mentioned in #1485.
Credit to @pallgeuer.

Modification

BC-breaking (Optional)

Use cases (Optional)

A command to run the demo using the 1-frame videopose3d model trained on Body3DMpiInf3dhpDataset:

python demo/body3d_two_stage_video_demo.py \
    demo/mmdetection_cfg/faster_rcnn_r50_fpn_coco.py \
    https://download.openmmlab.com/mmdetection/v2.0/faster_rcnn/faster_rcnn_r50_fpn_1x_coco/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth \
    configs/body/2d_kpt_sview_rgb_img/topdown_heatmap/coco/hrnet_w48_coco_256x192.py \
    https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w48_coco_256x192-b9e0b3ab_20200708.pth \
    configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/mpi_inf_3dhp/videopose3d_mpi-inf-3dhp_1frame_fullconv_supervised_gt.py \
    https://download.openmmlab.com/mmpose/body3d/videopose/videopose_mpi-inf-3dhp_1frame_fullconv_supervised_gt-d6ed21ef_20210603.pth \
    --video-path https://user-images.githubusercontent.com/87690686/164970135-b14e424c-765a-4180-9bc8-fa8d6abc5510.mp4 \
    --out-video-root vis_results \
    --rebase-keypoint-height

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit tests to ensure correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • CLA has been signed and all committers have signed the CLA in this PR.

@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #1490 (2ad5efd) into master (afb37d4) will decrease coverage by 0.01%.
The diff coverage is 40.00%.

@@            Coverage Diff             @@
##           master    #1490      +/-   ##
==========================================
- Coverage   84.47%   84.45%   -0.02%     
==========================================
  Files         236      236              
  Lines       20036    20038       +2     
  Branches     3602     3603       +1     
==========================================
- Hits        16925    16923       -2     
- Misses       2231     2233       +2     
- Partials      880      882       +2     
Flag Coverage Δ
unittests 84.36% <40.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmpose/apis/inference_3d.py 76.64% <40.00%> (-0.94%) ⬇️
mmpose/datasets/pipelines/shared_transform.py 83.26% <0.00%> (-0.43%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update afb37d4...2ad5efd. Read the comment docs.

else:
raise NotImplementedError
keypoints_new = np.zeros((17, keypoints.shape[1]), dtype=keypoints.dtype)
if pose_lift_dataset == 'Body3DH36MDataset':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the keypoint indexes conversion is hard to use the info in dataset_info. We may consider adding a tool to convert the keypoint orders later.

@ly015 ly015 merged commit 4f08658 into open-mmlab:master Jul 20, 2022
jin-s13 pushed a commit to dineshreddy91/mmpose that referenced this pull request Jul 29, 2022
@liqikai9 liqikai9 deleted the fix-body3d-video-demo branch September 18, 2022 08:01
evendrow pushed a commit to evendrow/mmpose that referenced this pull request Dec 22, 2022
shuheilocale pushed a commit to shuheilocale/mmpose that referenced this pull request May 5, 2023
ajgrafton pushed a commit to ajgrafton/mmpose that referenced this pull request Mar 6, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants