NVlabs / GLAMR

[CVPR 2022 Oral] Official PyTorch Implementation of "GLAMR: Global Occlusion-Aware Human Mesh Recovery with Dynamic Cameras”.
https://nvlabs.github.io/GLAMR
Other
358 stars 32 forks source link

Running demo causing the mentioned error, any idea to solve the problem ? Thanks in advance #10

Open arakis92 opened 2 years ago

arakis92 commented 2 years ago

moov atom not found out/glamr_dynamic/running/grecon_videos/running_seed1_sbs_all_tmp1.mp4: Invalid data found when processing input

haofanwang commented 2 years ago

Is the source video valid?

arakis92 commented 2 years ago

Yes, source is valid but the issue is inside preprocessing stage, 2d_res folder is empty.

arakis92 commented 2 years ago

The folder of preprocessing (res_2d_images) is full empty which is the cause of blank output. Can you please help ?

Issue

haofanwang commented 2 years ago

Can u check whether video_to_images works well? This function just save image frames. I guess it may be a problem of ffmpeg.

Khrylx commented 2 years ago

I didn't write anything to res_2d_images. Could it be that the package pyvista is not working on your computer? Could you try pyvista's example (https://docs.pyvista.org/examples/02-plot/gif.html?highlight=off_screen) and see whether it works?

arakis92 commented 2 years ago
grid = pv.StructuredGrid(x, y, z)

AttributeError: module 'pyvista' has no attribute 'StructuredGrid'

The error which I am getting while running the example

Khrylx commented 2 years ago

make sure you are using pyvista==0.31.3. Also try to install these:

pip install -e 'git+https://github.com/mmatl/pyopengl.git#egg=pyopengl'

if this doesn't work, could you also try:

# mesa
sudo apt update
sudo wget https://github.com/mmatl/travis_debs/raw/master/xenial/mesa_18.3.3-0.deb
sudo dpkg -i ./mesa_18.3.3-0.deb || true
sudo apt install -f

To check whether pyvista work, you could try this test script:

import pyvista
from pyvista import examples
import numpy as np

# needed for headless rendering
pyvista.start_xvfb()

mesh = examples.download_dragon()
mesh.rotate_x(90)
mesh.rotate_z(120)

###############################################################################
# Using two lights, plot the Stanford Dragon with shadows.
#
# .. Note::
#    VTK has known issues when rendering shadows on certain window
#    sizes.  Be prepared to experiment with the ``window_size``
#    parameter.  An initial window size of ``(1000, 1000)`` seems to
#    work well, which can be manually resized without issue.

light1 = pyvista.Light(position=(0, 0.2, 1.0),
                       focal_point=(0, 0, 0),
                       color=[1, 1.0, 0.9843, 1],  # Color temp. 5400 K
                       intensity=0.3)

light2 = pyvista.Light(position=(0, 1.0, 1.0),
                       focal_point=(0, 0, 0),
                       color=[1, 0.83921, 0.6666, 1],  # Color temp. 2850 K
                       intensity=1)

# Add a thin box below the mesh
bounds = mesh.bounds
rnge = (bounds[1] - bounds[0],
        bounds[3] - bounds[2],
        bounds[5] - bounds[4])

expand = 1.0
height = rnge[2] * 0.05
center = np.array(mesh.center)
center -= [0, 0, mesh.center[2] - bounds[4] + height/2]

width = rnge[0]*(1 + expand)
length = rnge[1]*(1 + expand)
base_mesh = pyvista.Cube(center,
                         width,
                         length,
                         height)

# rotate base and mesh to get a better view
base_mesh.rotate_z(30)
mesh.rotate_z(30)

# create the plotter with custom lighting
pl = pyvista.Plotter(lighting=None, window_size=(3200, 3200), off_screen=True)
pl.add_light(light1)
pl.add_light(light2)
pl.add_mesh(mesh, ambient=0.2, diffuse=0.5, specular=0.5, specular_power=90,
            smooth_shading=True, color='orange')
pl.add_mesh(base_mesh)
pl.enable_shadows()
pl.camera.zoom(1.5)
pl.show(screenshot='shadow.png')

check whether you can get correct shadow.png.

arakis92 commented 2 years ago
  1. I've installed pyvista=0.31.3 (via pip and conda forge) and opengl
  2. Tried with mesa Still I am getting the same error "AttributeError: module 'pyvista' has no attribute 'StructuredGrid'"
haofanwang commented 2 years ago

I cannot re-produce this problem even on my PC.

I just install pyvista via pip install pyvista==0.31.3, everything works fine.

import pyvista
print(pyvista. StructuredGrid)
lucasjinreal commented 2 years ago

@haofanwang I installed 0.31.3, the above test script author provided even can not rung:

pyvista/_vtk.py", line 318, in <module>
    from vtkmodules.vtkFiltersExtraction import (vtkExtractEdges,
ImportError: cannot import name 'vtkExtractEdges' from 'vtkmodules.vtkFiltersExtraction

Is this version work at all? However, 0.36.1 works fine.

haofanwang commented 2 years ago

@jinfagang What's your Python version? I have tested with Python3.7.13 and Python3.9.12, could you try install it in conda environment?

take2rohit commented 12 months ago

See #41 for dependency list .. it will solve all your problem