open-mmlab / mmpose

OpenMMLab Pose Estimation Toolbox and Benchmark.
https://mmpose.readthedocs.io/en/latest/
Apache License 2.0
5.91k stars 1.26k forks source link

inference mmpose/configs/top_down/resnet/mpii/res152_mpii_256x256.py failed. #331

Closed La-fe closed 3 years ago

La-fe commented 3 years ago

When I run top_down_img_demo_with_mmdet.py , config is mmpose/configs/top_down/resnet/mpii/res152_mpii_256x256.py , the following question arises

Traceback (most recent call last):
  File "mt_top_down_img_demo.py", line 235, in <module>
    main(**default)
  File "mt_top_down_img_demo.py", line 153, in main
    pose_model, image_name, person_bboxes, format='xywh')
  File "/home/lafe/mt/gitdemo/mmpose/mmpose/apis/inference.py", line 232, in inference_top_down_pose_model
    pose = _inference_single_pose_model(model, img_or_path, bbox)
  File "/home/lafe/mt/gitdemo/mmpose/mmpose/apis/inference.py", line 188, in _inference_single_pose_model
    return_loss=False, img=data['img'], img_metas=data['img_metas'])
  File "/home/lafe/.conda/envs/py37pt1.4/lib/python3.7/site-packages/torch/nn/modules/module.py", line 532, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/lafe/mt/gitdemo/mmpose/mmpose/models/detectors/top_down.py", line 107, in forward
    return self.forward_test(img, img_metas, **kwargs)
  File "/home/lafe/mt/gitdemo/mmpose/mmpose/models/detectors/top_down.py", line 171, in forward_test
    flip_pairs)
  File "/home/lafe/mt/gitdemo/mmpose/mmpose/core/post_processing/post_transforms.py", line 73, in flip_back
    output_flipped_back[:, left, ...] = output_flipped[:, right, ...]
IndexError: index 16 is out of bounds for axis 1 with size 16

flip_test =False in the configuration file will work fine.

jin-s13 commented 3 years ago

Have you tried the latest MMPose v0.9?

jin-s13 commented 3 years ago

This will be solved by updating MMPose. Will close this issue for now.

Better369 commented 7 months ago

Hello, I'm training RTMPose with a self-built coco format skeleton dataset and I'm having the same issue, but my mmpose version is already newer 1.3.1. Hope to get your answers. @jin-s13