zju3dv / GVHMR

Code for "GVHMR: World-Grounded Human Motion Recovery via Gravity-View Coordinates", Siggraph Asia 2024
https://zju3dv.github.io/gvhmr
Other
221 stars 16 forks source link

NameError: name 'cfg' is not defined #5

Open kexul opened 3 days ago

kexul commented 3 days ago

Hi, thanks for the great work! I encountered a problem when using the demo.py,would mind help?

Command I used:

!python /content/GVHMR/tools/demo/demo.py --video=/content/test.mp4

Output:

DPVO:   0% 0/155 [00:00<?, ?it/s]Traceback (most recent call last):
  File "/content/GVHMR/tools/demo/demo.py", line 289, in <module>
    run_preprocess(cfg)
  File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/content/GVHMR/tools/demo/demo.py", line 143, in run_preprocess
    ret = slam.track()
  File "/content/GVHMR/hmr4d/utils/preproc/slam.py", line 51, in track
    cfg.merge_from_file(self.dpvo_cfg)
NameError: name 'cfg' is not defined
zehongs commented 3 days ago

Hi, are you running this command from the /content/GVHMR directory?

kexul commented 3 days ago

Hi, are you running this command from the /content/GVHMR directory?

Yes, I'm using the ipython notebook provided by camenduru https://github.com/camenduru/GVHMR-jupyter

zehongs commented 3 days ago

This is a great Colab example from camenduru. However, I'm not familiar with the details, and this issue seems to be on the DPVO side. The intallation of DPVO may be problematic..

Since the environment should be similar, I suggest following our docs/INSTALL.md and running the demo command python tools/demo/demo.py --video=docs/example_video/tennis.mp4 -s.

IsshikiHugh commented 3 days ago

Hi, are you running this command from the /content/GVHMR directory?

Yes, I'm using the ipython notebook provided by camenduru https://github.com/camenduru/GVHMR-jupyter

Hi, just in case you haven't solved the problem, you can also try our new colab demo here:

https://colab.research.google.com/drive/1N9WSchizHv2bfQqkE9Wuiegw_OT7mtGj?usp=sharing

Lidhra commented 3 days ago

I had the same problem when running locally. Just add "-s" at the end and the video was processed successfully

!python /content/GVHMR/tools/demo/demo.py --video=/content/test.mp4 -s

kexul commented 3 days ago

This is a great Colab example from camenduru. However, I'm not familiar with the details, and this issue seems to be on the DPVO side. The intallation of DPVO may be problematic..

Since the environment should be similar, I suggest following our docs/INSTALL.md and running the demo command python tools/demo/demo.py --video=docs/example_video/tennis.mp4 -s.

Thanks! But the camera in my input video is not static, can I use -s in this case?

kexul commented 3 days ago

Hi, are you running this command from the /content/GVHMR directory?

Yes, I'm using the ipython notebook provided by camenduru https://github.com/camenduru/GVHMR-jupyter

Hi, just in case you haven't solved the problem, you can also try our new colab demo here:

https://colab.research.google.com/drive/1N9WSchizHv2bfQqkE9Wuiegw_OT7mtGj?usp=sharing

Thank you so much, I'll try it!


UPDATE: It works! Though the result seems to be similar w/wo the -s option.