Vegetebird / StridedTransformer-Pose3D

[TMM 2022] Exploiting Temporal Contexts with Strided Transformer for 3D Human Pose Estimation
MIT License
335 stars 37 forks source link

Question about vis.py #22

Closed AIceDog closed 1 year ago

AIceDog commented 1 year ago

Hi, thank you for your amazing work.

I have a question about inferencing from custom videos.

I first trained the model and refined it with respectively python main.py and python main.py --refine --lr 1e-5 --reload --previous_dir checkpoint/1023_2122_14_351_no/ and finally got the refined model refine_1_4368.pth.

But when I used python demo/vis.py --video sample_video.mp4 to test the model I got the following message:

Traceback (most recent call last):
  File "demo/vis.py", line 278, in <module>
    get_pose3D(video_path, output_dir)
  File "demo/vis.py", line 142, in get_pose3D
    pre_dict = torch.load(model_path)
  File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 581, in load
    with _open_file_like(f, 'rb') as opened_file:
  File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 235, in _open_file_like
    return _open_buffer_reader(name_or_buffer)
  File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 220, in __init__
    _check_seekable(buffer)
  File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 311, in _check_seekable
    raise_err_msg(["seek", "tell"], e)
  File "/root/miniconda3/lib/python3.8/site-packages/torch/serialization.py", line 304, in raise_err_msg
    raise type(e)(msg)
AttributeError: 'list' object has no attribute 'seek'. You can only torch.load from a file that is seekable. Please pre-load the data into a buffer like io.BytesIO and try to load from it instead.
root@container-ad3a11b63c-5ff14e31:~/autodl-tmp/3dhp-pose-lifter# python demo/vis.py --video sample_video.mp4

I wonder how to solve it. Thanks.

Vegetebird commented 1 year ago

You need to check if "model_path" is correct