vefalun / HTNet

HTFormer: Human Topology Aware Transformer for 3D Human Pose Estimation
MIT License
175 stars 14 forks source link

Report a bug #4

Closed StupidAdam closed 1 year ago

StupidAdam commented 1 year ago

Like written in the README.md, I downloaded the pretrained model and put it in the './ckpt' directory. But when I run:

python main.py --reload --previous_dir "cpn" 

I got this error:

Traceback (most recent call last):
  File "main.py", line 117, in <module>
    model_path = sorted(glob.glob(os.path.join(opt.previous_dir, '*.pth')))[0]
IndexError: list index out of range

After reviewing the code, I found the reason lies in opt.previous_dir, it is set as "cpn" by the code above. I added some to the main.py in line 117, and it looks like this:

model_path = sorted(glob.glob(os.path.join('./ckpt', opt.previous_dir, '*.pth')))[0]

Then I could evaluate the pretrained model.

vefalun commented 1 year ago

Thanks for your reminder, we have revised it.