facebookresearch / pifuhd

High-Resolution 3D Human Digitization from A Single Image.

Repository from Github https://github.comfacebookresearch/pifuhdRepository from Github https://github.comfacebookresearch/pifuhd

can this be run within a python venv? (linux)

joshgura opened this issue · comments

i've set up a miniconda3 to install the requirements, done.

but I'm seeing this error, and it is a very common problem: "GLIBCXX_3.4.30 not found"

File "/home/username/pifuhd/apps/recon.py", line 163, in recon
raise Exception('failed loading state dict!', state_dict_path)
Exception: ('failed loading state dict!', './checkpoints/pifuhd.pt')
MESA-LOADER: failed to open crocus: /home/username/miniconda3/envs/py310/bin/../lib/libstdc++.so.6: version GLIBCXX_3.4.30' not found (required by /usr/lib/dri/crocus_dri.so) (search paths /usr/lib/dri, suffix _dri) failed to load driver: crocus MESA-LOADER: failed to open swrast: /home/username/miniconda3/envs/py310/bin/../lib/libstdc++.so.6: version GLIBCXX_3.4.30' not found (required by /usr/lib/dri/swrast_dri.so) (search paths /usr/lib/dri, suffix _dri)
freeglut (foo): Unable to create OpenGL 1.0 context (flags 0, profile 0)

added the following line to demo.sh

export LD_PRELOAD=/usr/lib64/libstdc++.so.6

seemed to make the glibcxx_3.4.30 go away, but I advanced to the next error, sorry for the TLDR:

Traceback (most recent call last):
File "/home/username/miniconda3/envs/py310/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/username/miniconda3/envs/py310/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/username/pifuhd/apps/simple_test.py", line 30, in
reconWrapper(cmd, args.use_rect)
File "/home/username/pifuhd/apps/recon.py", line 220, in reconWrapper
recon(opt, use_rect)
File "/home/username/pifuhd/apps/recon.py", line 163, in recon
raise Exception('failed loading state dict!', state_dict_path)
Exception: ('failed loading state dict!', './checkpoints/pifuhd.pt')
Traceback (most recent call last):
File "/home/username/miniconda3/envs/py310/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/username/miniconda3/envs/py310/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/username/pifuhd/apps/render_turntable.py", line 69, in
renderer = ColorRender(width=args.width, height=args.height)
File "/home/username/pifuhd/lib/render/gl/color_render.py", line 34, in init
CamRender.init(self, width, height, name, program_files=program_files)
File "/home/username/pifuhd/lib/render/gl/cam_render.py", line 32, in init
Render.init(self, width, height, name, program_files, color_size, ms_rate)
File "/home/username/pifuhd/lib/render/gl/render.py", line 178, in init
glutDisplayFunc(self.display)
File "/home/username/miniconda3/envs/py310/lib/python3.10/site-packages/OpenGL/GLUT/special.py", line 147, in call
contextdata.setValue( self.CONTEXT_DATA_KEY, cCallback )
File "/home/username/miniconda3/envs/py310/lib/python3.10/site-packages/OpenGL/contextdata.py", line 58, in setValue
context = getContext( context )
File "/home/username/miniconda3/envs/py310/lib/python3.10/site-packages/OpenGL/contextdata.py", line 40, in getContext
raise error.Error(
OpenGL.error.Error: Attempt to retrieve context when no valid context

I'm realizing this project is a bit too bleeding edge for me, I'll keep my eyes open to see if there's any progress later.

tried to run the download_trained_model.sh in scripts folder?
if this doesnt work please manually create the folder and download the trained model under https://dl.fbaipublicfiles.com/pifuhd/checkpoints/pifuhd.pt