facebookresearch / frankmocap

A Strong and Easy-to-use Single View 3D Hand+Body Pose Estimator
Other
2.14k stars 373 forks source link

Running screenless mode with PyTorch3D as renderer --AssertionError: You should import either OpenDR or Pytorch3D #95

Closed monacv closed 3 years ago

monacv commented 3 years ago

I want to run the screenless mode with PyTorch3D as a renderer.

So, I ran the following as per instructions:

[jalal@goku frankmocap]$ xvfb-run -a python -m demo.demo_frankmocap --input_path ./sample_data/han_short.mp4 --out_dir ./mocap_outp --renderer_type pytorch3d
Loading Body Pose Estimator
Loading Third View Hand Detector
Cannot import OpendrRenderer
Cannot import Pytorch3dRenderer
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/scratch3/research/code/frankmocap/demo/demo_frankmocap.py", line 251, in <module>
    main()
  File "/scratch3/research/code/frankmocap/demo/demo_frankmocap.py", line 242, in main
    from renderer.screen_free_visualizer import Visualizer
  File "/scratch3/research/code/frankmocap/renderer/screen_free_visualizer.py", line 26, in <module>
    assert g_valid_visualize, "You should import either OpenDR or Pytorch3D"
AssertionError: You should import either OpenDR or Pytorch3D

This is despite naively adding import pytorch3d in the following two files import section:

/scratch3/research/code/frankmocap/demo/demo_frankmocap.py
/scratch3/research/code/frankmocap/renderer/screen_free_visualizer.py

Could you please guide me a bit more details on how to fix this?

penincillin commented 3 years ago

It seems that you did not have opendr or pytorch-3d successfully installed. Would you mind try to install opendr or pytorch-3d first ? To install opendr, you can try the following command

pip install opendr

To install pytorch-3d, please their official installation guidance