Closed 642802017 closed 3 years ago
try to add from mpl_toolkits.mplot3d import Axes3D
in test.py
try ,but failed
sorry ,maybe succeeded
What is your matplotlib version?
3.1.1
还有一个问题,我重现的3d demo并不能像样例demo那样得倒那么精确的人体关键点,我已经尝试了好几个不同的视频了,请问是什么原因呢
Please consider upgrading your matplotlib to 3.2.0 or higher version, or you will need to explicitly import mpl_toolkits.mplot3d to make the "3d" projection to Figure.add_subplot, according to the docs.
About the accuracy issue, please upload some of your demo videos so we can check the possible reason.
我先尝试升级matplotlib版本,如果还是无法得倒准确度较好的结果的话我再上传
升级了matplotlib 版本后,得到的效果还是很差 这是演示视频的链接 http://www.iqiyi.com/v_h5xjovf79s.html
The matploblib version won't affect the demo results. It's just to fix the exception. Please provide the model information you used for the demo, including the pose detector and the pose lifter. If your pose detection (stage 1) result was from the json file instead of a model, please double-check it and make sure that its keypoint definition is consistent with the expected pose lifer input (e.g. both Human3.6M or COCO definition).
BTW, the GitHub issue supports video attachments. I would suggest directly attaching the video to your comment message to avoid the long ad.
文件是:mmpose/demo/body3d_two_stage_video_demo.py 脚本是:python demo/body3d_two_stage_img_demo.py \ configs/body/3d_kpt_sview_rgb_img/pose_lift/h36m/simplebaseline3d_h36m.py \ https://download.openmmlab.com/mmpose/body3d/simple_baseline/simple3Dbaseline_h36m-f0ad73a4_20210419.pth \ --json-file tests/data/h36m/h36m_coco.json \ --img-root tests/data/h36m \ --camera-param-file tests/data/h36m/cameras.pkl \ --only-second-stage \ --out-img-root vis_results \ --rebase-keypoint-height \ --show-ground-truth 原视频是:
Uploading exp.mp4…
Which demo script did you use? body3d_two_stage_img_demo.py or body3d_two_stage_video_demo.py If you are using body3d_two_stage_img_demo.py, and only want to run the 2nd stage (I assume so because you set "only-second-stage" and did not use pose detector), you need to provide a JSON file that contains both the bbox and 2d keypoints of your own input images. "tests/data/h36m/h36m_coco.json" is just an example JSON file that corresponds to the images in tests/data/h36m.
body3d_two_stage_video_demo.py
文件是:mmpose/demo/body3d_two_stage_video_demo.py 脚本是:python demo/body3d_two_stage_img_demo.py configs/body/3d_kpt_sview_rgb_img/pose_lift/h36m/simplebaseline3d_h36m.py https://download.openmmlab.com/mmpose/body3d/simple_baseline/simple3Dbaseline_h36m-f0ad73a4_20210419.pth --json-file tests/data/h36m/h36m_coco.json --img-root tests/data/h36m --camera-param-file tests/data/h36m/cameras.pkl --only-second-stage --out-img-root vis_results --rebase-keypoint-height --show-ground-truth 原视频是:
Uploading exp.mp4…
Ok, here according to the command you provided, body3d_two_stage_img_demo.py was used. Anyway, if you are sure that you were using body3d_two_stage_video_demo.py, please provide the command you used.
脚本是: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/h36m/hrnet_w32_h36m_256x256.py \ https://download.openmmlab.com/mmpose/top_down/hrnet/hrnet_w32_h36m_256x256-d3206675_20210621.pth \ configs/body/3d_kpt_sview_rgb_vid/video_pose_lift/h36m/videopose3d_h36m_243frames_fullconv_supervised_cpn_ft.py \ https://download.openmmlab.com/mmpose/body3d/videopose/videopose_h36m_243frames_fullconv_supervised_cpn_ft-88f5abbb_20210527.pth \ --video-path demo/resources/body3d_demo.mp4 \ --out-video-root vis_results \ --rebase-keypoint-height
我自己修改了调用文件的路径 ,不好意思,发错了
This problem is caused by the 2D pose model trained on human3.6m dataset. We will check and update the checkpoint. Meanwhile, you can choose a 2D pose model trained on COCO (e.g. hrnet) to run this demo script.
Thanks for helping to find this problem and sorry for the trouble.
我还有一个问题, 2d的模型我照着做了两个 top_down_pose_tracking_demo_with_mmdet.py 的结果并不是很好 而 top_down_img_demo_with_mmdet.py的结果相当的好 只是我的目的是通过人体动作得倒跳舞视频中的节奏点,方法是人体四肢向量的改变,而2d的模型无法判断抬手,提腿的动作,你有什么好的建议么
我还有一个问题, 2d的模型我照着做了两个 top_down_pose_tracking_demo_with_mmdet.py 的结果并不是很好 而 top_down_img_demo_with_mmdet.py的结果相当的好 只是我的目的是通过人体动作得倒跳舞视频中的节奏点,方法是人体四肢向量的改变,而2d的模型无法判断抬手,提腿的动作,你有什么好的建议么
Please start a new issue for a different topic. I don't understand why 2D models cannot help recognize movements like raising arms or kicking legs. Maybe you can show some examples.
好吧,我可能表述的不是很清楚 我的意思的top_down_pose_tracking_demo_with_mmdet.py 人体关键点检测的结果远不如top_down_img_demo_with_mmdet.py 的结果 动作的检测并没有问题
Please start a new issue for a different topic.
We found that the pool results of the 3D demo were because that h36m 2d model could not generalize well to natural images. As mentioned above, we recommend using COCO 2d models instead. We updated the demo example in #785.
由于没有路径文件的关系,自己上传了一个文件 运行时显示:RuntimeError: Only one file(not dir) is allowed in the zipfile
自己预处理把model下载,定义了下输入文件和输出文件路径后发生如下报错,请问该怎样做才能复现demo呢 Use load_from_local loader [ ] 0/719, elapsed: 0s, ETA:Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/matplotlib/projections/init.py", line 58, in get_projection_class return projection_registry.get_projection_class(projection) File "/usr/local/lib/python3.6/dist-packages/matplotlib/projections/init.py", line 25, in get_projection_class return self._all_projection_types[name] KeyError: '3d'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "test.py", line 333, in
main()
File "test.py", line 317, in main
num_instances=num_instances)
File "/usr/local/lib/python3.6/dist-packages/mmpose/apis/inference_3d.py", line 423, in vis_3d_pose_result
out_file=out_file)
File "/usr/local/lib/python3.6/dist-packages/mmpose/models/detectors/pose_lifter.py", line 388, in show_result
num_instances=num_instances)
File "/usr/local/lib/python3.6/dist-packages/mmpose/core/visualization/image.py", line 274, in imshow_keypoints_3d
ax = fig.add_subplot(1, num_axis, ax_idx, projection='3d')
File "/usr/local/lib/python3.6/dist-packages/matplotlib/figure.py", line 1396, in add_subplot
self._process_projection_requirements(*args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/figure.py", line 1120, in _process_projection_requirements
projection_class = projections.get_projection_class(projection)
File "/usr/local/lib/python3.6/dist-packages/matplotlib/projections/init.py", line 60, in get_projection_class
raise ValueError("Unknown projection %r" % projection)
ValueError: Unknown projection '3d'